Browse Source

Merge remote-tracking branch 'origin/dev/ez-security210625' into dev/ez-security210625

songxinlu 3 years ago
parent
commit
b1d08f03d1

+ 0 - 6
common/src/main/java/com/lantone/common/vo/GetAbnormalLogVO.java

@@ -22,10 +22,4 @@ public class GetAbnormalLogVO extends Page {
      */
     @ApiModelProperty(value = "操作ip")
     String operationIp;
-
-    /**
-     * 标记(0-操作方式 1-操作ip)
-     */
-    @ApiModelProperty(value = "单独列表返回标记(0-操作方式 1-操作ip)")
-    Integer mark;
 }

+ 33 - 0
common/src/main/java/com/lantone/common/vo/GetAbnormalWayAndIpVO.java

@@ -0,0 +1,33 @@
+package com.lantone.common.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+
+/**
+ * @Description:
+ * @Author: cy
+ * @time: 2021/9/6 15:24
+ */
+@Data
+public class GetAbnormalWayAndIpVO {
+    /**
+     * 操作方式
+     */
+    @ApiModelProperty(value = "操作方式")
+    String operationWay;
+    /**
+     * 操作ip
+     */
+    @ApiModelProperty(value = "操作ip")
+    String operationIp;
+
+    /**
+     * 标记(0-操作方式 1-操作ip)
+     */
+    @NotNull(message = "查询列表标记不能为空")
+    @ApiModelProperty(value = "单独列表返回标记(0-操作方式 1-操作ip)",required = true)
+    Integer mark;
+}

+ 2 - 0
common/src/main/java/com/lantone/common/vo/GetHospitalSetVO.java

@@ -8,6 +8,8 @@ import java.io.Serializable;
 public class GetHospitalSetVO implements Serializable {
     private static final long serialVersionUID = 1L;
 
+    @ApiModelProperty(value = "id")
+    private Long id;
 
     /**
      * 组织机构ID

+ 0 - 6
common/src/main/java/com/lantone/common/vo/GetLoginLogVO.java

@@ -23,10 +23,4 @@ public class GetLoginLogVO extends Page {
      */
     @ApiModelProperty(value = "登录ip")
     String loginIp;
-
-    /**
-     * 标记(0-登录用户 1-登录ip)
-     */
-    @ApiModelProperty(value = "单独列表返回标记(0-登录用户 1-登录ip)")
-    Integer mark;
 }

+ 32 - 0
common/src/main/java/com/lantone/common/vo/GetLoginNameAndIpVO.java

@@ -0,0 +1,32 @@
+package com.lantone.common.vo;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+
+/**
+ * @Description:
+ * @Author: cy
+ * @time: 2021/9/6 15:24
+ */
+@Data
+public class GetLoginNameAndIpVO {
+    /**
+     * 登录用户
+     */
+    @ApiModelProperty(value = "登录用户")
+    String loginName;
+    /**
+     * 登录ip
+     */
+    @ApiModelProperty(value = "登录ip")
+    String loginIp;
+
+    /**
+     * 标记(0-登录用户 1-登录ip)
+     */
+    @NotNull(message = "查询列表标记不能为空")
+    @ApiModelProperty(value = "单独列表返回标记(0-登录用户 1-登录ip)",required = true)
+    Integer mark;
+}

+ 2 - 1
dblayer-mbg/src/main/java/com/lantone/dblayermbg/mapper/AbnormalLogMapper.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.lantone.common.dto.AbnormalLogDTO;
 import com.lantone.common.vo.GetAbnormalLogVO;
+import com.lantone.common.vo.GetAbnormalWayAndIpVO;
 import com.lantone.dblayermbg.entity.AbnormalLog;
 import org.springframework.stereotype.Repository;
 
@@ -21,5 +22,5 @@ public interface AbnormalLogMapper extends BaseMapper<AbnormalLog> {
 
     IPage<AbnormalLogDTO> getAbnormalLog(GetAbnormalLogVO getAbnormalLogVO);
 
-    List<String> getAbnormalLogWayAndIp(GetAbnormalLogVO getAbnormalLogVO);
+    List<String> getAbnormalLogWayAndIp(GetAbnormalWayAndIpVO getAbnormalWayAndIpVO);
 }

