|
@@ -0,0 +1,28 @@ |
|
|
|
|
|
package implement |
|
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
|
|
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" |
|
|
|
|
|
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" |
|
|
|
|
|
zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_model.git/utils/logx" |
|
|
|
|
|
"xorm.io/xorm" |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
type HappyOrchardSixEnergyBallDb struct { |
|
|
|
|
|
Db *xorm.Engine |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func NewHappyOrchardSixEnergyBallDb(engine *xorm.Engine) dao.HappyOrchardSixEnergyBallDao { |
|
|
|
|
|
return &HappyOrchardSixEnergyBallDb{Db: engine} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (h HappyOrchardSixEnergyBallDb) GetHappyOrchardSixEnergyBall(sess *xorm.Session, uid, signTime, ballId int) (m *models.HappyOrchardSixEnergyBall, err error) { |
|
|
|
|
|
m = new(models.HappyOrchardSixEnergyBall) |
|
|
|
|
|
has, err := sess.Where("uid=? and sign_time=? and ball_id=?", uid, signTime, ballId).Get(m) |
|
|
|
|
|
if err != nil { |
|
|
|
|
|
return nil, zhios_order_relate_logx.Error(err) |
|
|
|
|
|
} |
|
|
|
|
|
if has == false { |
|
|
|
|
|
return nil, nil |
|
|
|
|
|
} |
|
|
|
|
|
return m, nil |
|
|
|
|
|
} |