Commit 16e1029a by duanhq

资源绑定bug修改 by duanht 2019/3/19

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@18640 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent db9a53d6
...@@ -503,7 +503,7 @@ public class SysUserServiceImpl implements SysUserService { ...@@ -503,7 +503,7 @@ public class SysUserServiceImpl implements SysUserService {
criteria.andServiceKeyEqualTo(sysResourceMatching.getServiceKey()); criteria.andServiceKeyEqualTo(sysResourceMatching.getServiceKey());
sysResourceMatchingList = sysResourceMatchingMapper.selectByExample(sysResourceMatchingExample); sysResourceMatchingList = sysResourceMatchingMapper.selectByExample(sysResourceMatchingExample);
//修改绑定服务商时,需要把之前的数据删除 //修改绑定服务商时,需要把之前绑定的服务商和技工数据删除
if (sysResourceMatchingList.isEmpty() || if (sysResourceMatchingList.isEmpty() ||
(sysResourceMatchingList.size() == 1 && bindType == 1) || (sysResourceMatchingList.size() == 1 && bindType == 1) ||
(sysResourceMatchingList.size() == 2 && bindType == 1)) { (sysResourceMatchingList.size() == 2 && bindType == 1)) {
......
...@@ -740,6 +740,10 @@ ...@@ -740,6 +740,10 @@
<bind name="merchantId" value="'%' + merchantId + '%'"/> <bind name="merchantId" value="'%' + merchantId + '%'"/>
</if> </if>
SELECT SELECT
*
FROM
(
SELECT
DISTINCT DISTINCT
u.id, u.id,
u.username, u.username,
...@@ -756,7 +760,8 @@ ...@@ -756,7 +760,8 @@
sdd.data_value serviceItems, sdd.data_value serviceItems,
sms.merchant_status merchantStatus, sms.merchant_status merchantStatus,
u.group_id groupId, u.group_id groupId,
su.name serviceName su.name serviceName,
su.user_type
<choose> <choose>
<when test="userId != 0 and userId!=''"> <when test="userId != 0 and userId!=''">
FROM FROM
...@@ -822,7 +827,6 @@ ...@@ -822,7 +827,6 @@
<if test="listType == 3"> <if test="listType == 3">
and u.user_status IN ('sys_user_status_normal') and u.user_status IN ('sys_user_status_normal')
and su.user_type = 1
<choose> <choose>
<when test="userStatus != null and userStatus!=''"> <when test="userStatus != null and userStatus!=''">
and sms.merchant_status = #{userStatus,jdbcType=VARCHAR} and sms.merchant_status = #{userStatus,jdbcType=VARCHAR}
...@@ -836,7 +840,6 @@ ...@@ -836,7 +840,6 @@
<if test="listType == 4"> <if test="listType == 4">
and u.user_status IN ('sys_user_status_normal') and u.user_status IN ('sys_user_status_normal')
and su.user_type = 1
<choose> <choose>
<when test="userStatus != null and userStatus!=''"> <when test="userStatus != null and userStatus!=''">
and sms.merchant_status = #{userStatus,jdbcType=VARCHAR} and sms.merchant_status = #{userStatus,jdbcType=VARCHAR}
...@@ -847,6 +850,14 @@ ...@@ -847,6 +850,14 @@
</choose> </choose>
</if> </if>
ORDER BY u.id DESC ORDER BY u.id DESC
) list
WHERE
CASE
WHEN list.user_type IS NULL THEN
list.user_type IS NULL
WHEN list.user_type IS NOT NULL THEN
list.user_type = 1
END
</select> </select>
...@@ -1109,7 +1120,7 @@ ...@@ -1109,7 +1120,7 @@
WHERE srm.merchant_id = #{merchantId,jdbcType=INTEGER} WHERE srm.merchant_id = #{merchantId,jdbcType=INTEGER}
AND su.user_status = 'sys_user_status_normal' AND su.user_status = 'sys_user_status_normal'
AND su.user_type = 3 AND su.user_type = 3
AND ssm.service_id = #{id,jdbcType=INTEGER} AND ssm.service_id = #{id,jdbcType=INTEGER}
<if test="orgId != null"> <if test="orgId != null">
AND su.org_id = #{orgId,jdbcType=INTEGER} AND su.org_id = #{orgId,jdbcType=INTEGER}
</if> </if>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!