+ 2 - 1
dblayer-mbg/src/main/java/com/lantone/dblayermbg/mapper/LoginLogMapper.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.lantone.common.dto.LoginLogDTO;
 import com.lantone.common.vo.GetLoginLogVO;
+import com.lantone.common.vo.GetLoginNameAndIpVO;
 import com.lantone.dblayermbg.entity.LoginLog;
 import org.springframework.stereotype.Repository;
 
@@ -21,5 +22,5 @@ public interface LoginLogMapper extends BaseMapper<LoginLog> {
 
     IPage<LoginLogDTO> getLoginLog(GetLoginLogVO getLoginLogVO);
 
-    List<String> getLoginLogNameAndIp(GetLoginLogVO getLoginLogVO);
+    List<String> getLoginLogNameAndIp(GetLoginNameAndIpVO getLoginNameAndIpVO);
 }

+ 2 - 1
dblayer-mbg/src/main/java/com/lantone/dblayermbg/service/LoginLogService.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.lantone.common.dto.LoginLogDTO;
 import com.lantone.common.vo.GetLoginLogVO;
+import com.lantone.common.vo.GetLoginNameAndIpVO;
 import com.lantone.dblayermbg.entity.LoginLog;
 
 import java.util.List;
@@ -17,5 +18,5 @@ import java.util.List;
 public interface LoginLogService extends IService<LoginLog> {
     void addLoginLog(LoginLogDTO loginLogDTO);
     IPage<LoginLogDTO> getLoginLog(GetLoginLogVO getLoginLogVO);
-    List<String> getLoginLogNameAndIp(GetLoginLogVO getLoginLogVO);
+    List<String> getLoginLogNameAndIp(GetLoginNameAndIpVO getLoginNameAndIpVO);
 }

+ 3 - 2
dblayer-mbg/src/main/java/com/lantone/dblayermbg/service/impl/AbnormalLogServiceImpl.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.lantone.common.dto.AbnormalLogDTO;
 import com.lantone.common.vo.GetAbnormalLogVO;
+import com.lantone.common.vo.GetAbnormalWayAndIpVO;
 import com.lantone.dblayermbg.entity.AbnormalLog;
 import com.lantone.dblayermbg.mapper.AbnormalLogMapper;
 import com.lantone.dblayermbg.service.AbnormalLogService;
@@ -33,7 +34,7 @@ public class AbnormalLogServiceImpl extends ServiceImpl<AbnormalLogMapper, Abnor
         return  abnormalLogMapper.getAbnormalLog(getAbnormalLogVO);
     }
 
-    public List<String> getAbnormalLogWayAndIp(GetAbnormalLogVO getAbnormalLogVO) {
-        return  abnormalLogMapper.getAbnormalLogWayAndIp(getAbnormalLogVO);
+    public List<String> getAbnormalLogWayAndIp(GetAbnormalWayAndIpVO getAbnormalWayAndIpVO) {
+        return  abnormalLogMapper.getAbnormalLogWayAndIp(getAbnormalWayAndIpVO);
     }
 }

+ 3 - 2
dblayer-mbg/src/main/java/com/lantone/dblayermbg/service/impl/LoginLogServiceImpl.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.lantone.common.dto.LoginLogDTO;
 import com.lantone.common.vo.GetLoginLogVO;
+import com.lantone.common.vo.GetLoginNameAndIpVO;
 import com.lantone.dblayermbg.entity.LoginLog;
 import com.lantone.dblayermbg.mapper.LoginLogMapper;
 import com.lantone.dblayermbg.service.LoginLogService;
@@ -34,7 +35,7 @@ public class LoginLogServiceImpl extends ServiceImpl<LoginLogMapper, LoginLog> i
     }
 
     @Override
-    public List<String> getLoginLogNameAndIp(GetLoginLogVO getLoginLogVO) {
-        return loginLogMapper.getLoginLogNameAndIp(getLoginLogVO);
+    public List<String> getLoginLogNameAndIp(GetLoginNameAndIpVO getLoginNameAndIpVO) {
+        return loginLogMapper.getLoginLogNameAndIp(getLoginNameAndIpVO);
     }
 }

