|
|
@@ -7,15 +7,15 @@ import ( |
|
|
|
"xorm.io/xorm" |
|
|
|
) |
|
|
|
|
|
|
|
type happyOrchardRewardExchangeRecordsDao struct { |
|
|
|
type happyOrchardRewardExchangeRecordsDb struct { |
|
|
|
Db *xorm.Engine |
|
|
|
} |
|
|
|
|
|
|
|
func NewHappyOrchardRewardExchangeRecordsDao(engine *xorm.Engine) dao.HappyOrchardRewardExchangeRecordsDao { |
|
|
|
return &happyOrchardRewardExchangeRecordsDao{Db: engine} |
|
|
|
func NewHappyOrchardRewardExchangeRecordsDb(engine *xorm.Engine) dao.HappyOrchardRewardExchangeRecordsDao { |
|
|
|
return &happyOrchardRewardExchangeRecordsDb{Db: engine} |
|
|
|
} |
|
|
|
|
|
|
|
func (h happyOrchardRewardExchangeRecordsDao) GetHappyOrchardRewardExchangeRecords(id int) (m *models.HappyOrchardRewardExchangeRecords, err error) { |
|
|
|
func (h happyOrchardRewardExchangeRecordsDb) GetHappyOrchardRewardExchangeRecords(id int) (m *models.HappyOrchardRewardExchangeRecords, err error) { |
|
|
|
//TODO implement me |
|
|
|
m = new(models.HappyOrchardRewardExchangeRecords) |
|
|
|
has, err := h.Db.Where("id =?", id).Get(m) |
|
|
@@ -28,7 +28,7 @@ func (h happyOrchardRewardExchangeRecordsDao) GetHappyOrchardRewardExchangeRecor |
|
|
|
return m, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (h happyOrchardRewardExchangeRecordsDao) FindHappyOrchardRewardExchangeRecordsByUid(uid int) (mm *[]models.HappyOrchardRewardExchangeRecords, err error) { |
|
|
|
func (h happyOrchardRewardExchangeRecordsDb) FindHappyOrchardRewardExchangeRecordsByUid(uid int) (mm *[]models.HappyOrchardRewardExchangeRecords, err error) { |
|
|
|
//TODO implement me |
|
|
|
var m []models.HappyOrchardRewardExchangeRecords |
|
|
|
if err := h.Db.Where("uid =?", uid).Desc("id").Find(&m); err != nil { |