huangjiajun il y a 1 mois
Parent
révision
7eff77ed4b
4 fichiers modifiés avec 11 ajouts et 10 suppressions
  1. +2
    -2
      app/agent/svc/svc_store.go
  2. +3
    -3
      app/db/model/community_team_store_withdraw_apply.go
  3. +5
    -4
      app/store/hdl/hdl_store.go
  4. +1
    -1
      app/store/svc/svc_login.go

+ 2
- 2
app/agent/svc/svc_store.go Voir le fichier

@@ -30,7 +30,7 @@ func StoreWithdrawFlow(c *gin.Context) {
name = store.Name
}
tmp := map[string]string{
"id": utils.Int64ToStr(v.Id),
"id": utils.IntToStr(v.Id),
"name": name,
"amount": v.Amount,
"alipay_account": v.WithdrawAccount,
@@ -41,7 +41,7 @@ func StoreWithdrawFlow(c *gin.Context) {
"end_time": "",
"memo": v.Memo,
}
if v.PaymentDate != "" {
if v.PaymentDate != "" && v.PaymentDate != "0000-00-00 00:00:00" {
tmp["end_time"] = v.PaymentDate
}
list = append(list, tmp)


+ 3
- 3
app/db/model/community_team_store_withdraw_apply.go Voir le fichier

@@ -5,12 +5,11 @@ import (
)

type CommunityTeamStoreWithdrawApply struct {
Id int64 `json:"id" xorm:"pk autoincr BIGINT(20)"`
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
Uid int `json:"uid" xorm:"not null default 0 comment('用户ID') index INT(10)"`
Amount string `json:"amount" xorm:"not null default 0.00 comment('提现金额') DECIMAL(10,2)"`
Memo string `json:"memo" xorm:"not null default '' comment('备注,失败请备注原因') VARCHAR(500)"`
Type int `json:"type" xorm:"not null default 1 comment('提现类型;1:手动;2:自动') TINYINT(1)"`
ParentUid int `json:"parent_uid" xorm:"not null default 1 comment('提现类型;1:手动;2:自动') TINYINT(1)"`
WithdrawAccount string `json:"withdraw_account" xorm:"not null default '' comment('提现账号') VARCHAR(64)"`
WithdrawName string `json:"withdraw_name" xorm:"not null default '' comment('提现人姓名') VARCHAR(12)"`
Reason int `json:"reason" xorm:"not null default 0 comment('审核失败(驳回理由);1:当前账号不满足提现规则;2:账号异常;3:资金异常') TINYINT(1)"`
@@ -18,6 +17,7 @@ type CommunityTeamStoreWithdrawApply struct {
CreateAt time.Time `json:"create_at" xorm:"not null default CURRENT_TIMESTAMP comment('申请时间') index TIMESTAMP"`
UpdateAt time.Time `json:"update_at" xorm:"not null default CURRENT_TIMESTAMP comment('处理时间') TIMESTAMP"`
State int `json:"state" xorm:"not null default 0 comment('0申请中,1通过,2完成,3失败') TINYINT(1)"`
Oid int64 `json:"oid" xorm:"not null default 0 comment('0申请中,1通过,2完成,3失败') TINYINT(1)"`
Platform string `json:"platform" xorm:"VARCHAR(255)"`
ParentUid int `json:"parent_uid" xorm:"default 0 INT(11)"`
Oid int64 `json:"oid" xorm:"BIGINT(20)"`
}

+ 5
- 4
app/store/hdl/hdl_store.go Voir le fichier

@@ -314,7 +314,7 @@ func UserStoreInfoSet(c *gin.Context) {
store := db.GetStoreIdEg(svc.MasterDb(c), utils.IntToStr(user.Info.Uid))
if store == nil {
store = &model.CommunityTeamStore{
Uid: int(utils.AnyToInt64(arg["uid"])),
Uid: user.Info.Uid,
CreateAt: time.Now(),
UpdateAt: time.Now(),
State: 1,
@@ -373,8 +373,8 @@ func UserStoreBanner(c *gin.Context) {
e.OutErr(c, e.ERR_INVALID_ARGS, err)
return
}
uid := utils.StrToInt(arg["uid"])
user := svc.GetUser(c)
uid := user.Info.Uid
activity := db.GetUserStoreActivity(svc.MasterDb(c), arg["type"], uid)
data := make([]map[string]string, 0)
if activity != nil {
@@ -434,10 +434,11 @@ func UserStoreBannerSave(c *gin.Context) {
return
}

user := svc.GetUser(c)
data := model.UserStoreActivity{}
if arg["id"] == "" {
data = model.UserStoreActivity{
Uid: utils.StrToInt(arg["uid"]),
Uid: user.Info.Uid,
Type: arg["type"],
Time: time.Now(),
}


+ 1
- 1
app/store/svc/svc_login.go Voir le fichier

@@ -391,7 +391,7 @@ func Sms(c *gin.Context) {
}
user := svc.GetUser(c)
req["phone"] = user.Info.Phone
types := "bind_alipay"
types := req["type"]
var err error
smsType := svc.SysCfgGet(c, "sms_type")
c.Set("sms_type", smsType)


Chargement…
Annuler
Enregistrer