Commit db4c2e68 by duanhq

获取商户列表新增服务商名,所有用户列表只显示普通用户和服务商 by duanht 2019/3/12

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@18438 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 968924f9
......@@ -89,6 +89,11 @@ public class SysUser extends BaseModel implements Serializable{
private Integer groupId;
/**
*服务商名称
*/
private String serviceName;
/**
*服务项信息
*/
private List<SysUserServices> userService = new ArrayList<>();
......@@ -327,5 +332,13 @@ public class SysUser extends BaseModel implements Serializable{
public void setGroupId(Integer groupId) {
this.groupId = groupId;
}
public String getServiceName() {
return serviceName;
}
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
}
......@@ -155,6 +155,12 @@ public class SysUserServiceImpl implements SysUserService {
SysOrganization sysOrganization = sysOrganizationMapper.selectByPrimaryKey(sysMerchant.getGroupId());
sysMerchant.setOrgName(sysOrganization.getName());
}
//设置服务商名
SysUser sysUser = sysUserMapper.selectByPrimaryKey(sysMerchant.getUserId());
if (sysUser != null){
sysMerchant.setServiceName(sysUser.getName());
}
}
return sysMerchantList;
}
......
......@@ -269,7 +269,8 @@
<select id="getAllGroupByParentId" resultType="com.glsx.usercenter.pojo.menu.SysOrganization">
SELECT
so.id id,
so.name name
so.name name,
so.org_type orgType
FROM
sys_organization so
WHERE
......
......@@ -80,7 +80,7 @@
</sql>
<sql id="Base_Column_List">
id, username, name, org_id, phone_number, user_status, create_by, create_time, update_by,
update_time, password, sex, remark, user_type,group_id
update_time, password, sex, remark, user_type, group_id
</sql>
<select id="selectByExample" parameterType="com.glsx.usercenter.pojo.user.SysUserExample" resultMap="BaseResultMap">
......@@ -619,7 +619,7 @@
</choose>
</otherwise>
</choose>
and u.user_type in (0,1)
<if test="ids != null">
and u.org_id in
<foreach collection="ids" item="item" index="index"
......@@ -646,9 +646,10 @@
<select id="getSysMerchantList" parameterType="com.glsx.usercenter.pojo.vo.UserQueryVo"
resultType="com.glsx.usercenter.pojo.user.SysMerchant">
<if test="merchantId != null ">
<bind name="merchantId" value="'%' + merchantId + '%'"/>
<bind name="merchantId" value="'%' + merchantId + '%'"/>
</if>
SELECT
DISTINCT
u.id,
u.username,
u.password,
......@@ -663,7 +664,8 @@
sdd.data_key serviceKey,
sdd.data_value serviceItems,
sm.merchant_status merchantStatus,
u.org_id groupId
u.org_id groupId,
srm.user_id userId
<choose>
<when test="userId != 0 and userId!=''">
FROM
......@@ -673,6 +675,7 @@
LEFT JOIN sys_merchant sm ON sm.user_id = u.id
LEFT JOIN sys_user_services sms ON sm.user_id = sms.user_id
LEFT JOIN sys_dict_data sdd ON sms.service_key = sdd.data_key
LEFT JOIN sys_resource_matching srm ON srm.merchant_id = u.id
WHERE suo.user_id = #{userId,jdbcType=INTEGER}
AND u.user_type = 2
</when>
......@@ -683,6 +686,7 @@
LEFT JOIN sys_merchant sm ON sm.user_id = u.id
LEFT JOIN sys_user_services sms ON sm.user_id = sms.user_id
LEFT JOIN sys_dict_data sdd ON sms.service_key = sdd.data_key
LEFT JOIN sys_resource_matching srm ON srm.merchant_id = u.id
WHERE u.user_type = 2
</otherwise>
</choose>
......@@ -913,10 +917,10 @@
<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=
UPDATE sys_user
SET user_status = 'sys_user_status_logout', update_by = #{name,jdbcType=VARCHAR}, update_time =
#{time,jdbcType=TIMESTAMP}
where id = #{userId,jdbcType=INTEGER}
WHERE id = #{userId,jdbcType=INTEGER}
</update>
<select id="getUserByIdAndName" resultType="com.glsx.usercenter.pojo.user.SysUser">
......@@ -930,6 +934,7 @@
LEFT JOIN sys_user_org uo ON uo.org_id = u.org_id
LEFT JOIN sys_organization so ON uo.org_id = so.id
WHERE u.user_type = 1
and u.user_status='sys_user_status_normal'
<if test="id != 0 and id!=''">
AND uo.user_id = #{id,jdbcType=INTEGER}
</if>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!