Commit 84ecb0c0 by duanhq

角色,列表bug修改 by duanht 2019/1/28

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@18026 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 3270a5e4
...@@ -101,7 +101,7 @@ public class SysRoleServiceImpl implements SysRoleService { ...@@ -101,7 +101,7 @@ public class SysRoleServiceImpl implements SysRoleService {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public int save(SysRole sysRole) { public int save(SysRole sysRole) {
Integer role_id = null; Integer role_id = null;
if (sysRole.getId() == null || sysRole.getId() == 0) { if (sysRole.getId() == null) {
// 新增角色 // 新增角色
sysRoleMapper.insertSelective(sysRole); sysRoleMapper.insertSelective(sysRole);
role_id = sysRole.getId(); role_id = sysRole.getId();
......
...@@ -304,9 +304,9 @@ ...@@ -304,9 +304,9 @@
sm.parent_id parentId, sm.parent_id parentId,
sm.sort sm.sort
FROM FROM
sys_menu sm sys_role_menu srm
LEFT JOIN sys_role_menu srm ON srm.menu_id = sm.id LEFT JOIN sys_menu sm ON srm.menu_id = sm.id
WHERE sm.menu_status = 'sys_user_status_normal' WHERE sm.menu_status = 1
<if test="_parameter != 0"> <if test="_parameter != 0">
AND srm.role_id = #{id,jdbcType=INTEGER} AND srm.role_id = #{id,jdbcType=INTEGER}
</if> </if>
......
...@@ -598,7 +598,7 @@ ...@@ -598,7 +598,7 @@
WHERE u.user_status = #{userStatus,jdbcType=VARCHAR} WHERE u.user_status = #{userStatus,jdbcType=VARCHAR}
</when> </when>
<otherwise> <otherwise>
WHERE u.user_status &lt;&gt; 2 WHERE u.user_status &lt;&gt; 'sys_user_status_logout'
</otherwise> </otherwise>
</choose> </choose>
<if test="id != null and id!=''"> <if test="id != null and id!=''">
...@@ -685,31 +685,31 @@ ...@@ -685,31 +685,31 @@
and u.user_status = #{userStatus,jdbcType=VARCHAR} and u.user_status = #{userStatus,jdbcType=VARCHAR}
</when> </when>
<otherwise> <otherwise>
and u.user_status IN (0,1) and u.user_status IN ('sys_user_status_nonuse','sys_user_status_normal')
</otherwise> </otherwise>
</choose> </choose>
</if> </if>
<if test="listType == 3"> <if test="listType == 3">
and u.user_status IN (1) and u.user_status IN ('sys_user_status_normal')
<choose> <choose>
<when test="userStatus != null and userStatus!=''"> <when test="userStatus != null and userStatus!=''">
and u.merchant_status = #{userStatus,jdbcType=VARCHAR} and u.merchant_status = #{userStatus,jdbcType=VARCHAR}
</when> </when>
<otherwise> <otherwise>
and sm.merchant_status IN (1,2,3) and sm.merchant_status IN ('sys_user_status_unbound_service','sys_user_status_unbound_mechanic','sys_user_status_bound')
</otherwise> </otherwise>
</choose> </choose>
</if> </if>
<if test="listType == 4"> <if test="listType == 4">
and u.user_status IN (1) and u.user_status IN ('sys_user_status_normal')
<choose> <choose>
<when test="userStatus != null and userStatus!=''"> <when test="userStatus != null and userStatus!=''">
and u.merchant_status = #{userStatus,jdbcType=VARCHAR} and u.merchant_status = #{userStatus,jdbcType=VARCHAR}
</when> </when>
<otherwise> <otherwise>
and sm.merchant_status IN (2,3) and sm.merchant_status IN ('sys_user_status_unbound_mechanic','sys_user_status_bound')
</otherwise> </otherwise>
</choose> </choose>
</if> </if>
...@@ -720,7 +720,6 @@ ...@@ -720,7 +720,6 @@
<select id="getSysMechanicList" parameterType="com.glsx.usercenter.pojo.vo.UserQueryVo" <select id="getSysMechanicList" parameterType="com.glsx.usercenter.pojo.vo.UserQueryVo"
resultType="com.glsx.usercenter.pojo.user.SysMechanic"> resultType="com.glsx.usercenter.pojo.user.SysMechanic">
SELECT SELECT
DISTINCT
u.id, u.id,
u.org_id orgId, u.org_id orgId,
so.name orgName, so.name orgName,
...@@ -778,18 +777,20 @@ ...@@ -778,18 +777,20 @@
and u.user_status = #{userStatus,jdbcType=VARCHAR} and u.user_status = #{userStatus,jdbcType=VARCHAR}
</when> </when>
<otherwise> <otherwise>
and u.user_status IN (0,1) and u.user_status IN ('sys_user_status_normal','sys_user_status_nonuse')
</otherwise> </otherwise>
</choose> </choose>
</if> </if>
<if test="listType == 1"> <if test="listType == 1">
and u.user_status IN ('sys_user_status_normal')
<choose> <choose>
<when test="userStatus != null and userStatus!=''"> <when test="userStatus != null and userStatus!=''">
and u.user_status = #{userStatus,jdbcType=VARCHAR} and sm.mechanic_status = #{userStatus,jdbcType=VARCHAR}
</when> </when>
<otherwise> <otherwise>
and u.user_status IN (1,3,4) and sm.mechanic_status IN
('sys_user_status_uncheck','sys_user_status_nopass_check','sys_user_status_pass_check')
</otherwise> </otherwise>
</choose> </choose>
</if> </if>
...@@ -800,7 +801,8 @@ ...@@ -800,7 +801,8 @@
<update id="deleteUserById" parameterType="com.glsx.usercenter.pojo.vo.UserQueryVo"> <update id="deleteUserById" parameterType="com.glsx.usercenter.pojo.vo.UserQueryVo">
update sys_user update sys_user
set user_status = 'sys_user_status_logout',update_by= #{name,jdbcType=VARCHAR},update_time= #{time,jdbcType=TIMESTAMP} set user_status = 'sys_user_status_logout',update_by= #{name,jdbcType=VARCHAR},update_time=
#{time,jdbcType=TIMESTAMP}
where id in where id in
<foreach collection="ids" index="index" item="id" <foreach collection="ids" index="index" item="id"
separator="," open="(" close=")"> separator="," open="(" close=")">
...@@ -903,7 +905,7 @@ ...@@ -903,7 +905,7 @@
FROM sys_resource_matching srm LEFT JOIN sys_service_mechanic ssm ON srm.user_id = ssm.service_id FROM sys_resource_matching srm LEFT JOIN sys_service_mechanic ssm ON srm.user_id = ssm.service_id
LEFT JOIN sys_user su ON ssm.mechanic_id = su.id LEFT JOIN sys_user su ON ssm.mechanic_id = su.id
WHERE srm.merchant_id = #{id,jdbcType=INTEGER} AND srm.service_key = #{serviceKey,jdbcType=VARCHAR} WHERE srm.merchant_id = #{id,jdbcType=INTEGER} AND srm.service_key = #{serviceKey,jdbcType=VARCHAR}
AND su.user_status = 1 AND su.user_status = 'sys_user_status_normal'
<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!