add store
This commit is contained in:
@@ -6,10 +6,16 @@
|
||||
*
|
||||
FROM `gao_customer`
|
||||
WHERE
|
||||
`id` IN
|
||||
<foreach collection="idList" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
TRUE
|
||||
<if test="idList != null and !idList.isEmpty()">
|
||||
AND `id` IN
|
||||
<foreach collection="idList" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="idList == null or idList.isEmpty()">
|
||||
AND FALSE
|
||||
</if>
|
||||
AND `deleted_at` IS NULL
|
||||
</select>
|
||||
|
||||
@@ -19,7 +25,8 @@
|
||||
COUNT(1) AS `newCustomerCount`
|
||||
FROM `gao_customer`
|
||||
WHERE
|
||||
`created_at` >= #{beginCreatedAt}
|
||||
`store_id` = #{storeId}
|
||||
AND `created_at` >= #{beginCreatedAt}
|
||||
AND `created_at` <= #{endCreatedAt}
|
||||
AND `deleted_at` IS NULL
|
||||
GROUP BY DATE_FORMAT(FROM_UNIXTIME(`created_at` / 1000), '%Y%m%d')
|
||||
@@ -31,7 +38,8 @@
|
||||
COUNT(1)
|
||||
FROM `gao_customer`
|
||||
WHERE
|
||||
`created_at` < #{beginCreatedAt}
|
||||
`store_id` = #{storeId}
|
||||
AND `created_at` < #{beginCreatedAt}
|
||||
AND `deleted_at` IS NULL
|
||||
</select>
|
||||
|
||||
@@ -41,7 +49,8 @@
|
||||
COUNT(1) AS `count`
|
||||
FROM `gao_customer`
|
||||
WHERE
|
||||
`deleted_at` IS NULL
|
||||
`store_id` = #{storeId}
|
||||
AND `deleted_at` IS NULL
|
||||
GROUP BY IFNULL(CAST(`gender` AS CHAR), 'UNKNOWN')
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user