master
howell 4 years ago
parent 0c951a2cd8
commit b6061ca1c7

@ -266,7 +266,7 @@ func MobileRegister(c *gin.Context) {
}
// 从手机注册时用户邀请码默认为id时6的用户邀请码为NXR0L3
p.InvitationNo = "NXR0L3"
// p.InvitationNo = "NXR0L3"
// 根据 不同的码 去调用不同的 下级规则
// 获取用户角色等级

@ -1,10 +1,11 @@
package user
import (
"git.oa00.com/go/mysql"
"github.com/shopspring/decimal"
"recook/internal/model/order"
"recook/internal/v2/model/recook/user"
"git.oa00.com/go/mysql"
"github.com/shopspring/decimal"
)
var IncomeLogic = &incomeLogic{}
@ -67,7 +68,7 @@ func (i *incomeLogic) Profit(userID uint) (res Profit) {
res.ECount4 += 1
res.EAmount4 = res.EAmount4.Add(v.Income)
}
res.Total = res.Total.Add(v.Income)
res.ETotal = res.ETotal.Add(v.Income)
case 2:
switch v.Type {
case 1:
@ -83,7 +84,7 @@ func (i *incomeLogic) Profit(userID uint) (res Profit) {
res.Count4 += 1
res.Amount4 = res.EAmount4.Add(v.Income)
}
res.ETotal = res.ETotal.Add(v.Income)
res.Total = res.ETotal.Add(v.Income)
}
}
return

@ -69,7 +69,7 @@ func (b *brandLogic) Create(userId uint, brandType int, name string, logo string
enterpriseState := gysEnterpriseStateModel.FindByUserId(userId)
if enterpriseState.Id <= 0 {
return errors.New("网络异常")
return errors.New("网络异常1")
}
if enterpriseState.State != enterprise.GysEnterpriseStateSuc {
return errors.New("请先进行资料审核处理")
@ -98,7 +98,7 @@ func (b *brandLogic) Create(userId uint, brandType int, name string, logo string
gysEnterpriseBrandModel.SetDb(tx)
gysEnterpriseBrandModel.Create(&gysEnterpriseBrandModel)
if gysEnterpriseBrandModel.Id <= 0 {
return errors.New("网络异常")
return errors.New("网络异常2")
}
var images []enterprise.GysEnterpriseImgModel
imgType := enterprise.GysEnterpriseImgTypeReg
@ -111,7 +111,7 @@ func (b *brandLogic) Create(userId uint, brandType int, name string, logo string
BrandId: gysEnterpriseBrandModel.Id,
Type: imgType,
Url: url.Url,
Start: formatime.NewSecondFrom(time.Time(url.Start)),
Start: formatime.NewSecondNow(),
End: formatime.NewSecondFrom(time.Time(url.End)),
})
}
@ -120,7 +120,7 @@ func (b *brandLogic) Create(userId uint, brandType int, name string, logo string
BrandId: gysEnterpriseBrandModel.Id,
Type: enterprise.GysEnterpriseImgTypeRecook,
Url: url.Url,
Start: formatime.NewSecondFrom(time.Time(url.Start)),
Start: formatime.NewSecondNow(),
End: formatime.NewSecondFrom(time.Time(url.End)),
})
}
@ -129,7 +129,7 @@ func (b *brandLogic) Create(userId uint, brandType int, name string, logo string
BrandId: gysEnterpriseBrandModel.Id,
Type: enterprise.GysEnterpriseImgTypeOther,
Url: url.Url,
Start: formatime.NewSecondFrom(time.Time(url.Start)),
Start: formatime.NewSecondNow(),
End: formatime.NewSecondFrom(time.Time(url.End)),
})
}
@ -137,7 +137,7 @@ func (b *brandLogic) Create(userId uint, brandType int, name string, logo string
gysEnterpriseImgModel.SetDb(tx)
row := gysEnterpriseImgModel.CreateAll(&images)
if int(row) != len(images) {
return errors.New("网络异常")
return errors.New("网络异常3")
}
return nil
}); err != nil {

Loading…
Cancel
Save