Commit 23fae18b authored by sml's avatar sml

代码提交

parent 8b964097
...@@ -97,5 +97,12 @@ public class CommConstant { ...@@ -97,5 +97,12 @@ public class CommConstant {
public static final String MODULAR_DATASERVICE_DEV = "数据服务/服务开发";//数据服务/服务开发 public static final String MODULAR_DATASERVICE_DEV = "数据服务/服务开发";//数据服务/服务开发
public static final String MODULAR_DATASERVICE_ORG = "数据服务/组织管理";//数据服务/组织管理 public static final String MODULAR_DATASERVICE_ORG = "数据服务/组织管理";//数据服务/组织管理
public static final String MODULAR_DATASERVICE_AUTHMANAG = "数据服务/授权管理";//数据服务/授权管理 public static final String MODULAR_DATASERVICE_AUTHMANAG = "数据服务/授权管理";//数据服务/授权管理
public static final String MODULAR_WORKMANG = "工作台管理";//工作台管理
public static final String MODULAR_WORKMANG_SYSCONFIG = "工作台管理/系统配置";//工作台管理/系统配置
public static final String MODULAR_WORKSPACEMANG = "工作空间管理";//工作台管理
public static final String MODULAR_WORKSPACEMANG_LIST = "工作空间管理/工作空间列表";//工作空间管理/工作空间列表
public static final String MODULAR_WORKSPACEMANG_MEMBER = "工作空间管理/成员管理";//工作空间管理/成员管理
public static final String MODULAR_WORKSPACEMANG_SYSCONFIG = "工作空间管理/系统配置";//工作空间管理/系统配置
} }
...@@ -46,7 +46,7 @@ public class CustomUserService implements UserDetailsService { ...@@ -46,7 +46,7 @@ public class CustomUserService implements UserDetailsService {
} }
if (user != null) { if (user != null) {
//设置登录用户默认项目 //设置登录用户默认项目
Integer defaultProjectId = dmpMemberService.getDefProjectByUserName(user.getUsername()); Integer defaultProjectId = dmpMemberService.getDefProjectByUserId(user.getUserId());
user.setCurrentProjectId(defaultProjectId); user.setCurrentProjectId(defaultProjectId);
//设置UserRole //设置UserRole
List<DmpRole> memberRoles = dmpRoleService.findMemberRolesByUserId(user.getUserId()); List<DmpRole> memberRoles = dmpRoleService.findMemberRolesByUserId(user.getUserId());
......
...@@ -10,9 +10,11 @@ import org.springframework.web.bind.annotation.RequestParam; ...@@ -10,9 +10,11 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.jz.common.annotation.MethodCallLogPrint; import com.jz.common.annotation.MethodCallLogPrint;
import com.jz.common.annotation.SysOperationLogAnnotation;
import com.jz.common.bean.BaseBeanResponse; import com.jz.common.bean.BaseBeanResponse;
import com.jz.common.bean.BaseResponse; import com.jz.common.bean.BaseResponse;
import com.jz.common.bean.PageInfoResponse; import com.jz.common.bean.PageInfoResponse;
import com.jz.common.constant.CommConstant;
import com.jz.common.constant.StatuConstant; import com.jz.common.constant.StatuConstant;
import com.jz.dmp.modules.controller.bean.DmpDevelopTaskHistoryDto; import com.jz.dmp.modules.controller.bean.DmpDevelopTaskHistoryDto;
import com.jz.dmp.modules.controller.bean.DmpDevelopTaskHistoryRequest; import com.jz.dmp.modules.controller.bean.DmpDevelopTaskHistoryRequest;
...@@ -62,6 +64,7 @@ public class DmpDevelopTaskHistoryController { ...@@ -62,6 +64,7 @@ public class DmpDevelopTaskHistoryController {
@RequestMapping(method = RequestMethod.GET, value = "/taskVersionRollback") @RequestMapping(method = RequestMethod.GET, value = "/taskVersionRollback")
@ApiOperation(value = "版本回滚", notes = "版本回滚") @ApiOperation(value = "版本回滚", notes = "版本回滚")
@ApiImplicitParam(name = "id", value = "任务历史版本主键") @ApiImplicitParam(name = "id", value = "任务历史版本主键")
@SysOperationLogAnnotation(actionType = CommConstant.OPT_TYPE_EDIT, descrption = "版本回滚", optModular = CommConstant.MODULAR_DATADEV, isProjOpt = true)
public BaseResponse taskVersionRollback(@RequestParam(name = "id", required = true ) Integer id, HttpServletRequest httpRequest){ public BaseResponse taskVersionRollback(@RequestParam(name = "id", required = true ) Integer id, HttpServletRequest httpRequest){
BaseResponse baseResponse = new BaseResponse(); BaseResponse baseResponse = new BaseResponse();
try { try {
...@@ -82,6 +85,7 @@ public class DmpDevelopTaskHistoryController { ...@@ -82,6 +85,7 @@ public class DmpDevelopTaskHistoryController {
@MethodCallLogPrint @MethodCallLogPrint
@RequestMapping(method = RequestMethod.POST, value = "/edit") @RequestMapping(method = RequestMethod.POST, value = "/edit")
@ApiOperation(value = "修改任务历史版本", notes = "修改任务历史版本") @ApiOperation(value = "修改任务历史版本", notes = "修改任务历史版本")
@SysOperationLogAnnotation(actionType = CommConstant.OPT_TYPE_EDIT, descrption = "修改任务历史版本", optModular = CommConstant.MODULAR_DATADEV, isProjOpt = true)
public BaseBeanResponse<DmpDevelopTaskHistory> edit(@RequestBody DmpDevelopTaskHistory dmpDevelopTaskHistory, HttpServletRequest httpRequest){ public BaseBeanResponse<DmpDevelopTaskHistory> edit(@RequestBody DmpDevelopTaskHistory dmpDevelopTaskHistory, HttpServletRequest httpRequest){
BaseBeanResponse<DmpDevelopTaskHistory> baseBeanResponse = new BaseBeanResponse<DmpDevelopTaskHistory>(); BaseBeanResponse<DmpDevelopTaskHistory> baseBeanResponse = new BaseBeanResponse<DmpDevelopTaskHistory>();
try { try {
......
...@@ -11,8 +11,10 @@ import org.springframework.web.bind.annotation.RequestParam; ...@@ -11,8 +11,10 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.jz.common.annotation.MethodCallLogPrint; import com.jz.common.annotation.MethodCallLogPrint;
import com.jz.common.annotation.SysOperationLogAnnotation;
import com.jz.common.bean.BaseBeanResponse; import com.jz.common.bean.BaseBeanResponse;
import com.jz.common.bean.BaseResponse; import com.jz.common.bean.BaseResponse;
import com.jz.common.constant.CommConstant;
import com.jz.common.constant.StatuConstant; import com.jz.common.constant.StatuConstant;
import com.jz.dmp.modules.controller.bean.DmpNavigationTreeDto; import com.jz.dmp.modules.controller.bean.DmpNavigationTreeDto;
import com.jz.dmp.modules.controller.bean.DmpNavigationTreeRequest; import com.jz.dmp.modules.controller.bean.DmpNavigationTreeRequest;
...@@ -80,6 +82,7 @@ public class DmpNavigationTreeController { ...@@ -80,6 +82,7 @@ public class DmpNavigationTreeController {
*/ */
@RequestMapping(method = RequestMethod.POST, value = "/add") @RequestMapping(method = RequestMethod.POST, value = "/add")
@ApiOperation(value = "新增DMP资源导航树", notes = "新增DMP资源导航树") @ApiOperation(value = "新增DMP资源导航树", notes = "新增DMP资源导航树")
@SysOperationLogAnnotation(actionType = CommConstant.OPT_TYPE_ADD, descrption = "新建任务目录", optModular = CommConstant.MODULAR_DATADEV, isProjOpt = true)
public BaseBeanResponse<DmpNavigationTree> add(@RequestBody DmpNavigationTree dmpNavigationTree, HttpServletRequest httpRequest) throws Exception { public BaseBeanResponse<DmpNavigationTree> add(@RequestBody DmpNavigationTree dmpNavigationTree, HttpServletRequest httpRequest) throws Exception {
BaseBeanResponse<DmpNavigationTree> baseBeanResponse = new BaseBeanResponse<DmpNavigationTree>(); BaseBeanResponse<DmpNavigationTree> baseBeanResponse = new BaseBeanResponse<DmpNavigationTree>();
...@@ -120,6 +123,7 @@ public class DmpNavigationTreeController { ...@@ -120,6 +123,7 @@ public class DmpNavigationTreeController {
@RequestMapping(method = RequestMethod.GET, value = "/deleteById") @RequestMapping(method = RequestMethod.GET, value = "/deleteById")
@ApiOperation(value = "删除DMP资源导航树", notes = "删除DMP资源导航树") @ApiOperation(value = "删除DMP资源导航树", notes = "删除DMP资源导航树")
@ApiImplicitParam(name = "id", value = "DMP资源导航树主键") @ApiImplicitParam(name = "id", value = "DMP资源导航树主键")
@SysOperationLogAnnotation(actionType = CommConstant.OPT_TYPE_DELETE, descrption = "删除任务目录", optModular = CommConstant.MODULAR_DATADEV, isProjOpt = true)
public BaseResponse deleteById(@RequestParam(name = "id", required = true) Integer id, HttpServletRequest httpRequest) { public BaseResponse deleteById(@RequestParam(name = "id", required = true) Integer id, HttpServletRequest httpRequest) {
BaseResponse baseResponse = new BaseResponse(); BaseResponse baseResponse = new BaseResponse();
try { try {
...@@ -149,6 +153,7 @@ public class DmpNavigationTreeController { ...@@ -149,6 +153,7 @@ public class DmpNavigationTreeController {
@MethodCallLogPrint @MethodCallLogPrint
@RequestMapping(method = RequestMethod.POST, value = "/edit") @RequestMapping(method = RequestMethod.POST, value = "/edit")
@ApiOperation(value = "修改DMP资源导航树", notes = "修改DMP资源导航树") @ApiOperation(value = "修改DMP资源导航树", notes = "修改DMP资源导航树")
@SysOperationLogAnnotation(actionType = CommConstant.OPT_TYPE_EDIT, descrption = "修改任务目录", optModular = CommConstant.MODULAR_DATADEV, isProjOpt = true)
public BaseBeanResponse<DmpNavigationTree> edit(@RequestBody DmpNavigationTree dmpNavigationTree, HttpServletRequest httpRequest) { public BaseBeanResponse<DmpNavigationTree> edit(@RequestBody DmpNavigationTree dmpNavigationTree, HttpServletRequest httpRequest) {
BaseBeanResponse<DmpNavigationTree> baseBeanResponse = new BaseBeanResponse<DmpNavigationTree>(); BaseBeanResponse<DmpNavigationTree> baseBeanResponse = new BaseBeanResponse<DmpNavigationTree>();
try { try {
......
...@@ -9,9 +9,11 @@ import org.springframework.web.bind.annotation.RequestMethod; ...@@ -9,9 +9,11 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.jz.common.annotation.SysOperationLogAnnotation;
import com.jz.common.bean.BaseBeanResponse; import com.jz.common.bean.BaseBeanResponse;
import com.jz.common.bean.BaseResponse; import com.jz.common.bean.BaseResponse;
import com.jz.common.bean.PageInfoResponse; import com.jz.common.bean.PageInfoResponse;
import com.jz.common.constant.CommConstant;
import com.jz.common.constant.StatuConstant; import com.jz.common.constant.StatuConstant;
import com.jz.dmp.modules.controller.bean.DmpProjectDto; import com.jz.dmp.modules.controller.bean.DmpProjectDto;
import com.jz.dmp.modules.controller.bean.DmpProjectRequest; import com.jz.dmp.modules.controller.bean.DmpProjectRequest;
...@@ -82,6 +84,7 @@ public class DmpProjectController { ...@@ -82,6 +84,7 @@ public class DmpProjectController {
@RequestMapping(method = RequestMethod.POST, value = "/softDelete") @RequestMapping(method = RequestMethod.POST, value = "/softDelete")
@ApiOperation(value = "软删除项目信息", notes = "软删除项目信息") @ApiOperation(value = "软删除项目信息", notes = "软删除项目信息")
@ApiImplicitParam(name = "id", value = "项目信息主键") @ApiImplicitParam(name = "id", value = "项目信息主键")
@SysOperationLogAnnotation(actionType = CommConstant.OPT_TYPE_DELETE, descrption = "删除项目信息", optModular = CommConstant.MODULAR_WORKSPACEMANG_LIST, isProjOpt = false)
public BaseResponse softDelete(@RequestParam(name = "id", required = true ) Integer id, HttpServletRequest httpRequest){ public BaseResponse softDelete(@RequestParam(name = "id", required = true ) Integer id, HttpServletRequest httpRequest){
BaseResponse baseResponse = new BaseResponse(); BaseResponse baseResponse = new BaseResponse();
try { try {
...@@ -101,6 +104,7 @@ public class DmpProjectController { ...@@ -101,6 +104,7 @@ public class DmpProjectController {
*/ */
@RequestMapping(method = RequestMethod.POST, value = "/add") @RequestMapping(method = RequestMethod.POST, value = "/add")
@ApiOperation(value = "新增项目信息", notes = "新增项目信息") @ApiOperation(value = "新增项目信息", notes = "新增项目信息")
@SysOperationLogAnnotation(actionType = CommConstant.OPT_TYPE_ADD, descrption = "新增项目信息", optModular = CommConstant.MODULAR_WORKSPACEMANG_LIST, isProjOpt = false)
public BaseBeanResponse<DmpProject> add(@RequestBody DmpProject dmpProject, HttpServletRequest httpRequest){ public BaseBeanResponse<DmpProject> add(@RequestBody DmpProject dmpProject, HttpServletRequest httpRequest){
BaseBeanResponse<DmpProject> baseBeanResponse = new BaseBeanResponse<DmpProject>(); BaseBeanResponse<DmpProject> baseBeanResponse = new BaseBeanResponse<DmpProject>();
try { try {
......
...@@ -205,6 +205,12 @@ public class DmpProjectRequest extends BasePageBean { ...@@ -205,6 +205,12 @@ public class DmpProjectRequest extends BasePageBean {
*/ */
@ApiModelProperty(value = "数据更新时间止") @ApiModelProperty(value = "数据更新时间止")
private Date updateTimeEnd; private Date updateTimeEnd;
/**
* 拥有该项目权限的用户ID
*/
@ApiModelProperty(value = "拥有该项目权限的用户ID")
private Integer ownerAuthUserId;
public Integer getId() { public Integer getId() {
return id; return id;
...@@ -413,4 +419,29 @@ public class DmpProjectRequest extends BasePageBean { ...@@ -413,4 +419,29 @@ public class DmpProjectRequest extends BasePageBean {
public void setUpdateTimeEnd(Date updateTimeEnd) { public void setUpdateTimeEnd(Date updateTimeEnd) {
this.updateTimeEnd = updateTimeEnd; this.updateTimeEnd = updateTimeEnd;
} }
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Integer getOwnerAuthUserId() {
return ownerAuthUserId;
}
public void setOwnerAuthUserId(Integer ownerAuthUserId) {
this.ownerAuthUserId = ownerAuthUserId;
}
} }
...@@ -10,7 +10,9 @@ import org.springframework.web.bind.annotation.RequestParam; ...@@ -10,7 +10,9 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.jz.common.annotation.MethodCallLogPrint; import com.jz.common.annotation.MethodCallLogPrint;
import com.jz.common.annotation.SysOperationLogAnnotation;
import com.jz.common.bean.BaseBeanResponse; import com.jz.common.bean.BaseBeanResponse;
import com.jz.common.constant.CommConstant;
import com.jz.common.constant.StatuConstant; import com.jz.common.constant.StatuConstant;
import com.jz.dmp.modules.controller.projconfig.bean.DmpProjectConfigInfoDto; import com.jz.dmp.modules.controller.projconfig.bean.DmpProjectConfigInfoDto;
import com.jz.dmp.modules.controller.projconfig.bean.DmpProjectConfigInfoRequest; import com.jz.dmp.modules.controller.projconfig.bean.DmpProjectConfigInfoRequest;
...@@ -82,7 +84,7 @@ public class DmpProjectConfigInfoController { ...@@ -82,7 +84,7 @@ public class DmpProjectConfigInfoController {
@MethodCallLogPrint @MethodCallLogPrint
@RequestMapping(method = RequestMethod.POST, value = "/addOrEdit") @RequestMapping(method = RequestMethod.POST, value = "/addOrEdit")
@ApiOperation(value = "新增或修改项目配置表", notes = "新增或修改项目配置表") @ApiOperation(value = "新增或修改项目配置表", notes = "新增或修改项目配置表")
@ApiImplicitParam(name = "id", value = "组织id", required = true) @SysOperationLogAnnotation(actionType = CommConstant.OPT_TYPE_ADDOREDIT, descrption = "新增或修改项目配置表", optModular = CommConstant.MODULAR_WORKMANG_SYSCONFIG, isProjOpt = true)
public BaseBeanResponse<DmpProjectConfigInfo> addOrEdit(@RequestBody DmpProjectConfigInfo dmpProjectConfigInfo, HttpServletRequest httpRequest){ public BaseBeanResponse<DmpProjectConfigInfo> addOrEdit(@RequestBody DmpProjectConfigInfo dmpProjectConfigInfo, HttpServletRequest httpRequest){
BaseBeanResponse<DmpProjectConfigInfo> baseBeanResponse = new BaseBeanResponse<DmpProjectConfigInfo>(); BaseBeanResponse<DmpProjectConfigInfo> baseBeanResponse = new BaseBeanResponse<DmpProjectConfigInfo>();
try { try {
......
...@@ -9,7 +9,9 @@ import org.springframework.web.bind.annotation.RequestMethod; ...@@ -9,7 +9,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.jz.common.annotation.MethodCallLogPrint; import com.jz.common.annotation.MethodCallLogPrint;
import com.jz.common.annotation.SysOperationLogAnnotation;
import com.jz.common.bean.BaseBeanResponse; import com.jz.common.bean.BaseBeanResponse;
import com.jz.common.constant.CommConstant;
import com.jz.common.constant.StatuConstant; import com.jz.common.constant.StatuConstant;
import com.jz.dmp.modules.controller.projconfig.bean.DmpComputEngineDto; import com.jz.dmp.modules.controller.projconfig.bean.DmpComputEngineDto;
import com.jz.dmp.modules.controller.projconfig.bean.DmpComputEngineRequest; import com.jz.dmp.modules.controller.projconfig.bean.DmpComputEngineRequest;
...@@ -65,6 +67,7 @@ public class DmpPublicConfigInfoController { ...@@ -65,6 +67,7 @@ public class DmpPublicConfigInfoController {
@MethodCallLogPrint @MethodCallLogPrint
@RequestMapping(method = RequestMethod.POST, value = "/addOrEdit") @RequestMapping(method = RequestMethod.POST, value = "/addOrEdit")
@ApiOperation(value = "新增或修改公共配置表", notes = "新增或修改公共配置表") @ApiOperation(value = "新增或修改公共配置表", notes = "新增或修改公共配置表")
@SysOperationLogAnnotation(actionType = CommConstant.OPT_TYPE_ADDOREDIT, descrption = "新增或修改公共配置表", optModular = CommConstant.MODULAR_WORKSPACEMANG_SYSCONFIG, isProjOpt = false)
public BaseBeanResponse<DmpPublicConfigInfo> addOrEdit(@RequestBody DmpPublicConfigInfo dmpPublicConfigInfo, HttpServletRequest httpRequest){ public BaseBeanResponse<DmpPublicConfigInfo> addOrEdit(@RequestBody DmpPublicConfigInfo dmpPublicConfigInfo, HttpServletRequest httpRequest){
BaseBeanResponse<DmpPublicConfigInfo> baseBeanResponse = new BaseBeanResponse<DmpPublicConfigInfo>(); BaseBeanResponse<DmpPublicConfigInfo> baseBeanResponse = new BaseBeanResponse<DmpPublicConfigInfo>();
try { try {
......
...@@ -14,8 +14,10 @@ import org.springframework.web.bind.annotation.RequestMethod; ...@@ -14,8 +14,10 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.jz.common.annotation.SysOperationLogAnnotation;
import com.jz.common.bean.BaseBeanResponse; import com.jz.common.bean.BaseBeanResponse;
import com.jz.common.bean.BaseResponse; import com.jz.common.bean.BaseResponse;
import com.jz.common.constant.CommConstant;
import com.jz.common.constant.ResultCode; import com.jz.common.constant.ResultCode;
import com.jz.common.constant.StatuConstant; import com.jz.common.constant.StatuConstant;
import com.jz.dmp.modules.controller.sys.bean.DmpMemberBatch; import com.jz.dmp.modules.controller.sys.bean.DmpMemberBatch;
...@@ -151,6 +153,7 @@ public class DmpMemberController { ...@@ -151,6 +153,7 @@ public class DmpMemberController {
@RequestMapping(method = RequestMethod.GET, value = "/softDelete") @RequestMapping(method = RequestMethod.GET, value = "/softDelete")
@ApiOperation(value = "软删除用户表", notes = "软删除用户表") @ApiOperation(value = "软删除用户表", notes = "软删除用户表")
@ApiImplicitParam(name = "ids", value = "用户表主键集(逗号隔开)") @ApiImplicitParam(name = "ids", value = "用户表主键集(逗号隔开)")
@SysOperationLogAnnotation(actionType = CommConstant.OPT_TYPE_DELETE, descrption = "软删除用户表", optModular = CommConstant.MODULAR_WORKSPACEMANG_MEMBER, isProjOpt = false)
public BaseResponse softDelete(@RequestParam(name = "ids", required = true ) String ids, HttpServletRequest httpRequest){ public BaseResponse softDelete(@RequestParam(name = "ids", required = true ) String ids, HttpServletRequest httpRequest){
BaseResponse baseResponse = new BaseResponse(); BaseResponse baseResponse = new BaseResponse();
try { try {
...@@ -176,6 +179,7 @@ public class DmpMemberController { ...@@ -176,6 +179,7 @@ public class DmpMemberController {
*/ */
@RequestMapping(method = RequestMethod.POST, value = "/add") @RequestMapping(method = RequestMethod.POST, value = "/add")
@ApiOperation(value = "新增用户表", notes = "新增用户表") @ApiOperation(value = "新增用户表", notes = "新增用户表")
@SysOperationLogAnnotation(actionType = CommConstant.OPT_TYPE_ADD, descrption = "新增用户", optModular = CommConstant.MODULAR_WORKSPACEMANG_MEMBER, isProjOpt = false)
public BaseBeanResponse<DmpMember> add(@RequestBody DmpMember dmpMember, HttpServletRequest httpRequest){ public BaseBeanResponse<DmpMember> add(@RequestBody DmpMember dmpMember, HttpServletRequest httpRequest){
BaseBeanResponse<DmpMember> baseBeanResponse = new BaseBeanResponse<DmpMember>(); BaseBeanResponse<DmpMember> baseBeanResponse = new BaseBeanResponse<DmpMember>();
try { try {
...@@ -234,6 +238,7 @@ public class DmpMemberController { ...@@ -234,6 +238,7 @@ public class DmpMemberController {
@RequestMapping(method = RequestMethod.GET, value = "/switchProj") @RequestMapping(method = RequestMethod.GET, value = "/switchProj")
@ApiImplicitParam(name = "projectId", value = "项目主键") @ApiImplicitParam(name = "projectId", value = "项目主键")
@ApiOperation(value = "用户项目切换", notes = "用户项目切换") @ApiOperation(value = "用户项目切换", notes = "用户项目切换")
@SysOperationLogAnnotation(actionType = CommConstant.OPT_TYPE_EDIT, descrption = "用户项目切换", optModular = CommConstant.MODULAR_WORKSPACEMANG_MEMBER, isProjOpt = true)
public BaseBeanResponse<DmpMember> switchProj(@RequestParam(name = "projectId", required = true) Integer projectId, HttpServletRequest httpRequest){ public BaseBeanResponse<DmpMember> switchProj(@RequestParam(name = "projectId", required = true) Integer projectId, HttpServletRequest httpRequest){
BaseBeanResponse<DmpMember> baseBeanResponse = new BaseBeanResponse<DmpMember>(); BaseBeanResponse<DmpMember> baseBeanResponse = new BaseBeanResponse<DmpMember>();
try { try {
......
...@@ -9,9 +9,11 @@ import org.springframework.web.bind.annotation.RequestMethod; ...@@ -9,9 +9,11 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.jz.common.annotation.SysOperationLogAnnotation;
import com.jz.common.bean.BaseBeanResponse; import com.jz.common.bean.BaseBeanResponse;
import com.jz.common.bean.BaseResponse; import com.jz.common.bean.BaseResponse;
import com.jz.common.bean.PageInfoResponse; import com.jz.common.bean.PageInfoResponse;
import com.jz.common.constant.CommConstant;
import com.jz.common.constant.StatuConstant; import com.jz.common.constant.StatuConstant;
import com.jz.dmp.modules.controller.sys.bean.DmpMemberProjectRoleBatch; import com.jz.dmp.modules.controller.sys.bean.DmpMemberProjectRoleBatch;
import com.jz.dmp.modules.controller.sys.bean.DmpMemberProjectRoleDto; import com.jz.dmp.modules.controller.sys.bean.DmpMemberProjectRoleDto;
...@@ -181,6 +183,7 @@ public class DmpMemberProjectRoleController { ...@@ -181,6 +183,7 @@ public class DmpMemberProjectRoleController {
*/ */
@RequestMapping(method = RequestMethod.POST, value = "/add") @RequestMapping(method = RequestMethod.POST, value = "/add")
@ApiOperation(value = "新增用户项目角色表", notes = "新增用户项目角色表") @ApiOperation(value = "新增用户项目角色表", notes = "新增用户项目角色表")
@SysOperationLogAnnotation(actionType = CommConstant.OPT_TYPE_MEMBERCONFIG, descrption = "工作空间成员配置", optModular = CommConstant.MODULAR_WORKSPACEMANG_LIST, isProjOpt = false)
public BaseBeanResponse<DmpMemberProjectRole> add(@RequestBody DmpMemberProjectRole dmpMemberProjectRole, HttpServletRequest httpRequest){ public BaseBeanResponse<DmpMemberProjectRole> add(@RequestBody DmpMemberProjectRole dmpMemberProjectRole, HttpServletRequest httpRequest){
BaseBeanResponse<DmpMemberProjectRole> baseBeanResponse = new BaseBeanResponse<DmpMemberProjectRole>(); BaseBeanResponse<DmpMemberProjectRole> baseBeanResponse = new BaseBeanResponse<DmpMemberProjectRole>();
try { try {
...@@ -238,6 +241,7 @@ public class DmpMemberProjectRoleController { ...@@ -238,6 +241,7 @@ public class DmpMemberProjectRoleController {
*/ */
@RequestMapping(method = RequestMethod.POST, value = "/addProjMembers") @RequestMapping(method = RequestMethod.POST, value = "/addProjMembers")
@ApiOperation(value = "项目成员添加", notes = "项目成员添加") @ApiOperation(value = "项目成员添加", notes = "项目成员添加")
@SysOperationLogAnnotation(actionType = CommConstant.OPT_TYPE_MEMBERCONFIG, descrption = "工作空间成员配置", optModular = CommConstant.MODULAR_WORKSPACEMANG_LIST, isProjOpt = false)
public BaseBeanResponse<DmpMemberProjectRole> addProjMembers(@RequestBody MembProjRoleBatchReq membProjRoleBatchReq, HttpServletRequest httpRequest){ public BaseBeanResponse<DmpMemberProjectRole> addProjMembers(@RequestBody MembProjRoleBatchReq membProjRoleBatchReq, HttpServletRequest httpRequest){
BaseBeanResponse<DmpMemberProjectRole> baseBeanResponse = new BaseBeanResponse<DmpMemberProjectRole>(); BaseBeanResponse<DmpMemberProjectRole> baseBeanResponse = new BaseBeanResponse<DmpMemberProjectRole>();
try { try {
......
...@@ -436,5 +436,16 @@ public class DmpDevelopTask implements Serializable { ...@@ -436,5 +436,16 @@ public class DmpDevelopTask implements Serializable {
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
/**
* @Title: getAzkabanName
* @Description: TODO(拼接azkaban用名称)
* @param @return 参数
* @return String 返回类型
* @throws
*/
public String getAzkabanName() {
return "jz_dmp_"+this.id;
}
} }
\ No newline at end of file
...@@ -101,12 +101,12 @@ public interface DmpMemberService { ...@@ -101,12 +101,12 @@ public interface DmpMemberService {
/** /**
* @Title: getDefProjectByUserName * @Title: getDefProjectByUserName
* @Description: TODO(获取用户默认的项目) * @Description: TODO(获取用户默认的项目)
* @param @param username * @param @param userId
* @param @return 参数 * @param @return 参数
* @return Integer 返回类型 * @return Integer 返回类型
* @throws * @throws
*/ */
public Integer getDefProjectByUserName(String username); public Integer getDefProjectByUserId(Integer userId);
/** /**
......
...@@ -444,9 +444,9 @@ public class DmpMemberServiceImpl extends BaseService implements DmpMemberServic ...@@ -444,9 +444,9 @@ public class DmpMemberServiceImpl extends BaseService implements DmpMemberServic
*根据用户获取默认项目ID *根据用户获取默认项目ID
*/ */
@Override @Override
public Integer getDefProjectByUserName(String username) { public Integer getDefProjectByUserId(Integer userId) {
Map<String, Object> params = new HashMap<String, Object>(); Map<String, Object> params = new HashMap<String, Object>();
params.put("ownerId", username); params.put("ownerAuthUserId", userId);
List<DmpProject> projects = dmpProjectDao.getExampleQuery(params); List<DmpProject> projects = dmpProjectDao.getExampleQuery(params);
if (CollectionUtils.isEmpty(projects)) { if (CollectionUtils.isEmpty(projects)) {
logger.info("该用户没有项目"); logger.info("该用户没有项目");
......
...@@ -4,6 +4,7 @@ import java.text.SimpleDateFormat; ...@@ -4,6 +4,7 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.regex.Pattern;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -49,7 +50,12 @@ public class SystemCommonServiceImpl implements SystemCommonService { ...@@ -49,7 +50,12 @@ public class SystemCommonServiceImpl implements SystemCommonService {
BaseBeanResponse<String> baseBeanResponse = new BaseBeanResponse<String>(); BaseBeanResponse<String> baseBeanResponse = new BaseBeanResponse<String>();
//CronSequenceGenerator cronSequenceGenerator = new CronSequenceGenerator("* * * * * ?"); //CronSequenceGenerator cronSequenceGenerator = new CronSequenceGenerator("* * * * * ?");
corn = corn.replace("/", "0/");
boolean flag = Pattern.matches("^/", corn);
if (flag) {
corn = corn.replace(" /", " 0/");
}
CronSequenceGenerator cronSequenceGenerator = new CronSequenceGenerator(corn); CronSequenceGenerator cronSequenceGenerator = new CronSequenceGenerator(corn);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
...@@ -70,19 +76,26 @@ public class SystemCommonServiceImpl implements SystemCommonService { ...@@ -70,19 +76,26 @@ public class SystemCommonServiceImpl implements SystemCommonService {
} }
public static void main(String[] args) { public static void main(String[] args) {
CronSequenceGenerator cronSequenceGenerator = new CronSequenceGenerator("0 1-3 * * * ?");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
List<String> list = new ArrayList<String>(10);
Date nextTimePoint = new Date();
for (int i = 0; i < 10; i++) { String corn = "0 0/1 * /2 * *";
nextTimePoint = cronSequenceGenerator.next(nextTimePoint); corn = corn.replace(" /", " 0/");
list.add(sdf.format(nextTimePoint));
} System.out.println(corn);
System.out.println(JSONObject.toJSONString(list)); /*
* CronSequenceGenerator cronSequenceGenerator = new
* CronSequenceGenerator("0 1-3 * * * ?");
*
* SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
*
* List<String> list = new ArrayList<String>(10);
*
* Date nextTimePoint = new Date();
*
* for (int i = 0; i < 10; i++) { nextTimePoint =
* cronSequenceGenerator.next(nextTimePoint);
* list.add(sdf.format(nextTimePoint)); }
* System.out.println(JSONObject.toJSONString(list));
*/
} }
} }
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
server: server:
port: 7181 port: 7181
#contextPath: /resource #contextPath: /resource
#servlet:
# context-path: /prod-api
management: management:
port: 54003 port: 54003
......
...@@ -48,7 +48,16 @@ ...@@ -48,7 +48,16 @@
<sql id="FIND_ALL_COLUMN" > <sql id="FIND_ALL_COLUMN" >
id,owner_id,production_id,data_warehouse_id,name,display_name,project_desc,publish_target_id,is_enable_scheduler,is_edit_task_code,is_enable_select,dw_name,dw_access_type,dw_is_enable_acl,dw_is_enable_access_obj,dw_is_enable_auth_obj,dw_is_protect_data,data_status,create_user_id,create_time,update_user_id,update_time,impala_jdbc_url,impala_master_fqdn id,owner_id,production_id,data_warehouse_id,name,display_name,project_desc,publish_target_id,is_enable_scheduler,is_edit_task_code,is_enable_select,dw_name,dw_access_type,dw_is_enable_acl,dw_is_enable_access_obj,dw_is_enable_auth_obj,dw_is_protect_data,data_status,create_user_id,create_time,update_user_id,update_time,impala_jdbc_url,impala_master_fqdn
</sql> </sql>
<sql id="FIND_ALL_COLUMN_SUFFIX" >
_project.id,_project.owner_id,_project.production_id,_project.data_warehouse_id,_project.name,
_project.display_name,_project.project_desc,_project.publish_target_id,_project.is_enable_scheduler,
_project.is_edit_task_code,_project.is_enable_select,_project.dw_name,_project.dw_access_type,_project.dw_is_enable_acl,
_project.dw_is_enable_access_obj,_project.dw_is_enable_auth_obj,_project.dw_is_protect_data,_project.data_status,
_project.create_user_id,_project.create_time,_project.update_user_id,_project.update_time,_project.impala_jdbc_url,
_project.impala_master_fqdn
</sql>
<!-- 模块共有接口实现 --> <!-- 模块共有接口实现 -->
<insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="com.jz.dmp.modules.model.DmpProject"> <insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="com.jz.dmp.modules.model.DmpProject">
...@@ -141,25 +150,28 @@ ...@@ -141,25 +150,28 @@
<select id="getExampleQuery" parameterType="java.util.Map" <select id="getExampleQuery" parameterType="java.util.Map"
resultType="com.jz.dmp.modules.model.DmpProject"> resultType="com.jz.dmp.modules.model.DmpProject">
SELECT SELECT
<include refid="FIND_ALL_COLUMN" /> <include refid="FIND_ALL_COLUMN_SUFFIX" />
FROM dmp_project WHERE 1=1 FROM dmp_project _project
<if test="ownerId != null">AND owner_id = #{ownerId}</if> LEFT JOIN dmp_member_project_role _mprole ON _project.id = _mprole.project_id
<if test="productionId != null">AND production_id = #{productionId}</if> WHERE 1=1
<if test="dataWarehouseId != null">AND data_warehouse_id = #{dataWarehouseId}</if> <if test="ownerId != null">AND _project.owner_id = #{ownerId}</if>
<if test="name != null">AND name = #{name}</if> <if test="productionId != null">AND _project.production_id = #{productionId}</if>
<if test="displayName != null">AND display_name = #{displayName}</if> <if test="dataWarehouseId != null">AND _project.data_warehouse_id = #{dataWarehouseId}</if>
<if test="projectDesc != null">AND project_desc = #{projectDesc}</if> <if test="name != null">AND _project.name = #{name}</if>
<if test="publishTargetId != null">AND publish_target_id = #{publishTargetId}</if> <if test="displayName != null">AND _project.display_name = #{displayName}</if>
<if test="isEnableScheduler != null">AND is_enable_scheduler = #{isEnableScheduler}</if> <if test="projectDesc != null">AND _project.project_desc = #{projectDesc}</if>
<if test="isEditTaskCode != null">AND is_edit_task_code = #{isEditTaskCode}</if> <if test="publishTargetId != null">AND _project.publish_target_id = #{publishTargetId}</if>
<if test="isEnableSelect != null">AND is_enable_select = #{isEnableSelect}</if> <if test="isEnableScheduler != null">AND _project.is_enable_scheduler = #{isEnableScheduler}</if>
<if test="dwName != null">AND dw_name = #{dwName}</if> <if test="isEditTaskCode != null">AND _project.is_edit_task_code = #{isEditTaskCode}</if>
<if test="dwAccessType != null">AND dw_access_type = #{dwAccessType}</if> <if test="isEnableSelect != null">AND _project.is_enable_select = #{isEnableSelect}</if>
<if test="dwIsEnableAcl != null">AND dw_is_enable_acl = #{dwIsEnableAcl}</if> <if test="dwName != null">AND _project.dw_name = #{dwName}</if>
<if test="dwIsEnableAccessObj != null">AND dw_is_enable_access_obj = #{dwIsEnableAccessObj}</if> <if test="dwAccessType != null">AND _project.dw_access_type = #{dwAccessType}</if>
<if test="dwIsEnableAuthObj != null">AND dw_is_enable_auth_obj = #{dwIsEnableAuthObj}</if> <if test="dwIsEnableAcl != null">AND _project.dw_is_enable_acl = #{dwIsEnableAcl}</if>
<if test="dwIsProtectData != null">AND dw_is_protect_data = #{dwIsProtectData}</if> <if test="dwIsEnableAccessObj != null">AND _project.dw_is_enable_access_obj = #{dwIsEnableAccessObj}</if>
<if test="dataStatus != null">AND data_status = #{dataStatus}</if> <if test="dwIsEnableAuthObj != null">AND _project.dw_is_enable_auth_obj = #{dwIsEnableAuthObj}</if>
<if test="dwIsProtectData != null">AND _project.dw_is_protect_data = #{dwIsProtectData}</if>
<if test="dataStatus != null">AND _project.data_status = #{dataStatus}</if>
<if test="ownerAuthUserId != null">AND _mprole.user_id = #{ownerAuthUserId}</if>
</select> </select>
<select id="getProjectPage1" resultType="java.util.Map" <select id="getProjectPage1" resultType="java.util.Map"
......
...@@ -300,6 +300,11 @@ ...@@ -300,6 +300,11 @@
<!-- 项目角色用户人数统计 --> <!-- 项目角色用户人数统计 -->
<select id="projRoleStat" resultType="map"> <select id="projRoleStat" resultType="map">
select
'ALL' AS roleCode,'全部' AS roleName,COUNT(DISTINCT member.user_id) AS statCount
from dmp_member member
where member.data_status='1'
UNION
select select
role.role_code AS roleCode,role.role_name AS roleName,COUNT(DISTINCT member.user_id) AS statCount role.role_code AS roleCode,role.role_name AS roleName,COUNT(DISTINCT member.user_id) AS statCount
from dmp_member_project_role mprole from dmp_member_project_role mprole
...@@ -307,11 +312,6 @@ ...@@ -307,11 +312,6 @@
left join dmp_member member on mprole.user_id=member.user_id left join dmp_member member on mprole.user_id=member.user_id
where member.data_status='1' where member.data_status='1'
group by role.role_code,role.role_name group by role.role_code,role.role_name
UNION
select
'' AS roleCode,'全部' AS roleName,COUNT(DISTINCT member.user_id) AS statCount
from dmp_member member
where member.data_status='1'
</select> </select>
</mapper> </mapper>
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