Commit 2e7d4735 authored by zhangc's avatar zhangc

commit

parent b5bdfe5f
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());
}
}
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