From f4b9a8a6dbb08dfdf777440239039ffb638686bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Tue, 23 Jan 2024 11:37:17 +0800 Subject: [PATCH] =?UTF-8?q?2.0-=E4=BB=BB=E5=8A=A1=E6=9F=A5=E8=AF=A2bug-?= =?UTF-8?q?=E5=8E=BB=E6=8E=89shareKey=E7=9A=84=E5=AD=97=E6=AE=B5=E6=A3=80?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/xm-backend.iml | 3 +- xm-bootstrap/xm-bootstrap.iml | 41 +++++++++---------- .../com/xm/core/ctrl/XmTaskController.java | 2 +- .../xm/core/service/TestXmGroupService.java | 38 +++++++++++++++++ .../core/service/TestXmGroupStateService.java | 38 +++++++++++++++++ .../core/service/TestXmGroupUserService.java | 38 +++++++++++++++++ 6 files changed, 136 insertions(+), 24 deletions(-) create mode 100644 xm-core/src/test/java/com/xm/core/service/TestXmGroupService.java create mode 100644 xm-core/src/test/java/com/xm/core/service/TestXmGroupStateService.java create mode 100644 xm-core/src/test/java/com/xm/core/service/TestXmGroupUserService.java diff --git a/.idea/xm-backend.iml b/.idea/xm-backend.iml index e886f85d..98c8a90b 100644 --- a/.idea/xm-backend.iml +++ b/.idea/xm-backend.iml @@ -115,7 +115,7 @@ - + @@ -124,7 +124,6 @@ - diff --git a/xm-bootstrap/xm-bootstrap.iml b/xm-bootstrap/xm-bootstrap.iml index 6ac8c078..e7c277c8 100644 --- a/xm-bootstrap/xm-bootstrap.iml +++ b/xm-bootstrap/xm-bootstrap.iml @@ -10,6 +10,25 @@ + + + + + + + + + + + + + + + + + + + @@ -94,25 +113,6 @@ - - - - - - - - - - - - - - - - - - - @@ -199,7 +199,7 @@ - + @@ -208,7 +208,6 @@ - diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmTaskController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmTaskController.java index b0adad1a..cb24d5d4 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmTaskController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmTaskController.java @@ -456,7 +456,7 @@ public class XmTaskController { @ApiOperation( value = "查询互联网开放的任务的信息详情,免登录",notes="taskDetail,条件之间是 and关系,模糊查询写法如 {studentName:'%才哥%'}") - @ApiEntityParams(value = XmTask.class,props = {"id","shareKey"}) + @ApiEntityParams(value = XmTask.class,props = {"id"}) @ApiResponses({ @ApiResponse(code = 200,response= XmTask.class,message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'错误码'},total:总记录数,data:[数据对象1,数据对象2,...]}") }) diff --git a/xm-core/src/test/java/com/xm/core/service/TestXmGroupService.java b/xm-core/src/test/java/com/xm/core/service/TestXmGroupService.java new file mode 100644 index 00000000..73cfeaf4 --- /dev/null +++ b/xm-core/src/test/java/com/xm/core/service/TestXmGroupService.java @@ -0,0 +1,38 @@ +package com.xm.core.service; + +import java.util.*; +import java.text.SimpleDateFormat; +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.ContextHierarchy; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import com.mdp.core.utils.BaseUtils; +import org.springframework.beans.factory.annotation.Autowired; +import com.xm.core.service.XmGroupService; +import com.xm.core.entity.XmGroup; +import org.springframework.boot.test.context.SpringBootTest; +/** + * @author code-gen + * @since 2023-11-10 + */ +@RunWith(SpringJUnit4ClassRunner.class) +@SpringBootTest +public class TestXmGroupService { + + @Autowired + XmGroupService xmGroupService; + + /** + * 新增一条数据 + ***/ + @Test + public void insert() { + Map p=BaseUtils.map("id","PS0R","groupName","zjya","projectId","q50f","pgTypeId","qIVN","pgTypeName","v2Cg","leaderUserid","uhyX","leaderUsername","OfYq","ctime",new Date("2023-11-10 16:33:3"),"ltime",new Date("2023-11-10 16:33:3"),"productId","c40j","branchId","SOEs","pgClass","X","pgroupId","p0dQ","lvl",1521,"pidPaths","J5w5","isTpl","e","assUserid","9LlN","assUsername","emuI","childrenCnt",1697,"userCnt",8957,"qxCode","MnDD","calcWorkload","E","ntype","K","crowBranchId","DYQO","crowBranchName","lMyS","isCrow","9"); + XmGroup xmGroup=BaseUtils.fromMap(p,XmGroup.class); + xmGroupService.save(xmGroup); + //Assert.assertEquals(1, result); + } + +} diff --git a/xm-core/src/test/java/com/xm/core/service/TestXmGroupStateService.java b/xm-core/src/test/java/com/xm/core/service/TestXmGroupStateService.java new file mode 100644 index 00000000..e389a003 --- /dev/null +++ b/xm-core/src/test/java/com/xm/core/service/TestXmGroupStateService.java @@ -0,0 +1,38 @@ +package com.xm.core.service; + +import java.util.*; +import java.text.SimpleDateFormat; +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.ContextHierarchy; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import com.mdp.core.utils.BaseUtils; +import org.springframework.beans.factory.annotation.Autowired; +import com.xm.core.service.XmGroupStateService; +import com.xm.core.entity.XmGroupState; +import org.springframework.boot.test.context.SpringBootTest; +/** + * @author code-gen + * @since 2023-11-10 + */ +@RunWith(SpringJUnit4ClassRunner.class) +@SpringBootTest +public class TestXmGroupStateService { + + @Autowired + XmGroupStateService xmGroupStateService; + + /** + * 新增一条数据 + ***/ + @Test + public void insert() { + Map p=BaseUtils.map("planStartTime",new Date("2023-11-10 16:33:3"),"planEndTime",new Date("2023-11-10 16:33:3"),"actStartTime",new Date("2023-11-10 16:33:3"),"actEndTime",new Date("2023-11-10 16:33:3"),"planWorkload",1073.08,"actWorkload",7946.42,"planCostAmount",2655.46,"actCostAmount",2094.76,"finishRate",3413.5,"demandRate",7640.24,"designRate",9242.96,"devRate",8315.16,"uatRate",3971.94,"sitRate",2932.46,"ctime",new Date("2023-11-10 16:33:3"),"calcTime",new Date("2023-11-10 16:33:3"),"planWorkhours",756.86,"planWorkerCnt",6995.62,"closedBugs",939,"activeBugs",7671,"confirmedBugs",9137,"resolvedBugs",5801,"testCases",9705,"execCases",915,"designCases",1329,"finishCases",3450,"iterationCnt",1548,"taskCnt",7039,"finishTaskCnt",901,"bizDate","n1xJ","bugCnt",1553,"groupId","ki4Q","projectId","refF","projectName","8r4q","groupName","qmay"); + XmGroupState xmGroupState=BaseUtils.fromMap(p,XmGroupState.class); + xmGroupStateService.save(xmGroupState); + //Assert.assertEquals(1, result); + } + +} diff --git a/xm-core/src/test/java/com/xm/core/service/TestXmGroupUserService.java b/xm-core/src/test/java/com/xm/core/service/TestXmGroupUserService.java new file mode 100644 index 00000000..dc696924 --- /dev/null +++ b/xm-core/src/test/java/com/xm/core/service/TestXmGroupUserService.java @@ -0,0 +1,38 @@ +package com.xm.core.service; + +import java.util.*; +import java.text.SimpleDateFormat; +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.ContextHierarchy; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import com.mdp.core.utils.BaseUtils; +import org.springframework.beans.factory.annotation.Autowired; +import com.xm.core.service.XmGroupUserService; +import com.xm.core.entity.XmGroupUser; +import org.springframework.boot.test.context.SpringBootTest; +/** + * @author code-gen + * @since 2023-11-10 + */ +@RunWith(SpringJUnit4ClassRunner.class) +@SpringBootTest +public class TestXmGroupUserService { + + @Autowired + XmGroupUserService xmGroupUserService; + + /** + * 新增一条数据 + ***/ + @Test + public void insert() { + Map p=BaseUtils.map("joinTime",new Date("2023-11-10 16:33:3"),"groupId","i297","userid","ztct","username","FNbW","outTime",new Date("2023-11-10 16:33:3"),"status","f","obranchId","1zPT","isPri","F","seqNo",5179,"projectId","Y968","productId","80g5","pgClass","G","obranchName","R9eR"); + XmGroupUser xmGroupUser=BaseUtils.fromMap(p,XmGroupUser.class); + xmGroupUserService.save(xmGroupUser); + //Assert.assertEquals(1, result); + } + +}