|
|
@@ -1,36 +0,0 @@ |
|
|
|
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 HappyOrchardUserSeedRecordDb struct { |
|
|
|
Db *xorm.Engine |
|
|
|
} |
|
|
|
|
|
|
|
func (h HappyOrchardUserSeedRecordDb) GetHappyOrchardUserSeedRecord(id int) (m *models.HappyOrchardUserSeedRecord, err error) { |
|
|
|
m = new(models.HappyOrchardUserSeedRecord) |
|
|
|
has, err := h.Db.Where("id =?", id).Get(m) |
|
|
|
if err != nil { |
|
|
|
return nil, zhios_order_relate_logx.Error(err) |
|
|
|
} |
|
|
|
if has == false { |
|
|
|
return nil, nil |
|
|
|
} |
|
|
|
return m, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (h HappyOrchardUserSeedRecordDb) FindHappyOrchardUserSeedRecordsByUid(uid int) (mm *[]models.HappyOrchardUserSeedRecord, err error) { |
|
|
|
var m []models.HappyOrchardUserSeedRecord |
|
|
|
if err := h.Db.Where("uid =?", uid).Desc("id").Find(&m); err != nil { |
|
|
|
return nil, zhios_order_relate_logx.Error(err) |
|
|
|
} |
|
|
|
return &m, nil |
|
|
|
} |
|
|
|
|
|
|
|
func NewHappyOrchardUserSeedRecordDb(engine *xorm.Engine) dao.HappyOrchardUserSeedRecordDao { |
|
|
|
return &HappyOrchardUserSeedRecordDb{Db: engine} |
|
|
|
} |