From 93ef8c3e2149e7c07b94c5e31628615f537973a8 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 22 Feb 2023 10:03:17 +0800 Subject: [PATCH 1/4] debug task --- .../main/java/com/ningdatech/pmapi/scheduler/task/InitProcessTask.java | 1 - 1 file changed, 1 deletion(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/InitProcessTask.java b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/InitProcessTask.java index 2adcf0b..d28a2f7 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/InitProcessTask.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/InitProcessTask.java @@ -108,7 +108,6 @@ public class InitProcessTask { for(Integer processType : processTypeList){ String formName = ProjectProcessStageEnum.getDesc(processType); WflowModelHistorysDto models = new WflowModelHistorysDto(); - models.setCreated(GregorianCalendar.getInstance().getTime()); // models.setFormId("wf" + IdUtil.objectId()); models.setVersion(1); models.setGroupId(1); From fbc54ef090bcfb7a26a0fe822de47620fd86080d Mon Sep 17 00:00:00 2001 From: WendyYang Date: Wed, 22 Feb 2023 10:41:06 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=A7=92=E8=89=B2=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=AE=A1=E7=90=86=E8=A7=92=E8=89=B2ID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/sys/controller/RoleController.java | 2 ++ .../main/java/com/ningdatech/pmapi/sys/model/vo/RoleVO.java | 3 +++ .../com/ningdatech/pmapi/sys/service/IMenuServiceTest.java | 12 +++++++----- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/RoleController.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/RoleController.java index 5115569..1950dc2 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/RoleController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/RoleController.java @@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.lang.Assert; import com.ningdatech.basic.model.PageVo; import com.ningdatech.log.annotation.WebLog; +import com.ningdatech.pmapi.common.util.BizUtils; import com.ningdatech.pmapi.sys.model.entity.Role; import com.ningdatech.pmapi.sys.model.req.RolePageReq; import com.ningdatech.pmapi.sys.model.dto.RoleSaveDTO; @@ -60,6 +61,7 @@ public class RoleController { Role role = roleService.getById(id); Assert.notNull(role, "角色不存在"); RoleVO query = BeanUtil.toBean(role, RoleVO.class); + query.setManageRoleIdList(BizUtils.splitToLong(role.getManageRoleIds())); // 菜单 roleManage.buildMenu(query); return query; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/RoleVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/RoleVO.java index 025085b..e9d18ec 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/RoleVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/RoleVO.java @@ -37,6 +37,9 @@ public class RoleVO extends BaseEntity { @ApiModelProperty(value = "名称") private String name; + @ApiModelProperty("管理角色ID") + private List manageRoleIdList; + /** * 描述 */ diff --git a/pmapi/src/test/java/com/ningdatech/pmapi/sys/service/IMenuServiceTest.java b/pmapi/src/test/java/com/ningdatech/pmapi/sys/service/IMenuServiceTest.java index 092fdfa..7b5d953 100644 --- a/pmapi/src/test/java/com/ningdatech/pmapi/sys/service/IMenuServiceTest.java +++ b/pmapi/src/test/java/com/ningdatech/pmapi/sys/service/IMenuServiceTest.java @@ -6,6 +6,7 @@ import cn.hutool.db.Db; import cn.hutool.db.Entity; import cn.hutool.json.JSONObject; import cn.hutool.json.JSONUtil; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ningdatech.pmapi.AppTests; import com.ningdatech.pmapi.sys.model.entity.Menu; import com.ningdatech.pmapi.sys.model.entity.Role; @@ -71,11 +72,12 @@ class IMenuServiceTest extends AppTests { @Test public void initMenu() { - menuService.remove(null); - roleMenuService.remove(null); - String str = FileUtil.readString("/Users/wendy/Desktop/long_text_2023-02-13-15-28-42.txt", "UTF-8"); - List obj = JSONUtil.toList(str, JSONObject.class); - save(obj, 0); + // menuService.remove(null); + roleMenuService.remove(Wrappers.lambdaQuery(RoleMenu.class) + .eq(RoleMenu::getRoleId,1)); + // String str = FileUtil.readString("/Users/wendy/Desktop/long_text_2023-02-13-15-28-42.txt", "UTF-8"); + // List obj = JSONUtil.toList(str, JSONObject.class); + // save(obj, 0); menuService.list().forEach(w -> { roleMenuService.save(new RoleMenu() {{ setRoleId(1L); From ff1f1a487323bfbf63a2c4e561da4423ebd03e3e Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 22 Feb 2023 11:51:37 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=85=A5=E5=8F=82=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E7=B2=BE=E7=A1=AE=E5=88=B0=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ningdatech/pmapi/projectdeclared/model/req/AdjustmentListReq.java | 4 ++-- .../pmapi/projectdeclared/model/req/ConstrctionPlanListReq.java | 4 ++-- .../projectdeclared/model/req/PrequalificationDeclaredListReq.java | 4 ++-- .../com/ningdatech/pmapi/projectlib/model/req/ProjectListReq.java | 4 ++-- .../java/com/ningdatech/pmapi/user/manage/UserAuthLoginManage.java | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/AdjustmentListReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/AdjustmentListReq.java index 87823f0..5512e53 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/AdjustmentListReq.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/AdjustmentListReq.java @@ -28,11 +28,11 @@ public class AdjustmentListReq { private Integer projectYear; @ApiModelProperty("创建时间") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") private LocalDateTime createOnMin; @ApiModelProperty("创建时间") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") private LocalDateTime createOnMax; @ApiModelProperty("项目阶段") diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/ConstrctionPlanListReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/ConstrctionPlanListReq.java index 70b9323..38d3e54 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/ConstrctionPlanListReq.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/ConstrctionPlanListReq.java @@ -28,11 +28,11 @@ public class ConstrctionPlanListReq { private Integer projectYear; @ApiModelProperty("创建时间") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") private LocalDateTime createOnMin; @ApiModelProperty("创建时间") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") private LocalDateTime createOnMax; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/PrequalificationDeclaredListReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/PrequalificationDeclaredListReq.java index e4e4457..3d90f21 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/PrequalificationDeclaredListReq.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/PrequalificationDeclaredListReq.java @@ -28,11 +28,11 @@ public class PrequalificationDeclaredListReq { private Integer projectYear; @ApiModelProperty("创建时间") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") private LocalDateTime createOnMin; @ApiModelProperty("创建时间") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") private LocalDateTime createOnMax; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectListReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectListReq.java index 80716b3..08c4e80 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectListReq.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectListReq.java @@ -62,11 +62,11 @@ public class ProjectListReq extends PagePo { private BigDecimal approveAmountMax; @ApiModelProperty("创建时间") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") private LocalDateTime createOnMin; @ApiModelProperty("创建时间") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") private LocalDateTime createOnMax; @ApiModelProperty("用户ID") diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserAuthLoginManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserAuthLoginManage.java index 57b0afd..b846cb0 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserAuthLoginManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserAuthLoginManage.java @@ -65,7 +65,7 @@ public class UserAuthLoginManage { */ public UserFullInfoDTO queryUserInfoInPasswordAuth(String username) { // TODO 目前账号密码登陆测试使用 强制用户登录 userId 1L - UserInfo userInfo = iUserInfoService.getById(2L); + UserInfo userInfo = iUserInfoService.getById(username); if (Objects.isNull(userInfo)) { return null; } From 826b95bb7594733c640edaa26343e791739e7bdf Mon Sep 17 00:00:00 2001 From: WendyYang Date: Wed, 22 Feb 2023 14:23:05 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E8=87=AA=E5=A2=9E?= =?UTF-8?q?=E4=B8=BB=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pmapi/src/main/java/com/ningdatech/pmapi/user/entity/UserInfo.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/entity/UserInfo.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/entity/UserInfo.java index 791a84f..c7ee627 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/entity/UserInfo.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/entity/UserInfo.java @@ -1,5 +1,7 @@ package com.ningdatech.pmapi.user.entity; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import lombok.AllArgsConstructor; @@ -28,6 +30,7 @@ public class UserInfo implements Serializable { private static final long serialVersionUID = 1L; + @TableId(type = IdType.AUTO) private Long id; private LocalDateTime createOn;