fix:
This commit is contained in:
parent
3670b91603
commit
ceea1518e0
|
@ -164,6 +164,26 @@ func InitDBProd() {
|
||||||
//&UserAttendance{},
|
//&UserAttendance{},
|
||||||
//&UserAttendanceRecord{},
|
//&UserAttendanceRecord{},
|
||||||
|
|
||||||
|
&Store{},
|
||||||
|
&GameCard{},
|
||||||
|
&GameCardGoods{},
|
||||||
|
&GameCardGoodsStock{},
|
||||||
|
&User{},
|
||||||
|
&Order{},
|
||||||
|
&OrderCard{},
|
||||||
|
|
||||||
|
&OperationLog{},
|
||||||
|
&CooperativeBusiness{},
|
||||||
|
&CooperativeMemberDeduct{},
|
||||||
|
&CooperativeAssistantMemberDeduct{},
|
||||||
|
|
||||||
|
&CooperativeMemberPromotion{},
|
||||||
|
&CooperativeMemberPromotionStore{},
|
||||||
|
&CooperativeMemberPromotionDay{},
|
||||||
|
&CooperativeMemberPromotionStoreDay{},
|
||||||
|
&InviteMemberReport{},
|
||||||
|
&CooperativeDeductSettle{},
|
||||||
|
&XcxRole{},
|
||||||
)
|
)
|
||||||
|
|
||||||
if err := DBProd.DB().Ping(); err != nil {
|
if err := DBProd.DB().Ping(); err != nil {
|
||||||
|
@ -1165,3 +1185,33 @@ func TestAddCooperativeMemberPromotion(t *testing.T) {
|
||||||
DB = DBDev
|
DB = DBDev
|
||||||
AddCooperativeMemberPromotion(4, 20, 68608411, 2)
|
AddCooperativeMemberPromotion(4, 20, 68608411, 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestUpdateCooperativeBusiness(t *testing.T) {
|
||||||
|
//InitTestDB()
|
||||||
|
//DB = DBDev
|
||||||
|
InitDBProd()
|
||||||
|
DB = DBProd
|
||||||
|
|
||||||
|
//var list []GameCardGoods
|
||||||
|
//err := DB.Table("game_card").Find(&list).Error
|
||||||
|
//if err != nil {
|
||||||
|
// fmt.Println("err:", err)
|
||||||
|
//}
|
||||||
|
//storeMap := GetAllStoreMap()
|
||||||
|
chendu := []uint32{15, 17, 20, 21}
|
||||||
|
chongqin := []uint32{12, 16}
|
||||||
|
diwei := []uint32{13, 14, 18, 19, 23, 24, 25}
|
||||||
|
DB.Table("user").Where("store_id in (?)", chendu).Updates(map[string]interface{}{
|
||||||
|
"cooperative_business_id": 2,
|
||||||
|
"cooperative_name": "成都合作商",
|
||||||
|
})
|
||||||
|
DB.Table("user").Where("store_id in (?)", chongqin).Updates(map[string]interface{}{
|
||||||
|
"cooperative_business_id": 3,
|
||||||
|
"cooperative_name": "重庆合作商",
|
||||||
|
})
|
||||||
|
DB.Table("user").Where("store_id in (?)", diwei).Updates(map[string]interface{}{
|
||||||
|
"cooperative_business_id": 1,
|
||||||
|
"cooperative_name": "迪为合作商",
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -277,18 +277,18 @@ const (
|
||||||
// gen:qs
|
// gen:qs
|
||||||
type OperationLog struct {
|
type OperationLog struct {
|
||||||
Model
|
Model
|
||||||
Uid uint32 `json:"uid" gorm:"index"` // 店员id
|
Uid uint32 `json:"uid" gorm:"index"` // 店员id
|
||||||
Description string `json:"description"` // 描述
|
Description string `json:"description"` // 描述
|
||||||
OperationType string `json:"operation_type" gorm:"index"` // 操作类型
|
OperationType string `json:"operation_type" gorm:"index"` // 操作类型
|
||||||
CorrelationId uint32 `json:"correlation_id" gorm:"index"` // 关联id
|
CorrelationId uint32 `json:"correlation_id" gorm:"index"` // 关联id
|
||||||
CorrelationName string `json:"correlation_name" gorm:"index"` // 关联name
|
CorrelationName string `json:"correlation_name" gorm:"index"` // 关联name
|
||||||
StoreId uint32 `json:"store_id" gorm:"index"` // 门店id
|
StoreId uint32 `json:"store_id" gorm:"index"` // 门店id
|
||||||
StoreName string `json:"store_name"` // 门店名称
|
StoreName string `json:"store_name"` // 门店名称
|
||||||
CooperativeName string `json:"cooperative_name"` // 合作商名称
|
CooperativeName string `json:"cooperative_name"` // 合作商名称
|
||||||
CooperativeBusinessId uint32 `json:"cooperative_business_id"` // 合作商id
|
CooperativeBusinessId uint32 `json:"cooperative_business_id" gorm:"index"` // 合作商id
|
||||||
SerialNumber string `json:"serial_number" gorm:"index"` // 卡编号
|
SerialNumber string `json:"serial_number" gorm:"index"` // 卡编号
|
||||||
Detail string `json:"detail"` // 详情
|
Detail string `json:"detail"` // 详情
|
||||||
Remark string `json:"remark"` // 备注
|
Remark string `json:"remark"` // 备注
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *UserOpenMemberRecord) OrderRefund(outTradeNo string) error {
|
func (m *UserOpenMemberRecord) OrderRefund(outTradeNo string) error {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user