1修改账号相关接口
This commit is contained in:
parent
fc8104ea23
commit
ebc4ba6496
@ -370,6 +370,7 @@ public class SysUser extends BaseEntity
|
|||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
.append("userId", getUserId())
|
.append("userId", getUserId())
|
||||||
.append("deptId", getDeptId())
|
.append("deptId", getDeptId())
|
||||||
|
.append("userType", getUserType())
|
||||||
.append("userName", getUserName())
|
.append("userName", getUserName())
|
||||||
.append("nickName", getNickName())
|
.append("nickName", getNickName())
|
||||||
.append("email", getEmail())
|
.append("email", getEmail())
|
||||||
|
|||||||
@ -1,34 +1,20 @@
|
|||||||
package com.ruoyi.system.controller;
|
package com.ruoyi.system.controller;
|
||||||
|
|
||||||
import com.ruoyi.common.core.constant.UserConstants;
|
|
||||||
import com.ruoyi.common.core.domain.R;
|
|
||||||
import com.ruoyi.common.core.utils.SecurityUtils;
|
import com.ruoyi.common.core.utils.SecurityUtils;
|
||||||
import com.ruoyi.common.core.utils.StringUtils;
|
|
||||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
|
||||||
import com.ruoyi.common.core.web.controller.BaseController;
|
import com.ruoyi.common.core.web.controller.BaseController;
|
||||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
|
||||||
import com.ruoyi.common.log.annotation.Log;
|
|
||||||
import com.ruoyi.common.log.enums.BusinessType;
|
|
||||||
import com.ruoyi.common.security.annotation.PreAuthorize;
|
|
||||||
import com.ruoyi.system.api.domain.SysRole;
|
import com.ruoyi.system.api.domain.SysRole;
|
||||||
import com.ruoyi.system.api.domain.SysUser;
|
|
||||||
import com.ruoyi.system.api.model.LoginUser;
|
|
||||||
import com.ruoyi.system.domain.SysMenu;
|
import com.ruoyi.system.domain.SysMenu;
|
||||||
import com.ruoyi.system.domain.XhpcUserPrivilege;
|
import com.ruoyi.system.domain.XhpcUserPrivilege;
|
||||||
import com.ruoyi.system.service.*;
|
import com.ruoyi.system.service.ISysMenuService;
|
||||||
|
import com.ruoyi.system.service.ISysRoleService;
|
||||||
|
import com.ruoyi.system.service.IXhpcUserPrivilegeService;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户信息
|
* 用户信息
|
||||||
@ -51,13 +37,13 @@ public class XhpcUserPrivilegeController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 加载对应角色菜单列表树
|
* 加载对应角色菜单列表树
|
||||||
*/
|
*/
|
||||||
@PreAuthorize(hasPermi = "user:privilege:power")
|
//@PreAuthorize(hasPermi = "user:privilege:power")
|
||||||
@GetMapping(value = "/power")
|
@GetMapping(value = "/power")
|
||||||
public AjaxResult roleMenuTreeselect(@PathVariable("userId") Long userId) {
|
public AjaxResult roleMenuTreeselect(@RequestParam Long userId) {
|
||||||
Long SecurityUserId = SecurityUtils.getUserId();
|
Long SecurityUserId = SecurityUtils.getUserId();
|
||||||
List<SysMenu> menus = menuService.selectMenuList(SecurityUserId);
|
List<SysMenu> menus = menuService.selectMenuList(SecurityUserId);
|
||||||
//登录用户拥有的数据权限树
|
//登录用户拥有的数据权限树
|
||||||
List<Map<String, Object>> data = iXhpcUserPrivilegeService.dataList(SecurityUserId);
|
List<Map<String, Object>> dataList = iXhpcUserPrivilegeService.dataList(SecurityUserId);
|
||||||
//选择用户拥有的权限
|
//选择用户拥有的权限
|
||||||
List<String> dataCheckedKeys = iXhpcUserPrivilegeService.dataCheckedKeys(userId);
|
List<String> dataCheckedKeys = iXhpcUserPrivilegeService.dataCheckedKeys(userId);
|
||||||
AjaxResult ajax = AjaxResult.success();
|
AjaxResult ajax = AjaxResult.success();
|
||||||
@ -65,7 +51,7 @@ public class XhpcUserPrivilegeController extends BaseController {
|
|||||||
ajax.put("checkedKeys", menuService.selectMenuListByRoleId(sysRole.getRoleId()));
|
ajax.put("checkedKeys", menuService.selectMenuListByRoleId(sysRole.getRoleId()));
|
||||||
ajax.put("menus", menuService.buildMenuTreeSelect(menus));
|
ajax.put("menus", menuService.buildMenuTreeSelect(menus));
|
||||||
ajax.put("dataCheckedKeys", dataCheckedKeys);
|
ajax.put("dataCheckedKeys", dataCheckedKeys);
|
||||||
ajax.put("data", data);
|
ajax.put("dataList", dataList);
|
||||||
return ajax;
|
return ajax;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,7 +59,7 @@ public class XhpcUserPrivilegeController extends BaseController {
|
|||||||
* 新增数据权限
|
* 新增数据权限
|
||||||
*/
|
*/
|
||||||
@ApiOperation("新增数据权限")
|
@ApiOperation("新增数据权限")
|
||||||
@PreAuthorize(hasPermi = "user:privilege:add")
|
//@PreAuthorize(hasPermi = "user:privilege:add")
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
public AjaxResult add(@RequestBody List<XhpcUserPrivilege> list) {
|
public AjaxResult add(@RequestBody List<XhpcUserPrivilege> list) {
|
||||||
if (null != list && list.size() > 0) {
|
if (null != list && list.size() > 0) {
|
||||||
|
|||||||
@ -4,29 +4,30 @@
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.system.mapper.SysUserMapper">
|
<mapper namespace="com.ruoyi.system.mapper.SysUserMapper">
|
||||||
|
|
||||||
<resultMap type="SysUser" id="SysUserResult">
|
<resultMap id="SysUserResult" type="com.ruoyi.system.api.domain.SysUser">
|
||||||
<id property="userId" column="user_id"/>
|
<result column="user_id" property="userId"/>
|
||||||
<result property="deptId" column="dept_id"/>
|
<result column="dept_id" property="deptId"/>
|
||||||
<result property="userName" column="user_name"/>
|
<result column="user_name" property="userName"/>
|
||||||
<result property="nickName" column="nick_name"/>
|
<result column="user_type" property="userType"/>
|
||||||
<result property="email" column="email"/>
|
<result column="nick_name" property="nickName"/>
|
||||||
<result property="phonenumber" column="phonenumber"/>
|
<result column="email" property="email"/>
|
||||||
<result property="sex" column="sex"/>
|
<result column="phonenumber" property="phonenumber"/>
|
||||||
<result property="avatar" column="avatar"/>
|
<result column="operator_id" property="operatorId"/>
|
||||||
<result property="password" column="password"/>
|
<result column="internet_user_id" property="internetUserId"/>
|
||||||
<result property="operatorId" column="operator_id"/>
|
<result column="sex" property="sex"/>
|
||||||
<result property="dataPowerType" column="data_power_type"/>
|
<result column="avatar" property="avatar"/>
|
||||||
<result property="internetUserId" column="internet_user_id"/>
|
<result column="password" property="password"/>
|
||||||
<result property="status" column="status"/>
|
<result column="data_power_type" property="dataPowerType"/>
|
||||||
<result property="delFlag" column="del_flag"/>
|
<result column="status" property="status"/>
|
||||||
<result property="loginIp" column="login_ip"/>
|
<result column="del_flag" property="delFlag"/>
|
||||||
<result property="loginDate" column="login_date"/>
|
<result column="login_ip" property="loginIp"/>
|
||||||
<result property="createBy" column="create_by"/>
|
<result column="login_date" property="loginDate"/>
|
||||||
<result property="createTime" column="create_time"/>
|
<result column="create_by" property="createBy"/>
|
||||||
<result property="updateBy" column="update_by"/>
|
<result column="create_time" property="createTime"/>
|
||||||
<result property="updateTime" column="update_time"/>
|
<result column="update_by" property="updateBy"/>
|
||||||
<result property="remark" column="remark"/>
|
<result column="update_time" property="updateTime"/>
|
||||||
<association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult"/>
|
<result column="remark" property="remark"/>
|
||||||
|
<association column="dept_id" property="dept" javaType="SysDept" resultMap="deptResult"/>
|
||||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>
|
<collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
@ -50,8 +51,8 @@
|
|||||||
|
|
||||||
<sql id="selectUserVo">
|
<sql id="selectUserVo">
|
||||||
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
|
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
|
||||||
d.dept_id, d.parent_id, d.dept_name, d.order_num, d.leader, d.status as dept_status,
|
d.dept_id, d.parent_id, d.dept_name, d.order_num, d.leader, d.status as dept_status,u.data_power_type ,
|
||||||
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
|
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,u.user_type
|
||||||
from sys_user u
|
from sys_user u
|
||||||
left join sys_dept d on u.dept_id = d.dept_id
|
left join sys_dept d on u.dept_id = d.dept_id
|
||||||
left join sys_user_role ur on u.user_id = ur.user_id
|
left join sys_user_role ur on u.user_id = ur.user_id
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
delete from xhpc_station_internet_blacklist where user_id = #{userId}
|
delete from xhpc_station_internet_blacklist where user_id = #{userId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="dataCheckedKeys" parameterType="String" resultType="java.lang.String">
|
<select id="dataCheckedKeys" parameterType="Long" resultType="java.lang.String">
|
||||||
select charging_station_id chargingStationId from xhpc_user_privilege where user_id = #{userId}
|
select charging_station_id chargingStationId from xhpc_user_privilege where user_id = #{userId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -132,7 +132,7 @@
|
|||||||
|
|
||||||
<select id="dataPowerByOperatorId" parameterType="String" resultType="java.util.Map">
|
<select id="dataPowerByOperatorId" parameterType="String" resultType="java.util.Map">
|
||||||
|
|
||||||
select xcs.charging_station_id ,xcs.name
|
select xcs.charging_station_id chargingStationId,xcs.name
|
||||||
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`
|
||||||
|
|||||||
@ -89,6 +89,10 @@
|
|||||||
<groupId>com.alipay.sdk</groupId>
|
<groupId>com.alipay.sdk</groupId>
|
||||||
<artifactId>alipay-sdk-java</artifactId>
|
<artifactId>alipay-sdk-java</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.hutool</groupId>
|
||||||
|
<artifactId>hutool-all</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@ -8,7 +8,6 @@ import com.ruoyi.common.core.domain.R;
|
|||||||
import com.ruoyi.common.core.web.controller.BaseController;
|
import com.ruoyi.common.core.web.controller.BaseController;
|
||||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||||
import com.ruoyi.common.security.annotation.PreAuthorize;
|
|
||||||
import com.xhpc.user.service.IXhpcAppUserUserService;
|
import com.xhpc.user.service.IXhpcAppUserUserService;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -34,7 +33,7 @@ public class XhpcAppUserController extends BaseController {
|
|||||||
* C端用户详情
|
* C端用户详情
|
||||||
*/
|
*/
|
||||||
@ApiOperation("C端用户详情")
|
@ApiOperation("C端用户详情")
|
||||||
@PreAuthorize(hasPermi = "app:user:info")
|
//@PreAuthorize(hasPermi = "app:user:info")
|
||||||
@GetMapping("/info")
|
@GetMapping("/info")
|
||||||
public AjaxResult info(@RequestParam Long appUserId) {
|
public AjaxResult info(@RequestParam Long appUserId) {
|
||||||
return AjaxResult.success(iXhpcAppUserUserService.info(appUserId));
|
return AjaxResult.success(iXhpcAppUserUserService.info(appUserId));
|
||||||
@ -43,7 +42,7 @@ public class XhpcAppUserController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* C端用户分页列表
|
* C端用户分页列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize(hasPermi = "app:user:page")
|
//@PreAuthorize(hasPermi = "app:user:page")
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
public TableDataInfo page(String phone) {
|
public TableDataInfo page(String phone) {
|
||||||
startPage();
|
startPage();
|
||||||
@ -55,7 +54,7 @@ public class XhpcAppUserController extends BaseController {
|
|||||||
* 禁用/启用C端用户
|
* 禁用/启用C端用户
|
||||||
*/
|
*/
|
||||||
@ApiOperation("禁用/启用C端用户")
|
@ApiOperation("禁用/启用C端用户")
|
||||||
@PreAuthorize(hasPermi = "app:user:status")
|
//@PreAuthorize(hasPermi = "app:user:status")
|
||||||
@PostMapping("/status")
|
@PostMapping("/status")
|
||||||
public AjaxResult status(@RequestParam Long appUserId) {
|
public AjaxResult status(@RequestParam Long appUserId) {
|
||||||
iXhpcAppUserUserService.status(appUserId);
|
iXhpcAppUserUserService.status(appUserId);
|
||||||
@ -89,7 +88,7 @@ public class XhpcAppUserController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation("小程序用户详情")
|
@ApiOperation("小程序用户详情")
|
||||||
@GetMapping("/appInfo")
|
@GetMapping("/appInfo")
|
||||||
public AjaxResult appInfo(@RequestBody Long appUserId) {
|
public AjaxResult appInfo(@RequestParam Long appUserId) {
|
||||||
return AjaxResult.success(iXhpcAppUserUserService.info(appUserId));
|
return AjaxResult.success(iXhpcAppUserUserService.info(appUserId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,4 +132,13 @@ public class XhpcAppUserController extends BaseController {
|
|||||||
return AjaxResult.success(response);
|
return AjaxResult.success(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注销账号
|
||||||
|
*/
|
||||||
|
@ApiOperation("注销账号")
|
||||||
|
@PostMapping("/logout")
|
||||||
|
public AjaxResult logout(@RequestParam Long appUserId) {
|
||||||
|
iXhpcAppUserUserService.logout(appUserId);
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,7 +38,7 @@ public class XhpcInternetUserController extends BaseController {
|
|||||||
* 新增流量用户
|
* 新增流量用户
|
||||||
*/
|
*/
|
||||||
@ApiOperation("新增流量用户")
|
@ApiOperation("新增流量用户")
|
||||||
@PreAuthorize(hasPermi = "user:internet:add")
|
//@PreAuthorize(hasPermi = "user:internet:add")
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
public AjaxResult add(@Valid @RequestBody XhpcInternetUser xhpcInternetUser) {
|
public AjaxResult add(@Valid @RequestBody XhpcInternetUser xhpcInternetUser) {
|
||||||
SysUser sysUser = new SysUser();
|
SysUser sysUser = new SysUser();
|
||||||
@ -89,9 +89,9 @@ public class XhpcInternetUserController extends BaseController {
|
|||||||
* 删除流量用户
|
* 删除流量用户
|
||||||
*/
|
*/
|
||||||
@ApiOperation("删除流量用户")
|
@ApiOperation("删除流量用户")
|
||||||
@PreAuthorize(hasPermi = "user:internet:remove")
|
//@PreAuthorize(hasPermi = "user:internet:remove")
|
||||||
@PostMapping("/remove")
|
@PostMapping("/remove")
|
||||||
public AjaxResult remove(@RequestParam Long[] ids) {
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||||
iXhpcInternetUserService.deleteByIds(ids);
|
iXhpcInternetUserService.deleteByIds(ids);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
@ -100,7 +100,7 @@ public class XhpcInternetUserController extends BaseController {
|
|||||||
* 流量用户详情
|
* 流量用户详情
|
||||||
*/
|
*/
|
||||||
@ApiOperation("流量用户详情")
|
@ApiOperation("流量用户详情")
|
||||||
@PreAuthorize(hasPermi = "user:internet:info")
|
//@PreAuthorize(hasPermi = "user:internet:info")
|
||||||
@GetMapping("/info")
|
@GetMapping("/info")
|
||||||
public AjaxResult info(@RequestParam Long internetUserId) {
|
public AjaxResult info(@RequestParam Long internetUserId) {
|
||||||
return AjaxResult.success(iXhpcInternetUserService.info(internetUserId));
|
return AjaxResult.success(iXhpcInternetUserService.info(internetUserId));
|
||||||
@ -109,7 +109,7 @@ public class XhpcInternetUserController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 流量用户分页列表
|
* 流量用户分页列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize(hasPermi = "system:internet:page")
|
//@PreAuthorize(hasPermi = "system:internet:page")
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
public TableDataInfo page(String name, String contactName, String contactPhone) {
|
public TableDataInfo page(String name, String contactName, String contactPhone) {
|
||||||
startPage();
|
startPage();
|
||||||
@ -121,7 +121,7 @@ public class XhpcInternetUserController extends BaseController {
|
|||||||
* 禁用/启用流量用户
|
* 禁用/启用流量用户
|
||||||
*/
|
*/
|
||||||
@ApiOperation("禁用/启用流量用户")
|
@ApiOperation("禁用/启用流量用户")
|
||||||
@PreAuthorize(hasPermi = "user:internet:status")
|
//@PreAuthorize(hasPermi = "user:internet:status")
|
||||||
@PostMapping("/status")
|
@PostMapping("/status")
|
||||||
public AjaxResult status(@RequestParam Long internetUserId) {
|
public AjaxResult status(@RequestParam Long internetUserId) {
|
||||||
iXhpcInternetUserService.status(internetUserId);
|
iXhpcInternetUserService.status(internetUserId);
|
||||||
@ -132,7 +132,7 @@ public class XhpcInternetUserController extends BaseController {
|
|||||||
* 流量用户列表
|
* 流量用户列表
|
||||||
*/
|
*/
|
||||||
@ApiOperation("流量用户列表")
|
@ApiOperation("流量用户列表")
|
||||||
@PreAuthorize(hasPermi = "user:internet:list")
|
//@PreAuthorize(hasPermi = "user:internet:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(String name) {
|
public TableDataInfo list(String name) {
|
||||||
List<Map<String, Object>> list = iXhpcInternetUserService.list(name);
|
List<Map<String, Object>> list = iXhpcInternetUserService.list(name);
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流量用户
|
* 运营商设置流量方黑名单
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@ -27,9 +27,9 @@ public class XhpcOperatorInternetBlacklistController extends BaseController {
|
|||||||
private IXhpcOperatorInternetBlacklistService xhpcOperatorInternetBlacklistService;
|
private IXhpcOperatorInternetBlacklistService xhpcOperatorInternetBlacklistService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增流量用户
|
* 新增运营商设置流量方黑名单
|
||||||
*/
|
*/
|
||||||
@ApiOperation("新增流量用户")
|
@ApiOperation("新增运营商设置流量方黑名单")
|
||||||
@PreAuthorize(hasPermi = "operator:internet:add")
|
@PreAuthorize(hasPermi = "operator:internet:add")
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
public AjaxResult add(@Valid @RequestBody List<XhpcOperatorInternetBlacklist> list) {
|
public AjaxResult add(@Valid @RequestBody List<XhpcOperatorInternetBlacklist> list) {
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流量用户
|
* 电站流量方黑名单
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -17,7 +17,6 @@ public class XhpcInternetUser extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 用户id
|
* 用户id
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "用户id不能为空")
|
|
||||||
private Long internetUserId;
|
private Long internetUserId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -54,18 +53,16 @@ public class XhpcInternetUser extends BaseEntity {
|
|||||||
* 卡号
|
* 卡号
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "卡号不能为空")
|
@NotNull(message = "卡号不能为空")
|
||||||
private Integer cardNumber;
|
private Long cardNumber;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 合作开始时间
|
* 合作开始时间
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "合作开始时间不能为空")
|
|
||||||
private Date cooperationStartTime;
|
private Date cooperationStartTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 合作结束时间
|
* 合作结束时间
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "合作结束时间不能为空")
|
|
||||||
private Date cooperationEndTime;
|
private Date cooperationEndTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -173,11 +170,11 @@ public class XhpcInternetUser extends BaseEntity {
|
|||||||
this.openBank = openBank;
|
this.openBank = openBank;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getCardNumber() {
|
public Long getCardNumber() {
|
||||||
return cardNumber;
|
return cardNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCardNumber(Integer cardNumber) {
|
public void setCardNumber(Long cardNumber) {
|
||||||
this.cardNumber = cardNumber;
|
this.cardNumber = cardNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -29,6 +29,14 @@ public interface XhpcAppUserMapper {
|
|||||||
*/
|
*/
|
||||||
public int update(XhpcAppUser xhpcAppUser);
|
public int update(XhpcAppUser xhpcAppUser);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除C端用户信息
|
||||||
|
*
|
||||||
|
* @param appUserId C端用户id
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteById(@Param("appUserId") Long appUserId);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询C端用户详情
|
* 查询C端用户详情
|
||||||
|
|||||||
@ -80,4 +80,11 @@ public interface IXhpcAppUserUserService {
|
|||||||
*/
|
*/
|
||||||
public R<?> voluntaryLogin(Map<String, Object> map);
|
public R<?> voluntaryLogin(Map<String, Object> map);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注销账号
|
||||||
|
*
|
||||||
|
* @param appUserId C端用户id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public void logout(Long appUserId);
|
||||||
}
|
}
|
||||||
@ -234,6 +234,7 @@ public class XhpcAppUserServiceImpl implements IXhpcAppUserUserService {
|
|||||||
* @param map type 登录方式1微信2小程序 openid 微信或支付宝openid
|
* @param map type 登录方式1微信2小程序 openid 微信或支付宝openid
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public R<?> voluntaryLogin(Map<String, Object> map) {
|
public R<?> voluntaryLogin(Map<String, Object> map) {
|
||||||
String type = StringUtils.valueOf(map.get("type"));
|
String type = StringUtils.valueOf(map.get("type"));
|
||||||
String openid = StringUtils.valueOf(map.get("openid"));
|
String openid = StringUtils.valueOf(map.get("openid"));
|
||||||
@ -243,4 +244,15 @@ public class XhpcAppUserServiceImpl implements IXhpcAppUserUserService {
|
|||||||
}
|
}
|
||||||
return appLogin(user.getPhone(), type, openid);
|
return appLogin(user.getPhone(), type, openid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注销账号
|
||||||
|
*
|
||||||
|
* @param appUserId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void logout(Long appUserId) {
|
||||||
|
xhpcAppUserMapper.deleteById(appUserId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -4,6 +4,7 @@ import com.ruoyi.common.core.utils.StringUtils;
|
|||||||
import com.ruoyi.system.api.domain.SysUser;
|
import com.ruoyi.system.api.domain.SysUser;
|
||||||
import com.xhpc.user.domain.XhpcInternetUser;
|
import com.xhpc.user.domain.XhpcInternetUser;
|
||||||
import com.xhpc.user.mapper.XhpcInternetUserMapper;
|
import com.xhpc.user.mapper.XhpcInternetUserMapper;
|
||||||
|
import com.xhpc.user.mapper.XhpcOperatorMapper;
|
||||||
import com.xhpc.user.mapper.XhpcUserMapper;
|
import com.xhpc.user.mapper.XhpcUserMapper;
|
||||||
import com.xhpc.user.service.IXhpcInternetUserService;
|
import com.xhpc.user.service.IXhpcInternetUserService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -26,6 +27,9 @@ public class XhpcInternetUserServiceImpl implements IXhpcInternetUserService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private XhpcUserMapper xhpcUserMapper;
|
private XhpcUserMapper xhpcUserMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private XhpcOperatorMapper xhpcOperatorMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增任务
|
* 新增任务
|
||||||
*
|
*
|
||||||
@ -54,6 +58,14 @@ public class XhpcInternetUserServiceImpl implements IXhpcInternetUserService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void deleteByIds(Long[] ids) {
|
public void deleteByIds(Long[] ids) {
|
||||||
|
for (Long id : ids) {
|
||||||
|
SysUser sysUser = xhpcOperatorMapper.getUserByOperatorId(id);
|
||||||
|
// 删除用户与角色关联
|
||||||
|
xhpcOperatorMapper.deleteUserRoleByUserId(sysUser.getUserId());
|
||||||
|
// 删除用户与岗位表
|
||||||
|
xhpcOperatorMapper.deleteUserPostByUserId(sysUser.getUserId());
|
||||||
|
xhpcOperatorMapper.deleteUserById(sysUser.getUserId(), "2");
|
||||||
|
}
|
||||||
xhpcInternetUserMapper.deleteByIds(ids);
|
xhpcInternetUserMapper.deleteByIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -149,6 +149,10 @@
|
|||||||
WHERE app_user_id = #{appUserId}
|
WHERE app_user_id = #{appUserId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteById" parameterType="java.lang.Long">
|
||||||
|
delete from xhpc_app_user where app_user_id = #{appUserId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
<select id="info" parameterType="java.lang.Long" resultType="java.util.Map">
|
<select id="info" parameterType="java.lang.Long" resultType="java.util.Map">
|
||||||
select app_user_id appUserId, phone, weixin_open_id weixinOpenId,
|
select app_user_id appUserId, phone, weixin_open_id weixinOpenId,
|
||||||
weixin_login weixinlogin,alipay_login alipayLogin,
|
weixin_login weixinlogin,alipay_login alipayLogin,
|
||||||
@ -156,7 +160,7 @@
|
|||||||
`status`,create_by createBy ,create_time createTime,
|
`status`,create_by createBy ,create_time createTime,
|
||||||
update_time updateTime, update_by updateBy,
|
update_time updateTime, update_by updateBy,
|
||||||
del_flag delflag, remark,
|
del_flag delflag, remark,
|
||||||
CASE WHEN xiu.`status` = 0 THEN '正常' else '禁用' end statusName,
|
CASE WHEN `status` = 0 THEN '正常' else '禁用' end statusName
|
||||||
from xhpc_app_user
|
from xhpc_app_user
|
||||||
WHERE del_flag = 0 and app_user_id = #{appUserId}
|
WHERE del_flag = 0 and app_user_id = #{appUserId}
|
||||||
</select>
|
</select>
|
||||||
@ -164,7 +168,7 @@
|
|||||||
<select id="selectAppUserList" parameterType="java.lang.Long" resultType="java.util.Map">
|
<select id="selectAppUserList" parameterType="java.lang.Long" resultType="java.util.Map">
|
||||||
select app_user_id appUserId, phone, balance,
|
select app_user_id appUserId, phone, balance,
|
||||||
`status`,create_time createTime,
|
`status`,create_time createTime,
|
||||||
CASE WHEN xiu.`status` = 0 THEN '正常' else '禁用' end statusName
|
CASE WHEN `status` = 0 THEN '正常' else '禁用' end statusName
|
||||||
from xhpc_app_user
|
from xhpc_app_user
|
||||||
WHERE del_flag = 0
|
WHERE del_flag = 0
|
||||||
<if test="phone != null and phone != ''">
|
<if test="phone != null and phone != ''">
|
||||||
|
|||||||
@ -12,8 +12,8 @@
|
|||||||
<result column="contact_phone" property="contactPhone"/>
|
<result column="contact_phone" property="contactPhone"/>
|
||||||
<result column="open_bank" property="openBank"/>
|
<result column="open_bank" property="openBank"/>
|
||||||
<result column="card_number" property="cardNumber"/>
|
<result column="card_number" property="cardNumber"/>
|
||||||
<result column="cooperation_start_time" property="cooperationStartTime"/>
|
<result column="cooperation_start_time" property="cooperationStartTime" jdbcType="TIMESTAMP"/>
|
||||||
<result column="cooperation_end_time" property="cooperationEndTime"/>
|
<result column="cooperation_end_time" property="cooperationEndTime" jdbcType="TIMESTAMP"/>
|
||||||
<result column="money" property="money"/>
|
<result column="money" property="money"/>
|
||||||
<result column="area_code" property="areaCode"/>
|
<result column="area_code" property="areaCode"/>
|
||||||
<result column="address" property="address"/>
|
<result column="address" property="address"/>
|
||||||
@ -33,152 +33,155 @@
|
|||||||
|
|
||||||
|
|
||||||
<insert id="insert" parameterType="com.xhpc.user.domain.XhpcInternetUser">
|
<insert id="insert" parameterType="com.xhpc.user.domain.XhpcInternetUser">
|
||||||
insert into xhpc_internet_user(
|
INSERT INTO xhpc_internet_user
|
||||||
<if test="null != internetUserId and '' != internetUserId">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
internet_user_id,
|
<if test="null != internetUserId and '' != internetUserId">
|
||||||
</if>
|
internet_user_id,
|
||||||
<if test="null != name and '' != name">
|
</if>
|
||||||
name,
|
<if test="null != name and '' != name">
|
||||||
</if>
|
name,
|
||||||
<if test="null != phone and '' != phone">
|
</if>
|
||||||
phone,
|
<if test="null != phone and '' != phone">
|
||||||
</if>
|
phone,
|
||||||
<if test="null != contactName and '' != contactName">
|
</if>
|
||||||
contact_name,
|
<if test="null != contactName and '' != contactName">
|
||||||
</if>
|
contact_name,
|
||||||
<if test="null != contactPhone and '' != contactPhone">
|
</if>
|
||||||
contact_phone,
|
<if test="null != contactPhone and '' != contactPhone">
|
||||||
</if>
|
contact_phone,
|
||||||
<if test="null != openBank and '' != openBank">
|
</if>
|
||||||
open_bank,
|
<if test="null != openBank and '' != openBank">
|
||||||
</if>
|
open_bank,
|
||||||
<if test="null != cardNumber and '' != cardNumber">
|
</if>
|
||||||
card_number,
|
<if test="null != cardNumber and '' != cardNumber">
|
||||||
</if>
|
card_number,
|
||||||
<if test="null != cooperationStartTime and '' != cooperationStartTime">
|
</if>
|
||||||
cooperation_start_time,
|
<if test="null != cooperationStartTime ">
|
||||||
</if>
|
cooperation_start_time,
|
||||||
<if test="null != cooperationEndTime and '' != cooperationEndTime">
|
</if>
|
||||||
cooperation_end_time,
|
<if test="null != cooperationEndTime ">
|
||||||
</if>
|
cooperation_end_time,
|
||||||
<if test="null != money and '' != money">
|
</if>
|
||||||
money,
|
<if test="null != money and '' != money">
|
||||||
</if>
|
money,
|
||||||
<if test="null != areaCode and '' != areaCode">
|
</if>
|
||||||
area_code,
|
<if test="null != areaCode and '' != areaCode">
|
||||||
</if>
|
area_code,
|
||||||
<if test="null != address and '' != address">
|
</if>
|
||||||
address,
|
<if test="null != address and '' != address">
|
||||||
</if>
|
address,
|
||||||
<if test="null != detailedAddress and '' != detailedAddress">
|
</if>
|
||||||
detailed_address,
|
<if test="null != detailedAddress and '' != detailedAddress">
|
||||||
</if>
|
detailed_address,
|
||||||
<if test="null != commissionType and '' != commissionType">
|
</if>
|
||||||
commission_type,
|
<if test="null != commissionType and '' != commissionType">
|
||||||
</if>
|
commission_type,
|
||||||
<if test="null != commissionRate and '' != commissionRate">
|
</if>
|
||||||
commission_rate,
|
<if test="null != commissionRate and '' != commissionRate">
|
||||||
</if>
|
commission_rate,
|
||||||
<if test="null != longitude and '' != longitude">
|
</if>
|
||||||
longitude,
|
<if test="null != longitude and '' != longitude">
|
||||||
</if>
|
longitude,
|
||||||
<if test="null != latitude and '' != latitude">
|
</if>
|
||||||
latitude,
|
<if test="null != latitude and '' != latitude">
|
||||||
</if>
|
latitude,
|
||||||
<if test="null != status and '' != status">
|
</if>
|
||||||
status,
|
<if test="null != status and '' != status">
|
||||||
</if>
|
status,
|
||||||
<if test="null != delFlag and '' != delFlag">
|
</if>
|
||||||
del_flag,
|
<if test="null != delFlag and '' != delFlag">
|
||||||
</if>
|
del_flag,
|
||||||
<if test="null != createBy and '' != createBy">
|
</if>
|
||||||
create_by,
|
<if test="null != createBy and '' != createBy">
|
||||||
</if>
|
create_by,
|
||||||
<if test="null != createTime and '' != createTime">
|
</if>
|
||||||
create_time,
|
<if test="null != createTime and '' != createTime">
|
||||||
</if>
|
create_time,
|
||||||
<if test="null != updateBy and '' != updateBy">
|
</if>
|
||||||
update_by,
|
<if test="null != updateBy and '' != updateBy">
|
||||||
</if>
|
update_by,
|
||||||
<if test="null != updateTime and '' != updateTime">
|
</if>
|
||||||
update_time,
|
<if test="null != updateTime and '' != updateTime">
|
||||||
</if>
|
update_time,
|
||||||
<if test="null != remark and '' != remark">
|
</if>
|
||||||
remark
|
<if test="null != remark and '' != remark">
|
||||||
</if>
|
remark
|
||||||
)values(
|
</if>
|
||||||
<if test="null != internetUserId and '' != internetUserId">
|
</trim>
|
||||||
#{internetUserId},
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
</if>
|
<if test="null != internetUserId and '' != internetUserId">
|
||||||
<if test="null != name and '' != name">
|
#{internetUserId},
|
||||||
#{name},
|
</if>
|
||||||
</if>
|
<if test="null != name and '' != name">
|
||||||
<if test="null != phone and '' != phone">
|
#{name},
|
||||||
#{phone},
|
</if>
|
||||||
</if>
|
<if test="null != phone and '' != phone">
|
||||||
<if test="null != contactName and '' != contactName">
|
#{phone},
|
||||||
#{contactName},
|
</if>
|
||||||
</if>
|
<if test="null != contactName and '' != contactName">
|
||||||
<if test="null != contactPhone and '' != contactPhone">
|
#{contactName},
|
||||||
#{contactPhone},
|
</if>
|
||||||
</if>
|
<if test="null != contactPhone and '' != contactPhone">
|
||||||
<if test="null != openBank and '' != openBank">
|
#{contactPhone},
|
||||||
#{openBank},
|
</if>
|
||||||
</if>
|
<if test="null != openBank and '' != openBank">
|
||||||
<if test="null != cardNumber and '' != cardNumber">
|
#{openBank},
|
||||||
#{cardNumber},
|
</if>
|
||||||
</if>
|
<if test="null != cardNumber and '' != cardNumber">
|
||||||
<if test="null != cooperationStartTime and '' != cooperationStartTime">
|
#{cardNumber},
|
||||||
#{cooperationStartTime},
|
</if>
|
||||||
</if>
|
<if test="null != cooperationStartTime ">
|
||||||
<if test="null != cooperationEndTime and '' != cooperationEndTime">
|
#{cooperationStartTime},
|
||||||
#{cooperationEndTime},
|
</if>
|
||||||
</if>
|
<if test="null != cooperationEndTime ">
|
||||||
<if test="null != money and '' != money">
|
#{cooperationEndTime},
|
||||||
#{money},
|
</if>
|
||||||
</if>
|
<if test="null != money and '' != money">
|
||||||
<if test="null != areaCode and '' != areaCode">
|
#{money},
|
||||||
#{areaCode},
|
</if>
|
||||||
</if>
|
<if test="null != areaCode and '' != areaCode">
|
||||||
<if test="null != address and '' != address">
|
#{areaCode},
|
||||||
#{address},
|
</if>
|
||||||
</if>
|
<if test="null != address and '' != address">
|
||||||
<if test="null != detailedAddress and '' != detailedAddress">
|
#{address},
|
||||||
#{detailedAddress},
|
</if>
|
||||||
</if>
|
<if test="null != detailedAddress and '' != detailedAddress">
|
||||||
<if test="null != commissionType and '' != commissionType">
|
#{detailedAddress},
|
||||||
#{commissionType},
|
</if>
|
||||||
</if>
|
<if test="null != commissionType and '' != commissionType">
|
||||||
<if test="null != commissionRate and '' != commissionRate">
|
#{commissionType},
|
||||||
#{commissionRate},
|
</if>
|
||||||
</if>
|
<if test="null != commissionRate and '' != commissionRate">
|
||||||
<if test="null != longitude and '' != longitude">
|
#{commissionRate},
|
||||||
#{longitude},
|
</if>
|
||||||
</if>
|
<if test="null != longitude and '' != longitude">
|
||||||
<if test="null != latitude and '' != latitude">
|
#{longitude},
|
||||||
#{latitude},
|
</if>
|
||||||
</if>
|
<if test="null != latitude and '' != latitude">
|
||||||
<if test="null != status and '' != status">
|
#{latitude},
|
||||||
#{status},
|
</if>
|
||||||
</if>
|
<if test="null != status and '' != status">
|
||||||
<if test="null != delFlag and '' != delFlag">
|
#{status},
|
||||||
#{delFlag},
|
</if>
|
||||||
</if>
|
<if test="null != delFlag and '' != delFlag">
|
||||||
<if test="null != createBy and '' != createBy">
|
#{delFlag},
|
||||||
#{createBy},
|
</if>
|
||||||
</if>
|
<if test="null != createBy and '' != createBy">
|
||||||
<if test="null != createTime and '' != createTime">
|
#{createBy},
|
||||||
#{createTime},
|
</if>
|
||||||
</if>
|
<if test="null != createTime and '' != createTime">
|
||||||
<if test="null != updateBy and '' != updateBy">
|
#{createTime},
|
||||||
#{updateBy},
|
</if>
|
||||||
</if>
|
<if test="null != updateBy and '' != updateBy">
|
||||||
<if test="null != updateTime and '' != updateTime">
|
#{updateBy},
|
||||||
#{updateTime},
|
</if>
|
||||||
</if>
|
<if test="null != updateTime and '' != updateTime">
|
||||||
<if test="null != remark and '' != remark">
|
#{updateTime},
|
||||||
#{remark}
|
</if>
|
||||||
</if>
|
<if test="null != remark and '' != remark">
|
||||||
|
#{remark}
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="update" parameterType="com.xhpc.user.domain.XhpcInternetUser">
|
<update id="update" parameterType="com.xhpc.user.domain.XhpcInternetUser">
|
||||||
@ -190,10 +193,10 @@
|
|||||||
<if test="null != contactPhone and '' != contactPhone">contact_phone = #{contactPhone},</if>
|
<if test="null != contactPhone and '' != contactPhone">contact_phone = #{contactPhone},</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 and '' != cardNumber">card_number = #{cardNumber},</if>
|
<if test="null != cardNumber and '' != cardNumber">card_number = #{cardNumber},</if>
|
||||||
<if test="null != cooperationStartTime and '' != cooperationStartTime">cooperation_start_time =
|
<if test="null != cooperationStartTime">cooperation_start_time =
|
||||||
#{cooperationStartTime},
|
#{cooperationStartTime},
|
||||||
</if>
|
</if>
|
||||||
<if test="null != cooperationEndTime and '' != cooperationEndTime">cooperation_end_time =
|
<if test="null != cooperationEndTime">cooperation_end_time =
|
||||||
#{cooperationEndTime},
|
#{cooperationEndTime},
|
||||||
</if>
|
</if>
|
||||||
<if test="null != money and '' != money">money = #{money},</if>
|
<if test="null != money and '' != money">money = #{money},</if>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user