Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dm_project
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姚本章
dm_project
Commits
2e7d4735
Commit
2e7d4735
authored
Dec 24, 2020
by
zhangc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
b5bdfe5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
81 additions
and
0 deletions
+81
-0
TestOrganizationManage.java
...st/java/com/jz/dm/gateway/org/TestOrganizationManage.java
+81
-0
No files found.
jz-dm-apigateway/src/test/java/com/jz/dm/gateway/org/TestOrganizationManage.java
0 → 100644
View file @
2e7d4735
package
com
.
jz
.
dm
.
gateway
.
org
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.jz.common.utils.Result
;
import
com.jz.dm.gateway.SpringTestCase
;
import
com.jz.dm.models.domian.ApiOrg
;
import
com.jz.dm.models.req.OrganizationManageAddReq
;
import
com.jz.dm.models.req.OrganizationManageDetailQueryReq
;
import
com.jz.dm.models.req.OrganizationManageListQueryReq
;
import
com.jz.dm.models.req.OrganizationManageUpdateReq
;
import
com.jz.dm.service.OrganizationManageService
;
import
org.junit.Test
;
import
org.springframework.beans.factory.annotation.Autowired
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.gateway.org
* @PROJECT_NAME: jz-dm-parent
* @NAME: TestOrganizationManage
* @DATE: 2020-12-24/18:38
* @DAY_NAME_SHORT: 周四
* @Description:
**/
public
class
TestOrganizationManage
extends
SpringTestCase
{
@Autowired
private
OrganizationManageService
organizationManageService
;
/**
* 查询类列表信息
*/
@Test
public
void
getOrgList
(){
OrganizationManageListQueryReq
req
=
new
OrganizationManageListQueryReq
();
req
.
setPageNum
(
1
);
req
.
setPageSize
(
20
);
IPage
<
ApiOrg
>
apiOrgIPage
=
organizationManageService
.
listOrganization
(
req
);
apiOrgIPage
.
getRecords
().
forEach
(
x
->
System
.
out
.
println
(
x
));
}
/**
* 查询详情信息
*/
@Test
public
void
getOrgDetail
(){
OrganizationManageDetailQueryReq
req
=
new
OrganizationManageDetailQueryReq
();
req
.
setId
(
5L
);
Result
detail
=
organizationManageService
.
getOrganizationDetail
(
req
);
ApiOrg
apiOrg
=
(
ApiOrg
)
detail
.
getData
();
System
.
out
.
println
(
apiOrg
);
}
/**
* 添加组织信息
*/
@Test
public
void
addOrg
(){
OrganizationManageAddReq
req
=
new
OrganizationManageAddReq
();
req
.
setOrgName
(
"ABCOO"
);
req
.
setOrgDesc
(
"粗这次"
);
req
.
setOrgCnName
(
"AOKK"
);
req
.
setOrgMail
(
"7273JA@QQ.COM"
);
req
.
setRemark
(
"sfsihsio"
);
Result
result
=
organizationManageService
.
add
(
req
);
System
.
out
.
println
(
result
.
getMessage
());
}
/**
* 更新组织信息
*/
@Test
public
void
updateOrg
(){
OrganizationManageUpdateReq
req
=
new
OrganizationManageUpdateReq
();
req
.
setId
(
8L
);
req
.
setOrgName
(
"ABCOssO"
);
req
.
setOrgDesc
(
"粗这次002"
);
req
.
setOrgCnName
(
"AOKK33"
);
req
.
setOrgMail
(
"727322JA@QQ.COM"
);
req
.
setRemark
(
"sfsihsio"
);
Result
result
=
organizationManageService
.
update
(
req
);
System
.
out
.
println
(
result
.
getMessage
());
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment