From 98d79175537a23a0232de5bb14051a12a14bd9ea Mon Sep 17 00:00:00 2001 From: fengjundan <1436525664@qq.com> Date: Thu, 22 Jul 2021 16:02:30 +0800 Subject: [PATCH] =?UTF-8?q?1=E4=BF=AE=E6=94=B9=E8=B4=A6=E5=8F=B7=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 8 +- ruoyi-common/ruoyi-common-core/pom.xml | 10 +- .../ruoyi/common/core/utils/StringUtils.java | 24 ++ .../{SysJobMapper.xml => MapperUpdate.xml} | 220 +++++++++--------- ...XhpcDictBizMapper.xml => MapperUpdate.xml} | 0 xhpc-modules/xhpc-user/pom.xml | 5 + .../java/com/xhpc/user/aspect/DaoAspect.java | 108 +++++++++ .../user/controller/XhpcUserController.java | 15 ++ .../domain/XhpcOperatorInternetBlacklist.java | 90 +++++++ .../domain/XhpcStationInternetBlacklist.java | 92 ++++++++ .../xhpc/user/mapper/XhpcOperatorMapper.java | 8 + .../RemoteSystemFallbackFactory.java | 7 + .../user/openfeign/RemoteSystemService.java | 9 + .../service/impl/XhpcOperatorServiceImpl.java | 6 + .../resources/mapper/XhpcAppUserMapper.xml | 12 +- .../mapper/XhpcInternetUserMapper.xml | 12 +- .../XhpcOperatorInternetBlacklistMapper.xml | 70 +++++- .../resources/mapper/XhpcOperatorMapper.xml | 17 +- .../XhpcStationInternetBlacklistMapper.xml | 74 +++++- .../main/resources/mapper/XhpcUserMapper.xml | 4 +- 20 files changed, 638 insertions(+), 153 deletions(-) rename ruoyi-modules/ruoyi-job/src/main/resources/mapper/job/{SysJobMapper.xml => MapperUpdate.xml} (97%) rename xhpc-modules/xhpc-general/src/main/resources/mapper/{XhpcDictBizMapper.xml => MapperUpdate.xml} (100%) create mode 100644 xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/aspect/DaoAspect.java diff --git a/pom.xml b/pom.xml index 31e6a2a5..eab3a9a2 100644 --- a/pom.xml +++ b/pom.xml @@ -39,6 +39,7 @@ 2.6.2 3.2.2 4.15.14.ALL + 1.9.3 @@ -236,7 +237,11 @@ ruoyi-api-system ${ruoyi.version} - + + commons-beanutils + commons-beanutils + ${commons-beanutils.sdk} + @@ -258,6 +263,7 @@ spring-cloud-starter-bootstrap + diff --git a/ruoyi-common/ruoyi-common-core/pom.xml b/ruoyi-common/ruoyi-common-core/pom.xml index 0426a88f..363ba1b9 100644 --- a/ruoyi-common/ruoyi-common-core/pom.xml +++ b/ruoyi-common/ruoyi-common-core/pom.xml @@ -10,7 +10,7 @@ 4.0.0 ruoyi-common-core - + ruoyi-common-core核心模块 @@ -22,7 +22,7 @@ org.springframework.cloud spring-cloud-starter-openfeign - + org.springframework.cloud @@ -107,6 +107,12 @@ swagger-annotations + + + commons-beanutils + commons-beanutils + + diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StringUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StringUtils.java index 9d977b17..51c7734e 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StringUtils.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StringUtils.java @@ -3,6 +3,7 @@ package com.ruoyi.common.core.utils; import com.ruoyi.common.core.text.StrFormatter; import org.springframework.util.AntPathMatcher; +import java.beans.PropertyDescriptor; import java.util.Collection; import java.util.List; import java.util.Map; @@ -483,4 +484,27 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils return String.valueOf(obj); } } + + /** + * @param bean 对象 + * @param propertyName 属性 + * @return + * @Title: isProperty + * @Description: 判断对象是否存在某属性 + * @return: boolean 有则反之true 反之false + */ + public static boolean isProperty(Object bean, String propertyName) { + if (bean == null) { + return false; + } + Class cls = bean.getClass(); + PropertyDescriptor[] propertys = org.springframework.beans.BeanUtils.getPropertyDescriptors(cls); + for (PropertyDescriptor property : propertys) { + String fieldName = property.getName(); + if (fieldName != null && propertyName != null && fieldName.equals(propertyName)) { + return true; + } + } + return false; + } } \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-job/src/main/resources/mapper/job/SysJobMapper.xml b/ruoyi-modules/ruoyi-job/src/main/resources/mapper/job/MapperUpdate.xml similarity index 97% rename from ruoyi-modules/ruoyi-job/src/main/resources/mapper/job/SysJobMapper.xml rename to ruoyi-modules/ruoyi-job/src/main/resources/mapper/job/MapperUpdate.xml index 0323cf11..a0b0ce88 100644 --- a/ruoyi-modules/ruoyi-job/src/main/resources/mapper/job/SysJobMapper.xml +++ b/ruoyi-modules/ruoyi-job/src/main/resources/mapper/job/MapperUpdate.xml @@ -1,111 +1,111 @@ - - - - - - - - - - - - - - - - - - - - - - select job_id, job_name, job_group, invoke_target, cron_expression, misfire_policy, concurrent, status, create_by, create_time, remark - from sys_job - - - - - - - - - - delete from sys_job where job_id = #{jobId} - - - - delete from sys_job where job_id in - - #{jobId} - - - - - update sys_job - - job_name = #{jobName}, - job_group = #{jobGroup}, - invoke_target = #{invokeTarget}, - cron_expression = #{cronExpression}, - misfire_policy = #{misfirePolicy}, - concurrent = #{concurrent}, - status = #{status}, - remark = #{remark}, - update_by = #{updateBy}, - update_time = sysdate() - - where job_id = #{jobId} - - - - insert into sys_job( - job_id, - job_name, - job_group, - invoke_target, - cron_expression, - misfire_policy, - concurrent, - status, - remark, - create_by, - create_time - )values( - #{jobId}, - #{jobName}, - #{jobGroup}, - #{invokeTarget}, - #{cronExpression}, - #{misfirePolicy}, - #{concurrent}, - #{status}, - #{remark}, - #{createBy}, - sysdate() - ) - - + + + + + + + + + + + + + + + + + + + + + + select job_id, job_name, job_group, invoke_target, cron_expression, misfire_policy, concurrent, status, create_by, create_time, remark + from sys_job + + + + + + + + + + delete from sys_job where job_id = #{jobId} + + + + delete from sys_job where job_id in + + #{jobId} + + + + + update sys_job + + job_name = #{jobName}, + job_group = #{jobGroup}, + invoke_target = #{invokeTarget}, + cron_expression = #{cronExpression}, + misfire_policy = #{misfirePolicy}, + concurrent = #{concurrent}, + status = #{status}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + + where job_id = #{jobId} + + + + insert into sys_job( + job_id, + job_name, + job_group, + invoke_target, + cron_expression, + misfire_policy, + concurrent, + status, + remark, + create_by, + create_time + )values( + #{jobId}, + #{jobName}, + #{jobGroup}, + #{invokeTarget}, + #{cronExpression}, + #{misfirePolicy}, + #{concurrent}, + #{status}, + #{remark}, + #{createBy}, + sysdate() + ) + + \ No newline at end of file diff --git a/xhpc-modules/xhpc-general/src/main/resources/mapper/XhpcDictBizMapper.xml b/xhpc-modules/xhpc-general/src/main/resources/mapper/MapperUpdate.xml similarity index 100% rename from xhpc-modules/xhpc-general/src/main/resources/mapper/XhpcDictBizMapper.xml rename to xhpc-modules/xhpc-general/src/main/resources/mapper/MapperUpdate.xml diff --git a/xhpc-modules/xhpc-user/pom.xml b/xhpc-modules/xhpc-user/pom.xml index adf42f13..26623541 100644 --- a/xhpc-modules/xhpc-user/pom.xml +++ b/xhpc-modules/xhpc-user/pom.xml @@ -15,6 +15,11 @@ 账号服务 + + 8 + 8 + + diff --git a/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/aspect/DaoAspect.java b/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/aspect/DaoAspect.java new file mode 100644 index 00000000..0ace821c --- /dev/null +++ b/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/aspect/DaoAspect.java @@ -0,0 +1,108 @@ +package com.xhpc.user.aspect; + + +import com.ruoyi.common.core.utils.SecurityUtils; +import com.ruoyi.common.core.utils.StringUtils; +import org.apache.commons.beanutils.BeanUtils; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.springframework.context.annotation.Configuration; +import org.springframework.stereotype.Component; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.servlet.http.HttpServletRequest; +import java.util.Date; + +/* + * TODO AO切面,插入创建人,创建时间,修改人,修改时间 + * @author fjd + * @date 2020-07-09 11:59 + */ +@Aspect +@Component +@Configuration +public class DaoAspect { + private static final String CREATE_USER = "createUser"; + private static final String CREATE_TIME = "createTime"; + private static final String UPDATE_USER = "updateUser"; + private static final String UPDATE_TIME = "updateTime"; + + @Pointcut("execution(* com.xhpc..*.update*(..))") + public void daoUpdate() { + } + + @Pointcut("execution(* com.xhpc..*.insert*(..))") + public void daoCreate() { + } + + @Around("daoUpdate()") + public Object doAroundUpdate(ProceedingJoinPoint point) throws Throwable { + ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); + if (attributes == null) { + return point.proceed(); + } + //String userName = StringUtils.valueOf(SecurityUtils.getUsername()); + String userName = ""; + if (StringUtils.isNull(userName)) { + userName = "admin"; + } + if (userName != null){ + Object[] objects = point.getArgs(); + if (objects != null && objects.length > 0) { + for (Object arg : objects) { + if (isProperty(arg, UPDATE_USER) && StringUtils.isNull(BeanUtils.getProperty(arg, UPDATE_USER))) { + BeanUtils.setProperty(arg, UPDATE_USER, userName); + } + if (isProperty(arg, UPDATE_TIME) && StringUtils.isNull(BeanUtils.getProperty(arg, UPDATE_TIME))) { + BeanUtils.setProperty(arg, UPDATE_TIME, new Date()); + } + } + } + } + Object object = point.proceed(); + return object; + + } + + @Around("daoCreate()") + public Object doAroundCreate(ProceedingJoinPoint point) throws Throwable { + ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); + if (attributes == null) { + return point.proceed(); + } + Object[] objects = point.getArgs(); + if (objects != null && objects.length > 0) { + for (Object arg : objects) { + //String userName = StringUtils.valueOf(SecurityUtils.getUsername()); + String userName = ""; + Date date = new Date(); + if (StringUtils.isNull(userName)) { + userName = "admin"; + } + if (isProperty(arg, CREATE_USER) && StringUtils.isNull(BeanUtils.getProperty(arg, CREATE_USER))) { + BeanUtils.setProperty(arg, CREATE_USER, userName); + } + if (isProperty(arg, UPDATE_USER) && StringUtils.isNull(BeanUtils.getProperty(arg, UPDATE_USER))) { + BeanUtils.setProperty(arg, UPDATE_USER, userName); + } + + if (isProperty(arg, CREATE_TIME) && StringUtils.isNull(BeanUtils.getProperty(arg, CREATE_TIME))) { + BeanUtils.setProperty(arg, CREATE_TIME, date); + } + if (isProperty(arg, UPDATE_TIME) && StringUtils.isNull(BeanUtils.getProperty(arg, UPDATE_TIME))) { + BeanUtils.setProperty(arg, UPDATE_TIME, date); + } + } + } + Object object = point.proceed(); + return object; + } + + public static boolean isProperty(Object bean, String field){ + return StringUtils.isProperty(bean, field); + } + +} diff --git a/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/controller/XhpcUserController.java b/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/controller/XhpcUserController.java index 626a1684..6bb493c3 100644 --- a/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/controller/XhpcUserController.java +++ b/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/controller/XhpcUserController.java @@ -6,6 +6,7 @@ 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.SysRole; import com.ruoyi.system.api.domain.SysUser; import com.xhpc.user.openfeign.RemoteSystemService; import com.xhpc.user.service.IXhpcOperatorService; @@ -62,6 +63,13 @@ public class XhpcUserController extends BaseController { if (null != ajaxResult && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) { return ajaxResult; } + SysRole role = new SysRole(); + role.setRoleName(sysUser.getUserName()); + role.setRoleKey(sysUser.getUserName()); + ajaxResult = remoteSystemService.addRole(role); + if (null != ajaxResult && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) { + return ajaxResult; + } return AjaxResult.success(); } @@ -124,6 +132,13 @@ public class XhpcUserController extends BaseController { if (null != ajaxResult && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) { return ajaxResult; } + SysRole role = new SysRole(); + role.setRoleName(sysUser.getUserName()); + role.setRoleKey(sysUser.getUserName()); + ajaxResult = remoteSystemService.addRole(role); + if (null != ajaxResult && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) { + return ajaxResult; + } return AjaxResult.success(); } diff --git a/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/domain/XhpcOperatorInternetBlacklist.java b/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/domain/XhpcOperatorInternetBlacklist.java index 2a8f34a6..44f77d26 100644 --- a/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/domain/XhpcOperatorInternetBlacklist.java +++ b/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/domain/XhpcOperatorInternetBlacklist.java @@ -2,6 +2,7 @@ package com.xhpc.user.domain; import javax.validation.constraints.NotNull; import java.io.Serializable; +import java.util.Date; /** * 运营商设置流量方黑名单 xhpc_operator_internet_blacklist @@ -12,6 +13,11 @@ public class XhpcOperatorInternetBlacklist implements Serializable { private static final long serialVersionUID = 1L; + /** + * 运营商设置流量方黑名单id + */ + private Long xhpcOperatorInternetBlacklistId; + /** * 运营商id */ @@ -24,6 +30,35 @@ public class XhpcOperatorInternetBlacklist implements Serializable { @NotNull(message = "流量用户id不能为空") private Long internetUserId; + /** + * 状态(0正常 1停用) + */ + private Integer status; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 创建者 + */ + private String createBy; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 更新者 + */ + private String updateBy; + + /** + * 备注 + */ + private String remark; public XhpcOperatorInternetBlacklist() { } @@ -44,4 +79,59 @@ public class XhpcOperatorInternetBlacklist implements Serializable { this.internetUserId = internetUserId; } + public Long getXhpcOperatorInternetBlacklistId() { + return xhpcOperatorInternetBlacklistId; + } + + public void setXhpcOperatorInternetBlacklistId(Long xhpcOperatorInternetBlacklistId) { + this.xhpcOperatorInternetBlacklistId = xhpcOperatorInternetBlacklistId; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } } diff --git a/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/domain/XhpcStationInternetBlacklist.java b/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/domain/XhpcStationInternetBlacklist.java index 4027210c..1d770413 100644 --- a/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/domain/XhpcStationInternetBlacklist.java +++ b/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/domain/XhpcStationInternetBlacklist.java @@ -2,6 +2,7 @@ package com.xhpc.user.domain; import javax.validation.constraints.NotNull; import java.io.Serializable; +import java.util.Date; /** * 流量用户设置流量方黑名单 xhpc_operator_internet_blacklist @@ -12,6 +13,13 @@ public class XhpcStationInternetBlacklist implements Serializable { private static final long serialVersionUID = 1L; + + + /** + * 运营者子账号权限id + */ + private Long xhpcUserPrivilegeId; + /** * 流量用户id */ @@ -24,6 +32,35 @@ public class XhpcStationInternetBlacklist implements Serializable { @NotNull(message = "电站id不能为空") private Long chargingStationId; + /** + * 状态(0正常 1停用) + */ + private Integer status; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 创建者 + */ + private String createBy; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 更新者 + */ + private String updateBy; + + /** + * 备注 + */ + private String remark; public XhpcStationInternetBlacklist() { } @@ -44,4 +81,59 @@ public class XhpcStationInternetBlacklist implements Serializable { this.chargingStationId = chargingStationId; } + public Long getXhpcUserPrivilegeId() { + return xhpcUserPrivilegeId; + } + + public void setXhpcUserPrivilegeId(Long xhpcUserPrivilegeId) { + this.xhpcUserPrivilegeId = xhpcUserPrivilegeId; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } } diff --git a/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/mapper/XhpcOperatorMapper.java b/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/mapper/XhpcOperatorMapper.java index 257801f6..6898ab54 100644 --- a/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/mapper/XhpcOperatorMapper.java +++ b/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/mapper/XhpcOperatorMapper.java @@ -80,6 +80,14 @@ public interface XhpcOperatorMapper { */ public int deleteUserPostByUserId(@Param("userId") Long userId); + /** + * 删除角色信息 + * + * @param roleName 角色名称 + * @return 结果 + */ + public int deleteRoleByName(@Param("roleName") String roleName); + /** * 通过用户ID删除用户 * diff --git a/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/openfeign/RemoteSystemFallbackFactory.java b/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/openfeign/RemoteSystemFallbackFactory.java index f615b967..36c209f3 100644 --- a/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/openfeign/RemoteSystemFallbackFactory.java +++ b/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/openfeign/RemoteSystemFallbackFactory.java @@ -1,11 +1,14 @@ package com.xhpc.user.openfeign; import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.system.api.domain.SysRole; 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; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RequestBody; /** * 用户服务降级处理 @@ -29,6 +32,10 @@ public class RemoteSystemFallbackFactory implements FallbackFactory map = xhpcUserMapper.pcInfo(userId); + if (StringUtils.isNotNull(map)) { + String userName = StringUtils.valueOf(map.get("userName")); + // 删除用户与岗位表 + xhpcOperatorMapper.deleteRoleByName(userName); + } return xhpcOperatorMapper.deleteUserById(userId, "2"); } diff --git a/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcAppUserMapper.xml b/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcAppUserMapper.xml index 5c771ea2..1029d1b4 100644 --- a/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcAppUserMapper.xml +++ b/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcAppUserMapper.xml @@ -62,13 +62,13 @@ create_by, - + create_time, update_by, - + update_time, @@ -112,13 +112,13 @@ #{createBy}, - + #{createTime}, #{updateBy}, - + #{updateTime}, @@ -141,9 +141,9 @@ status = #{status}, del_flag = #{delFlag}, create_by = #{createBy}, - create_time = #{createTime}, + create_time = #{createTime}, update_by = #{updateBy}, - update_time = #{updateTime}, + update_time = #{updateTime}, remark = #{remark} WHERE app_user_id = #{appUserId} diff --git a/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcInternetUserMapper.xml b/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcInternetUserMapper.xml index 8a32f1c5..c9f08dbd 100644 --- a/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcInternetUserMapper.xml +++ b/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcInternetUserMapper.xml @@ -95,13 +95,13 @@ create_by, - + create_time, update_by, - + update_time, @@ -169,13 +169,13 @@ #{createBy}, - + #{createTime}, #{updateBy}, - + #{updateTime}, @@ -210,9 +210,9 @@ status = #{status}, del_flag = #{delFlag}, create_by = #{createBy}, - create_time = #{createTime}, + create_time = #{createTime}, update_by = #{updateBy}, - update_time = #{updateTime}, + update_time = #{updateTime}, remark = #{remark} WHERE internet_user_id = #{internetUserId} diff --git a/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcOperatorInternetBlacklistMapper.xml b/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcOperatorInternetBlacklistMapper.xml index 7f6ed21a..8b1b76dc 100644 --- a/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcOperatorInternetBlacklistMapper.xml +++ b/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcOperatorInternetBlacklistMapper.xml @@ -5,26 +5,78 @@ - - + + + + + + + + + - insert into xhpc_operator_internet_blacklist( + insert into xhpc_operator_internet_blacklist + + + xhpc_operator_internet_blacklist_id, + operator_id, - internet_user_id + internet_user_id, - )values( - - #{operatorId}, + + status, - - #{internetUserId} + + create_time, + + create_by, + + + update_time, + + + update_by, + + + remark + + + + + #{xhpcOperatorInternetBlacklistId}, + + + #{operatorId}, + + + #{internetUserId}, + + + #{status}, + + + #{createTime}, + + + #{createBy}, + + + #{updateTime}, + + + #{updateBy}, + + + #{remark} + + diff --git a/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcOperatorMapper.xml b/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcOperatorMapper.xml index e4c7d547..da0dd443 100644 --- a/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcOperatorMapper.xml +++ b/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcOperatorMapper.xml @@ -102,13 +102,13 @@ del_flag, - + create_time, create_by, - + update_time, @@ -177,13 +177,13 @@ #{delFlag}, - + #{createTime}, #{createBy}, - + #{updateTime}, @@ -223,9 +223,9 @@ soc = #{soc}, status = #{status}, del_flag = #{delFlag}, - create_time = #{createTime}, + create_time = #{createTime}, create_by = #{createBy}, - update_time = #{updateTime}, + update_time = #{updateTime}, update_by = #{updateBy}, remark = #{remark} @@ -301,4 +301,9 @@ where xo.del_flag = 0 ORDER BY xo.create_time DESC + + + + update sys_role set del_flag = '2' where roleName = #{roleId} + \ No newline at end of file diff --git a/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcStationInternetBlacklistMapper.xml b/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcStationInternetBlacklistMapper.xml index 96691c56..cb02b0b8 100644 --- a/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcStationInternetBlacklistMapper.xml +++ b/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcStationInternetBlacklistMapper.xml @@ -5,26 +5,78 @@ - - + + + + + + + + + - insert into xhpc_operator_internet_blacklist( - - internet_user_id, + insert into xhpc_operator_internet_blacklist + + + xhpc_user_privilege_id, + + + user_id, - charging_station_id + charging_station_id, - )values( - - #{internetUserId}, + + status, - - #{chargingStationId} + + create_time, + + create_by, + + + update_time, + + + update_by, + + + remark + + + + + #{xhpcUserPrivilegeId}, + + + #{userId}, + + + #{chargingStationId}, + + + #{status}, + + + #{createTime}, + + + #{createBy}, + + + #{updateTime}, + + + #{updateBy}, + + + #{remark} + + diff --git a/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcUserMapper.xml b/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcUserMapper.xml index 61a2746e..554d50fb 100644 --- a/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcUserMapper.xml +++ b/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcUserMapper.xml @@ -48,9 +48,9 @@ login_ip = #{loginIp}, login_date = #{loginDate}, create_by = #{createBy}, - create_time = #{createTime}, + create_time = #{createTime}, update_by = #{updateBy}, - update_time = #{updateTime}, + update_time = #{updateTime}, remark = #{remark} WHERE user_id = #{userId}