推荐商品
This commit is contained in:
@@ -12,10 +12,11 @@ import (
|
||||
)
|
||||
|
||||
type ActMapPureInfo struct {
|
||||
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
||||
VendorActID string `orm:"column(vendor_act_id);size(48)" json:"vendorActID"`
|
||||
SyncStatus int `orm:"default(2)" json:"syncStatus"`
|
||||
Remark string `orm:"column(map_remark)" json:"remark"`
|
||||
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
||||
VendorOrgCode string `orm:"size(32)" json:"vendorOrgCode"` // 同一平台下不同的商户代码,如果只有一个,可以为空
|
||||
VendorActID string `orm:"column(vendor_act_id);size(48)" json:"vendorActID"`
|
||||
SyncStatus int `orm:"default(2)" json:"syncStatus"`
|
||||
Remark string `orm:"column(map_remark)" json:"remark"`
|
||||
}
|
||||
|
||||
type ActVendorInfo struct {
|
||||
@@ -41,7 +42,7 @@ func GetActVendorInfo(db *DaoDB, actID int, vendorIDs []int) (actMap map[int]*mo
|
||||
}
|
||||
sql := fmt.Sprintf(`
|
||||
SELECT t1.*,
|
||||
t2.id map_id, t2.vendor_id, t2.vendor_act_id, t2.sync_status
|
||||
t2.id map_id, t2.vendor_id, t2.vendor_org_code, t2.vendor_act_id, t2.sync_status
|
||||
FROM act t1
|
||||
%s JOIN act_map t2 ON t2.act_id = t1.id AND t2.deleted_at = ?`, leftOrEmpty)
|
||||
sqlParams := []interface{}{
|
||||
@@ -307,7 +308,7 @@ func QueryActs(db *DaoDB, actID int, offset, pageSize int, syncStatus int, keywo
|
||||
sql = `
|
||||
SELECT
|
||||
t1.*,
|
||||
t2.id map_id, t2.vendor_id, t2.vendor_act_id, t2.sync_status, t2.remark map_remark
|
||||
t2.id map_id, t2.vendor_id, t2.vendor_org_code, t2.vendor_act_id, t2.sync_status, t2.remark map_remark
|
||||
FROM act t1
|
||||
LEFT JOIN act_map t2 ON t2.act_id = t1.id AND t2.deleted_at = ?
|
||||
WHERE t1.id IN (` + GenQuestionMarks(len(idList)) + `)
|
||||
|
||||
Reference in New Issue
Block a user