- comment moved from skuname to sku.
This commit is contained in:
@@ -154,7 +154,7 @@ func GetSkuNames(keyword string, params map[string]interface{}, offset, pageSize
|
||||
sqlParams := make([]interface{}, 0)
|
||||
if keyword != "" {
|
||||
keywordLike := "%" + keyword + "%"
|
||||
sql += " AND (t1.name LIKE ? OR t1.prefix LIKE ? OR t1.comment LIKE ?"
|
||||
sql += " AND (t1.name LIKE ? OR t1.prefix LIKE ? OR t2.comment LIKE ?"
|
||||
sqlParams = append(sqlParams, keywordLike, keywordLike, keywordLike)
|
||||
|
||||
if keywordInt64, err2 := strconv.ParseInt(keyword, 10, 64); err2 == nil {
|
||||
@@ -241,7 +241,6 @@ func GetSkuNames(keyword string, params map[string]interface{}, offset, pageSize
|
||||
t1.deleted_at,
|
||||
t1.prefix,
|
||||
t1.name,
|
||||
t1.comment,
|
||||
t1.brand_id,
|
||||
t1.category_id,
|
||||
t1.is_global,
|
||||
@@ -260,7 +259,6 @@ func GetSkuNames(keyword string, params map[string]interface{}, offset, pageSize
|
||||
t1.deleted_at,
|
||||
t1.prefix,
|
||||
t1.name,
|
||||
t1.comment,
|
||||
t1.brand_id,
|
||||
t1.category_id,
|
||||
t1.is_global,
|
||||
@@ -268,7 +266,7 @@ func GetSkuNames(keyword string, params map[string]interface{}, offset, pageSize
|
||||
t1.price,
|
||||
t1.img,
|
||||
t1.elm_img_hash_code,
|
||||
CONCAT("[", GROUP_CONCAT(DISTINCT CONCAT('{"id":', t2.id, ',"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, '","weight":', t2.weight, ',"jdID":', t2.jd_id, ',"categoryID":', t2.category_id, ',"nameID":', t2.name_id, "}")), "]") skus_str,
|
||||
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, '","weight":', t2.weight, ',"jdID":', t2.jd_id, ',"categoryID":', t2.category_id, ',"nameID":', t2.name_id, "}")), "]") skus_str,
|
||||
CONCAT("[", GROUP_CONCAT(DISTINCT t3.place_code), "]") places_str
|
||||
` + sql + `
|
||||
ORDER BY t1.id
|
||||
|
||||
Reference in New Issue
Block a user