diff --git a/controllers/client/shake_red_envelope.go b/controllers/client/shake_red_envelope.go index d9ef628..4e18c5c 100644 --- a/controllers/client/shake_red_envelope.go +++ b/controllers/client/shake_red_envelope.go @@ -92,11 +92,12 @@ func (t *ShakeRedEnvelopeCtl) Shake() { // 记录红包 ---> 非彩排才能 if activity.RehearsalId == 0 { - result, err := pay_service.SendRedPack("欧轩互动", user.Openid, "红包只会越抢越多", + result, _ := pay_service.SendRedPack("欧轩互动", user.Openid, "红包只会越抢越多", "直播抢红包活动", "抢的多,赚得多", int(record.Amount*100), 1, 2) - if err != nil { - t.ERROR("红包被领完了", code.MSG_SHAKERB_RECORD_NOT_HIT) - } + //t.CheckErr(err) + //if err != nil { + // t.ERROR("红包被领完了", code.MSG_SHAKERB_RECORD_NOT_HIT) + //} record.MchBillno = result.MchBillno models.Update(record.Id, record, "mch_billno") } diff --git a/controllers/pc/activity.go b/controllers/pc/activity.go index 534b794..95da943 100644 --- a/controllers/pc/activity.go +++ b/controllers/pc/activity.go @@ -6,7 +6,6 @@ import ( "hudongzhuanjia/models" "hudongzhuanjia/utils/code" "hudongzhuanjia/utils/define" - "time" ) //活动 @@ -47,14 +46,6 @@ func (t *ActivityCtl) StartActivity() { _, err = models.Add(&rehearsal) t.CheckErr(err) activity.RehearsalId = rehearsal.Id - } else { //非彩排 - arch := &models.Arch{} - count, err := arch.Count(activity.Id) - t.CheckErr(err) - arch.Date = time.Now().Format("2006-01-02") - arch.Name = fmt.Sprintf("第%d场", count) - _, err = models.Update(activity.ArchId, arch, "name", "date") - t.CheckErr(err) } activity.Status = define.StatusRunning diff --git a/go.mod b/go.mod index d3f3784..7c5cdbc 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.12 require ( github.com/360EntSecGroup-Skylar/excelize/v2 v2.0.1 github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 // indirect - github.com/aws/aws-sdk-go v1.33.1 // indirect + github.com/aws/aws-sdk-go v1.33.6 // indirect github.com/chanxuehong/wechat v0.0.0-20200409104612-0a1fd76d7a3a github.com/dgrijalva/jwt-go v3.2.0+incompatible github.com/elazarl/go-bindata-assetfs v1.0.0 // indirect diff --git a/go.sum b/go.sum index 1d08200..7acef39 100644 --- a/go.sum +++ b/go.sum @@ -59,6 +59,8 @@ github.com/aws/aws-sdk-go v1.33.0 h1:Bq5Y6VTLbfnJp1IV8EL/qUU5qO1DYHda/zis/sqevkY github.com/aws/aws-sdk-go v1.33.0/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.33.1 h1:yz9XmNzPshz/lhfAZvLfMnIS9HPo8+boGRcWqDVX+T0= github.com/aws/aws-sdk-go v1.33.1/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= +github.com/aws/aws-sdk-go v1.33.6 h1:YLoUeMSx05kHwhS+HLDSpdYYpPzJMyp6hn1cWsJ6a+U= +github.com/aws/aws-sdk-go v1.33.6/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/bndr/gotabulate v1.1.2 h1:yC9izuZEphojb9r+KYL4W9IJKO/ceIO8HDwxMA24U4c= github.com/bndr/gotabulate v1.1.2/go.mod h1:0+8yUgaPTtLRTjf49E8oju7ojpU11YmXyvq1LbPAb3U= diff --git a/models/activity.go b/models/activity.go index 0baccc8..c71c829 100644 --- a/models/activity.go +++ b/models/activity.go @@ -10,7 +10,6 @@ const ActivityTableName = TableNamePrefix + "activity" type Activity struct { Id int64 `json:"id" xorm:"pk autoincr INT(11)"` CustomerId int64 `json:"customer_id" xorm:"not null default(0) comment('customer_id, 创建客户id') INT(11)"` - ArchId int64 `json:"arch_id" xorm:"not null default 0 comment('归档id') INT(11)"` Services []*ActivityModuleService `json:"services,omitempty" xorm:"-" description:"主活动下的服务"` AreaStores []*AreaStore `json:"area_stores,omitempty" xorm:"-" description:"地区"` BarrageStatus string `json:"barrage_status,omitempty" xorm:"-" description:"弹幕服务状态"` diff --git a/models/arch.go b/models/arch.go deleted file mode 100644 index bddd6c4..0000000 --- a/models/arch.go +++ /dev/null @@ -1,27 +0,0 @@ -package models - -import ( - "github.com/ouxuanserver/osmanthuswine/src/core" - "time" -) - -const ArchTableName = TableNamePrefix + "arch" - -type Arch struct { - Id int `json:"id"` - CustomerId int `json:"customer_id"` - ActivityId int `json:"activity_id"` - Date string `json:"date"` - Name string `json:"name"` - IsDelete int `json:"is_delete"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` -} - -func (t *Arch) TableName() string { - return ArchTableName -} - -func (t *Arch) Count(activityId interface{}) (int64, error) { - return core.GetXormAuto().Where("is_delete=0 and activity_id=?", activityId).Get(t) -} diff --git a/utils/define/config.go b/utils/define/config.go deleted file mode 100644 index e3a4d59..0000000 --- a/utils/define/config.go +++ /dev/null @@ -1,69 +0,0 @@ -package define - -var IsDebugging = true - -func SetDebug(modes ...bool) { - if len(modes) > 0 { - IsDebugging = modes[0] - } else { - IsDebugging = false - } - if IsDebugging { - //RoomPrefix = "test_" - HOST = "https://hdzj.utools.club" - H5Host = "http://ouxuanhudongtest.t.3pr.com.cn/web" - SendUrl = "https://hdzjws.utools.club/PcClient/Ws/MessageCtl/Receive" - } -} - -var ( - SendUrl = "https://api.ouxuanhudong.com:20182/PcClient/Connect/MessageCtl/Receive" - RoomPrefix = "" - HOST = "https://api.ouxuanhudong.com" - H5Host = "https://h5.ouxuanhudong.com/web" -) - -const ( - H5Index = "index.html" - H5SignIn = "SignIn.html" - H5ShakeRb = "shakeRb.html" - H5TugOfWar = "tugOfWar.html" - H5UpperWall = "UpperWall.html" - H5Barrage = "barrage.html" - H5Order = "order.html" - H5Reward = "reward.html" - H5BScreen = "bScreen.html" - H5Auction = "auction.html" - H5Vote = "vote.html" - H5Calorie = "calorie.html" -) - -// 固定长度 -var DefaultOrderNo = 10000000000 - -// 微信常量 -const ( - // 欧轩互动 -> 普通商户 - ApiKey = `2c82c64ceec6ba89ffc9f593c671a12f` - WxAppId = `wx7b0bcf476552c5e9` - Secret = `f6aabdd40ea25272f4442603a7dc8028` - AppId = `wx7b0bcf476552c5e9` - MchId = `1394404502` - SubMchId = `` - - // 欧轩 -> 服务商 - //ApiKey = `6e281c8b5430c674034594cab789334F` - //AppId = `wx662a1633304bfd42` - //WxAppId = `wx662a1633304bfd42` - //Secret = `7e4ecfe06ad1e075c210059d5b0162a3` - //MchId = `1441266702` - //SubMchId = `1394404502` - //SubMchId = `1594049151` - // 认证服务号:欧轩(用于申请微信服务商) - // AppID:wx662a1633304bfd42 - // 密钥:7e4ecfe06ad1e075c210059d5b0162a3 - - WxHost = `https://api.mch.weixin.qq.com` - WxBack = `https://api2.mch.weixin.qq.com` - ClientIp = `123.207.246.51` -)