|
@@ -17,7 +17,7 @@ func (r *RaffleInfo) PointConsume(cost int64) (err error) {
|
|
|
endData = time.Now().AddDate(1, 0, 0).Format(date.Date_Short_Layout)
|
|
|
abstract = fmt.Sprintf("抽奖活动消费剑鱼币-%d", common.If(cost > 0, cost, r.DLai.Cost).(int64))
|
|
|
)
|
|
|
- res, err_ := config.Middleground.JyPoints.PointConsume(r.UserInfo.UserId, consts.AppId, endData, strconv.FormatInt(consts.PointTypeConsume, 10), abstract, common.If(cost > 0, cost, r.DLai.Cost).(int64), consts.PointTypeConsume, false)
|
|
|
+ res, err_ := config.Middleground.JyPoints.PointConsume(r.UserInfo.UserId, consts.AppId, endData, strconv.FormatInt(consts.PointTypeConsume, 10), abstract, cost, consts.PointTypeConsume, false)
|
|
|
if err_ != nil {
|
|
|
err = err_
|
|
|
return
|
|
@@ -27,12 +27,18 @@ func (r *RaffleInfo) PointConsume(cost int64) (err error) {
|
|
|
}
|
|
|
|
|
|
// 积分新增
|
|
|
-func (r *RaffleInfo) PointHarvest() (err error) {
|
|
|
+func (r *RaffleInfo) PointHarvest(coin int64) (err error) {
|
|
|
+ if coin == 0 {
|
|
|
+ coin = common.Int64All(r.Prize.JyPrize)
|
|
|
+ }
|
|
|
var (
|
|
|
endData = time.Now().AddDate(1, 0, 0).Format(date.Date_Short_Layout)
|
|
|
- abstract = fmt.Sprintf("抽奖活动奖品剑鱼币+%r", r.DLai.Cost)
|
|
|
+ abstract = fmt.Sprintf("抽奖活动奖品剑鱼币+%d", coin)
|
|
|
)
|
|
|
- res, err_ := config.Middleground.JyPoints.PointHarvest(r.UserInfo.UserId, consts.AppId, endData, strconv.FormatInt(consts.PointTypeHarvest, 10), abstract, common.Int64All(r.Prize.JyPrize), consts.PointTypeHarvest, false)
|
|
|
+ if coin == r.DLai.Cost {
|
|
|
+ abstract = fmt.Sprintf("抽奖活动+%d", coin)
|
|
|
+ }
|
|
|
+ res, err_ := config.Middleground.JyPoints.PointHarvest(r.UserInfo.UserId, consts.AppId, endData, strconv.FormatInt(consts.PointTypeHarvest, 10), abstract, coin, consts.PointTypeHarvest, false)
|
|
|
if err_ != nil {
|
|
|
err = err_
|
|
|
return
|