diff --git a/src/dao/alipay_user_info_dao.go b/src/dao/alipay_user_info_dao.go new file mode 100644 index 0000000..e8eb227 --- /dev/null +++ b/src/dao/alipay_user_info_dao.go @@ -0,0 +1,5 @@ +package dao + +type AlipayUserInfoDao interface { + //TODO:: You can add specific method definitions here +} diff --git a/src/dao/im_group_batch_send_message_records_dao.go b/src/dao/im_group_batch_send_message_records_dao.go index 2631a65..6a17701 100644 --- a/src/dao/im_group_batch_send_message_records_dao.go +++ b/src/dao/im_group_batch_send_message_records_dao.go @@ -3,7 +3,6 @@ import "code.fnuoos.com/EggPlanet/egg_models.git/src/model" type ImGroupBatchSendMessageRecordsDao interface { - //TODO:: You can add specific method definitions here 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) } diff --git a/src/dao/im_user_batch_send_message_records_dao.go b/src/dao/im_user_batch_send_message_records_dao.go index 54750d7..50306c3 100644 --- a/src/dao/im_user_batch_send_message_records_dao.go +++ b/src/dao/im_user_batch_send_message_records_dao.go @@ -3,7 +3,6 @@ import "code.fnuoos.com/EggPlanet/egg_models.git/src/model" type ImUserBatchSendMessageRecordsDao interface { - //TODO:: You can add specific method definitions here 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) } diff --git a/src/dao/platform_active_data_dao.go b/src/dao/platform_active_data_dao.go index 72301de..b70ad1b 100644 --- a/src/dao/platform_active_data_dao.go +++ b/src/dao/platform_active_data_dao.go @@ -1,4 +1,4 @@ -package dao +package dao import "code.fnuoos.com/EggPlanet/egg_models.git/src/model" diff --git a/src/dao/platform_grow_data_dao.go b/src/dao/platform_grow_data_dao.go index b8fd015..bccdfe2 100644 --- a/src/dao/platform_grow_data_dao.go +++ b/src/dao/platform_grow_data_dao.go @@ -1,4 +1,4 @@ -package dao +package dao import "code.fnuoos.com/EggPlanet/egg_models.git/src/model" diff --git a/src/dao/platform_total_data_dao.go b/src/dao/platform_total_data_dao.go index a71ff89..4431d48 100644 --- a/src/dao/platform_total_data_dao.go +++ b/src/dao/platform_total_data_dao.go @@ -1,4 +1,4 @@ -package dao +package dao import "code.fnuoos.com/EggPlanet/egg_models.git/src/model" diff --git a/src/implement/alipay_user_info_implement.go b/src/implement/alipay_user_info_implement.go new file mode 100644 index 0000000..c301179 --- /dev/null +++ b/src/implement/alipay_user_info_implement.go @@ -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 +} diff --git a/src/implement/im_group_batch_send_message_records_implement.go b/src/implement/im_group_batch_send_message_records_implement.go index 9edcd58..42db42a 100644 --- a/src/implement/im_group_batch_send_message_records_implement.go +++ b/src/implement/im_group_batch_send_message_records_implement.go @@ -1,4 +1,4 @@ -package implement +package implement import ( "code.fnuoos.com/EggPlanet/egg_models.git/src/dao" diff --git a/src/implement/im_user_batch_send_message_records_implement.go b/src/implement/im_user_batch_send_message_records_implement.go index 8bc1c68..9bdfa55 100644 --- a/src/implement/im_user_batch_send_message_records_implement.go +++ b/src/implement/im_user_batch_send_message_records_implement.go @@ -3,6 +3,7 @@ import ( "code.fnuoos.com/EggPlanet/egg_models.git/src/dao" "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" ) @@ -17,23 +18,23 @@ type ImUserBatchSendMessageRecordsDb struct { func (i ImUserBatchSendMessageRecordsDb) ImUserBatchSendMessageRecordsInsert(m *model.ImUserBatchSendMessageRecords) (int, error) { _, err := i.Db.InsertOne(m) if err != nil { - return 0, err + return 0, zhios_order_relate_logx.Error(err) } 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 ( affected int64 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 { affected, err = i.Db.Where("id=?", id).Update(m) } if err != nil { - return 0, err + return 0, zhios_order_relate_logx.Error(err) } return affected, nil } diff --git a/src/implement/platform_active_data_implement.go b/src/implement/platform_active_data_implement.go index 1679592..24022e6 100644 --- a/src/implement/platform_active_data_implement.go +++ b/src/implement/platform_active_data_implement.go @@ -1,4 +1,4 @@ -package implement +package implement import ( "code.fnuoos.com/EggPlanet/egg_models.git/src/dao" diff --git a/src/implement/platform_grow_data_implement.go b/src/implement/platform_grow_data_implement.go index e3634a8..837584e 100644 --- a/src/implement/platform_grow_data_implement.go +++ b/src/implement/platform_grow_data_implement.go @@ -1,4 +1,4 @@ -package implement +package implement import ( "code.fnuoos.com/EggPlanet/egg_models.git/src/dao" diff --git a/src/implement/platform_total_data_implement.go b/src/implement/platform_total_data_implement.go index 3db6e13..aa59dba 100644 --- a/src/implement/platform_total_data_implement.go +++ b/src/implement/platform_total_data_implement.go @@ -1,4 +1,4 @@ -package implement +package implement import ( "code.fnuoos.com/EggPlanet/egg_models.git/src/dao" diff --git a/src/model/alipay_user_info.go b/src/model/alipay_user_info.go new file mode 100644 index 0000000..c039eac --- /dev/null +++ b/src/model/alipay_user_info.go @@ -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"` +}