|
@@ -239,13 +239,13 @@ func GetOffSaleProducts(query []MerchantProductType) (list []MerchantProduct, er
|
|
|
|
|
|
func GetOnSalePackageIds(ids []int) (sourceIds []int, err error) {
|
|
|
sql := `SELECT
|
|
|
- a.id,
|
|
|
- GROUP_CONCAT( a.product_id ) product_ids
|
|
|
+ a.id
|
|
|
+# GROUP_CONCAT( a.product_id ) product_ids
|
|
|
FROM
|
|
|
(
|
|
|
SELECT
|
|
|
- r.id,
|
|
|
- mp.id AS product_id
|
|
|
+ r.id
|
|
|
+ # mp.id AS product_id
|
|
|
FROM
|
|
|
reports r
|
|
|
LEFT JOIN permission_classify_mapping pcm ON r.classify_id = pcm.classify_id
|
|
@@ -256,8 +256,8 @@ FROM
|
|
|
mp.id IS NOT NULL and mp.id in ?
|
|
|
UNION ALL
|
|
|
SELECT
|
|
|
- r.id,
|
|
|
- mp.id AS product_id
|
|
|
+ r.id
|
|
|
+ # mp.id AS product_id
|
|
|
FROM
|
|
|
reports r
|
|
|
LEFT JOIN permissions p ON r.plate_name = p.
|
|
@@ -278,8 +278,8 @@ ORDER BY
|
|
|
|
|
|
func GetOnSaleReportIds(ids []int) (sourceIds []int, err error) {
|
|
|
sql := `SELECT
|
|
|
- r.id,
|
|
|
- GROUP_CONCAT( mp.id )AS product_ids
|
|
|
+ r.id
|
|
|
+ #GROUP_CONCAT( mp.id )AS product_ids
|
|
|
FROM
|
|
|
reports r
|
|
|
LEFT JOIN merchant_products mp ON mp.source_id = r.id
|