add gao user remind
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.imyeyu.api.modules.gao.mapper.GaoOrderReminderMapper">
|
||||
<select id="selectOrderReceiveCustomers" resultType="com.imyeyu.api.modules.gao.vo.GaoOrderReminderCustomer">
|
||||
SELECT
|
||||
o.`store_id` AS `storeId`,
|
||||
o.`customer_id` AS `customerId`,
|
||||
c.`name` AS `customerName`
|
||||
FROM `gao_sales_order` o
|
||||
INNER JOIN `gao_customer` c ON c.`id` = o.`customer_id` AND c.`deleted_at` IS NULL
|
||||
WHERE o.`deleted_at` IS NULL
|
||||
AND o.`status` IN ('ACTIVE', 'FULFILLED')
|
||||
AND o.`payment_status` IN ('UNPAID', 'PARTIALLY_PAID')
|
||||
GROUP BY o.`store_id`, o.`customer_id`, c.`name`
|
||||
ORDER BY o.`store_id`, c.`name`, o.`customer_id`
|
||||
</select>
|
||||
|
||||
<select id="selectReceiveVerifyCustomers" resultType="com.imyeyu.api.modules.gao.vo.GaoOrderReminderCustomer">
|
||||
SELECT
|
||||
f.`store_id` AS `storeId`,
|
||||
f.`customer_id` AS `customerId`,
|
||||
c.`name` AS `customerName`
|
||||
FROM `gao_fund_record` f
|
||||
INNER JOIN `gao_customer` c ON c.`id` = f.`customer_id` AND c.`deleted_at` IS NULL
|
||||
WHERE f.`deleted_at` IS NULL
|
||||
AND f.`biz_type` = 'SALES_ORDER'
|
||||
AND f.`operation_type` = 'RECEIVE'
|
||||
AND f.`status` = 'PENDING'
|
||||
GROUP BY f.`store_id`, f.`customer_id`, c.`name`
|
||||
ORDER BY f.`store_id`, c.`name`, f.`customer_id`
|
||||
</select>
|
||||
|
||||
<select id="selectFulfillmentVerifyCustomers" resultType="com.imyeyu.api.modules.gao.vo.GaoOrderReminderCustomer">
|
||||
SELECT
|
||||
f.`store_id` AS `storeId`,
|
||||
f.`customer_id` AS `customerId`,
|
||||
c.`name` AS `customerName`
|
||||
FROM `gao_order_fulfillment` f
|
||||
INNER JOIN `gao_customer` c ON c.`id` = f.`customer_id` AND c.`deleted_at` IS NULL
|
||||
WHERE f.`status` = 'PENDING'
|
||||
GROUP BY f.`store_id`, f.`customer_id`, c.`name`
|
||||
ORDER BY f.`store_id`, c.`name`, f.`customer_id`
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,6 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.imyeyu.api.modules.gao.mapper.GaoUserMapper">
|
||||
<select id="selectEnabledStoreManagers" resultType="com.imyeyu.api.modules.gao.entity.GaoUser">
|
||||
SELECT DISTINCT gu.*
|
||||
FROM `gao_user` gu
|
||||
INNER JOIN `user_role` ur ON ur.`user_id` = gu.`user_id` AND ur.`deleted_at` IS NULL
|
||||
INNER JOIN `role` r ON r.`id` = ur.`role_id` AND r.`deleted_at` IS NULL
|
||||
WHERE gu.`store_id` = #{storeId}
|
||||
AND gu.`enabled` = 1
|
||||
AND gu.`deleted_at` IS NULL
|
||||
AND r.`module_code` = 'GAO'
|
||||
AND r.`code` = 'STORE_MANAGER'
|
||||
</select>
|
||||
|
||||
<select id="selectByUserIdList" resultType="com.imyeyu.api.modules.gao.entity.GaoUser">
|
||||
SELECT
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user