1修改账号相关接口
This commit is contained in:
parent
a179b2f704
commit
b0ef15d6a8
@ -157,6 +157,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<select id="getRoleByUserID" parameterType="Long" resultMap="SysRoleResult">
|
<select id="getRoleByUserID" parameterType="Long" resultMap="SysRoleResult">
|
||||||
<include refid="selectRoleVo"/>
|
<include refid="selectRoleVo"/>
|
||||||
where r.role_key=#{roleKey} ORDER BY r.update_time DESC limit 1
|
where u.user_id = #{userId} ORDER BY r.update_time DESC limit 1
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -37,11 +37,12 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getOperatorId" parameterType="java.lang.String" resultType="java.util.Map">
|
<select id="getOperatorId" parameterType="java.lang.String" resultType="java.util.Map">
|
||||||
select xo.operator_id operatorId, xo.name, xo.contact_name contactName,
|
select distinct xo.operator_id operatorId, xo.name, xo.contact_name contactName,
|
||||||
xo.contact_phone contactPhone, xo.phone, xo.attribute,
|
xo.contact_phone contactPhone, xo.phone, xo.attribute,
|
||||||
xdb.dict_value attributenName
|
xdb.dict_value attributenName
|
||||||
from xhpc_operator `xo`
|
from xhpc_operator `xo`
|
||||||
LEFT JOIN xhpc_dict_biz xdb on xdb.`code` = 'operator_attribute' and xdb.dict_key = xo.attribute
|
LEFT JOIN xhpc_dict_biz xdb on xdb.`code` = 'operator_attribute' and xdb.dict_key = xo.attribute
|
||||||
|
JOIN xhpc_charging_station xcs on xcs.operator_id = xo.operator_id
|
||||||
where xo.del_flag = 0
|
where xo.del_flag = 0
|
||||||
<if test="null != operatorIds and '' != operatorIds">
|
<if test="null != operatorIds and '' != operatorIds">
|
||||||
operator_id in
|
operator_id in
|
||||||
@ -85,12 +86,12 @@
|
|||||||
and xcs.operator_id = #{operatorId}
|
and xcs.operator_id = #{operatorId}
|
||||||
</if>
|
</if>
|
||||||
GROUP BY `pxa`.pcode
|
GROUP BY `pxa`.pcode
|
||||||
)
|
) and code != 100000
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="groupCityByOperatorId" parameterType="java.lang.String" resultType="java.util.Map">
|
<select id="groupCityByOperatorId" parameterType="java.lang.String" resultType="java.util.Map">
|
||||||
select `code` ,`name` from xhpc_area where `code` in (
|
select `code` ,`name` from xhpc_area where `code` in (
|
||||||
select `pxa`.code city
|
select `xa`.pcode city
|
||||||
from xhpc_charging_station xcs
|
from xhpc_charging_station xcs
|
||||||
LEFT JOIN xhpc_area `xa` on `xa`.`code` = xcs.area_code
|
LEFT JOIN xhpc_area `xa` on `xa`.`code` = xcs.area_code
|
||||||
LEFT JOIN xhpc_area pxa on `xa`.pcode = pxa.`code`
|
LEFT JOIN xhpc_area pxa on `xa`.pcode = pxa.`code`
|
||||||
@ -124,7 +125,7 @@
|
|||||||
and xcs.operator_id = #{operatorId}
|
and xcs.operator_id = #{operatorId}
|
||||||
</if>
|
</if>
|
||||||
<if test="null != cityCode and '' != cityCode">
|
<if test="null != cityCode and '' != cityCode">
|
||||||
and pxa.code = #{cityCode}
|
and xa.pcode = #{cityCode}
|
||||||
</if>
|
</if>
|
||||||
GROUP BY `xa`.code
|
GROUP BY `xa`.code
|
||||||
)
|
)
|
||||||
|
|||||||
@ -67,6 +67,13 @@
|
|||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common-datascope</artifactId>
|
<artifactId>ruoyi-common-datascope</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>xhpc-common</artifactId>
|
||||||
|
<version>3.0.0</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@ -74,6 +74,13 @@
|
|||||||
<artifactId>alipay-sdk-java</artifactId>
|
<artifactId>alipay-sdk-java</artifactId>
|
||||||
<version>${alipay.sdk}</version>
|
<version>${alipay.sdk}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>xhpc-common</artifactId>
|
||||||
|
<version>3.0.0</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@ -86,8 +86,7 @@ public class WxPaymentController {
|
|||||||
return AjaxResult.error(HttpStatus.NOT_NULL, "用户信息不能为空");
|
return AjaxResult.error(HttpStatus.NOT_NULL, "用户信息不能为空");
|
||||||
}
|
}
|
||||||
Double amount1 = Double.parseDouble(amount) * 100;
|
Double amount1 = Double.parseDouble(amount) * 100;
|
||||||
String orderNumber = "wx" + DateUtils.timePath();
|
String orderNumber = String.format("%07d", userId) + DateUtils.timePath() + 1 + 1 + (int) (1 + Math.random() * (10 - 1 + 1));
|
||||||
|
|
||||||
if (0.0 == amount1) {
|
if (0.0 == amount1) {
|
||||||
return AjaxResult.error(HttpStatus.NOT_NULL, "充值金额不能为0");
|
return AjaxResult.error(HttpStatus.NOT_NULL, "充值金额不能为0");
|
||||||
}
|
}
|
||||||
@ -161,7 +160,6 @@ public class WxPaymentController {
|
|||||||
return AjaxResult.success(sign);
|
return AjaxResult.success(sign);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成签名
|
* 生成签名
|
||||||
*
|
*
|
||||||
|
|||||||
@ -51,7 +51,7 @@ public class XhpcRefundOrderController extends BaseController {
|
|||||||
return AjaxResult.error(HttpStatus.NOT_NULL, "退款渠道不能为空");
|
return AjaxResult.error(HttpStatus.NOT_NULL, "退款渠道不能为空");
|
||||||
}
|
}
|
||||||
//生成退款订单
|
//生成退款订单
|
||||||
String orderOutNumber = "wxOut" + DateUtils.timePath();
|
String orderOutNumber = String.format("%07d", userId) + DateUtils.timePath() + type + 2 + (int) (1 + Math.random() * (10 - 1 + 1));
|
||||||
iXhpcRefundOrderService.addRefundOrder(userId, BigDecimal.valueOf(Double.parseDouble(amount)), type, orderOutNumber, openid);
|
iXhpcRefundOrderService.addRefundOrder(userId, BigDecimal.valueOf(Double.parseDouble(amount)), type, orderOutNumber, openid);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,7 +59,8 @@ public class XhpcInternetUserController extends BaseController {
|
|||||||
return AjaxResult.error("新增用户'" + sysUser.getUserName() + "'失败,登录账号已存在");
|
return AjaxResult.error("新增用户'" + sysUser.getUserName() + "'失败,登录账号已存在");
|
||||||
}
|
}
|
||||||
iXhpcInternetUserService.insert(xhpcInternetUser);
|
iXhpcInternetUserService.insert(xhpcInternetUser);
|
||||||
sysUser = iXhpcUserService.insertUser(sysUser);
|
sysUser.setInternetUserId(xhpcInternetUser.getInternetUserId());
|
||||||
|
iXhpcUserService.insertUser(sysUser);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -132,4 +132,14 @@ public class XhpcOperatorController extends BaseController {
|
|||||||
iXhpcOperatorService.status(Long.parseLong(operatorId));
|
iXhpcOperatorService.status(Long.parseLong(operatorId));
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取运营商分页列表
|
||||||
|
*/
|
||||||
|
//@PreAuthorize(hasPermi = "system:operator:page")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public AjaxResult list(String name, String contactName, String contactPhone, String createTimeStart, String createTimeEnd) {
|
||||||
|
List<Map<String, Object>> list = iXhpcOperatorService.selectOperatorList(name, contactName, contactPhone, createTimeStart, createTimeEnd);
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -130,12 +130,5 @@ public interface XhpcUserMapper {
|
|||||||
*/
|
*/
|
||||||
public int checkUserNameUnique(String userName);
|
public int checkUserNameUnique(String userName);
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改用户信息
|
|
||||||
*
|
|
||||||
* @param user 用户信息
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int updateUser(SysUser user);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,7 +59,8 @@ public class XhpcInternetUserServiceImpl implements IXhpcInternetUserService {
|
|||||||
@Override
|
@Override
|
||||||
public void deleteByIds(String[] ids) {
|
public void deleteByIds(String[] ids) {
|
||||||
for (String id : ids) {
|
for (String id : ids) {
|
||||||
SysUser sysUser = xhpcOperatorMapper.getUserByOperatorId(Long.parseLong(id));
|
SysUser sysUser = xhpcInternetUserMapper.getUserByInternetUserId(Long.parseLong(id));
|
||||||
|
if (null != sysUser) {
|
||||||
// 删除用户与角色关联
|
// 删除用户与角色关联
|
||||||
xhpcOperatorMapper.deleteUserRoleByUserId(sysUser.getUserId());
|
xhpcOperatorMapper.deleteUserRoleByUserId(sysUser.getUserId());
|
||||||
// 删除用户与岗位表
|
// 删除用户与岗位表
|
||||||
@ -67,6 +68,7 @@ public class XhpcInternetUserServiceImpl implements IXhpcInternetUserService {
|
|||||||
sysUser.setDelFlag(String.valueOf(UserConstants.DEL_FLAG));
|
sysUser.setDelFlag(String.valueOf(UserConstants.DEL_FLAG));
|
||||||
xhpcOperatorMapper.deleteUserById(sysUser);
|
xhpcOperatorMapper.deleteUserById(sysUser);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
xhpcInternetUserMapper.deleteByIds(ids);
|
xhpcInternetUserMapper.deleteByIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,13 +105,15 @@ public class XhpcInternetUserServiceImpl implements IXhpcInternetUserService {
|
|||||||
@Override
|
@Override
|
||||||
public void status(Long internetUserId) {
|
public void status(Long internetUserId) {
|
||||||
SysUser sysUser = xhpcInternetUserMapper.getUserByInternetUserId(internetUserId);
|
SysUser sysUser = xhpcInternetUserMapper.getUserByInternetUserId(internetUserId);
|
||||||
|
if (null != sysUser) {
|
||||||
sysUser.setStatus(String.valueOf(UserConstants.NORMAL == Integer.parseInt(sysUser.getStatus()) ? UserConstants.EXCEPTION : UserConstants.NORMAL));
|
sysUser.setStatus(String.valueOf(UserConstants.NORMAL == Integer.parseInt(sysUser.getStatus()) ? UserConstants.EXCEPTION : UserConstants.NORMAL));
|
||||||
xhpcUserMapper.update(sysUser);
|
xhpcUserMapper.update(sysUser);
|
||||||
XhpcInternetUser xhpcInternetUser = new XhpcInternetUser();
|
XhpcInternetUser xhpcInternetUser = new XhpcInternetUser();
|
||||||
xhpcInternetUser.setInternetUserId(internetUserId);
|
xhpcInternetUser.setInternetUserId(internetUserId);
|
||||||
xhpcInternetUser.setStatus(UserConstants.NORMAL == Integer.parseInt(sysUser.getStatus()) ? UserConstants.EXCEPTION : UserConstants.NORMAL);
|
xhpcInternetUser.setStatus(Integer.parseInt(sysUser.getStatus()));
|
||||||
update(xhpcInternetUser);
|
update(xhpcInternetUser);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流量用户列表
|
* 流量用户列表
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.xhpc.user.service.IXhpcStationInternetBlacklistService;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -58,6 +59,7 @@ public class XhpcStationInternetBlacklistServiceImpl implements IXhpcStationInte
|
|||||||
@Override
|
@Override
|
||||||
public List<Map<String, Object>> list(String internetUserId) {
|
public List<Map<String, Object>> list(String internetUserId) {
|
||||||
List<Map<String, Object>> list = xhpcOperatorMapper.getOperatorId();
|
List<Map<String, Object>> list = xhpcOperatorMapper.getOperatorId();
|
||||||
|
List<Map<String, Object>> xhpcOperatorList = new ArrayList<>();
|
||||||
if (null != list && list.size() > 0) {
|
if (null != list && list.size() > 0) {
|
||||||
List<Map<String, Object>> blacklist = xhpcStationInternetBlacklistMapper.list(Long.parseLong(internetUserId));
|
List<Map<String, Object>> blacklist = xhpcStationInternetBlacklistMapper.list(Long.parseLong(internetUserId));
|
||||||
boolean bool = false;
|
boolean bool = false;
|
||||||
@ -81,9 +83,10 @@ public class XhpcStationInternetBlacklistServiceImpl implements IXhpcStationInte
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
map.put("listXhpcChargingStation", listXhpcChargingStation);
|
map.put("listXhpcChargingStation", listXhpcChargingStation);
|
||||||
|
xhpcOperatorList.add(map);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return xhpcOperatorList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -199,6 +199,6 @@ public class XhpcUserServiceImpl implements IXhpcUserService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public int updateUser(SysUser user) {
|
public int updateUser(SysUser user) {
|
||||||
return xhpcUserMapper.updateUser(user);
|
return xhpcUserMapper.update(user);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -134,10 +134,10 @@
|
|||||||
<if test="null != phone and '' != phone">phone = #{phone},</if>
|
<if test="null != phone and '' != phone">phone = #{phone},</if>
|
||||||
<if test="null != weixinOpenId and '' != weixinOpenId">weixin_open_id = #{weixinOpenId},</if>
|
<if test="null != weixinOpenId and '' != weixinOpenId">weixin_open_id = #{weixinOpenId},</if>
|
||||||
<if test="null != alipayOpenId and '' != alipayOpenId">alipay_open_id = #{alipayOpenId},</if>
|
<if test="null != alipayOpenId and '' != alipayOpenId">alipay_open_id = #{alipayOpenId},</if>
|
||||||
<if test="null != weixinLogin and ''">weixin_login = #{weixinLogin},</if>
|
<if test="null != weixinLogin ">weixin_login = #{weixinLogin},</if>
|
||||||
<if test="null != alipayLogin and ''">alipay_login = #{alipayLogin},</if>
|
<if test="null != alipayLogin ">alipay_login = #{alipayLogin},</if>
|
||||||
<if test="null != avatar and '' != avatar">avatar = #{avatar},</if>
|
<if test="null != avatar and '' != avatar">avatar = #{avatar},</if>
|
||||||
<if test="null != balance and '' != balance">balance = #{balance},</if>
|
<if test="null != balance ">balance = #{balance},</if>
|
||||||
<if test="null != password and '' != password">password = #{password},</if>
|
<if test="null != password and '' != password">password = #{password},</if>
|
||||||
<if test="null != status">status = #{status},</if>
|
<if test="null != status">status = #{status},</if>
|
||||||
<if test="null != delFlag and '' != delFlag">del_flag = #{delFlag},</if>
|
<if test="null != delFlag and '' != delFlag">del_flag = #{delFlag},</if>
|
||||||
|
|||||||
@ -195,11 +195,11 @@
|
|||||||
<if test="null != cooperationEndTime">cooperation_end_time =
|
<if test="null != cooperationEndTime">cooperation_end_time =
|
||||||
#{cooperationEndTime},
|
#{cooperationEndTime},
|
||||||
</if>
|
</if>
|
||||||
<if test="null != balance and '' != balance">balance = #{balance},</if>
|
<if test="null != balance ">balance = #{balance},</if>
|
||||||
<if test="null != areaCode and '' != areaCode">area_code = #{areaCode},</if>
|
<if test="null != areaCode and '' != areaCode">area_code = #{areaCode},</if>
|
||||||
<if test="null != address and '' != address">address = #{address},</if>
|
<if test="null != address and '' != address">address = #{address},</if>
|
||||||
<if test="null != detailedAddress and '' != detailedAddress">detailed_address = #{detailedAddress},</if>
|
<if test="null != detailedAddress and '' != detailedAddress">detailed_address = #{detailedAddress},</if>
|
||||||
<if test="null != commissionType and ''">commission_type = #{commissionType},</if>
|
<if test="null != commissionType ">commission_type = #{commissionType},</if>
|
||||||
<if test="null != commissionRate and '' != commissionRate">commission_rate = #{commissionRate},</if>
|
<if test="null != commissionRate and '' != commissionRate">commission_rate = #{commissionRate},</if>
|
||||||
<if test="null != longitude and '' != longitude">longitude = #{longitude},</if>
|
<if test="null != longitude and '' != longitude">longitude = #{longitude},</if>
|
||||||
<if test="null != latitude and '' != latitude">latitude = #{latitude},</if>
|
<if test="null != latitude and '' != latitude">latitude = #{latitude},</if>
|
||||||
@ -265,12 +265,33 @@
|
|||||||
<if test="createTimeEnd != null and createTimeEnd != ''"><!-- 结束时间检索 -->
|
<if test="createTimeEnd != null and createTimeEnd != ''"><!-- 结束时间检索 -->
|
||||||
AND xiu.create_time <= #{createTimeEnd}
|
AND xiu.create_time <= #{createTimeEnd}
|
||||||
</if>
|
</if>
|
||||||
ORDER BY xiu.update_time DESC
|
ORDER BY xiu.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getUserByInternetUserId" parameterType="java.lang.Long"
|
<select id="getUserByInternetUserId" parameterType="java.lang.Long"
|
||||||
resultType="com.xhpc.system.api.domain.SysUser">
|
resultType="com.xhpc.system.api.domain.SysUser">
|
||||||
select *
|
select user_id userId,
|
||||||
|
dept_id deptid,
|
||||||
|
user_name userName,
|
||||||
|
nick_name nickName,
|
||||||
|
user_type userType,
|
||||||
|
email,
|
||||||
|
phonenumber,
|
||||||
|
operator_id operatorId,
|
||||||
|
internet_user_id internetUserId,
|
||||||
|
sex,
|
||||||
|
avatar,
|
||||||
|
password,
|
||||||
|
data_power_type dataPowerType,
|
||||||
|
status,
|
||||||
|
del_flag delFlag,
|
||||||
|
login_ip loginIp,
|
||||||
|
login_date loginDate,
|
||||||
|
create_by createBy,
|
||||||
|
create_time createTime,
|
||||||
|
update_by updateBy,
|
||||||
|
update_time updateTime,
|
||||||
|
remark
|
||||||
from sys_user
|
from sys_user
|
||||||
where del_flag = 0
|
where del_flag = 0
|
||||||
and internet_user_id = #{internetUserId}
|
and internet_user_id = #{internetUserId}
|
||||||
|
|||||||
@ -226,7 +226,7 @@
|
|||||||
<if test="null != contactName and '' != contactName">contact_name = #{contactName},</if>
|
<if test="null != contactName and '' != contactName">contact_name = #{contactName},</if>
|
||||||
<if test="null != contactPhone and '' != contactPhone">contact_phone = #{contactPhone},</if>
|
<if test="null != contactPhone and '' != contactPhone">contact_phone = #{contactPhone},</if>
|
||||||
<if test="null != phone and '' != phone">phone = #{phone},</if>
|
<if test="null != phone and '' != phone">phone = #{phone},</if>
|
||||||
<if test="null != attribute and '' != attribute">attribute = #{attribute},</if>
|
<if test="null != attribute ">attribute = #{attribute},</if>
|
||||||
<if test="null != openBank and '' != openBank">open_bank = #{openBank},</if>
|
<if test="null != openBank and '' != openBank">open_bank = #{openBank},</if>
|
||||||
<if test="null != cardNumber">card_number = #{cardNumber},</if>
|
<if test="null != cardNumber">card_number = #{cardNumber},</if>
|
||||||
<if test="null != areaCode and '' != areaCode">area_code = #{areaCode},</if>
|
<if test="null != areaCode and '' != areaCode">area_code = #{areaCode},</if>
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
<if test="null != sex and '' != sex">sex = #{sex},</if>
|
<if test="null != sex and '' != sex">sex = #{sex},</if>
|
||||||
<if test="null != avatar and '' != avatar">avatar = #{avatar},</if>
|
<if test="null != avatar and '' != avatar">avatar = #{avatar},</if>
|
||||||
<if test="null != password and '' != password">password = #{password},</if>
|
<if test="null != password and '' != password">password = #{password},</if>
|
||||||
<if test="null != dataPowerType and '' != dataPowerType">data_power_type = #{dataPowerType},</if>
|
<if test="null != dataPowerType ">data_power_type = #{dataPowerType},</if>
|
||||||
<if test="null != status">status = #{status},</if>
|
<if test="null != status">status = #{status},</if>
|
||||||
<if test="null != delFlag and '' != delFlag">del_flag = #{delFlag},</if>
|
<if test="null != delFlag and '' != delFlag">del_flag = #{delFlag},</if>
|
||||||
<if test="null != loginIp and '' != loginIp">login_ip = #{loginIp},</if>
|
<if test="null != loginIp and '' != loginIp">login_ip = #{loginIp},</if>
|
||||||
@ -88,7 +88,7 @@
|
|||||||
|
|
||||||
<select id="pcInfo" parameterType="java.lang.Long" resultType="java.util.Map">
|
<select id="pcInfo" parameterType="java.lang.Long" resultType="java.util.Map">
|
||||||
select su.user_id userId,su.user_name userName,
|
select su.user_id userId,su.user_name userName,
|
||||||
su.nick_name nickName, su.email,su.status,
|
su.nick_name nickName, su.email,su.status,su.avatar,
|
||||||
su.create_by createBy ,su.create_time createTime,su.`status` ,
|
su.create_by createBy ,su.create_time createTime,su.`status` ,
|
||||||
CASE WHEN su.`status` = 0 THEN '正常' else '禁用' end statusName,
|
CASE WHEN su.`status` = 0 THEN '正常' else '禁用' end statusName,
|
||||||
sdd.dict_label sexName
|
sdd.dict_label sexName
|
||||||
@ -120,7 +120,7 @@
|
|||||||
|
|
||||||
<select id="operatorInfo" parameterType="java.lang.Long" resultType="java.util.Map">
|
<select id="operatorInfo" parameterType="java.lang.Long" resultType="java.util.Map">
|
||||||
select su.user_id userId,su.user_name userName,
|
select su.user_id userId,su.user_name userName,
|
||||||
su.nick_name nickName, su.email,su.sex,
|
su.nick_name nickName, su.email,su.sex,su.avatar,
|
||||||
su.create_by createBy ,su.create_time createTime,xo.operator_id operatorId,
|
su.create_by createBy ,su.create_time createTime,xo.operator_id operatorId,
|
||||||
xo.`name` operatorName,su.`status` ,
|
xo.`name` operatorName,su.`status` ,
|
||||||
CASE WHEN su.`status` = 0 THEN '正常' else '禁用' end statusName,
|
CASE WHEN su.`status` = 0 THEN '正常' else '禁用' end statusName,
|
||||||
@ -238,7 +238,7 @@
|
|||||||
<if test="userId != null and userId != 0">user_id,</if>
|
<if test="userId != null and userId != 0">user_id,</if>
|
||||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||||
<if test="userName != null and userName != ''">user_name,</if>
|
<if test="userName != null and userName != ''">user_name,</if>
|
||||||
<if test="userTpe != null and userTpe != ''">user_type,</if>
|
<if test="userType != null and userType != ''">user_type,</if>
|
||||||
<if test="nickName != null and nickName != ''">nick_name,</if>
|
<if test="nickName != null and nickName != ''">nick_name,</if>
|
||||||
<if test="email != null and email != ''">email,</if>
|
<if test="email != null and email != ''">email,</if>
|
||||||
<if test="avatar != null and avatar != ''">avatar,</if>
|
<if test="avatar != null and avatar != ''">avatar,</if>
|
||||||
@ -256,7 +256,7 @@
|
|||||||
<if test="userId != null and userId != ''">#{userId},</if>
|
<if test="userId != null and userId != ''">#{userId},</if>
|
||||||
<if test="deptId != null and deptId != ''">#{deptId},</if>
|
<if test="deptId != null and deptId != ''">#{deptId},</if>
|
||||||
<if test="userName != null and userName != ''">#{userName},</if>
|
<if test="userName != null and userName != ''">#{userName},</if>
|
||||||
<if test="userTpe != null and userTpe != ''">#{userTpe},</if>
|
<if test="userType != null and userType != ''">#{userType},</if>
|
||||||
<if test="nickName != null and nickName != ''">#{nickName},</if>
|
<if test="nickName != null and nickName != ''">#{nickName},</if>
|
||||||
<if test="email != null and email != ''">#{email},</if>
|
<if test="email != null and email != ''">#{email},</if>
|
||||||
<if test="avatar != null and avatar != ''">#{avatar},</if>
|
<if test="avatar != null and avatar != ''">#{avatar},</if>
|
||||||
@ -273,30 +273,6 @@
|
|||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateUser" parameterType="com.xhpc.system.api.domain.SysUser">
|
|
||||||
update sys_user
|
|
||||||
<set>
|
|
||||||
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
|
|
||||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
|
||||||
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
|
|
||||||
<if test="email != null ">email = #{email},</if>
|
|
||||||
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
|
|
||||||
<if test="operatorId != null and operatorId != ''">operator_id = #{operatorId},</if>
|
|
||||||
<if test="internetUserId != null and internetUserId != ''">internet_user_id = #{internetUserId},</if>
|
|
||||||
<if test="dataPowerType != null and dataPowerType != ''">data_power_type = #{dataPowerType},</if>
|
|
||||||
<if test="sex != null and sex != ''">sex = #{sex},</if>
|
|
||||||
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
|
|
||||||
<if test="password != null and password != ''">password = #{password},</if>
|
|
||||||
<if test="status != null and status != ''">status = #{status},</if>
|
|
||||||
<if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
|
|
||||||
<if test="loginDate != null">login_date = #{loginDate},</if>
|
|
||||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
||||||
<if test="remark != null">remark = #{remark},</if>
|
|
||||||
update_time = sysdate()
|
|
||||||
</set>
|
|
||||||
where user_id = #{userId}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<insert id="batchUserRole">
|
<insert id="batchUserRole">
|
||||||
insert into sys_user_role(user_id, role_id) values
|
insert into sys_user_role(user_id, role_id) values
|
||||||
<foreach item="item" index="index" collection="list" separator=",">
|
<foreach item="item" index="index" collection="list" separator=",">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user