|
|
@@ -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 happyOrchardUserWatersDb struct { |
|
|
|
Db *xorm.Engine |
|
|
|
} |
|
|
|
|
|
|
|
func NewHappyOrchardUserWatersDb(engine *xorm.Engine) dao.HappyOrchardUserWatersDao { |
|
|
|
return &happyOrchardUserWatersDb{Db: engine} |
|
|
|
} |
|
|
|
|
|
|
|
func (h happyOrchardUserWatersDb) GetHappyOrchardUserWaters(uid int) (m *models.HappyOrchardUserWaters, err error) { |
|
|
|
m = new(models.HappyOrchardUserWaters) |
|
|
|
has, err := h.Db.Where("uid =?", uid).Get(m) |
|
|
|
if err != nil { |
|
|
|
return nil, zhios_order_relate_logx.Error(err) |
|
|
|
} |
|
|
|
if has == false { |
|
|
|
return nil, nil |
|
|
|
} |
|
|
|
return m, nil |
|
|
|
} |