|
@@ -88,6 +88,19 @@ func (m *ClientActiveDrawLog) GetClientActiveDrawLogListById() (ClientActiveDraw
|
|
|
return doc, nil
|
|
|
}
|
|
|
|
|
|
+func (m *ClientActiveDrawLog) GetClientActiveDrawLogListByOpenIdAndId() (ClientActiveDrawLog, error) {
|
|
|
+ var doc ClientActiveDrawLog
|
|
|
+
|
|
|
+ table := orm.ShMysql.Table(m.TableName())
|
|
|
+
|
|
|
+ table = table.Where("id = ? and client_open_id = ?", m.ID, m.ClientOpenID)
|
|
|
+ if err := table.Select("*").Order("id desc").First(&doc).Error; err != nil {
|
|
|
+ return doc, err
|
|
|
+ }
|
|
|
+
|
|
|
+ return doc, nil
|
|
|
+}
|
|
|
+
|
|
|
func (m *ClientActiveDrawLog) UpdateDrawPrize() error {
|
|
|
|
|
|
if err := orm.ShMysql.Table(m.TableName()).Model(&m).Where("id = ? ", m.ID).Updates(
|