+ 3 - 0
security-center/src/main/java/com/lantone/security/facade/DictionaryManagementFacade.java

@@ -77,6 +77,9 @@ public class DictionaryManagementFacade {
         if (null != getDictionaryVO.getGroupType()) {
             dictionaryInfoLambdaQuery.like(DictionaryInfo::getGroupType, getDictionaryVO.getGroupType());
         }
+        if (null != getDictionaryVO.getId()) {
+            dictionaryInfoLambdaQuery.eq(DictionaryInfo::getId, getDictionaryVO.getId());
+        }
         dictionaryInfoLambdaQuery.orderByDesc(DictionaryInfo::getGmtCreate);
         IPage<DictionaryInfo> page = dictionaryInfoLambdaQuery.page(pageInfo);
         page.getRecords().forEach(obj -> {

+ 1 - 0
security-center/src/main/java/com/lantone/security/facade/HospitalSetManagementFacade.java

@@ -77,6 +77,7 @@ public class HospitalSetManagementFacade {
         if (null != getHospitalSetVO.getCode()) {
             hospitalSetLambdaQuery.like(HospitalSet::getCode, getHospitalSetVO.getCode());
         }
+        hospitalSetLambdaQuery.eq(null != getHospitalSetVO.getId(),HospitalSet::getId, getHospitalSetVO.getId());
         hospitalSetLambdaQuery.orderByDesc(HospitalSet::getGmtCreate);
         IPage<HospitalSet> page = hospitalSetLambdaQuery.page(pageInfo);
         return page;

+ 7 - 4
security-center/src/main/java/com/lantone/security/web/LogManagementController.java

@@ -6,7 +6,9 @@ import com.lantone.common.dto.AbnormalLogDTO;
 import com.lantone.common.dto.LoginLogDTO;
 import com.lantone.common.dto.OperationLogDTO;
 import com.lantone.common.vo.GetAbnormalLogVO;
+import com.lantone.common.vo.GetAbnormalWayAndIpVO;
 import com.lantone.common.vo.GetLoginLogVO;
+import com.lantone.common.vo.GetLoginNameAndIpVO;
 import com.lantone.common.vo.GetOperationLogVO;
 import com.lantone.dblayermbg.facade.AbnormalLogFacade;
 import com.lantone.dblayermbg.facade.LoginLogFacade;
@@ -20,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
+import javax.validation.Valid;
 import java.util.List;
 
 /**
@@ -46,8 +49,8 @@ public class LogManagementController {
 
     @ApiOperation(value = "查看登录日志登录用户|登录ip地址[by:cy]")
     @PostMapping("/getLoginLogNameAndIp")
-    public CommonResult<List<String>> getLoginLogNameAndIp(@RequestBody GetLoginLogVO getLoginLogVO) {
-        return CommonResult.success(loginLogFacade.getLoginLogNameAndIp(getLoginLogVO));
+    public CommonResult<List<String>> getLoginLogNameAndIp(@RequestBody @Valid GetLoginNameAndIpVO getLoginNameAndIpVO) {
+        return CommonResult.success(loginLogFacade.getLoginLogNameAndIp(getLoginNameAndIpVO));
     }
 
     @ApiOperation(value = "查看操作日志[by:cy]")
@@ -70,8 +73,8 @@ public class LogManagementController {
 
     @ApiOperation(value = "查看异常日志请求方式|ip地址[by:cy]")
     @PostMapping("/getAbnormalLogWayAndIp")
-    public CommonResult<List<String>> getAbnormalLogWayAndIp(@RequestBody GetAbnormalLogVO getAbnormalLogVO) {
-        return CommonResult.success(abnormalLogFacade.getAbnormalLogWayAndIp(getAbnormalLogVO));
+    public CommonResult<List<String>> getAbnormalLogWayAndIp(@RequestBody @Valid GetAbnormalWayAndIpVO getAbnormalWayAndIpVO) {
+        return CommonResult.success(abnormalLogFacade.getAbnormalLogWayAndIp(getAbnormalWayAndIpVO));
     }
 
 }