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 {
@Transactional(rollbackFor = Exception.class)
public int save(SysRole sysRole) {
Integer role_id = null;
if (sysRole.getId() == null || sysRole.getId() == 0) {
if (sysRole.getId() == null) {
// 新增角色
sysRoleMapper.insertSelective(sysRole);
role_id = sysRole.getId();
......
......@@ -304,9 +304,9 @@
sm.parent_id parentId,
sm.sort
FROM
sys_menu sm
LEFT JOIN sys_role_menu srm ON srm.menu_id = sm.id
WHERE sm.menu_status = 'sys_user_status_normal'
sys_role_menu srm
LEFT JOIN sys_menu sm ON srm.menu_id = sm.id
WHERE sm.menu_status = 1
<if test="_parameter != 0">
AND srm.role_id = #{id,jdbcType=INTEGER}
</if>
......
......@@ -598,7 +598,7 @@
WHERE u.user_status = #{userStatus,jdbcType=VARCHAR}
</when>
<otherwise>
WHERE u.user_status &lt;&gt; 2
WHERE u.user_status &lt;&gt; 'sys_user_status_logout'
</otherwise>
</choose>
<if test="id != null and id!=''">
......@@ -685,31 +685,31 @@
and u.user_status = #{userStatus,jdbcType=VARCHAR}
</when>
<otherwise>
and u.user_status IN (0,1)
and u.user_status IN ('sys_user_status_nonuse','sys_user_status_normal')
</otherwise>
</choose>
</if>
<if test="listType == 3">
and u.user_status IN (1)
and u.user_status IN ('sys_user_status_normal')
<choose>
<when test="userStatus != null and userStatus!=''">
and u.merchant_status = #{userStatus,jdbcType=VARCHAR}
</when>
<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>
</choose>
</if>
<if test="listType == 4">
and u.user_status IN (1)
and u.user_status IN ('sys_user_status_normal')
<choose>
<when test="userStatus != null and userStatus!=''">
and u.merchant_status = #{userStatus,jdbcType=VARCHAR}
</when>
<otherwise>
and sm.merchant_status IN (2,3)
and sm.merchant_status IN ('sys_user_status_unbound_mechanic','sys_user_status_bound')
</otherwise>
</choose>
</if>
......@@ -720,7 +720,6 @@
<select id="getSysMechanicList" parameterType="com.glsx.usercenter.pojo.vo.UserQueryVo"
resultType="com.glsx.usercenter.pojo.user.SysMechanic">
SELECT
DISTINCT
u.id,
u.org_id orgId,
so.name orgName,
......@@ -778,18 +777,20 @@
and u.user_status = #{userStatus,jdbcType=VARCHAR}
</when>
<otherwise>
and u.user_status IN (0,1)
and u.user_status IN ('sys_user_status_normal','sys_user_status_nonuse')
</otherwise>
</choose>
</if>
<if test="listType == 1">
and u.user_status IN ('sys_user_status_normal')
<choose>
<when test="userStatus != null and userStatus!=''">
and u.user_status = #{userStatus,jdbcType=VARCHAR}
and sm.mechanic_status = #{userStatus,jdbcType=VARCHAR}
</when>
<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>
</choose>
</if>
......@@ -800,7 +801,8 @@
<update id="deleteUserById" parameterType="com.glsx.usercenter.pojo.vo.UserQueryVo">
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
<foreach collection="ids" index="index" item="id"
separator="," open="(" close=")">
......@@ -903,7 +905,7 @@
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
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">
AND su.org_id = #{orgId,jdbcType=INTEGER}
</if>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!