1新增用户的流量id
2新增流量用户 3新增运营商设置流量用户黑名单 4新增电站流量方黑名单
This commit is contained in:
parent
ebba99f4bc
commit
03afa6221c
@ -68,6 +68,12 @@ public class SysUser extends BaseEntity
|
||||
@Excel(name = "权限类型", readConverterExp = "0=所有,1=运营商所有,2=子账号,3=流量账号")
|
||||
private Integer dataPowerType;
|
||||
|
||||
/**
|
||||
* 流量用户id
|
||||
*/
|
||||
private Long internetUserId;
|
||||
|
||||
|
||||
/** 用户头像 */
|
||||
private String avatar;
|
||||
|
||||
@ -351,6 +357,14 @@ public class SysUser extends BaseEntity
|
||||
this.userType = userType;
|
||||
}
|
||||
|
||||
public Long getInternetUserId() {
|
||||
return internetUserId;
|
||||
}
|
||||
|
||||
public void setInternetUserId(Long internetUserId) {
|
||||
this.internetUserId = internetUserId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
||||
@ -1,21 +1,5 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import com.ruoyi.common.core.constant.UserConstants;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.utils.SecurityUtils;
|
||||
@ -34,6 +18,16 @@ import com.ruoyi.system.service.ISysPermissionService;
|
||||
import com.ruoyi.system.service.ISysPostService;
|
||||
import com.ruoyi.system.service.ISysRoleService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
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.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 用户信息
|
||||
@ -176,11 +170,6 @@ public class SysUserController extends BaseController
|
||||
{
|
||||
return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,手机号码已存在");
|
||||
}
|
||||
else if (StringUtils.isNotEmpty(user.getEmail())
|
||||
&& UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
|
||||
{
|
||||
return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,邮箱账号已存在");
|
||||
}
|
||||
user.setCreateBy(SecurityUtils.getUsername());
|
||||
user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
|
||||
return toAjax(userService.insertUser(user));
|
||||
|
||||
@ -1,51 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.SysUserMapper">
|
||||
|
||||
<resultMap type="SysUser" id="SysUserResult">
|
||||
<id property="userId" column="user_id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="nickName" column="nick_name" />
|
||||
<result property="email" column="email" />
|
||||
<result property="phonenumber" column="phonenumber" />
|
||||
<result property="sex" column="sex" />
|
||||
<result property="avatar" column="avatar" />
|
||||
<result property="password" column="password" />
|
||||
<resultMap type="SysUser" id="SysUserResult">
|
||||
<id property="userId" column="user_id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="userName" column="user_name"/>
|
||||
<result property="nickName" column="nick_name"/>
|
||||
<result property="email" column="email"/>
|
||||
<result property="phonenumber" column="phonenumber"/>
|
||||
<result property="sex" column="sex"/>
|
||||
<result property="avatar" column="avatar"/>
|
||||
<result property="password" column="password"/>
|
||||
<result property="operatorId" column="operator_id"/>
|
||||
<result property="dataPowerType" column="data_power_type"/>
|
||||
<result property="status" column="status" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="loginIp" column="login_ip" />
|
||||
<result property="loginDate" column="login_date" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult" />
|
||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
|
||||
</resultMap>
|
||||
<result property="internetUserId" column="internet_user_id"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="loginIp" column="login_ip"/>
|
||||
<result property="loginDate" column="login_date"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult"/>
|
||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="deptResult" type="SysDept">
|
||||
<id property="deptId" column="dept_id" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
<result property="orderNum" column="order_num" />
|
||||
<result property="leader" column="leader" />
|
||||
<result property="status" column="dept_status" />
|
||||
</resultMap>
|
||||
<resultMap id="deptResult" type="SysDept">
|
||||
<id property="deptId" column="dept_id"/>
|
||||
<result property="parentId" column="parent_id"/>
|
||||
<result property="deptName" column="dept_name"/>
|
||||
<result property="orderNum" column="order_num"/>
|
||||
<result property="leader" column="leader"/>
|
||||
<result property="status" column="dept_status"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="RoleResult" type="SysRole">
|
||||
<id property="roleId" column="role_id" />
|
||||
<result property="roleName" column="role_name" />
|
||||
<result property="roleKey" column="role_key" />
|
||||
<result property="roleSort" column="role_sort" />
|
||||
<result property="dataScope" column="data_scope" />
|
||||
<result property="status" column="role_status" />
|
||||
</resultMap>
|
||||
<id property="roleId" column="role_id"/>
|
||||
<result property="roleName" column="role_name"/>
|
||||
<result property="roleKey" column="role_key"/>
|
||||
<result property="roleSort" column="role_sort"/>
|
||||
<result property="dataScope" column="data_scope"/>
|
||||
<result property="status" column="role_status"/>
|
||||
</resultMap>
|
||||
|
||||
<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,
|
||||
@ -56,164 +57,177 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
left join sys_user_role ur on u.user_id = ur.user_id
|
||||
left join sys_role r on r.role_id = ur.role_id
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_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_name, d.leader from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
where u.del_flag = '0'
|
||||
<if test="userName != null and userName != ''">
|
||||
AND u.user_name like concat('%', #{userName}, '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND u.status = #{status}
|
||||
</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">
|
||||
AND u.phonenumber like concat('%', #{phonenumber}, '%')
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
AND date_format(u.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
AND date_format(u.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="deptId != null and deptId != 0">
|
||||
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
</select>
|
||||
|
||||
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
||||
from sys_user u
|
||||
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_role r on r.role_id = ur.role_id
|
||||
where u.del_flag = '0' and r.role_id = #{roleId}
|
||||
<if test="userName != null and userName != ''">
|
||||
AND u.user_name like concat('%', #{userName}, '%')
|
||||
</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">
|
||||
AND u.phonenumber like concat('%', #{phonenumber}, '%')
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
</select>
|
||||
|
||||
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
||||
from sys_user u
|
||||
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_role r on r.role_id = ur.role_id
|
||||
where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL)
|
||||
and u.user_id not in (select u.user_id from sys_user u inner join sys_user_role ur on u.user_id = ur.user_id and ur.role_id = #{roleId})
|
||||
<if test="userName != null and userName != ''">
|
||||
AND u.user_name like concat('%', #{userName}, '%')
|
||||
</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">
|
||||
AND u.phonenumber like concat('%', #{phonenumber}, '%')
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
</select>
|
||||
|
||||
<select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">
|
||||
<include refid="selectUserVo"/>
|
||||
where u.user_name = #{userName}
|
||||
</select>
|
||||
|
||||
<select id="selectUserById" parameterType="Long" resultMap="SysUserResult">
|
||||
<include refid="selectUserVo"/>
|
||||
where u.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="checkUserNameUnique" parameterType="String" resultType="int">
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_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_name, d.leader from
|
||||
sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
where u.del_flag = '0'
|
||||
<if test="userName != null and userName != ''">
|
||||
AND u.user_name like concat('%', #{userName}, '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND u.status = #{status}
|
||||
</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">
|
||||
AND u.phonenumber like concat('%', #{phonenumber}, '%')
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
AND date_format(u.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
AND date_format(u.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="deptId != null and deptId != 0">
|
||||
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId},
|
||||
ancestors) ))
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
</select>
|
||||
|
||||
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
||||
from sys_user u
|
||||
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_role r on r.role_id = ur.role_id
|
||||
where u.del_flag = '0' and r.role_id = #{roleId}
|
||||
<if test="userName != null and userName != ''">
|
||||
AND u.user_name like concat('%', #{userName}, '%')
|
||||
</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">
|
||||
AND u.phonenumber like concat('%', #{phonenumber}, '%')
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
</select>
|
||||
|
||||
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
||||
from sys_user u
|
||||
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_role r on r.role_id = ur.role_id
|
||||
where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL)
|
||||
and u.user_id not in (select u.user_id from sys_user u inner join sys_user_role ur on u.user_id = ur.user_id and
|
||||
ur.role_id = #{roleId})
|
||||
<if test="userName != null and userName != ''">
|
||||
AND u.user_name like concat('%', #{userName}, '%')
|
||||
</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">
|
||||
AND u.phonenumber like concat('%', #{phonenumber}, '%')
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
</select>
|
||||
|
||||
<select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">
|
||||
<include refid="selectUserVo"/>
|
||||
where u.user_name = #{userName}
|
||||
</select>
|
||||
|
||||
<select id="selectUserById" parameterType="Long" resultMap="SysUserResult">
|
||||
<include refid="selectUserVo"/>
|
||||
where u.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="checkUserNameUnique" parameterType="String" resultType="int">
|
||||
select count(1) from sys_user where user_name = #{userName} limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
|
||||
|
||||
<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
|
||||
select user_id, phonenumber from sys_user where phonenumber = #{phonenumber} limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
|
||||
|
||||
<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
|
||||
select user_id, email from sys_user where email = #{email} limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
|
||||
insert into sys_user(
|
||||
<if test="userId != null and userId != 0">user_id,</if>
|
||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="nickName != null and nickName != ''">nick_name,</if>
|
||||
<if test="email != null and email != ''">email,</if>
|
||||
<if test="avatar != null and avatar != ''">avatar,</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
|
||||
<if test="sex != null and sex != ''">sex,</if>
|
||||
<if test="password != null and password != ''">password,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="userId != null and userId != ''">#{userId},</if>
|
||||
<if test="deptId != null and deptId != ''">#{deptId},</if>
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="nickName != null and nickName != ''">#{nickName},</if>
|
||||
<if test="email != null and email != ''">#{email},</if>
|
||||
<if test="avatar != null and avatar != ''">#{avatar},</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
|
||||
<if test="sex != null and sex != ''">#{sex},</if>
|
||||
<if test="password != null and password != ''">#{password},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateUser" parameterType="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="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>
|
||||
|
||||
<update id="updateUserStatus" parameterType="SysUser">
|
||||
|
||||
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
|
||||
insert into sys_user(
|
||||
<if test="userId != null and userId != 0">user_id,</if>
|
||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="nickName != null and nickName != ''">nick_name,</if>
|
||||
<if test="email != null and email != ''">email,</if>
|
||||
<if test="avatar != null and avatar != ''">avatar,</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
|
||||
<if test="operatorId != null and operatorId != ''">operator_id,</if>
|
||||
<if test="internetUserId != null and internetUserId != ''">internet_user_id,</if>
|
||||
<if test="dataPowerType != null and dataPowerType != ''">data_power_type,</if>
|
||||
<if test="sex != null and sex != ''">sex,</if>
|
||||
<if test="password != null and password != ''">password,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="userId != null and userId != ''">#{userId},</if>
|
||||
<if test="deptId != null and deptId != ''">#{deptId},</if>
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="nickName != null and nickName != ''">#{nickName},</if>
|
||||
<if test="email != null and email != ''">#{email},</if>
|
||||
<if test="avatar != null and avatar != ''">#{avatar},</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
|
||||
<if test="operatorId != null and operatorId != ''">#{operatorId},</if>
|
||||
<if test="internetUserId != null and internetUserId != ''">#{internetUserId},</if>
|
||||
<if test="dataPowerType != null and dataPowerType != ''">#{dataPowerType},</if>
|
||||
<if test="sex != null and sex != ''">#{sex},</if>
|
||||
<if test="password != null and password != ''">#{password},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateUser" parameterType="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>
|
||||
|
||||
<update id="updateUserStatus" parameterType="SysUser">
|
||||
update sys_user set status = #{status} where user_id = #{userId}
|
||||
</update>
|
||||
|
||||
<update id="updateUserAvatar" parameterType="SysUser">
|
||||
|
||||
<update id="updateUserAvatar" parameterType="SysUser">
|
||||
update sys_user set avatar = #{avatar} where user_name = #{userName}
|
||||
</update>
|
||||
|
||||
<update id="resetUserPwd" parameterType="SysUser">
|
||||
|
||||
<update id="resetUserPwd" parameterType="SysUser">
|
||||
update sys_user set password = #{password} where user_name = #{userName}
|
||||
</update>
|
||||
|
||||
<delete id="deleteUserById" parameterType="Long">
|
||||
|
||||
<delete id="deleteUserById" parameterType="Long">
|
||||
update sys_user set del_flag = '2' where user_id = #{userId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUserByIds" parameterType="Long">
|
||||
update sys_user set del_flag = '2' where user_id in
|
||||
<foreach collection="array" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deleteUserByIds" parameterType="Long">
|
||||
update sys_user set del_flag = '2' where user_id in
|
||||
<foreach collection="array" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@ -1,9 +1,17 @@
|
||||
package com.xhpc.user;
|
||||
|
||||
import com.ruoyi.common.security.annotation.EnableCustomConfig;
|
||||
import com.ruoyi.common.security.annotation.EnableRyFeignClients;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
|
||||
@EnableCustomConfig
|
||||
@EnableRyFeignClients
|
||||
@EnableFeignClients
|
||||
@SpringBootApplication
|
||||
@MapperScan("com.xhpc.user.mapper")
|
||||
public class UserApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@ -0,0 +1,139 @@
|
||||
package com.xhpc.user.controller;
|
||||
|
||||
import com.ruoyi.common.core.utils.SecurityUtils;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
import com.ruoyi.common.security.annotation.PreAuthorize;
|
||||
import com.ruoyi.system.api.domain.SysUser;
|
||||
import com.xhpc.user.domain.XhpcInternetUser;
|
||||
import com.xhpc.user.openfeign.RemoteSystemService;
|
||||
import com.xhpc.user.service.IXhpcInternetUserService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 流量用户
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/internet")
|
||||
public class XhpcInternetUserController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IXhpcInternetUserService iXhpcInternetUserService;
|
||||
|
||||
@Autowired
|
||||
private RemoteSystemService remoteSystemService;
|
||||
|
||||
|
||||
/**
|
||||
* 新增流量用户
|
||||
*/
|
||||
@ApiOperation("新增流量用户")
|
||||
@PreAuthorize(hasPermi = "user:internet:add")
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody XhpcInternetUser xhpcInternetUser) {
|
||||
SysUser sysUser = new SysUser();
|
||||
sysUser.setUserName(xhpcInternetUser.getPhone());
|
||||
sysUser.setNickName(xhpcInternetUser.getName());
|
||||
sysUser.setPhonenumber(xhpcInternetUser.getPhone());
|
||||
sysUser.setDeptId(103l);
|
||||
sysUser.setSex("0");
|
||||
sysUser.setUserType("02");
|
||||
sysUser.setDataPowerType(3);
|
||||
sysUser.setCreateBy(SecurityUtils.getUsername());
|
||||
sysUser.setPassword(SecurityUtils.encryptPassword(xhpcInternetUser.getPhone()));
|
||||
AjaxResult ajaxResult = remoteSystemService.addUser(sysUser);
|
||||
if (null != ajaxResult && !"200".equals(ajaxResult.get("code"))) {
|
||||
return ajaxResult;
|
||||
}
|
||||
return toAjax(iXhpcInternetUserService.insert(xhpcInternetUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改流量用户
|
||||
*/
|
||||
@ApiOperation("修改流量用户")
|
||||
@PreAuthorize(hasPermi = "user:internet:edit")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody XhpcInternetUser xhpcInternetUser) {
|
||||
if (null == xhpcInternetUser.getInternetUserId()) {
|
||||
return AjaxResult.error("用户id不能为空");
|
||||
}
|
||||
SysUser sysUser = new SysUser();
|
||||
sysUser.setUserName(xhpcInternetUser.getPhone());
|
||||
sysUser.setNickName(xhpcInternetUser.getName());
|
||||
sysUser.setPhonenumber(xhpcInternetUser.getPhone());
|
||||
sysUser.setDeptId(103l);
|
||||
sysUser.setSex("0");
|
||||
sysUser.setUserType("02");
|
||||
sysUser.setDataPowerType(3);
|
||||
sysUser.setCreateBy(SecurityUtils.getUsername());
|
||||
sysUser.setPassword(SecurityUtils.encryptPassword(xhpcInternetUser.getPhone()));
|
||||
AjaxResult ajaxResult = remoteSystemService.editUser(sysUser);
|
||||
if (null != ajaxResult && !"200".equals(ajaxResult.get("code"))) {
|
||||
return ajaxResult;
|
||||
}
|
||||
return toAjax(iXhpcInternetUserService.update(xhpcInternetUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除流量用户
|
||||
*/
|
||||
@ApiOperation("删除流量用户")
|
||||
@PreAuthorize(hasPermi = "user:internet:remove")
|
||||
@PostMapping("/remove")
|
||||
public AjaxResult remove(@RequestBody Long[] ids) {
|
||||
iXhpcInternetUserService.deleteByIds(ids);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 流量用户详情
|
||||
*/
|
||||
@ApiOperation("流量用户详情")
|
||||
@PreAuthorize(hasPermi = "user:internet:info")
|
||||
@GetMapping("/info")
|
||||
public AjaxResult info(@RequestBody Long internetUserId) {
|
||||
return AjaxResult.success(iXhpcInternetUserService.info(internetUserId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 流量用户分页列表
|
||||
*/
|
||||
@PreAuthorize(hasPermi = "system:internet:page")
|
||||
@GetMapping("/page")
|
||||
public TableDataInfo page(String name, String contactName, String contactPhone) {
|
||||
startPage();
|
||||
List<Map<String, Object>> list = iXhpcInternetUserService.selectInternetList(name, contactName, contactPhone);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁用/启用流量用户
|
||||
*/
|
||||
@ApiOperation("禁用/启用流量用户")
|
||||
@PreAuthorize(hasPermi = "user:internet:status")
|
||||
@PostMapping("/status")
|
||||
public AjaxResult status(@RequestBody Long id) {
|
||||
iXhpcInternetUserService.status(id);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 流量用户列表
|
||||
*/
|
||||
@ApiOperation("流量用户列表")
|
||||
@PreAuthorize(hasPermi = "user:internet:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(String name) {
|
||||
List<Map<String, Object>> list = iXhpcInternetUserService.list(name);
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
@ -46,6 +46,7 @@ public class XhpcOperatorController extends BaseController {
|
||||
sysUser.setPhonenumber(xhpcOperator.getPhone());
|
||||
sysUser.setDeptId(103l);
|
||||
sysUser.setSex("0");
|
||||
sysUser.setUserType("01");
|
||||
sysUser.setDataPowerType(1);
|
||||
sysUser.setCreateBy(SecurityUtils.getUsername());
|
||||
sysUser.setPassword(SecurityUtils.encryptPassword(xhpcOperator.getPhone()));
|
||||
@ -69,6 +70,21 @@ public class XhpcOperatorController extends BaseController {
|
||||
if (null == xhpcOperator.getOperatorId()) {
|
||||
return AjaxResult.error("运营商id不能为空");
|
||||
}
|
||||
SysUser sysUser = new SysUser();
|
||||
sysUser.setUserName(xhpcOperator.getPhone());
|
||||
sysUser.setNickName(xhpcOperator.getName());
|
||||
sysUser.setEmail(xhpcOperator.getEmail());
|
||||
sysUser.setPhonenumber(xhpcOperator.getPhone());
|
||||
sysUser.setDeptId(103l);
|
||||
sysUser.setSex("0");
|
||||
sysUser.setUserType("01");
|
||||
sysUser.setDataPowerType(1);
|
||||
sysUser.setCreateBy(SecurityUtils.getUsername());
|
||||
sysUser.setPassword(SecurityUtils.encryptPassword(xhpcOperator.getPhone()));
|
||||
AjaxResult ajaxResult = remoteSystemService.editUser(sysUser);
|
||||
if (null != ajaxResult && !"200".equals(ajaxResult.get("code"))) {
|
||||
return ajaxResult;
|
||||
}
|
||||
if (UserConstants.NOT_UNIQUE.equals(iXhpcOperatorService.checkAccountUnique(xhpcOperator))) {
|
||||
return AjaxResult.error("用户'" + xhpcOperator.getPhone() + "'失败,登录账号已存在");
|
||||
}
|
||||
@ -97,11 +113,11 @@ public class XhpcOperatorController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取运营商列表
|
||||
* 获取运营商分页列表
|
||||
*/
|
||||
@PreAuthorize(hasPermi = "system:operator:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(String name, String contactName, String contactPhone) {
|
||||
@PreAuthorize(hasPermi = "system:operator:page")
|
||||
@GetMapping("/page")
|
||||
public TableDataInfo page(String name, String contactName, String contactPhone) {
|
||||
startPage();
|
||||
List<Map<String, Object>> list = iXhpcOperatorService.selectOperatorList(name, contactName, contactPhone);
|
||||
return getDataTable(list);
|
||||
|
||||
@ -0,0 +1,55 @@
|
||||
package com.xhpc.user.controller;
|
||||
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
import com.ruoyi.common.security.annotation.PreAuthorize;
|
||||
import com.xhpc.user.domain.XhpcOperatorInternetBlacklist;
|
||||
import com.xhpc.user.service.IXhpcOperatorInternetBlacklistService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 流量用户
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/operator/internet")
|
||||
public class XhpcOperatorInternetBlacklistController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IXhpcOperatorInternetBlacklistService xhpcOperatorInternetBlacklistService;
|
||||
|
||||
/**
|
||||
* 新增流量用户
|
||||
*/
|
||||
@ApiOperation("新增流量用户")
|
||||
@PreAuthorize(hasPermi = "operator:internet:add")
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody List<XhpcOperatorInternetBlacklist> list) {
|
||||
if (null != list && list.size() > 0) {
|
||||
Long operatorId = list.get(0).getOperatorId();
|
||||
xhpcOperatorInternetBlacklistService.deleteByIds(operatorId);
|
||||
for (XhpcOperatorInternetBlacklist xhpcOperatorInternetBlacklist : list) {
|
||||
xhpcOperatorInternetBlacklistService.insert(xhpcOperatorInternetBlacklist);
|
||||
}
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过运营商id查询流量方黑名单(包含已选择的黑名单)
|
||||
*/
|
||||
@ApiOperation("通过运营商id查询流量方黑名单")
|
||||
@PreAuthorize(hasPermi = "operator:internet:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(@RequestParam String operatorId) {
|
||||
List<Map<String, Object>> list = xhpcOperatorInternetBlacklistService.list(operatorId);
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
package com.xhpc.user.controller;
|
||||
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
import com.ruoyi.common.security.annotation.PreAuthorize;
|
||||
import com.xhpc.user.domain.XhpcStationInternetBlacklist;
|
||||
import com.xhpc.user.service.IXhpcStationInternetBlacklistService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 流量用户
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/station/internet")
|
||||
public class XhpcStationInternetBlacklistController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IXhpcStationInternetBlacklistService iXhpcStationInternetBlacklistService;
|
||||
|
||||
/**
|
||||
* 新增电站流量方黑名单
|
||||
*/
|
||||
@ApiOperation("新增电站流量方黑名单")
|
||||
@PreAuthorize(hasPermi = "station:internet:add")
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody List<XhpcStationInternetBlacklist> list) {
|
||||
if (null != list && list.size() > 0) {
|
||||
Long internetUserId = list.get(0).getInternetUserId();
|
||||
iXhpcStationInternetBlacklistService.deleteByIds(internetUserId);
|
||||
for (XhpcStationInternetBlacklist xhpcStationInternetBlacklist : list) {
|
||||
iXhpcStationInternetBlacklistService.insert(xhpcStationInternetBlacklist);
|
||||
}
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过流量用户id查询电站流量方黑名单(包含已选择的黑名单)
|
||||
*/
|
||||
@ApiOperation("通过运营商id查询流量方黑名单")
|
||||
@PreAuthorize(hasPermi = "station:internet:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(@RequestParam String internetUserId) {
|
||||
List<Map<String, Object>> list = iXhpcStationInternetBlacklistService.list(internetUserId);
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
@ -31,11 +31,11 @@ public class XhpcUserController extends BaseController {
|
||||
private RemoteSystemService remoteSystemService;
|
||||
|
||||
/**
|
||||
* 获取平台用户列表
|
||||
* 获取平台用户分页列表
|
||||
*/
|
||||
@PreAuthorize(hasPermi = "user:pc:list")
|
||||
@GetMapping("/pc/list")
|
||||
public TableDataInfo pcList(String userName, String nickName) {
|
||||
@PreAuthorize(hasPermi = "user:pc:page")
|
||||
@GetMapping("/pc/page")
|
||||
public TableDataInfo pcpage(String userName, String nickName) {
|
||||
startPage();
|
||||
List<Map<String, Object>> list = iXhpcUserService.selectPcUserList(userName, nickName);
|
||||
return getDataTable(list);
|
||||
@ -51,6 +51,7 @@ public class XhpcUserController extends BaseController {
|
||||
sysUser.setPhonenumber(sysUser.getUserName());
|
||||
sysUser.setDeptId(103l);
|
||||
sysUser.setDataPowerType(1);
|
||||
sysUser.setUserType("00");
|
||||
sysUser.setCreateBy(SecurityUtils.getUsername());
|
||||
AjaxResult ajaxResult = remoteSystemService.addUser(sysUser);
|
||||
if (null != ajaxResult && !"200".equals(ajaxResult.get("code"))) {
|
||||
@ -88,11 +89,11 @@ public class XhpcUserController extends BaseController {
|
||||
|
||||
|
||||
/**
|
||||
* 获取运营上用户列表
|
||||
* 获取运营上用户分页列表
|
||||
*/
|
||||
@PreAuthorize(hasPermi = "user:operator:list")
|
||||
@GetMapping("/operator/list")
|
||||
public TableDataInfo operatorList(String userName, String nickName, Long operatorId) {
|
||||
@PreAuthorize(hasPermi = "user:operator:page")
|
||||
@GetMapping("/operator/page")
|
||||
public TableDataInfo operatorPage(String userName, String nickName, Long operatorId) {
|
||||
startPage();
|
||||
List<Map<String, Object>> list = iXhpcUserService.selectOperatorUserList(userName, nickName, operatorId);
|
||||
return getDataTable(list);
|
||||
@ -111,7 +112,7 @@ public class XhpcUserController extends BaseController {
|
||||
sysUser.setPhonenumber(sysUser.getUserName());
|
||||
sysUser.setDeptId(103l);
|
||||
sysUser.setDataPowerType(1);
|
||||
sysUser.setUserType("01");
|
||||
sysUser.setUserType("03");
|
||||
sysUser.setCreateBy(SecurityUtils.getUsername());
|
||||
AjaxResult ajaxResult = remoteSystemService.addUser(sysUser);
|
||||
if (null != ajaxResult && !"200".equals(ajaxResult.get("code"))) {
|
||||
@ -149,4 +150,15 @@ public class XhpcUserController extends BaseController {
|
||||
public AjaxResult operatorInfo(@RequestBody Long userId) {
|
||||
return AjaxResult.success(iXhpcUserService.operatorInfo(userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁用/启用平台和运营商子账号
|
||||
*/
|
||||
@ApiOperation("禁用/启用平台和运营商子账号")
|
||||
@PreAuthorize(hasPermi = "user:pc:status")
|
||||
@PostMapping("/status")
|
||||
public AjaxResult status(@RequestBody Long userId) {
|
||||
iXhpcUserService.status(userId);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,279 @@
|
||||
package com.xhpc.user.domain;
|
||||
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 流量用户 xhpc_internet_user
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class XhpcInternetUser extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@NotBlank(message = "用户id不能为空")
|
||||
private Long internetUserId;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@NotBlank(message = "名称不能为空")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 手机号码(帐号)
|
||||
*/
|
||||
@NotBlank(message = "手机号码不能为空")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
@NotBlank(message = "联系人不能为空")
|
||||
private String contactName;
|
||||
|
||||
/**
|
||||
* 联系人电话
|
||||
*/
|
||||
@NotBlank(message = "联系人电话不能为空")
|
||||
private String contactPhone;
|
||||
|
||||
/**
|
||||
* 开户行
|
||||
*/
|
||||
@NotBlank(message = "开户行不能为空")
|
||||
private String openBank;
|
||||
|
||||
/**
|
||||
* 卡号
|
||||
*/
|
||||
@NotBlank(message = "卡号不能为空")
|
||||
private Integer cardNumber;
|
||||
|
||||
/**
|
||||
* 合作开始时间
|
||||
*/
|
||||
@NotBlank(message = "合作开始时间不能为空")
|
||||
private Date cooperationStartTime;
|
||||
|
||||
/**
|
||||
* 合作结束时间
|
||||
*/
|
||||
@NotBlank(message = "合作结束时间不能为空")
|
||||
private Date cooperationEndTime;
|
||||
|
||||
/**
|
||||
* 余额
|
||||
*/
|
||||
@NotBlank(message = "余额不能为空")
|
||||
private Double money;
|
||||
|
||||
/**
|
||||
* 地址code
|
||||
*/
|
||||
@NotBlank(message = "地址不能为空")
|
||||
private Integer areaCode;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@NotBlank(message = "地址不能为空")
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 详细地址
|
||||
*/
|
||||
@NotBlank(message = "详细地址不能为空")
|
||||
private String detailedAddress;
|
||||
|
||||
/**
|
||||
* 提成类型(0总金额提成 1服务费提成)
|
||||
*/
|
||||
@NotBlank(message = "提成类型不能为空")
|
||||
private Integer commissionType;
|
||||
|
||||
/**
|
||||
* 提成率
|
||||
*/
|
||||
@NotBlank(message = "提成率不能为空")
|
||||
private Double commissionRate;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@NotBlank(message = "经度不能为空")
|
||||
private String longitude;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@NotBlank(message = "纬度不能为空")
|
||||
private String latitude;
|
||||
|
||||
/**
|
||||
* 帐号状态
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 2代表删除)
|
||||
*/
|
||||
private String delFlag;
|
||||
|
||||
public Long getInternetUserId() {
|
||||
return internetUserId;
|
||||
}
|
||||
|
||||
public void setInternetUserId(Long internetUserId) {
|
||||
this.internetUserId = internetUserId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getContactName() {
|
||||
return contactName;
|
||||
}
|
||||
|
||||
public void setContactName(String contactName) {
|
||||
this.contactName = contactName;
|
||||
}
|
||||
|
||||
public String getContactPhone() {
|
||||
return contactPhone;
|
||||
}
|
||||
|
||||
public void setContactPhone(String contactPhone) {
|
||||
this.contactPhone = contactPhone;
|
||||
}
|
||||
|
||||
public String getOpenBank() {
|
||||
return openBank;
|
||||
}
|
||||
|
||||
public void setOpenBank(String openBank) {
|
||||
this.openBank = openBank;
|
||||
}
|
||||
|
||||
public Integer getCardNumber() {
|
||||
return cardNumber;
|
||||
}
|
||||
|
||||
public void setCardNumber(Integer cardNumber) {
|
||||
this.cardNumber = cardNumber;
|
||||
}
|
||||
|
||||
public Date getCooperationStartTime() {
|
||||
return cooperationStartTime;
|
||||
}
|
||||
|
||||
public void setCooperationStartTime(Date cooperationStartTime) {
|
||||
this.cooperationStartTime = cooperationStartTime;
|
||||
}
|
||||
|
||||
public Date getCooperationEndTime() {
|
||||
return cooperationEndTime;
|
||||
}
|
||||
|
||||
public void setCooperationEndTime(Date cooperationEndTime) {
|
||||
this.cooperationEndTime = cooperationEndTime;
|
||||
}
|
||||
|
||||
public Double getMoney() {
|
||||
return money;
|
||||
}
|
||||
|
||||
public void setMoney(Double money) {
|
||||
this.money = money;
|
||||
}
|
||||
|
||||
public Integer getAreaCode() {
|
||||
return areaCode;
|
||||
}
|
||||
|
||||
public void setAreaCode(Integer areaCode) {
|
||||
this.areaCode = areaCode;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getDetailedAddress() {
|
||||
return detailedAddress;
|
||||
}
|
||||
|
||||
public void setDetailedAddress(String detailedAddress) {
|
||||
this.detailedAddress = detailedAddress;
|
||||
}
|
||||
|
||||
public Integer getCommissionType() {
|
||||
return commissionType;
|
||||
}
|
||||
|
||||
public void setCommissionType(Integer commissionType) {
|
||||
this.commissionType = commissionType;
|
||||
}
|
||||
|
||||
public Double getCommissionRate() {
|
||||
return commissionRate;
|
||||
}
|
||||
|
||||
public void setCommissionRate(Double commissionRate) {
|
||||
this.commissionRate = commissionRate;
|
||||
}
|
||||
|
||||
public String getLongitude() {
|
||||
return longitude;
|
||||
}
|
||||
|
||||
public void setLongitude(String longitude) {
|
||||
this.longitude = longitude;
|
||||
}
|
||||
|
||||
public String getLatitude() {
|
||||
return latitude;
|
||||
}
|
||||
|
||||
public void setLatitude(String latitude) {
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getDelFlag() {
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
public void setDelFlag(String delFlag) {
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
}
|
||||
@ -1,19 +1,16 @@
|
||||
package com.xhpc.user.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 运营商表 xhpc_operator
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Data
|
||||
public class XhpcOperator {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class XhpcOperator extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 运营商id
|
||||
@ -129,28 +126,156 @@ public class XhpcOperator {
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createBy;
|
||||
public Long getOperatorId() {
|
||||
return operatorId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
public void setOperatorId(Long operatorId) {
|
||||
this.operatorId = operatorId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updateBy;
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getContactName() {
|
||||
return contactName;
|
||||
}
|
||||
|
||||
public void setContactName(String contactName) {
|
||||
this.contactName = contactName;
|
||||
}
|
||||
|
||||
public String getContactPhone() {
|
||||
return contactPhone;
|
||||
}
|
||||
|
||||
public void setContactPhone(String contactPhone) {
|
||||
this.contactPhone = contactPhone;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public Integer getAttribute() {
|
||||
return attribute;
|
||||
}
|
||||
|
||||
public void setAttribute(Integer attribute) {
|
||||
this.attribute = attribute;
|
||||
}
|
||||
|
||||
public String getAreaCode() {
|
||||
return areaCode;
|
||||
}
|
||||
|
||||
public void setAreaCode(String areaCode) {
|
||||
this.areaCode = areaCode;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getLongitude() {
|
||||
return longitude;
|
||||
}
|
||||
|
||||
public void setLongitude(String longitude) {
|
||||
this.longitude = longitude;
|
||||
}
|
||||
|
||||
public String getLatitude() {
|
||||
return latitude;
|
||||
}
|
||||
|
||||
public void setLatitude(String latitude) {
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public Integer getCommissionType() {
|
||||
return commissionType;
|
||||
}
|
||||
|
||||
public void setCommissionType(Integer commissionType) {
|
||||
this.commissionType = commissionType;
|
||||
}
|
||||
|
||||
public Double getPlatformCommissionRate() {
|
||||
return platformCommissionRate;
|
||||
}
|
||||
|
||||
public void setPlatformCommissionRate(Double platformCommissionRate) {
|
||||
this.platformCommissionRate = platformCommissionRate;
|
||||
}
|
||||
|
||||
public Double getMaintenanceCommissionRate() {
|
||||
return maintenanceCommissionRate;
|
||||
}
|
||||
|
||||
public void setMaintenanceCommissionRate(Double maintenanceCommissionRate) {
|
||||
this.maintenanceCommissionRate = maintenanceCommissionRate;
|
||||
}
|
||||
|
||||
public String getBusinessLicenseId() {
|
||||
return businessLicenseId;
|
||||
}
|
||||
|
||||
public void setBusinessLicenseId(String businessLicenseId) {
|
||||
this.businessLicenseId = businessLicenseId;
|
||||
}
|
||||
|
||||
public Integer getWithdrawalTime() {
|
||||
return withdrawalTime;
|
||||
}
|
||||
|
||||
public void setWithdrawalTime(Integer withdrawalTime) {
|
||||
this.withdrawalTime = withdrawalTime;
|
||||
}
|
||||
|
||||
public String getSoc() {
|
||||
return soc;
|
||||
}
|
||||
|
||||
public void setSoc(String soc) {
|
||||
this.soc = soc;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getDelFlag() {
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
public void setDelFlag(Integer delFlag) {
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,47 @@
|
||||
package com.xhpc.user.domain;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 运营商设置流量方黑名单 xhpc_operator_internet_blacklist
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class XhpcOperatorInternetBlacklist implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 运营商id
|
||||
*/
|
||||
@NotBlank(message = "运营商id不能为空")
|
||||
private Long operatorId;
|
||||
|
||||
/**
|
||||
* 流量用户id
|
||||
*/
|
||||
@NotBlank(message = "流量用户id不能为空")
|
||||
private Long internetUserId;
|
||||
|
||||
|
||||
public XhpcOperatorInternetBlacklist() {
|
||||
}
|
||||
|
||||
public Long getOperatorId() {
|
||||
return operatorId;
|
||||
}
|
||||
|
||||
public void setOperatorId(Long operatorId) {
|
||||
this.operatorId = operatorId;
|
||||
}
|
||||
|
||||
public Long getInternetUserId() {
|
||||
return internetUserId;
|
||||
}
|
||||
|
||||
public void setInternetUserId(Long internetUserId) {
|
||||
this.internetUserId = internetUserId;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,47 @@
|
||||
package com.xhpc.user.domain;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 流量用户设置流量方黑名单 xhpc_operator_internet_blacklist
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class XhpcStationInternetBlacklist implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 流量用户id
|
||||
*/
|
||||
@NotBlank(message = "流量用户id不能为空")
|
||||
private Long internetUserId;
|
||||
|
||||
/**
|
||||
* 电站id
|
||||
*/
|
||||
@NotBlank(message = "电站id不能为空")
|
||||
private Long chargingStationId;
|
||||
|
||||
|
||||
public XhpcStationInternetBlacklist() {
|
||||
}
|
||||
|
||||
public Long getInternetUserId() {
|
||||
return internetUserId;
|
||||
}
|
||||
|
||||
public void setInternetUserId(Long internetUserId) {
|
||||
this.internetUserId = internetUserId;
|
||||
}
|
||||
|
||||
public Long getChargingStationId() {
|
||||
return chargingStationId;
|
||||
}
|
||||
|
||||
public void setChargingStationId(Long chargingStationId) {
|
||||
this.chargingStationId = chargingStationId;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,75 @@
|
||||
package com.xhpc.user.mapper;
|
||||
|
||||
import com.ruoyi.system.api.domain.SysUser;
|
||||
import com.xhpc.user.domain.XhpcInternetUser;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 流量用户信息 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface XhpcInternetUserMapper {
|
||||
|
||||
/**
|
||||
* 修改流量用户信息
|
||||
*
|
||||
* @param xhpcInternetUser 流量用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int update(XhpcInternetUser xhpcInternetUser);
|
||||
|
||||
/**
|
||||
* 新增流量用户信息
|
||||
*
|
||||
* @param xhpcInternetUser 流量用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insert(XhpcInternetUser xhpcInternetUser);
|
||||
|
||||
/**
|
||||
* 批量删除流量用户信息
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByIds(Long[] ids);
|
||||
|
||||
|
||||
/**
|
||||
* 查询流量用户详情
|
||||
*
|
||||
* @param internetUserId 流量用户id
|
||||
* @return 结果
|
||||
*/
|
||||
public Map<String, Object> info(@Param("internetUserId") Long internetUserId);
|
||||
|
||||
/**
|
||||
* 流量用户分页列表
|
||||
*
|
||||
* @param name 流量用户名称
|
||||
* @param contactName 联系人
|
||||
* @param contactPhone 联系人电话
|
||||
* @return 结果
|
||||
*/
|
||||
public List<Map<String, Object>> selectInternetList(@Param("name") String name, @Param("contactName") String contactName, @Param("contactPhone") String contactPhone);
|
||||
|
||||
/**
|
||||
* 通过流量用户ID查询用户
|
||||
*
|
||||
* @param internetUserId 流量用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
public SysUser getUserByInternetUserId(@Param("internetUserId") Long internetUserId);
|
||||
|
||||
/**
|
||||
* 流量用户列表
|
||||
*
|
||||
* @param name 流量用户名称
|
||||
* @return 结果
|
||||
*/
|
||||
public List<Map<String, Object>> list(@Param("name") String name);
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package com.xhpc.user.mapper;
|
||||
|
||||
import com.xhpc.user.domain.XhpcOperatorInternetBlacklist;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 运营商设置流量方黑名单 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface XhpcOperatorInternetBlacklistMapper {
|
||||
|
||||
/**
|
||||
* 新增运营商设置流量方黑名单信息
|
||||
*
|
||||
* @param xhpcOperatorInternetBlacklist 运营商设置流量方黑名单信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insert(XhpcOperatorInternetBlacklist xhpcOperatorInternetBlacklist);
|
||||
|
||||
/**
|
||||
* 批量删除运营商设置流量方黑名单
|
||||
*
|
||||
* @param operatorId 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByIds(@Param("operatorId") Long operatorId);
|
||||
|
||||
|
||||
/**
|
||||
* 运营商设置流量方黑名单列表
|
||||
*
|
||||
* @param operatorId 运营商ID
|
||||
* @return 结果
|
||||
*/
|
||||
public List<Map<String, Object>> list(@Param("operatorId") Long operatorId);
|
||||
}
|
||||
@ -2,6 +2,7 @@ package com.xhpc.user.mapper;
|
||||
|
||||
import com.ruoyi.system.api.domain.SysUser;
|
||||
import com.xhpc.user.domain.XhpcOperator;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -43,7 +44,7 @@ public interface XhpcOperatorMapper {
|
||||
* @param phone 用户手机号
|
||||
* @return 结果
|
||||
*/
|
||||
public XhpcOperator checkAccountUnique(String phone);
|
||||
public XhpcOperator checkAccountUnique(@Param("phone") String phone);
|
||||
|
||||
/**
|
||||
* 查询运营商详情
|
||||
@ -51,17 +52,17 @@ public interface XhpcOperatorMapper {
|
||||
* @param operatorId 运营商id
|
||||
* @return 结果
|
||||
*/
|
||||
public Map<String, Object> info(Long operatorId);
|
||||
public Map<String, Object> info(@Param("operatorId") Long operatorId);
|
||||
|
||||
/**
|
||||
* 获取运营商列表
|
||||
* 获取运营商分页列表
|
||||
*
|
||||
* @param name 运营商名称
|
||||
* @param contactName 联系人
|
||||
* @param contactPhone 联系人电话
|
||||
* @return 结果
|
||||
*/
|
||||
public List<Map<String, Object>> selectOperatorList(String name, String contactName, String contactPhone);
|
||||
public List<Map<String, Object>> selectOperatorList(@Param("name") String name, @Param("contactName") String contactName, @Param("contactPhone") String contactPhone);
|
||||
|
||||
/**
|
||||
* 通过用户ID删除用户和角色关联
|
||||
@ -69,7 +70,7 @@ public interface XhpcOperatorMapper {
|
||||
* @param userId 用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserRoleByUserId(Long userId);
|
||||
public int deleteUserRoleByUserId(@Param("userId") Long userId);
|
||||
|
||||
/**
|
||||
* 通过用户ID删除用户和岗位关联
|
||||
@ -77,7 +78,7 @@ public interface XhpcOperatorMapper {
|
||||
* @param userId 用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserPostByUserId(Long userId);
|
||||
public int deleteUserPostByUserId(@Param("userId") Long userId);
|
||||
|
||||
/**
|
||||
* 通过用户ID删除用户
|
||||
@ -85,7 +86,7 @@ public interface XhpcOperatorMapper {
|
||||
* @param userId 用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserById(Long userId, String delFlag);
|
||||
public int deleteUserById(@Param("userId") Long userId, @Param("delFlag") String delFlag);
|
||||
|
||||
/**
|
||||
* 通过运营商ID查询用户
|
||||
@ -93,5 +94,12 @@ public interface XhpcOperatorMapper {
|
||||
* @param operatorId 运营商ID
|
||||
* @return 结果
|
||||
*/
|
||||
public SysUser getUserByOperatorId(Long operatorId);
|
||||
public SysUser getUserByOperatorId(@Param("operatorId") Long operatorId);
|
||||
|
||||
/**
|
||||
* 查询运营商列表
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public List<Map<String, Object>> getOperatorId();
|
||||
}
|
||||
|
||||
@ -0,0 +1,48 @@
|
||||
package com.xhpc.user.mapper;
|
||||
|
||||
import com.xhpc.user.domain.XhpcStationInternetBlacklist;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 流量用户设置流量方黑名单 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface XhpcStationInternetBlacklistMapper {
|
||||
|
||||
/**
|
||||
* 新增流量用户设置流量方黑名单信息
|
||||
*
|
||||
* @param xhpcStationInternetBlacklist 流量用户设置流量方黑名单信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insert(XhpcStationInternetBlacklist xhpcStationInternetBlacklist);
|
||||
|
||||
/**
|
||||
* 批量删除流量用户设置流量方黑名单
|
||||
*
|
||||
* @param internetUserId 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByIds(@Param("internetUserId") Long internetUserId);
|
||||
|
||||
|
||||
/**
|
||||
* 流量用户设置流量方黑名单列表
|
||||
*
|
||||
* @param internetUserId 流量用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
public List<Map<String, Object>> list(@Param("internetUserId") Long internetUserId);
|
||||
|
||||
/**
|
||||
* 通过运营商id查询电站列表
|
||||
*
|
||||
* @param operatorId 运营商ID
|
||||
* @return 结果
|
||||
*/
|
||||
public List<Map<String, Object>> getXhpcChargingStation(@Param("operatorId") Long operatorId);
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
package com.xhpc.user.mapper;
|
||||
|
||||
import com.ruoyi.system.api.domain.SysUser;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -20,14 +21,6 @@ public interface XhpcUserMapper {
|
||||
*/
|
||||
public int update(SysUser sysUser);
|
||||
|
||||
/**
|
||||
* 新增用户信息
|
||||
*
|
||||
* @param sysUser 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insert(SysUser sysUser);
|
||||
|
||||
/**
|
||||
* 批量删除用户信息
|
||||
*
|
||||
@ -42,16 +35,16 @@ public interface XhpcUserMapper {
|
||||
* @param userId 用户id
|
||||
* @return 结果
|
||||
*/
|
||||
public SysUser selectUserByUserId(Long userId);
|
||||
public SysUser selectUserByUserId(@Param("userId") Long userId);
|
||||
|
||||
/**
|
||||
* 获取平台用户列表
|
||||
* 获取平台用户分页列表
|
||||
*
|
||||
* @param userName 用户账号
|
||||
* @param nickName 用户昵称
|
||||
* @return 结果
|
||||
*/
|
||||
public List<Map<String, Object>> selectPcUserList(String userName, String nickName);
|
||||
public List<Map<String, Object>> selectPcUserList(@Param("userName") String userName, @Param("nickName") String nickName);
|
||||
|
||||
/**
|
||||
* 平台用户详情
|
||||
@ -59,16 +52,16 @@ public interface XhpcUserMapper {
|
||||
* @param userId 用户id
|
||||
* @return 结果
|
||||
*/
|
||||
public Map<String, Object> pcInfo(Long userId);
|
||||
public Map<String, Object> pcInfo(@Param("userId") Long userId);
|
||||
|
||||
/**
|
||||
* 获取运营商用户列表
|
||||
* 获取运营商用户分页列表
|
||||
*
|
||||
* @param userName 用户账号
|
||||
* @param nickName 用户昵称
|
||||
* @return 结果
|
||||
*/
|
||||
public List<Map<String, Object>> selectOperatorUserList(String userName, String nickName, Long operatorId, String createBy);
|
||||
public List<Map<String, Object>> selectOperatorUserList(@Param("userName") String userName, @Param("nickName") String nickName, @Param("operatorId") Long operatorId, @Param("createBy") String createBy);
|
||||
|
||||
/**
|
||||
* 运营商用户详情
|
||||
@ -76,5 +69,5 @@ public interface XhpcUserMapper {
|
||||
* @param userId 用户id
|
||||
* @return 结果
|
||||
*/
|
||||
public Map<String, Object> operatorInfo(Long userId);
|
||||
public Map<String, Object> operatorInfo(@Param("userId") Long userId);
|
||||
}
|
||||
|
||||
@ -0,0 +1,34 @@
|
||||
package com.xhpc.user.openfeign;
|
||||
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.system.api.domain.SysUser;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 用户服务降级处理
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Component
|
||||
public class RemoteSystemFallbackFactory implements FallbackFactory<RemoteSystemService> {
|
||||
private static final Logger log = LoggerFactory.getLogger(RemoteSystemFallbackFactory.class);
|
||||
|
||||
@Override
|
||||
public RemoteSystemService create(Throwable throwable) {
|
||||
log.error("用户服务调用失败:{}", throwable.getMessage());
|
||||
return new RemoteSystemService() {
|
||||
@Override
|
||||
public AjaxResult addUser(SysUser sysUser) {
|
||||
return AjaxResult.error(throwable.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult editUser(SysUser sysUser) {
|
||||
return AjaxResult.error(throwable.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -3,7 +3,6 @@ package com.xhpc.user.openfeign;
|
||||
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.system.api.domain.SysUser;
|
||||
import com.ruoyi.system.api.factory.RemoteFileFallbackFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
@ -14,7 +13,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@FeignClient(contextId = "remoteSystemService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteFileFallbackFactory.class)
|
||||
@FeignClient(contextId = "remoteSystemService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteSystemFallbackFactory.class)
|
||||
public interface RemoteSystemService {
|
||||
/**
|
||||
* 新增用户
|
||||
|
||||
@ -0,0 +1,73 @@
|
||||
package com.xhpc.user.service;
|
||||
|
||||
import com.xhpc.user.domain.XhpcInternetUser;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 流量用户信息 服务层
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface IXhpcInternetUserService {
|
||||
|
||||
/**
|
||||
* 新增任务
|
||||
*
|
||||
* @param xhpcInternetUser 流量用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insert(XhpcInternetUser xhpcInternetUser);
|
||||
|
||||
/**
|
||||
* 更新任务
|
||||
*
|
||||
* @param xhpcInternetUser 流量用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int update(XhpcInternetUser xhpcInternetUser);
|
||||
|
||||
/**
|
||||
* 批量删除流量用户信息
|
||||
*
|
||||
* @param ids 需要删除的流量用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
public void deleteByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 流量用户详情
|
||||
*
|
||||
* @param internetUserId 流量用户id
|
||||
* @return 结果
|
||||
*/
|
||||
public Map<String, Object> info(Long internetUserId);
|
||||
|
||||
/**
|
||||
* 流量用户分页列表
|
||||
*
|
||||
* @param name 流量用户名称
|
||||
* @param contactName 联系人
|
||||
* @param contactPhone 联系人电话
|
||||
* @return 结果
|
||||
*/
|
||||
public List<Map<String, Object>> selectInternetList(String name, String contactName, String contactPhone);
|
||||
|
||||
/**
|
||||
* 禁用/启用流量用户
|
||||
*
|
||||
* @param internetUserId 流量用户id
|
||||
* @return 结果
|
||||
*/
|
||||
public void status(Long internetUserId);
|
||||
|
||||
/**
|
||||
* 流量用户列表
|
||||
*
|
||||
* @param name 流量用户名称
|
||||
* @return 结果
|
||||
*/
|
||||
public List<Map<String, Object>> list(String name);
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package com.xhpc.user.service;
|
||||
|
||||
import com.xhpc.user.domain.XhpcOperatorInternetBlacklist;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 运营商设置流量方黑名单 服务层
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface IXhpcOperatorInternetBlacklistService {
|
||||
|
||||
/**
|
||||
* 新增任务
|
||||
*
|
||||
* @param xhpcOperatorInternetBlacklist 运营商设置流量方黑名单信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insert(XhpcOperatorInternetBlacklist xhpcOperatorInternetBlacklist);
|
||||
|
||||
/**
|
||||
* 批量删除流运营商设置流量方黑名单信息
|
||||
*
|
||||
* @param operatorId 需要删除的运营商ID
|
||||
* @return 结果
|
||||
*/
|
||||
public void deleteByIds(Long operatorId);
|
||||
|
||||
|
||||
/**
|
||||
* 运营商设置流量方黑名单信息列表
|
||||
*
|
||||
* @param operatorId 运营商ID
|
||||
* @return 结果
|
||||
*/
|
||||
public List<Map<String, Object>> list(String operatorId);
|
||||
}
|
||||
@ -54,7 +54,7 @@ public interface IXhpcOperatorService {
|
||||
public Map<String, Object> info(Long operatorId);
|
||||
|
||||
/**
|
||||
* 获取运营商列表
|
||||
* 获取运营商分页列表
|
||||
*
|
||||
* @param name 运营商名称
|
||||
* @param contactName 联系人
|
||||
|
||||
@ -0,0 +1,40 @@
|
||||
package com.xhpc.user.service;
|
||||
|
||||
import com.xhpc.user.domain.XhpcStationInternetBlacklist;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 运营商设置流量方黑名单 服务层
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface IXhpcStationInternetBlacklistService {
|
||||
|
||||
/**
|
||||
* 新增任务
|
||||
*
|
||||
* @param xhpcStationInternetBlacklist 运营商设置流量方黑名单信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insert(XhpcStationInternetBlacklist xhpcStationInternetBlacklist);
|
||||
|
||||
/**
|
||||
* 批量删除流运营商设置流量方黑名单信息
|
||||
*
|
||||
* @param internetUserId 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public void deleteByIds(Long internetUserId);
|
||||
|
||||
|
||||
/**
|
||||
* 运营商设置流量方黑名单信息列表
|
||||
*
|
||||
* @param internetUserId 流量用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
public List<Map<String, Object>> list(String internetUserId);
|
||||
}
|
||||
@ -1,7 +1,5 @@
|
||||
package com.xhpc.user.service;
|
||||
|
||||
import com.ruoyi.system.api.domain.SysUser;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -13,22 +11,6 @@ import java.util.Map;
|
||||
*/
|
||||
public interface IXhpcUserService {
|
||||
|
||||
/**
|
||||
* 新增用户信息
|
||||
*
|
||||
* @param sysUser 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insert(SysUser sysUser);
|
||||
|
||||
/**
|
||||
* 更新用户信息
|
||||
*
|
||||
* @param sysUser 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int update(SysUser sysUser);
|
||||
|
||||
/**
|
||||
* 批量删除用户信息
|
||||
*
|
||||
@ -38,7 +20,7 @@ public interface IXhpcUserService {
|
||||
public void deleteByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 获取平台用户列表
|
||||
* 获取平台用户分页列表
|
||||
*
|
||||
* @param userName 用户账号
|
||||
* @param nickName 用户昵称
|
||||
@ -55,7 +37,7 @@ public interface IXhpcUserService {
|
||||
public Map<String, Object> pcInfo(Long userId);
|
||||
|
||||
/**
|
||||
* 获取运营商用户列表
|
||||
* 获取运营商用户分页列表
|
||||
*
|
||||
* @param userName 用户账号
|
||||
* @param nickName 用户昵称
|
||||
@ -72,4 +54,12 @@ public interface IXhpcUserService {
|
||||
* @return 结果
|
||||
*/
|
||||
public Map<String, Object> operatorInfo(Long userId);
|
||||
|
||||
/**
|
||||
* 禁用/启用平台和运营商子账号
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @return 结果
|
||||
*/
|
||||
public void status(Long userId);
|
||||
}
|
||||
@ -0,0 +1,113 @@
|
||||
package com.xhpc.user.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.StringUtils;
|
||||
import com.ruoyi.system.api.domain.SysUser;
|
||||
import com.xhpc.user.domain.XhpcInternetUser;
|
||||
import com.xhpc.user.mapper.XhpcInternetUserMapper;
|
||||
import com.xhpc.user.mapper.XhpcUserMapper;
|
||||
import com.xhpc.user.service.IXhpcInternetUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 流量用户信息 服务层
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Service
|
||||
public class XhpcInternetUserServiceImpl implements IXhpcInternetUserService {
|
||||
|
||||
@Autowired
|
||||
private XhpcInternetUserMapper xhpcInternetUserMapper;
|
||||
|
||||
@Autowired
|
||||
private XhpcUserMapper xhpcUserMapper;
|
||||
|
||||
/**
|
||||
* 新增任务
|
||||
*
|
||||
* @param xhpcInternetUser 流量用户信息
|
||||
*/
|
||||
@Override
|
||||
public int insert(XhpcInternetUser xhpcInternetUser) {
|
||||
return xhpcInternetUserMapper.insert(xhpcInternetUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新流量用户
|
||||
*
|
||||
* @param xhpcInternetUser 流量用户信息
|
||||
*/
|
||||
@Override
|
||||
public int update(XhpcInternetUser xhpcInternetUser) {
|
||||
return xhpcInternetUserMapper.update(xhpcInternetUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除流量用户信息
|
||||
*
|
||||
* @param ids 需要删除的流量用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(Long[] ids) {
|
||||
xhpcInternetUserMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 流量用户详情
|
||||
*
|
||||
* @param internetUserId 流量用户id
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> info(Long internetUserId) {
|
||||
return xhpcInternetUserMapper.info(internetUserId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 流量用户分页列表
|
||||
*
|
||||
* @param name 流量用户名称
|
||||
* @param contactName 联系人
|
||||
* @param contactPhone 联系人电话
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> selectInternetList(String name, String contactName, String contactPhone) {
|
||||
return xhpcInternetUserMapper.selectInternetList(name, contactName, contactPhone);
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁用/启用流量用户
|
||||
*
|
||||
* @param internetUserId 流量用户id
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public void status(Long internetUserId) {
|
||||
SysUser sysUser = xhpcInternetUserMapper.getUserByInternetUserId(internetUserId);
|
||||
sysUser.setStatus("1".equals(sysUser.getStatus()) ? "0" : "1");
|
||||
xhpcUserMapper.update(sysUser);
|
||||
Map<String, Object> map = xhpcInternetUserMapper.info(internetUserId);
|
||||
String status = StringUtils.valueOf(map.get("status"));
|
||||
XhpcInternetUser xhpcInternetUser = new XhpcInternetUser();
|
||||
xhpcInternetUser.setInternetUserId(internetUserId);
|
||||
xhpcInternetUser.setStatus("0".equals(sysUser.getStatus()) ? 1 : 0);
|
||||
update(xhpcInternetUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 流量用户列表
|
||||
*
|
||||
* @param name 流量用户名称
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> list(String name) {
|
||||
return xhpcInternetUserMapper.list(name);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,81 @@
|
||||
package com.xhpc.user.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.StringUtils;
|
||||
import com.xhpc.user.domain.XhpcOperatorInternetBlacklist;
|
||||
import com.xhpc.user.mapper.XhpcInternetUserMapper;
|
||||
import com.xhpc.user.mapper.XhpcOperatorInternetBlacklistMapper;
|
||||
import com.xhpc.user.service.IXhpcOperatorInternetBlacklistService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 流量用户信息 服务层
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Service
|
||||
public class XhpcOperatorInternetBlacklistServiceImpl implements IXhpcOperatorInternetBlacklistService {
|
||||
|
||||
@Autowired
|
||||
private XhpcOperatorInternetBlacklistMapper xhpcOperatorInternetBlacklistMapper;
|
||||
|
||||
@Autowired
|
||||
private XhpcInternetUserMapper xhpcInternetUserMapper;
|
||||
|
||||
/**
|
||||
* 新增任务
|
||||
*
|
||||
* @param xhpcOperatorInternetBlacklist 流量用户信息
|
||||
*/
|
||||
@Override
|
||||
public int insert(XhpcOperatorInternetBlacklist xhpcOperatorInternetBlacklist) {
|
||||
return xhpcOperatorInternetBlacklistMapper.insert(xhpcOperatorInternetBlacklist);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 批量删除流量用户信息
|
||||
*
|
||||
* @param operatorId 需要删除的运营商ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(Long operatorId) {
|
||||
xhpcOperatorInternetBlacklistMapper.deleteByIds(operatorId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 流量用户列表
|
||||
*
|
||||
* @param operatorId 运营商ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> list(String operatorId) {
|
||||
List<Map<String, Object>> list = xhpcInternetUserMapper.list(null);
|
||||
if (null != list && list.size() > 0) {
|
||||
List<Map<String, Object>> blacklist = xhpcOperatorInternetBlacklistMapper.list(Long.parseLong(operatorId));
|
||||
boolean bool = false;
|
||||
if (null != blacklist && blacklist.size() > 0) {
|
||||
bool = true;
|
||||
}
|
||||
for (Map<String, Object> map : list) {
|
||||
map.put("isBlack", 0);
|
||||
if (bool) {
|
||||
for (Map<String, Object> map1 : blacklist) {
|
||||
String internetUserId = StringUtils.valueOf(map.get("internetUserId"));
|
||||
String internetUserId1 = StringUtils.valueOf(map1.get("internetUserId"));
|
||||
if (internetUserId.equals(internetUserId1)) {
|
||||
map.put("isBlack", 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@ -1,10 +1,12 @@
|
||||
package com.xhpc.user.service;
|
||||
package com.xhpc.user.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.constant.UserConstants;
|
||||
import com.ruoyi.common.core.utils.StringUtils;
|
||||
import com.ruoyi.system.api.domain.SysUser;
|
||||
import com.xhpc.user.domain.XhpcOperator;
|
||||
import com.xhpc.user.mapper.XhpcOperatorMapper;
|
||||
import com.xhpc.user.mapper.XhpcUserMapper;
|
||||
import com.xhpc.user.service.IXhpcOperatorService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -22,6 +24,9 @@ public class XhpcOperatorServiceImpl implements IXhpcOperatorService {
|
||||
@Autowired
|
||||
private XhpcOperatorMapper xhpcOperatorMapper;
|
||||
|
||||
@Autowired
|
||||
private XhpcUserMapper xhpcUserMapper;
|
||||
|
||||
/**
|
||||
* 新增任务
|
||||
*
|
||||
@ -85,7 +90,7 @@ public class XhpcOperatorServiceImpl implements IXhpcOperatorService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取运营商列表
|
||||
* 获取运营商分页列表
|
||||
*
|
||||
* @param name 运营商名称
|
||||
* @param contactName 联系人
|
||||
@ -121,7 +126,8 @@ public class XhpcOperatorServiceImpl implements IXhpcOperatorService {
|
||||
@Override
|
||||
public void status(Long operatorId) {
|
||||
SysUser sysUser = xhpcOperatorMapper.getUserByOperatorId(operatorId);
|
||||
xhpcOperatorMapper.deleteUserById(sysUser.getUserId(), "2".equals(sysUser.getStatus()) ? "0" : "2");
|
||||
sysUser.setStatus("1".equals(sysUser.getStatus()) ? "0" : "1");
|
||||
xhpcUserMapper.update(sysUser);
|
||||
Map<String, Object> map = xhpcOperatorMapper.info(operatorId);
|
||||
String status = StringUtils.valueOf(map.get("status"));
|
||||
XhpcOperator xhpcOperator = new XhpcOperator();
|
||||
@ -0,0 +1,88 @@
|
||||
package com.xhpc.user.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.StringUtils;
|
||||
import com.xhpc.user.domain.XhpcStationInternetBlacklist;
|
||||
import com.xhpc.user.mapper.XhpcOperatorMapper;
|
||||
import com.xhpc.user.mapper.XhpcStationInternetBlacklistMapper;
|
||||
import com.xhpc.user.service.IXhpcStationInternetBlacklistService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 流量用户设置流量方黑名单 服务层
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Service
|
||||
public class XhpcStationInternetBlacklistServiceImpl implements IXhpcStationInternetBlacklistService {
|
||||
|
||||
@Autowired
|
||||
private XhpcStationInternetBlacklistMapper xhpcStationInternetBlacklistMapper;
|
||||
|
||||
@Autowired
|
||||
private XhpcOperatorMapper xhpcOperatorMapper;
|
||||
|
||||
/**
|
||||
* 新增流量用户设置流量方黑名单信息
|
||||
*
|
||||
* @param xhpcStationInternetBlacklist 流量用户设置流量方黑名单信息
|
||||
*/
|
||||
@Override
|
||||
public int insert(XhpcStationInternetBlacklist xhpcStationInternetBlacklist) {
|
||||
return xhpcStationInternetBlacklistMapper.insert(xhpcStationInternetBlacklist);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 批量删除流量用户设置流量方黑名单信息
|
||||
*
|
||||
* @param internetUserId 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(Long internetUserId) {
|
||||
xhpcStationInternetBlacklistMapper.deleteByIds(internetUserId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 流量用户设置流量方黑名单信息列表
|
||||
*
|
||||
* @param internetUserId 流量用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> list(String internetUserId) {
|
||||
List<Map<String, Object>> list = xhpcOperatorMapper.getOperatorId();
|
||||
if (null != list && list.size() > 0) {
|
||||
List<Map<String, Object>> blacklist = xhpcStationInternetBlacklistMapper.list(Long.parseLong(internetUserId));
|
||||
boolean bool = false;
|
||||
if (null != blacklist && blacklist.size() > 0) {
|
||||
bool = true;
|
||||
}
|
||||
for (Map<String, Object> map : list) {
|
||||
String operatorId = StringUtils.valueOf(map.get("operatorId"));
|
||||
List<Map<String, Object>> listXhpcChargingStation = xhpcStationInternetBlacklistMapper.getXhpcChargingStation(Long.parseLong(operatorId));
|
||||
if (null != listXhpcChargingStation && listXhpcChargingStation.size() > 0) {
|
||||
for (Map<String, Object> xhpcChargingStation : listXhpcChargingStation) {
|
||||
xhpcChargingStation.put("isBlack", 0);
|
||||
if (bool) {
|
||||
for (Map<String, Object> map1 : blacklist) {
|
||||
String chargingStationId = StringUtils.valueOf(xhpcChargingStation.get("chargingStationId"));
|
||||
String chargingStationId1 = StringUtils.valueOf(map1.get("chargingStationId"));
|
||||
if (chargingStationId.equals(chargingStationId1)) {
|
||||
xhpcChargingStation.put("isBlack", 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
map.put("listXhpcChargingStation", listXhpcChargingStation);
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@ -1,11 +1,12 @@
|
||||
package com.xhpc.user.service;
|
||||
package com.xhpc.user.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.SecurityUtils;
|
||||
import com.ruoyi.system.api.domain.SysUser;
|
||||
import com.xhpc.user.mapper.XhpcUserMapper;
|
||||
import com.xhpc.user.service.IXhpcUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -17,29 +18,9 @@ import java.util.Map;
|
||||
@Service
|
||||
public class XhpcUserServiceImpl implements IXhpcUserService {
|
||||
|
||||
@Resource
|
||||
@Autowired
|
||||
private XhpcUserMapper xhpcUserMapper;
|
||||
|
||||
/**
|
||||
* 新增用户信息
|
||||
*
|
||||
* @param sysUser 用户信息
|
||||
*/
|
||||
@Override
|
||||
public int insert(SysUser sysUser) {
|
||||
return xhpcUserMapper.insert(sysUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新用户信息
|
||||
*
|
||||
* @param sysUser 用户信息
|
||||
*/
|
||||
@Override
|
||||
public int update(SysUser sysUser) {
|
||||
return xhpcUserMapper.update(sysUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除用户信息
|
||||
*
|
||||
@ -52,7 +33,7 @@ public class XhpcUserServiceImpl implements IXhpcUserService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取平台用户列表
|
||||
* 获取平台用户分页列表
|
||||
*
|
||||
* @param userName 用户账号
|
||||
* @param nickName 用户昵称
|
||||
@ -74,7 +55,7 @@ public class XhpcUserServiceImpl implements IXhpcUserService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取运营商用户列表
|
||||
* 获取运营商用户分页列表
|
||||
*
|
||||
* @param userName 用户账号
|
||||
* @param nickName 用户昵称
|
||||
@ -102,4 +83,17 @@ public class XhpcUserServiceImpl implements IXhpcUserService {
|
||||
public Map<String, Object> operatorInfo(Long userId) {
|
||||
return xhpcUserMapper.operatorInfo(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁用/启用平台和运营商子账号
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public void status(Long userId) {
|
||||
SysUser sysUser = xhpcUserMapper.selectUserByUserId(userId);
|
||||
sysUser.setStatus("1".equals(sysUser.getStatus()) ? "0" : "1");
|
||||
xhpcUserMapper.update(sysUser);
|
||||
}
|
||||
}
|
||||
@ -1,10 +1,10 @@
|
||||
ppsvc:
|
||||
server: 0.0.0.0
|
||||
port: 8887
|
||||
port: 8888
|
||||
|
||||
# Tomcat
|
||||
server:
|
||||
port: ${random.int(1300,1400)}
|
||||
port: 8887
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
|
||||
@ -0,0 +1,289 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xhpc.user.mapper.XhpcInternetUserMapper">
|
||||
|
||||
<resultMap type="com.xhpc.user.domain.XhpcInternetUser" id="XhpcInternetUserResult">
|
||||
<result column="internet_user_id" property="internetUserId"/>
|
||||
<result column="name" property="name"/>
|
||||
<result column="phone" property="phone"/>
|
||||
<result column="contact_name" property="contactName"/>
|
||||
<result column="contact_phone" property="contactPhone"/>
|
||||
<result column="open_bank" property="openBank"/>
|
||||
<result column="card_number" property="cardNumber"/>
|
||||
<result column="cooperation_start_time" property="cooperationStartTime"/>
|
||||
<result column="cooperation_end_time" property="cooperationEndTime"/>
|
||||
<result column="money" property="money"/>
|
||||
<result column="area_code" property="areaCode"/>
|
||||
<result column="address" property="address"/>
|
||||
<result column="detailed_address" property="detailedAddress"/>
|
||||
<result column="commission_type" property="commissionType"/>
|
||||
<result column="commission_rate" property="commissionRate"/>
|
||||
<result column="longitude" property="longitude"/>
|
||||
<result column="latitude" property="latitude"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="del_flag" property="delFlag"/>
|
||||
<result column="create_by" property="createBy"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_by" property="updateBy"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="remark" property="remark"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<insert id="insert" parameterType="com.xhpc.user.domain.XhpcInternetUser">
|
||||
insert into xhpc_internet_user(
|
||||
<if test="null != internetUserId and '' != internetUserId">
|
||||
internet_user_id,
|
||||
</if>
|
||||
<if test="null != name and '' != name">
|
||||
name,
|
||||
</if>
|
||||
<if test="null != phone and '' != phone">
|
||||
phone,
|
||||
</if>
|
||||
<if test="null != contactName and '' != contactName">
|
||||
contact_name,
|
||||
</if>
|
||||
<if test="null != contactPhone and '' != contactPhone">
|
||||
contact_phone,
|
||||
</if>
|
||||
<if test="null != openBank and '' != openBank">
|
||||
open_bank,
|
||||
</if>
|
||||
<if test="null != cardNumber and '' != cardNumber">
|
||||
card_number,
|
||||
</if>
|
||||
<if test="null != cooperationStartTime and '' != cooperationStartTime">
|
||||
cooperation_start_time,
|
||||
</if>
|
||||
<if test="null != cooperationEndTime and '' != cooperationEndTime">
|
||||
cooperation_end_time,
|
||||
</if>
|
||||
<if test="null != money and '' != money">
|
||||
money,
|
||||
</if>
|
||||
<if test="null != areaCode and '' != areaCode">
|
||||
area_code,
|
||||
</if>
|
||||
<if test="null != address and '' != address">
|
||||
address,
|
||||
</if>
|
||||
<if test="null != detailedAddress and '' != detailedAddress">
|
||||
detailed_address,
|
||||
</if>
|
||||
<if test="null != commissionType and '' != commissionType">
|
||||
commission_type,
|
||||
</if>
|
||||
<if test="null != commissionRate and '' != commissionRate">
|
||||
commission_rate,
|
||||
</if>
|
||||
<if test="null != longitude and '' != longitude">
|
||||
longitude,
|
||||
</if>
|
||||
<if test="null != latitude and '' != latitude">
|
||||
latitude,
|
||||
</if>
|
||||
<if test="null != status and '' != status">
|
||||
status,
|
||||
</if>
|
||||
<if test="null != delFlag and '' != delFlag">
|
||||
del_flag,
|
||||
</if>
|
||||
<if test="null != createBy and '' != createBy">
|
||||
create_by,
|
||||
</if>
|
||||
<if test="null != createTime and '' != createTime">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="null != updateBy and '' != updateBy">
|
||||
update_by,
|
||||
</if>
|
||||
<if test="null != updateTime and '' != updateTime">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="null != remark and '' != remark">
|
||||
remark
|
||||
</if>
|
||||
)values(
|
||||
<if test="null != internetUserId and '' != internetUserId">
|
||||
#{internetUserId},
|
||||
</if>
|
||||
<if test="null != name and '' != name">
|
||||
#{name},
|
||||
</if>
|
||||
<if test="null != phone and '' != phone">
|
||||
#{phone},
|
||||
</if>
|
||||
<if test="null != contactName and '' != contactName">
|
||||
#{contactName},
|
||||
</if>
|
||||
<if test="null != contactPhone and '' != contactPhone">
|
||||
#{contactPhone},
|
||||
</if>
|
||||
<if test="null != openBank and '' != openBank">
|
||||
#{openBank},
|
||||
</if>
|
||||
<if test="null != cardNumber and '' != cardNumber">
|
||||
#{cardNumber},
|
||||
</if>
|
||||
<if test="null != cooperationStartTime and '' != cooperationStartTime">
|
||||
#{cooperationStartTime},
|
||||
</if>
|
||||
<if test="null != cooperationEndTime and '' != cooperationEndTime">
|
||||
#{cooperationEndTime},
|
||||
</if>
|
||||
<if test="null != money and '' != money">
|
||||
#{money},
|
||||
</if>
|
||||
<if test="null != areaCode and '' != areaCode">
|
||||
#{areaCode},
|
||||
</if>
|
||||
<if test="null != address and '' != address">
|
||||
#{address},
|
||||
</if>
|
||||
<if test="null != detailedAddress and '' != detailedAddress">
|
||||
#{detailedAddress},
|
||||
</if>
|
||||
<if test="null != commissionType and '' != commissionType">
|
||||
#{commissionType},
|
||||
</if>
|
||||
<if test="null != commissionRate and '' != commissionRate">
|
||||
#{commissionRate},
|
||||
</if>
|
||||
<if test="null != longitude and '' != longitude">
|
||||
#{longitude},
|
||||
</if>
|
||||
<if test="null != latitude and '' != latitude">
|
||||
#{latitude},
|
||||
</if>
|
||||
<if test="null != status and '' != status">
|
||||
#{status},
|
||||
</if>
|
||||
<if test="null != delFlag and '' != delFlag">
|
||||
#{delFlag},
|
||||
</if>
|
||||
<if test="null != createBy and '' != createBy">
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="null != createTime and '' != createTime">
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="null != updateBy and '' != updateBy">
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="null != updateTime and '' != updateTime">
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="null != remark and '' != remark">
|
||||
#{remark}
|
||||
</if>
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.xhpc.user.domain.XhpcInternetUser">
|
||||
UPDATE xhpc_internet_user
|
||||
<set>
|
||||
<if test="null != name and '' != name">name = #{name},</if>
|
||||
<if test="null != phone and '' != phone">phone = #{phone},</if>
|
||||
<if test="null != contactName and '' != contactName">contact_name = #{contactName},</if>
|
||||
<if test="null != contactPhone and '' != contactPhone">contact_phone = #{contactPhone},</if>
|
||||
<if test="null != openBank and '' != openBank">open_bank = #{openBank},</if>
|
||||
<if test="null != cardNumber and '' != cardNumber">card_number = #{cardNumber},</if>
|
||||
<if test="null != cooperationStartTime and '' != cooperationStartTime">cooperation_start_time =
|
||||
#{cooperationStartTime},
|
||||
</if>
|
||||
<if test="null != cooperationEndTime and '' != cooperationEndTime">cooperation_end_time =
|
||||
#{cooperationEndTime},
|
||||
</if>
|
||||
<if test="null != money and '' != money">money = #{money},</if>
|
||||
<if test="null != areaCode and '' != areaCode">area_code = #{areaCode},</if>
|
||||
<if test="null != address and '' != address">address = #{address},</if>
|
||||
<if test="null != detailedAddress and '' != detailedAddress">detailed_address = #{detailedAddress},</if>
|
||||
<if test="null != commissionType and '' != commissionType">commission_type = #{commissionType},</if>
|
||||
<if test="null != commissionRate and '' != commissionRate">commission_rate = #{commissionRate},</if>
|
||||
<if test="null != longitude and '' != longitude">longitude = #{longitude},</if>
|
||||
<if test="null != latitude and '' != latitude">latitude = #{latitude},</if>
|
||||
<if test="null != status and '' != status">status = #{status},</if>
|
||||
<if test="null != delFlag and '' != delFlag">del_flag = #{delFlag},</if>
|
||||
<if test="null != createBy and '' != createBy">create_by = #{createBy},</if>
|
||||
<if test="null != createTime and '' != createTime">create_time = #{createTime},</if>
|
||||
<if test="null != updateBy and '' != updateBy">update_by = #{updateBy},</if>
|
||||
<if test="null != updateTime and '' != updateTime">update_time = #{updateTime},</if>
|
||||
<if test="null != remark and '' != remark">remark = #{remark}</if>
|
||||
</set>
|
||||
WHERE internet_user_id = #{internetUserId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByIds" parameterType="java.lang.Long">
|
||||
delete from xhpc_internet_user where internet_user_id in
|
||||
<foreach collection="array" item="userId" open="(" separator="," close=")">
|
||||
#{internetUserId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="info" parameterType="java.lang.Long" resultType="java.util.Map">
|
||||
select
|
||||
xiu.internet_user_id internetUserId, xiu.`name`, xiu.phone, xiu.contact_name contactName,
|
||||
xiu.contact_phone contactPhone, xiu.open_bank openBank, xiu.card_number cardNumber,
|
||||
xiu.cooperation_start_time cooperationStartTime, xiu.cooperation_end_time cooperationEndTime,
|
||||
xiu.money, xiu.area_code areaCode, xiu.address, xiu.detailed_address detailedAddress,
|
||||
xiu.commission_type commissionType, xiu.commission_rate commissionRate,
|
||||
xiu.longitude, xiu.latitude, xiu.`status`,
|
||||
xiu.create_by createBy ,xiu.create_time createTime,
|
||||
xiu.update_time updateTime, xiu.update_by updateBy,
|
||||
xiu.del_flag delflag, xiu.remark ,
|
||||
CASE WHEN xiu.`status` = 0 THEN '正常' else '禁用' end statusName,
|
||||
CASE WHEN xiu.commission_type = 0 THEN '总金额提成' else '服务费提成' end commissionTypeName
|
||||
from xhpc_internet_user xiu
|
||||
LEFT JOIN sys_user su on su.internet_user_id = xiu.internet_user_id
|
||||
WHERE xiu.del_flag = 0 and xiu.internet_user_id = #{internetUserId}
|
||||
</select>
|
||||
|
||||
<select id="selectInternetList" parameterType="java.lang.Long" resultType="java.util.Map">
|
||||
select
|
||||
xiu.internet_user_id internetUserId, xiu.`name`, xiu.phone, xiu.contact_name contactName,
|
||||
xiu.contact_phone contactPhone,
|
||||
xiu.commission_type commissionType, xiu.commission_rate commissionRate,
|
||||
xiu.latitude, xiu.`status`,
|
||||
CASE WHEN xiu.`status` = 0 THEN '正常' else '禁用' end statusName,
|
||||
CASE WHEN xiu.commission_type = 0 THEN '总金额提成' else '服务费提成' end commissionTypeName
|
||||
from xhpc_internet_user xiu
|
||||
LEFT JOIN sys_user su on su.internet_user_id = xiu.internet_user_id
|
||||
WHERE xiu.del_flag = 0
|
||||
<if test="name != null and name != ''">
|
||||
and xiu.name like concat(concat('%', #{name}), '%')
|
||||
</if>
|
||||
<if test="contactName != null and contactName != ''">
|
||||
and xiu.contact_name like concat(concat('%', #{contactName}), '%')
|
||||
</if>
|
||||
<if test="contactPhone != null and contactPhone != ''">
|
||||
and xiu.contact_phone like concat(concat('%', #{contactPhone}), '%')
|
||||
</if>
|
||||
ORDER BY xiu.update_time DESC
|
||||
</select>
|
||||
|
||||
<select id="getUserByInternetUserId" parameterType="java.lang.Long"
|
||||
resultType="com.ruoyi.system.api.domain.SysUser">
|
||||
select *
|
||||
from sys_user
|
||||
where del_flag = 0 and internet_user_id = #{internetUserId}
|
||||
</select>
|
||||
|
||||
<select id="list" parameterType="java.lang.Long" resultType="java.util.Map">
|
||||
select
|
||||
xiu.internet_user_id internetUserId, xiu.`name`, xiu.phone, xiu.contact_name contactName,
|
||||
xiu.contact_phone contactPhone,
|
||||
xiu.commission_type commissionType, xiu.commission_rate commissionRate,
|
||||
xiu.latitude, xiu.`status`,
|
||||
CASE WHEN xiu.`status` = 0 THEN '正常' else '禁用' end statusName,
|
||||
CASE WHEN xiu.commission_type = 0 THEN '总金额提成' else '服务费提成' end commissionTypeName
|
||||
from xhpc_internet_user xiu
|
||||
LEFT JOIN sys_user su on su.internet_user_id = xiu.internet_user_id
|
||||
WHERE xiu.del_flag = 0
|
||||
<if test="name != null and name != ''">
|
||||
and xiu.name like concat(concat('%', #{name}), '%')
|
||||
</if>
|
||||
ORDER BY xiu.update_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xhpc.user.mapper.XhpcOperatorInternetBlacklistMapper">
|
||||
|
||||
<resultMap type="com.xhpc.user.domain.XhpcOperatorInternetBlacklist" id="XhpcOperatorInternetBlacklistResult">
|
||||
<result column="operator_id" property="operatorId"/>
|
||||
<result column="internet_user_id" property="internetUserId"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<insert id="insert" parameterType="com.xhpc.user.domain.XhpcInternetUser">
|
||||
insert into xhpc_operator_internet_blacklist(
|
||||
<if test="null != operatorId and '' != operatorId">
|
||||
operator_id,
|
||||
</if>
|
||||
<if test="null != internetUserId and '' != internetUserId">
|
||||
internet_user_id
|
||||
</if>
|
||||
)values(
|
||||
<if test="null != operatorId and '' != operatorId">
|
||||
#{operatorId},
|
||||
</if>
|
||||
<if test="null != internetUserId and '' != internetUserId">
|
||||
#{internetUserId}
|
||||
</if>
|
||||
</insert>
|
||||
|
||||
<delete id="deleteByIds" parameterType="java.lang.Long">
|
||||
delete from xhpc_operator_internet_blacklist where operator_id = #{operatorId}
|
||||
</delete>
|
||||
|
||||
<select id="list" parameterType="java.lang.Long" resultType="java.util.Map">
|
||||
select
|
||||
operator_id operatorId, internet_user_id internetUserId
|
||||
from xhpc_operator_internet_blacklist
|
||||
WHERE 1 = 1
|
||||
<if test="operatorId != null and operatorId != ''">
|
||||
and operator_id = #{operatorId}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@ -32,7 +32,7 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
xo.operator_id, xo.name, xo.contact_name contactName, xo.contact_phone contactPhone,
|
||||
xo.operator_id operatorId, xo.name, xo.contact_name contactName, xo.contact_phone contactPhone,
|
||||
xo.phone, xo.attribute, xo.area_code areaCode, xo.address,
|
||||
xo.longitude, xo.latitude, xo.email, xo.commission_type commissionType,
|
||||
xo.platform_commission_rate platformCommissionRate,
|
||||
@ -253,13 +253,23 @@
|
||||
</select>
|
||||
|
||||
<select id="selectOperatorList" parameterType="java.lang.Long" resultType="java.util.Map">
|
||||
select xo.operator_id, xo.name, xo.contact_name contactName,
|
||||
select xo.operator_id operatorId, xo.name, xo.contact_name contactName,
|
||||
xo.contact_phone contactPhone, xo.phone, xo.attribute,
|
||||
xdb.dict_value attributenName
|
||||
from xhpc_operator `xo`
|
||||
LEFT JOIN xhpc_dict_biz xdb on xdb.`code` = 'operator_attribute' and xdb.dict_key = xo.attribute
|
||||
where xo.del_flag = 0 and xo.operator_id = #{operatorId}
|
||||
</select>
|
||||
where xo.del_flag = 0
|
||||
<if test="name != null and name != ''">
|
||||
and xo.name like concat(concat('%', #{name}), '%')
|
||||
</if>
|
||||
<if test="contactName != null and contactName != ''">
|
||||
and xo.contact_name like concat(concat('%', #{contactName}), '%')
|
||||
</if>
|
||||
<if test="contactPhone != null and contactPhone != ''">
|
||||
and xo.contact_phone like concat(concat('%', #{contactPhone}), '%')
|
||||
</if>
|
||||
ORDER BY xo.update_time DESC
|
||||
</select>
|
||||
|
||||
<delete id="deleteUserRoleByUserId" parameterType="java.lang.Long">
|
||||
delete from sys_user_role where user_id=#{userId}
|
||||
@ -278,4 +288,14 @@
|
||||
from sys_user
|
||||
where del_flag = 0 and operator_id = #{operatorId}
|
||||
</select>
|
||||
|
||||
<select id="getOperatorId" resultType="java.util.Map">
|
||||
select xo.operator_id operatorId, xo.name, xo.contact_name contactName,
|
||||
xo.contact_phone contactPhone, xo.phone, xo.attribute,
|
||||
xdb.dict_value attributenName
|
||||
from xhpc_operator `xo`
|
||||
LEFT JOIN xhpc_dict_biz xdb on xdb.`code` = 'operator_attribute' and xdb.dict_key = xo.attribute
|
||||
where xo.del_flag = 0
|
||||
ORDER BY xo.create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xhpc.user.mapper.XhpcStationInternetBlacklistMapper">
|
||||
|
||||
<resultMap type="com.xhpc.user.domain.XhpcStationInternetBlacklist" id="XhpcStationInternetBlacklistResult">
|
||||
<result column="internet_user_id" property="internetUserId"/>
|
||||
<result column="charging_station_id" property="chargingStationId"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<insert id="insert" parameterType="com.xhpc.user.domain.XhpcInternetUser">
|
||||
insert into xhpc_operator_internet_blacklist(
|
||||
<if test="null != internetUserId and '' != internetUserId">
|
||||
internet_user_id,
|
||||
</if>
|
||||
<if test="null != chargingStationId and '' != chargingStationId">
|
||||
charging_station_id
|
||||
</if>
|
||||
)values(
|
||||
<if test="null != internetUserId and '' != internetUserId">
|
||||
#{internetUserId},
|
||||
</if>
|
||||
<if test="null != chargingStationId and '' != chargingStationId">
|
||||
#{chargingStationId}
|
||||
</if>
|
||||
</insert>
|
||||
|
||||
<delete id="deleteByIds" parameterType="java.lang.Long">
|
||||
delete from xhpc_station_internet_blacklist where internet_user_id = #{internetUserId}
|
||||
</delete>
|
||||
|
||||
<select id="list" parameterType="java.lang.Long" resultType="java.util.Map">
|
||||
select
|
||||
internet_user_id internetUserId, charging_station_id chargingStationId
|
||||
from xhpc_station_internet_blacklist
|
||||
WHERE 1 = 1
|
||||
<if test="internetUserId != null and internetUserId != ''">
|
||||
and internet_user_id = #{internetUserId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getXhpcChargingStation" parameterType="java.lang.Long" resultType="java.util.Map">
|
||||
select
|
||||
charging_station_id chargingStationId, `name `,operator_id operatorId
|
||||
from xhpc_charging_station
|
||||
WHERE del_flag = 0
|
||||
<if test="operatorId != null and operatorId != ''">
|
||||
and operator_id = #{operatorId}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@ -12,6 +12,7 @@
|
||||
<result column="email" property="email"/>
|
||||
<result column="phonenumber" property="phonenumber"/>
|
||||
<result column="operator_id" property="operatorId"/>
|
||||
<result column="internet_user_id" property="internetUserId"/>
|
||||
<result column="sex" property="sex"/>
|
||||
<result column="avatar" property="avatar"/>
|
||||
<result column="password" property="password"/>
|
||||
@ -27,138 +28,6 @@
|
||||
<result column="remark" property="remark"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<insert id="insert" parameterType="com.ruoyi.system.api.domain.SysUser">
|
||||
insert into sys_user(
|
||||
<if test="null != userId and '' != userId">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="null != deptId and '' != deptId">
|
||||
dept_id,
|
||||
</if>
|
||||
<if test="null != userName and '' != userName">
|
||||
user_name,
|
||||
</if>
|
||||
<if test="null != nickName and '' != nickName">
|
||||
nick_name,
|
||||
</if>
|
||||
<if test="null != userType and '' != userType">
|
||||
user_type,
|
||||
</if>
|
||||
<if test="null != email and '' != email">
|
||||
email,
|
||||
</if>
|
||||
<if test="null != phonenumber and '' != phonenumber">
|
||||
phonenumber,
|
||||
</if>
|
||||
<if test="null != operatorId and '' != operatorId">
|
||||
operator_id,
|
||||
</if>
|
||||
<if test="null != sex and '' != sex">
|
||||
sex,
|
||||
</if>
|
||||
<if test="null != avatar and '' != avatar">
|
||||
avatar,
|
||||
</if>
|
||||
<if test="null != password and '' != password">
|
||||
password,
|
||||
</if>
|
||||
<if test="null != dataPowerType and '' != dataPowerType">
|
||||
data_power_type,
|
||||
</if>
|
||||
<if test="null != status and '' != status">
|
||||
status,
|
||||
</if>
|
||||
<if test="null != delFlag and '' != delFlag">
|
||||
del_flag,
|
||||
</if>
|
||||
<if test="null != loginIp and '' != loginIp">
|
||||
login_ip,
|
||||
</if>
|
||||
<if test="null != loginDate and '' != loginDate">
|
||||
login_date,
|
||||
</if>
|
||||
<if test="null != createBy and '' != createBy">
|
||||
create_by,
|
||||
</if>
|
||||
<if test="null != createTime and '' != createTime">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="null != updateBy and '' != updateBy">
|
||||
update_by,
|
||||
</if>
|
||||
<if test="null != updateTime and '' != updateTime">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="null != remark and '' != remark">
|
||||
remark
|
||||
</if>
|
||||
)values(
|
||||
<if test="null != userId and '' != userId">
|
||||
#{userId},
|
||||
</if>
|
||||
<if test="null != deptId and '' != deptId">
|
||||
#{deptId},
|
||||
</if>
|
||||
<if test="null != userName and '' != userName">
|
||||
#{userName},
|
||||
</if>
|
||||
<if test="null != nickName and '' != nickName">
|
||||
#{nickName},
|
||||
</if>
|
||||
<if test="null != userType and '' != userType">
|
||||
#{userType},
|
||||
</if>
|
||||
<if test="null != email and '' != email">
|
||||
#{email},
|
||||
</if>
|
||||
<if test="null != phonenumber and '' != phonenumber">
|
||||
#{phonenumber},
|
||||
</if>
|
||||
<if test="null != operatorId and '' != operatorId">
|
||||
#{operatorId},
|
||||
</if>
|
||||
<if test="null != sex and '' != sex">
|
||||
#{sex},
|
||||
</if>
|
||||
<if test="null != avatar and '' != avatar">
|
||||
#{avatar},
|
||||
</if>
|
||||
<if test="null != password and '' != password">
|
||||
#{password},
|
||||
</if>
|
||||
<if test="null != dataPowerType and '' != dataPowerType">
|
||||
#{dataPowerType},
|
||||
</if>
|
||||
<if test="null != status and '' != status">
|
||||
#{status},
|
||||
</if>
|
||||
<if test="null != delFlag and '' != delFlag">
|
||||
#{delFlag},
|
||||
</if>
|
||||
<if test="null != loginIp and '' != loginIp">
|
||||
#{loginIp},
|
||||
</if>
|
||||
<if test="null != loginDate and '' != loginDate">
|
||||
#{loginDate},
|
||||
</if>
|
||||
<if test="null != createBy and '' != createBy">
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="null != createTime and '' != createTime">
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="null != updateBy and '' != updateBy">
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="null != updateTime and '' != updateTime">
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="null != remark and '' != remark">
|
||||
#{remark}
|
||||
</if>
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.ruoyi.system.api.domain.SysUser">
|
||||
UPDATE sys_user
|
||||
<set>
|
||||
@ -212,6 +81,7 @@
|
||||
<if test="nickName != null and nickName != ''">
|
||||
and nick_name like concat(concat('%', #{nickName}), '%')
|
||||
</if>
|
||||
ORDER BY update_time DESC
|
||||
</select>
|
||||
|
||||
<select id="pcInfo" parameterType="java.lang.Long" resultType="java.util.Map">
|
||||
@ -246,6 +116,7 @@
|
||||
<if test="createBy != null and createBy != ''">
|
||||
and create_by = #{createBy}
|
||||
</if>
|
||||
ORDER BY su.update_time DESC
|
||||
</select>
|
||||
|
||||
<select id="operatorInfo" parameterType="java.lang.Long" resultType="java.util.Map">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user