@@ -0,0 +1,5 @@ | |||||
package dao | |||||
type AlipayUserInfoDao interface { | |||||
//TODO:: You can add specific method definitions here | |||||
} |
@@ -3,7 +3,6 @@ | |||||
import "code.fnuoos.com/EggPlanet/egg_models.git/src/model" | import "code.fnuoos.com/EggPlanet/egg_models.git/src/model" | ||||
type ImGroupBatchSendMessageRecordsDao interface { | type ImGroupBatchSendMessageRecordsDao interface { | ||||
//TODO:: You can add specific method definitions here | |||||
ImGroupBatchSendMessageRecordsInsert(m *model.ImGroupBatchSendMessageRecords) (int, error) | ImGroupBatchSendMessageRecordsInsert(m *model.ImGroupBatchSendMessageRecords) (int, error) | ||||
ImGroupBatchSendMessageRecordsUpdate(id interface{}, m *model.ImGroupBatchSendMessageRecords, forceColumns ...string) (int64, error) | |||||
ImGroupBatchSendMessageRecordsUpdate(id interface{}, m *model.ImGroupBatchSendMessageRecords, forceColums ...string) (int64, error) | |||||
} | } |
@@ -3,7 +3,6 @@ | |||||
import "code.fnuoos.com/EggPlanet/egg_models.git/src/model" | import "code.fnuoos.com/EggPlanet/egg_models.git/src/model" | ||||
type ImUserBatchSendMessageRecordsDao interface { | type ImUserBatchSendMessageRecordsDao interface { | ||||
//TODO:: You can add specific method definitions here | |||||
ImUserBatchSendMessageRecordsInsert(m *model.ImUserBatchSendMessageRecords) (int, error) | ImUserBatchSendMessageRecordsInsert(m *model.ImUserBatchSendMessageRecords) (int, error) | ||||
ImUserBatchSendMessageRecordsUpdate(id interface{}, m *model.ImUserBatchSendMessageRecords, forceColumns ...string) (int64, error) | |||||
ImUserBatchSendMessageRecordsUpdate(id interface{}, m *model.ImUserBatchSendMessageRecords, forceColums ...string) (int64, error) | |||||
} | } |
@@ -1,4 +1,4 @@ | |||||
package dao | |||||
package dao | |||||
import "code.fnuoos.com/EggPlanet/egg_models.git/src/model" | import "code.fnuoos.com/EggPlanet/egg_models.git/src/model" | ||||
@@ -1,4 +1,4 @@ | |||||
package dao | |||||
package dao | |||||
import "code.fnuoos.com/EggPlanet/egg_models.git/src/model" | import "code.fnuoos.com/EggPlanet/egg_models.git/src/model" | ||||
@@ -1,4 +1,4 @@ | |||||
package dao | |||||
package dao | |||||
import "code.fnuoos.com/EggPlanet/egg_models.git/src/model" | import "code.fnuoos.com/EggPlanet/egg_models.git/src/model" | ||||
@@ -0,0 +1,14 @@ | |||||
package implement | |||||
import ( | |||||
"code.fnuoos.com/EggPlanet/egg_models.git/src/dao" | |||||
"xorm.io/xorm" | |||||
) | |||||
func NewAlipayUserInfoDb(engine *xorm.Engine) dao.AlipayUserInfoDao { | |||||
return &AlipayUserInfoDb{Db: engine} | |||||
} | |||||
type AlipayUserInfoDb struct { | |||||
Db *xorm.Engine | |||||
} |
@@ -1,4 +1,4 @@ | |||||
package implement | |||||
package implement | |||||
import ( | import ( | ||||
"code.fnuoos.com/EggPlanet/egg_models.git/src/dao" | "code.fnuoos.com/EggPlanet/egg_models.git/src/dao" | ||||
@@ -3,6 +3,7 @@ | |||||
import ( | import ( | ||||
"code.fnuoos.com/EggPlanet/egg_models.git/src/dao" | "code.fnuoos.com/EggPlanet/egg_models.git/src/dao" | ||||
"code.fnuoos.com/EggPlanet/egg_models.git/src/model" | "code.fnuoos.com/EggPlanet/egg_models.git/src/model" | ||||
zhios_order_relate_logx "code.fnuoos.com/EggPlanet/egg_models.git/utils/logx" | |||||
"xorm.io/xorm" | "xorm.io/xorm" | ||||
) | ) | ||||
@@ -17,23 +18,23 @@ type ImUserBatchSendMessageRecordsDb struct { | |||||
func (i ImUserBatchSendMessageRecordsDb) ImUserBatchSendMessageRecordsInsert(m *model.ImUserBatchSendMessageRecords) (int, error) { | func (i ImUserBatchSendMessageRecordsDb) ImUserBatchSendMessageRecordsInsert(m *model.ImUserBatchSendMessageRecords) (int, error) { | ||||
_, err := i.Db.InsertOne(m) | _, err := i.Db.InsertOne(m) | ||||
if err != nil { | if err != nil { | ||||
return 0, err | |||||
return 0, zhios_order_relate_logx.Error(err) | |||||
} | } | ||||
return m.Id, nil | return m.Id, nil | ||||
} | } | ||||
func (i ImUserBatchSendMessageRecordsDb) ImUserBatchSendMessageRecordsUpdate(id interface{}, m *model.ImUserBatchSendMessageRecords, forceColumns ...string) (int64, error) { | |||||
func (i ImUserBatchSendMessageRecordsDb) ImUserBatchSendMessageRecordsUpdate(id interface{}, m *model.ImUserBatchSendMessageRecords, forceColums ...string) (int64, error) { | |||||
var ( | var ( | ||||
affected int64 | affected int64 | ||||
err error | err error | ||||
) | ) | ||||
if forceColumns != nil { | |||||
affected, err = i.Db.Where("id=?", id).MustCols(forceColumns...).Update(m) | |||||
if forceColums != nil { | |||||
affected, err = i.Db.Where("id=?", id).MustCols(forceColums...).Update(m) | |||||
} else { | } else { | ||||
affected, err = i.Db.Where("id=?", id).Update(m) | affected, err = i.Db.Where("id=?", id).Update(m) | ||||
} | } | ||||
if err != nil { | if err != nil { | ||||
return 0, err | |||||
return 0, zhios_order_relate_logx.Error(err) | |||||
} | } | ||||
return affected, nil | return affected, nil | ||||
} | } |
@@ -1,4 +1,4 @@ | |||||
package implement | |||||
package implement | |||||
import ( | import ( | ||||
"code.fnuoos.com/EggPlanet/egg_models.git/src/dao" | "code.fnuoos.com/EggPlanet/egg_models.git/src/dao" | ||||
@@ -1,4 +1,4 @@ | |||||
package implement | |||||
package implement | |||||
import ( | import ( | ||||
"code.fnuoos.com/EggPlanet/egg_models.git/src/dao" | "code.fnuoos.com/EggPlanet/egg_models.git/src/dao" | ||||
@@ -1,4 +1,4 @@ | |||||
package implement | |||||
package implement | |||||
import ( | import ( | ||||
"code.fnuoos.com/EggPlanet/egg_models.git/src/dao" | "code.fnuoos.com/EggPlanet/egg_models.git/src/dao" | ||||
@@ -0,0 +1,12 @@ | |||||
package model | |||||
type AlipayUserInfo struct { | |||||
Id int `json:"id" xorm:"not null pk autoincr INT(11)"` | |||||
Uid int64 `json:"uid" xorm:"not null comment('用户id') BIGINT(20)"` | |||||
UserId string `json:"user_id" xorm:"not null default '' comment('支付宝用户id') CHAR(100)"` | |||||
OpenId string `json:"open_id" xorm:"not null default '' comment('支付宝用户open_id') CHAR(100)"` | |||||
AppId string `json:"app_id" xorm:"not null default '' comment('支付宝商户应用appid') CHAR(50)"` | |||||
Ext string `json:"ext" xorm:"not null comment('拓展字段') TEXT"` | |||||
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"` | |||||
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"` | |||||
} |