商品库增加全国中位价
This commit is contained in:
@@ -392,9 +392,11 @@ func GetSkuNames(ctx *jxcontext.Context, keyword string, isBySku bool, params ma
|
||||
FROM sku_name t1
|
||||
LEFT JOIN sku t2 ON t1.id = t2.name_id AND t2.deleted_at = ?
|
||||
LEFT JOIN sku_name_place_bind t3 ON t1.id = t3.name_id
|
||||
LEFT JOIN price_refer_snapshot t4 ON t4.city_code = ? AND t4.snapshot_at = ? AND t4.sku_id = t2.id
|
||||
WHERE t1.deleted_at = ?`
|
||||
sqlParams := []interface{}{
|
||||
utils.DefaultTimeValue,
|
||||
0, utils.Time2Date(time.Now().AddDate(0, 0, -1)),
|
||||
utils.DefaultTimeValue,
|
||||
}
|
||||
if keyword != "" {
|
||||
@@ -561,7 +563,8 @@ func GetSkuNames(ctx *jxcontext.Context, keyword string, isBySku bool, params ma
|
||||
t1.upc,
|
||||
t1.ex_prefix,
|
||||
t1.ex_prefix_begin,
|
||||
t1.ex_prefix_end`
|
||||
t1.ex_prefix_end,
|
||||
t4.mid_unit_price`
|
||||
if isBySku {
|
||||
sql += `,
|
||||
t2.id`
|
||||
@@ -595,6 +598,7 @@ func GetSkuNames(ctx *jxcontext.Context, keyword string, isBySku bool, params ma
|
||||
t1.ex_prefix,
|
||||
t1.ex_prefix_begin,
|
||||
t1.ex_prefix_end,
|
||||
t4.mid_unit_price,
|
||||
CONCAT("[", GROUP_CONCAT(DISTINCT CONCAT('{"id":', t2.id, ',"comment":"', t2.comment, '","status":', t2.status,
|
||||
',"createdAt":"', CONCAT(REPLACE(t2.created_at," ","T"),"+08:00"), '","updatedAt":"', CONCAT(REPLACE(t2.updated_at," ","T"),"+08:00"),
|
||||
'","lastOperator":"', t2.last_operator, '","specQuality":', t2.spec_quality, ',"specUnit":"', t2.spec_unit,
|
||||
|
||||
@@ -282,9 +282,10 @@ type SkuWithVendor struct {
|
||||
|
||||
type SkuNameExt struct {
|
||||
SkuName
|
||||
Skus []*SkuWithVendor `orm:"-" json:"skus"`
|
||||
SkusStr string `json:"-"`
|
||||
FullName string `json:"fullName"`
|
||||
Places []int `orm:"-" json:"places"`
|
||||
PlacesStr string `json:"-"`
|
||||
Skus []*SkuWithVendor `orm:"-" json:"skus"`
|
||||
SkusStr string `json:"-"`
|
||||
FullName string `json:"fullName"`
|
||||
Places []int `orm:"-" json:"places"`
|
||||
PlacesStr string `json:"-"`
|
||||
MidUnitPrice int `json:"midUnitPrice"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user