Commit 697ed7a7 authored by mcb's avatar mcb

Merge branch 'dmp_dev' of http://gitlab.ioubuy.cn/yaobenzhang/jz-dmp-service into dmp_dev

parents 75ecc423 2640489e
...@@ -17,4 +17,6 @@ public @interface SysOperationLogAnnotation { ...@@ -17,4 +17,6 @@ public @interface SysOperationLogAnnotation {
//定义成员 //定义成员
String descrption() default "" ;//描述 String descrption() default "" ;//描述
String actionType() default "" ;//操作的类型,1、添加 2、修改 3、删除 4、查询 String actionType() default "" ;//操作的类型,1、添加 2、修改 3、删除 4、查询
String optModular() default "" ;//操作功能模块
boolean isProjOpt() default true ;//是否项目操作
} }
...@@ -3,7 +3,9 @@ package com.jz.common.aspect; ...@@ -3,7 +3,9 @@ package com.jz.common.aspect;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -22,7 +24,9 @@ import com.alibaba.fastjson.JSONObject; ...@@ -22,7 +24,9 @@ import com.alibaba.fastjson.JSONObject;
import com.jz.common.annotation.SysOperationLogAnnotation; import com.jz.common.annotation.SysOperationLogAnnotation;
import com.jz.common.utils.HttpRequestUtil; import com.jz.common.utils.HttpRequestUtil;
import com.jz.common.utils.web.SessionUtils; import com.jz.common.utils.web.SessionUtils;
import com.jz.dmp.modules.model.DmpMember;
import com.jz.dmp.modules.model.DmpOptLog; import com.jz.dmp.modules.model.DmpOptLog;
import com.jz.dmp.modules.model.DmpRole;
import com.jz.dmp.modules.service.DmpOptLogService; import com.jz.dmp.modules.service.DmpOptLogService;
/**系统操作日志 /**系统操作日志
...@@ -57,6 +61,13 @@ public class SysOperationLogAspect { ...@@ -57,6 +61,13 @@ public class SysOperationLogAspect {
dmpOptLog.setOptTime(optTime); dmpOptLog.setOptTime(optTime);
dmpOptLog.setCreateTime(optTime); dmpOptLog.setCreateTime(optTime);
// 保存操作用户信息
DmpMember dmpMember = SessionUtils.getSecurityUser();
dmpOptLog.setUserId(dmpMember.getUserId());
dmpOptLog.setUserName(dmpMember.getUserName());
dmpOptLog.setCreateUserId(dmpMember.getUserId());
//从切面织入点处通过反射机制获取织入点处的方法 //从切面织入点处通过反射机制获取织入点处的方法
MethodSignature signature = (MethodSignature) pjp.getSignature(); MethodSignature signature = (MethodSignature) pjp.getSignature();
//获取切入点所在的方法 //获取切入点所在的方法
...@@ -66,8 +77,25 @@ public class SysOperationLogAspect { ...@@ -66,8 +77,25 @@ public class SysOperationLogAspect {
if (operationLogAnnotation != null) { if (operationLogAnnotation != null) {
String optType = operationLogAnnotation.actionType(); String optType = operationLogAnnotation.actionType();
String optDesc = operationLogAnnotation.descrption(); String optDesc = operationLogAnnotation.descrption();
String optModular = operationLogAnnotation.optModular();
boolean isProjOpt = operationLogAnnotation.isProjOpt();
dmpOptLog.setOptType(optType);//保存获取的操作 dmpOptLog.setOptType(optType);//保存获取的操作
dmpOptLog.setOptDesc(optDesc); dmpOptLog.setOptDesc(optDesc);
dmpOptLog.setOptModular(optModular);
if (isProjOpt) {
dmpOptLog.setProjectId(dmpMember.getCurrentProjectId());
List<DmpRole> mprojRoleList = dmpMember.getMemberProjectRoleList();
String userRoles = mprojRoleList.stream().map(x->{
return x.getRoleName();
}).collect(Collectors.joining(","));
dmpOptLog.setUserRoles(userRoles);
}else {
List<DmpRole> memberRoleList = dmpMember.getMemberRoleList();
String userRoles = memberRoleList.stream().map(x->{
return x.getRoleName();
}).collect(Collectors.joining(","));
dmpOptLog.setUserRoles(userRoles);
}
} }
//获取请求的类名 //获取请求的类名
String className = pjp.getTarget().getClass().getName(); String className = pjp.getTarget().getClass().getName();
...@@ -89,12 +117,6 @@ public class SysOperationLogAspect { ...@@ -89,12 +117,6 @@ public class SysOperationLogAspect {
} }
dmpOptLog.setRequestParam(JSONObject.toJSONString(paramMap)); dmpOptLog.setRequestParam(JSONObject.toJSONString(paramMap));
// 保存操作用户信息
String userId = SessionUtils.getCurrentUserId();
dmpOptLog.setUserId(Integer.parseInt(userId));
dmpOptLog.setUserName(SessionUtils.getCurrentUserName());
dmpOptLog.setCreateUserId(Integer.parseInt(userId));
//设置ip //设置ip
String optIp = ""; String optIp = "";
try { try {
......
...@@ -46,7 +46,7 @@ public class DmpDevelopTaskController { ...@@ -46,7 +46,7 @@ public class DmpDevelopTaskController {
*/ */
@RequestMapping(method = RequestMethod.POST, value = "/findListWithPage") @RequestMapping(method = RequestMethod.POST, value = "/findListWithPage")
@ApiOperation(value = "分頁列表查询任务开发", notes = "分頁列表查询任务开发") @ApiOperation(value = "分頁列表查询任务开发", notes = "分頁列表查询任务开发")
@SysOperationLogAnnotation(actionType = "分頁列表查询任务开发", descrption = "分頁列表查询任务开发") @SysOperationLogAnnotation(actionType = "列表查询", descrption = "分頁列表查询任务开发", optModular = "任务开发--查询", isProjOpt = true)
public PageInfoResponse<DmpDevelopTaskDto> findListWithPage(@RequestBody DmpDevelopTaskRequest dmpDevelopTaskRequest, HttpServletRequest httpRequest){ public PageInfoResponse<DmpDevelopTaskDto> findListWithPage(@RequestBody DmpDevelopTaskRequest dmpDevelopTaskRequest, HttpServletRequest httpRequest){
PageInfoResponse<DmpDevelopTaskDto> pageInfo = new PageInfoResponse<DmpDevelopTaskDto>(); PageInfoResponse<DmpDevelopTaskDto> pageInfo = new PageInfoResponse<DmpDevelopTaskDto>();
try { try {
......
package com.jz.dmp.modules.controller.bean; package com.jz.dmp.modules.controller.bean;
import java.util.List; import java.util.List;
import com.jz.dmp.modules.model.DmpOptLog; import com.jz.dmp.modules.model.DmpOptLog;
/** /**
......
...@@ -16,23 +16,37 @@ public class DmpOptLogRequest extends BasePageBean { ...@@ -16,23 +16,37 @@ public class DmpOptLogRequest extends BasePageBean {
* 主键 * 主键
*/ */
@ApiModelProperty(value = "主键") @ApiModelProperty(value = "主键")
@FieldAssist(orderBy = "log.opt_id") @FieldAssist(orderBy = "_log.opt_id")
private Integer optId; private Integer optId;
/** /**
* 操作人ID * 操作人ID
*/ */
@ApiModelProperty(value = "操作人ID") @ApiModelProperty(value = "操作人ID")
@FieldAssist(orderBy = "log.user_id") @FieldAssist(orderBy = "_log.user_id")
private Integer userId; private Integer userId;
/** /**
* 操作人姓名 * 操作人姓名
*/ */
@ApiModelProperty(value = "操作人姓名") @ApiModelProperty(value = "操作人姓名")
@FieldAssist(orderBy = "log.user_name") @FieldAssist(orderBy = "_log.user_name")
private String userName; private String userName;
/**
*
*/
@ApiModelProperty(value = "")
@FieldAssist(orderBy = "_log.user_roles")
private String userRoles;
/**
* 操作时间
*/
@ApiModelProperty(value = "操作时间")
@FieldAssist(orderBy = "_log.opt_time")
private Date optTime;
/** /**
* 操作时间起 * 操作时间起
*/ */
...@@ -45,69 +59,90 @@ public class DmpOptLogRequest extends BasePageBean { ...@@ -45,69 +59,90 @@ public class DmpOptLogRequest extends BasePageBean {
@ApiModelProperty(value = "操作时间止") @ApiModelProperty(value = "操作时间止")
private Date optTimeEnd; private Date optTimeEnd;
/**
* 操作功能模块
*/
@ApiModelProperty(value = "操作功能模块")
@FieldAssist(orderBy = "_log.opt_modular")
private String optModular;
/** /**
* 操作类型 * 操作类型
*/ */
@ApiModelProperty(value = "操作类型") @ApiModelProperty(value = "操作类型")
@FieldAssist(orderBy = "log.opt_type") @FieldAssist(orderBy = "_log.opt_type")
private String optType; private String optType;
/** /**
* 操作描述 * 操作描述
*/ */
@ApiModelProperty(value = "操作描述") @ApiModelProperty(value = "操作描述")
@FieldAssist(orderBy = "log.opt_desc") @FieldAssist(orderBy = "_log.opt_desc")
private String optDesc; private String optDesc;
/** /**
* 操作方法 * 操作方法
*/ */
@ApiModelProperty(value = "操作方法") @ApiModelProperty(value = "操作方法")
@FieldAssist(orderBy = "log.method") @FieldAssist(orderBy = "_log.method")
private String method; private String method;
/** /**
* 请求参数 * 请求参数
*/ */
@ApiModelProperty(value = "请求参数") @ApiModelProperty(value = "请求参数")
@FieldAssist(orderBy = "log.request_param") @FieldAssist(orderBy = "_log.request_param")
private String requestParam; private String requestParam;
/** /**
* 操作结果 * 操作结果
*/ */
@ApiModelProperty(value = "操作结果") @ApiModelProperty(value = "操作结果")
@FieldAssist(orderBy = "log.opt_result") @FieldAssist(orderBy = "_log.opt_result")
private String optResult; private String optResult;
/** /**
* IP地址 * IP地址
*/ */
@ApiModelProperty(value = "IP地址") @ApiModelProperty(value = "IP地址")
@FieldAssist(orderBy = "log.opt_ip") @FieldAssist(orderBy = "_log.opt_ip")
private String optIp; private String optIp;
/**
*
*/
@ApiModelProperty(value = "")
@FieldAssist(orderBy = "_log.project_id")
private Integer projectId;
/** /**
* 备注 * 备注
*/ */
@ApiModelProperty(value = "备注") @ApiModelProperty(value = "备注")
@FieldAssist(orderBy = "log.remark") @FieldAssist(orderBy = "_log.remark")
private String remark; private String remark;
/** /**
* 数据状态(0:删除,1,未删除) * 数据状态(0:删除,1,未删除)
*/ */
@ApiModelProperty(value = "数据状态(0:删除,1,未删除)") @ApiModelProperty(value = "数据状态(0:删除,1,未删除)")
@FieldAssist(orderBy = "log.data_status") @FieldAssist(orderBy = "_log.data_status")
private String dataStatus; private String dataStatus;
/** /**
* 创建用户ID * 创建用户ID
*/ */
@ApiModelProperty(value = "创建用户ID") @ApiModelProperty(value = "创建用户ID")
@FieldAssist(orderBy = "log.create_user_id") @FieldAssist(orderBy = "_log.create_user_id")
private Integer createUserId; private Integer createUserId;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
@FieldAssist(orderBy = "_log.create_time")
private Date createTime;
/** /**
* 创建时间起 * 创建时间起
*/ */
...@@ -124,9 +159,16 @@ public class DmpOptLogRequest extends BasePageBean { ...@@ -124,9 +159,16 @@ public class DmpOptLogRequest extends BasePageBean {
* 修改用户ID * 修改用户ID
*/ */
@ApiModelProperty(value = "修改用户ID") @ApiModelProperty(value = "修改用户ID")
@FieldAssist(orderBy = "log.update_user_id") @FieldAssist(orderBy = "_log.update_user_id")
private Integer updateUserId; private Integer updateUserId;
/**
* 修改时间
*/
@ApiModelProperty(value = "修改时间")
@FieldAssist(orderBy = "_log.update_time")
private Date updateTime;
/** /**
* 修改时间起 * 修改时间起
*/ */
...@@ -163,6 +205,22 @@ public class DmpOptLogRequest extends BasePageBean { ...@@ -163,6 +205,22 @@ public class DmpOptLogRequest extends BasePageBean {
this.userName = userName; this.userName = userName;
} }
public String getUserRoles() {
return userRoles;
}
public void setUserRoles(String userRoles) {
this.userRoles = userRoles;
}
public Date getOptTime() {
return optTime;
}
public void setOptTime(Date optTime) {
this.optTime = optTime;
}
public Date getOptTimeStart() { public Date getOptTimeStart() {
return optTimeStart; return optTimeStart;
} }
...@@ -179,6 +237,14 @@ public class DmpOptLogRequest extends BasePageBean { ...@@ -179,6 +237,14 @@ public class DmpOptLogRequest extends BasePageBean {
this.optTimeEnd = optTimeEnd; this.optTimeEnd = optTimeEnd;
} }
public String getOptModular() {
return optModular;
}
public void setOptModular(String optModular) {
this.optModular = optModular;
}
public String getOptType() { public String getOptType() {
return optType; return optType;
} }
...@@ -227,6 +293,14 @@ public class DmpOptLogRequest extends BasePageBean { ...@@ -227,6 +293,14 @@ public class DmpOptLogRequest extends BasePageBean {
this.optIp = optIp; this.optIp = optIp;
} }
public Integer getProjectId() {
return projectId;
}
public void setProjectId(Integer projectId) {
this.projectId = projectId;
}
public String getRemark() { public String getRemark() {
return remark; return remark;
} }
...@@ -251,6 +325,14 @@ public class DmpOptLogRequest extends BasePageBean { ...@@ -251,6 +325,14 @@ public class DmpOptLogRequest extends BasePageBean {
this.createUserId = createUserId; this.createUserId = createUserId;
} }
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getCreateTimeStart() { public Date getCreateTimeStart() {
return createTimeStart; return createTimeStart;
} }
...@@ -275,6 +357,14 @@ public class DmpOptLogRequest extends BasePageBean { ...@@ -275,6 +357,14 @@ public class DmpOptLogRequest extends BasePageBean {
this.updateUserId = updateUserId; this.updateUserId = updateUserId;
} }
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Date getUpdateTimeStart() { public Date getUpdateTimeStart() {
return updateTimeStart; return updateTimeStart;
} }
......
...@@ -27,6 +27,9 @@ public class MyDmpDevelopTaskConverter { ...@@ -27,6 +27,9 @@ public class MyDmpDevelopTaskConverter {
} }
public DmpDevelopTaskDto domain2dto(DmpDevelopTask dmpDevelopTask) { public DmpDevelopTaskDto domain2dto(DmpDevelopTask dmpDevelopTask) {
if (dmpDevelopTask == null) {
return null;
}
DmpDevelopTaskDto dmpDevelopTaskDto = new DmpDevelopTaskDto(); DmpDevelopTaskDto dmpDevelopTaskDto = new DmpDevelopTaskDto();
BeanUtils.copyProperties(dmpDevelopTask, dmpDevelopTaskDto); BeanUtils.copyProperties(dmpDevelopTask, dmpDevelopTaskDto);
......
package com.jz.dmp.modules.controller.bean;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.BeanUtils;
import com.jz.dmp.modules.controller.sys.bean.DmpMemberDto;
import com.jz.dmp.modules.model.DmpMember;
public class MyDmpMemberConverter {
private static MyDmpMemberConverter instance;
private MyDmpMemberConverter() {};
public synchronized static MyDmpMemberConverter INSTANCE() {
if (instance==null) {
instance = new MyDmpMemberConverter();
}
return instance;
}
public DmpMemberDto domain2dto(DmpMember dmpMember) {
if (dmpMember==null) {
return null;
}
DmpMemberDto dmpMemberDto = new DmpMemberDto();
BeanUtils.copyProperties(dmpMember, dmpMemberDto);
return dmpMemberDto;
}
public List<DmpMemberDto> domain2dto(List<DmpMember> dmpMembers) {
List<DmpMemberDto> dmpMemberDtos = new ArrayList<DmpMemberDto>();
dmpMembers.stream().forEach(x -> {
dmpMemberDtos.add(domain2dto(x));
});
return dmpMemberDtos;
}
public DmpMember dto2domain(DmpMemberDto dmpMemberDto) {
if (dmpMemberDto==null) {
return null;
}
DmpMember dmpMember = new DmpMember();
BeanUtils.copyProperties(dmpMemberDto, dmpMember);
return dmpMember;
}
public List<DmpMember> dto2domain(List<DmpMemberDto> dmpMemberDtos) {
List<DmpMember> dmpMembers = new ArrayList<DmpMember>();
dmpMemberDtos.stream().forEach(x -> {
dmpMembers.add(dto2domain(x));
});
return dmpMembers;
}
}
...@@ -45,7 +45,7 @@ public class MyDmpOptLogConverter { ...@@ -45,7 +45,7 @@ public class MyDmpOptLogConverter {
public List<DmpOptLog> dto2domain(List<DmpOptLogDto> dmpOptLogDtos) { public List<DmpOptLog> dto2domain(List<DmpOptLogDto> dmpOptLogDtos) {
List<DmpOptLog> dmpOptLogs = new ArrayList<DmpOptLog>(); List<DmpOptLog> dmpOptLogs = new ArrayList<DmpOptLog>();
dmpOptLogDtos.stream().forEach(x -> { dmpOptLogDtos.stream().forEach(x -> {
dmpOptLogs.add(domain2dto(x)); dmpOptLogs.add(dto2domain(x));
}); });
return dmpOptLogs; return dmpOptLogs;
......
...@@ -99,6 +99,25 @@ public class DmpMemberController { ...@@ -99,6 +99,25 @@ public class DmpMemberController {
return baseBeanResponse; return baseBeanResponse;
} }
/**获取登录用户信息
* @param dmpMemberRequest
* @return
*/
@RequestMapping(method = RequestMethod.GET, value = "/getLoginUserInfo")
@ApiOperation(value = "获取登录用户信息", notes = "获取登录用户信息")
public BaseBeanResponse<DmpMemberDto> getLoginUserInfo(HttpServletRequest httpRequest){
BaseBeanResponse<DmpMemberDto> baseBeanResponse = new BaseBeanResponse<DmpMemberDto>();
try {
baseBeanResponse = dmpMemberService.getLoginUserInfo(httpRequest);
} catch (Exception e) {
baseBeanResponse.setMessage("请求失败");
baseBeanResponse.setCode(ResultCode.INTERNAL_SERVER_ERROR.val());
e.printStackTrace();
}
return baseBeanResponse;
}
/**删除用户表 /**删除用户表
* @param userId * @param userId
* @return * @return
......
...@@ -36,6 +36,12 @@ public class DmpOptLog implements Serializable{ ...@@ -36,6 +36,12 @@ public class DmpOptLog implements Serializable{
@ApiModelProperty(value = "操作人姓名") @ApiModelProperty(value = "操作人姓名")
private String userName; private String userName;
/**
*
*/
@ApiModelProperty(value = "")
private String userRoles;
/** /**
* 操作时间 * 操作时间
*/ */
...@@ -43,6 +49,12 @@ public class DmpOptLog implements Serializable{ ...@@ -43,6 +49,12 @@ public class DmpOptLog implements Serializable{
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date optTime; private Date optTime;
/**
* 操作功能模块
*/
@ApiModelProperty(value = "操作功能模块")
private String optModular;
/** /**
* 操作类型 * 操作类型
*/ */
...@@ -79,6 +91,12 @@ public class DmpOptLog implements Serializable{ ...@@ -79,6 +91,12 @@ public class DmpOptLog implements Serializable{
@ApiModelProperty(value = "IP地址") @ApiModelProperty(value = "IP地址")
private String optIp; private String optIp;
/**
*
*/
@ApiModelProperty(value = "")
private Integer projectId;
/** /**
* 备注 * 备注
*/ */
...@@ -141,6 +159,14 @@ public class DmpOptLog implements Serializable{ ...@@ -141,6 +159,14 @@ public class DmpOptLog implements Serializable{
this.userName = userName; this.userName = userName;
} }
public String getUserRoles() {
return userRoles;
}
public void setUserRoles(String userRoles) {
this.userRoles = userRoles;
}
public Date getOptTime() { public Date getOptTime() {
return optTime; return optTime;
} }
...@@ -149,6 +175,14 @@ public class DmpOptLog implements Serializable{ ...@@ -149,6 +175,14 @@ public class DmpOptLog implements Serializable{
this.optTime = optTime; this.optTime = optTime;
} }
public String getOptModular() {
return optModular;
}
public void setOptModular(String optModular) {
this.optModular = optModular;
}
public String getOptType() { public String getOptType() {
return optType; return optType;
} }
...@@ -197,6 +231,14 @@ public class DmpOptLog implements Serializable{ ...@@ -197,6 +231,14 @@ public class DmpOptLog implements Serializable{
this.optIp = optIp; this.optIp = optIp;
} }
public Integer getProjectId() {
return projectId;
}
public void setProjectId(Integer projectId) {
this.projectId = projectId;
}
public String getRemark() { public String getRemark() {
return remark; return remark;
} }
......
...@@ -5,9 +5,7 @@ import java.util.HashMap; ...@@ -5,9 +5,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -15,7 +13,6 @@ import org.springframework.stereotype.Service; ...@@ -15,7 +13,6 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import com.github.pagehelper.Page; import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
...@@ -78,6 +75,10 @@ public class DmpOptLogServiceImpl extends BaseService implements DmpOptLogServic ...@@ -78,6 +75,10 @@ public class DmpOptLogServiceImpl extends BaseService implements DmpOptLogServic
if (dmpOptLogRequest.getOptTimeEnd() != null) { if (dmpOptLogRequest.getOptTimeEnd() != null) {
param.put("optTimeEnd", dmpOptLogRequest.getOptTimeEnd()); param.put("optTimeEnd", dmpOptLogRequest.getOptTimeEnd());
} }
//操作功能模块
if (!StringUtils.isEmpty(dmpOptLogRequest.getOptModular())) {
param.put("optModular", dmpOptLogRequest.getOptModular());
}
//操作类型 //操作类型
if (!StringUtils.isEmpty(dmpOptLogRequest.getOptType())) { if (!StringUtils.isEmpty(dmpOptLogRequest.getOptType())) {
param.put("optType", dmpOptLogRequest.getOptType()); param.put("optType", dmpOptLogRequest.getOptType());
...@@ -187,6 +188,10 @@ public class DmpOptLogServiceImpl extends BaseService implements DmpOptLogServic ...@@ -187,6 +188,10 @@ public class DmpOptLogServiceImpl extends BaseService implements DmpOptLogServic
if (dmpOptLogRequest.getOptTimeEnd() != null) { if (dmpOptLogRequest.getOptTimeEnd() != null) {
param.put("optTimeEnd", dmpOptLogRequest.getOptTimeEnd()); param.put("optTimeEnd", dmpOptLogRequest.getOptTimeEnd());
} }
//操作功能模块
if (!StringUtils.isEmpty(dmpOptLogRequest.getOptModular())) {
param.put("optModular", dmpOptLogRequest.getOptModular());
}
//操作类型 //操作类型
if (!StringUtils.isEmpty(dmpOptLogRequest.getOptType())) { if (!StringUtils.isEmpty(dmpOptLogRequest.getOptType())) {
param.put("optType", dmpOptLogRequest.getOptType()); param.put("optType", dmpOptLogRequest.getOptType());
...@@ -444,6 +449,10 @@ public class DmpOptLogServiceImpl extends BaseService implements DmpOptLogServic ...@@ -444,6 +449,10 @@ public class DmpOptLogServiceImpl extends BaseService implements DmpOptLogServic
if (dmpOptLogRequest.getOptTimeEnd() != null) { if (dmpOptLogRequest.getOptTimeEnd() != null) {
param.put("optTimeEnd", dmpOptLogRequest.getOptTimeEnd()); param.put("optTimeEnd", dmpOptLogRequest.getOptTimeEnd());
} }
//操作功能模块
if (!StringUtils.isEmpty(dmpOptLogRequest.getOptModular())) {
param.put("optModular", dmpOptLogRequest.getOptModular());
}
//操作类型 //操作类型
if (!StringUtils.isEmpty(dmpOptLogRequest.getOptType())) { if (!StringUtils.isEmpty(dmpOptLogRequest.getOptType())) {
param.put("optType", dmpOptLogRequest.getOptType()); param.put("optType", dmpOptLogRequest.getOptType());
...@@ -542,6 +551,10 @@ public class DmpOptLogServiceImpl extends BaseService implements DmpOptLogServic ...@@ -542,6 +551,10 @@ public class DmpOptLogServiceImpl extends BaseService implements DmpOptLogServic
if (dmpOptLogRequest.getOptTimeEnd() != null) { if (dmpOptLogRequest.getOptTimeEnd() != null) {
param.put("optTimeEnd", dmpOptLogRequest.getOptTimeEnd()); param.put("optTimeEnd", dmpOptLogRequest.getOptTimeEnd());
} }
//操作功能模块
if (!StringUtils.isEmpty(dmpOptLogRequest.getOptModular())) {
param.put("optModular", dmpOptLogRequest.getOptModular());
}
//操作类型 //操作类型
if (!StringUtils.isEmpty(dmpOptLogRequest.getOptType())) { if (!StringUtils.isEmpty(dmpOptLogRequest.getOptType())) {
param.put("optType", dmpOptLogRequest.getOptType()); param.put("optType", dmpOptLogRequest.getOptType());
......
...@@ -145,4 +145,15 @@ public interface DmpMemberService { ...@@ -145,4 +145,15 @@ public interface DmpMemberService {
*/ */
public BaseResponse softDeleteByIds(List<Integer> idList, HttpServletRequest httpRequest)throws Exception; public BaseResponse softDeleteByIds(List<Integer> idList, HttpServletRequest httpRequest)throws Exception;
/**
* @Title: getLoginUserInfo
* @Description: TODO(获取当前登录用户信息)
* @param @param httpRequest
* @param @return
* @param @throws Exception 参数
* @return BaseBeanResponse<DmpMemberDto> 返回类型
* @throws
*/
public BaseBeanResponse<DmpMemberDto> getLoginUserInfo(HttpServletRequest httpRequest)throws Exception;
} }
...@@ -31,6 +31,7 @@ import com.jz.common.constant.ResultCode; ...@@ -31,6 +31,7 @@ import com.jz.common.constant.ResultCode;
import com.jz.common.constant.StatuConstant; import com.jz.common.constant.StatuConstant;
import com.jz.common.persistence.BaseService; import com.jz.common.persistence.BaseService;
import com.jz.common.utils.web.SessionUtils; import com.jz.common.utils.web.SessionUtils;
import com.jz.dmp.modules.controller.bean.MyDmpMemberConverter;
import com.jz.dmp.modules.controller.sys.bean.DmpMemberBatch; import com.jz.dmp.modules.controller.sys.bean.DmpMemberBatch;
import com.jz.dmp.modules.controller.sys.bean.DmpMemberDto; import com.jz.dmp.modules.controller.sys.bean.DmpMemberDto;
import com.jz.dmp.modules.controller.sys.bean.DmpMemberRequest; import com.jz.dmp.modules.controller.sys.bean.DmpMemberRequest;
...@@ -543,5 +544,22 @@ public class DmpMemberServiceImpl extends BaseService implements DmpMemberServic ...@@ -543,5 +544,22 @@ public class DmpMemberServiceImpl extends BaseService implements DmpMemberServic
return baseResponse; return baseResponse;
} }
/**
*获取当前登录用户信息
*/
@Override
public BaseBeanResponse<DmpMemberDto> getLoginUserInfo(HttpServletRequest httpRequest) throws Exception {
BaseBeanResponse<DmpMemberDto> baseBeanResponse = new BaseBeanResponse<>();
DmpMember dmpMember = SessionUtils.getSecurityUser();
DmpMemberDto dmpMemberDto = MyDmpMemberConverter.INSTANCE().domain2dto(dmpMember);
baseBeanResponse.setCode(ResultCode.SUCCESS.val());
baseBeanResponse.setMessage("查询成功");
baseBeanResponse.setData(dmpMemberDto);
return baseBeanResponse;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment