- GoodsOrder.ConsigneeMobile2 for real user mobile.

This commit is contained in:
gazebo
2019-01-08 18:21:50 +08:00
parent bffc72f751
commit b6f1dc8721
10 changed files with 49 additions and 13 deletions

View File

@@ -30,10 +30,10 @@ func SendAdvertingByGoodsOrder(ctx *jxcontext.Context, advertising string, days
}
sqlParams := []interface{}{}
sql1 := `
SELECT consignee_mobile mobile
SELECT IF(t1.consignee_mobile2 <> '', t1.consignee_mobile2, t1.consignee_mobile) mobile
FROM goods_order t1
LEFT JOIN black_client t2 ON t1.consignee_mobile = t2.mobile
WHERE consignee_mobile IS NOT NULL AND consignee_mobile <> '' AND t2.id IS NULL AND LENGTH(consignee_mobile) = 11 AND LEFT(consignee_mobile, 1) = '1'
LEFT JOIN black_client t2 ON IF(t1.consignee_mobile2 <> '', t1.consignee_mobile2, t1.consignee_mobile) = t2.mobile
WHERE IF(t1.consignee_mobile2 <> '', t1.consignee_mobile2, t1.consignee_mobile) <> '' AND t2.id IS NULL AND LENGTH(IF(t1.consignee_mobile2 <> '', t1.consignee_mobile2, t1.consignee_mobile)) = 11 AND LEFT(IF(t1.consignee_mobile2 <> '', t1.consignee_mobile2, t1.consignee_mobile), 1) = '1'
`
sql2 := `
SELECT buyer_mobile mobile