Ver a proveniência

update

master
dengbiao há 7 meses
ascendente
cometimento
29375a2022
2 ficheiros alterados com 15 adições e 2 eliminações
  1. +1
    -0
      md/mq.go
  2. +14
    -2
      rule/one_circles/one_circles_sign_in_green_energy_settlement.go

+ 1
- 0
md/mq.go Ver ficheiro

@@ -14,6 +14,7 @@ type OneCirclesStructForSignIn struct {
MasterId string `json:"master_id"`
Uid int `json:"uid"`
Id int64 `json:"id"`
EndTime string `json:"end_time"`
}

type OneCirclesStructForAutoExchangeGreenEnergy struct {


+ 14
- 2
rule/one_circles/one_circles_sign_in_green_energy_settlement.go Ver ficheiro

@@ -54,6 +54,7 @@ func SettlementSignInGreenEnergy(engine *xorm.Engine, masterId string, ch *rabbi
MasterId: masterId,
Uid: v.Uid,
Id: v.Id,
EndTime: v.EndTime,
}, md.OneCirclesRoutKeyForSignIn)
ids = append(ids, v.Id)
}
@@ -70,7 +71,18 @@ func SettlementSignInGreenEnergy(engine *xorm.Engine, masterId string, ch *rabbi
return
}

func HandleSettlementSignInGreenEnergy(engine *xorm.Engine, masterId string, id int64, uid int) (err error) {
func HandleSettlementSignInGreenEnergy(engine *xorm.Engine, masterId string, id int64, uid int, endTime string) (err error) {
//var signRecord model.OneCirclesGreenEnergySignIn
//has, err00000 := engine.Where("id =?", id).Get(&signRecord)
//if err00000 != nil {
// fmt.Println("err:::::0000000", err00000)
// return err00000
//}
//if !has {
// //不活跃不需要奖励
// return errors.New("未查询到对应记录")
//}

//1、查找 `one_circles_green_energy_basic_setting` 基础设置
oneCirclesGreenEnergyBasicSetting, cb, err := svc.GetPrice(engine, masterId)
if err != nil {
@@ -147,7 +159,7 @@ func HandleSettlementSignInGreenEnergy(engine *xorm.Engine, masterId string, id
}
//TODO::判断是否活跃
var m model.OneCirclesGreenEnergySignIn
has, err3333333 := engine.Where("uid =?", relate.ParentUid).And("end_time >=?", time.Now().Format("2006-01-02 15:04:05")).Get(&m)
has, err3333333 := engine.Where("uid =?", relate.ParentUid).And("end_time >=?", endTime).Get(&m)
if err3333333 != nil {
_ = session.Rollback()
fmt.Println("err:::::3333333", err3333333)


Carregando…
Cancelar
Guardar