fix:
This commit is contained in:
parent
3670b91603
commit
ceea1518e0
|
@ -164,6 +164,26 @@ func InitDBProd() {
|
|||
//&UserAttendance{},
|
||||
//&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 {
|
||||
|
@ -1165,3 +1185,33 @@ func TestAddCooperativeMemberPromotion(t *testing.T) {
|
|||
DB = DBDev
|
||||
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": "迪为合作商",
|
||||
})
|
||||
|
||||
}
|
||||
|
|
|
@ -285,7 +285,7 @@ type OperationLog struct {
|
|||
StoreId uint32 `json:"store_id" gorm:"index"` // 门店id
|
||||
StoreName string `json:"store_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"` // 卡编号
|
||||
Detail string `json:"detail"` // 详情
|
||||
Remark string `json:"remark"` // 备注
|
||||
|
|
Loading…
Reference in New Issue
Block a user