Commit aa0baeee by 谢海旭

单元测试

1 parent 08e7f7e2
package cn.com.glsx.dj.staff.mapper;
import cn.com.glsx.dj.sale.service.BaseServiceTest;
import cn.com.glsx.dj.staff.dto.recruitment.RecruitmentTrialOnboardingDTO;
import junit.framework.TestCase;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
* @Title:
* @Description:
* @Author xiehx
* @Date 2026/6/24
**/
public class RecruitmentTrialOnboardingMapperTest extends BaseServiceTest {
@Autowired
private RecruitmentTrialOnboardingMapper recruitmentTrialOnboardingMapper;
@Test
public void testListRecruitmentTrialOnboarding() {
List<RecruitmentTrialOnboardingDTO> list = recruitmentTrialOnboardingMapper.listRecruitmentTrialOnboarding(null);
TestCase.assertNotNull(list);
}
}
\ No newline at end of file \ No newline at end of file
...@@ -2,6 +2,7 @@ package cn.com.glsx.dj.staff.service.recruitment; ...@@ -2,6 +2,7 @@ package cn.com.glsx.dj.staff.service.recruitment;
import cn.com.glsx.dj.sale.service.BaseServiceTest; import cn.com.glsx.dj.sale.service.BaseServiceTest;
import cn.com.glsx.dj.staff.dto.recruitment.*; import cn.com.glsx.dj.staff.dto.recruitment.*;
import cn.com.glsx.dj.staff.model.RecruitmentProvinceHrbpRelation;
import cn.com.glsx.dj.staff.model.RecruitmentResume; import cn.com.glsx.dj.staff.model.RecruitmentResume;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination; import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
...@@ -27,32 +28,40 @@ public class RecruitmentDemandServiceTest extends BaseServiceTest { ...@@ -27,32 +28,40 @@ public class RecruitmentDemandServiceTest extends BaseServiceTest {
@Test @Test
public void testRecruitmentDemandAdd() { public void testRecruitmentDemandAdd() {
String userName = "test"; String userName = "xiehx";
RecruitmentDemandDTO dto = new RecruitmentDemandDTO(); RecruitmentDemandDTO dto = new RecruitmentDemandDTO();
dto.setMerchantId("15641846"); dto.setMerchantId("");
dto.setMerchantName("随机测试-上海国联信通"); dto.setMerchantName("xiehx-自测HRBP取值");
dto.setRegionOperationId("4156325632035620"); dto.setRegionOperationId("48494e7681b647ccb94d76ef4926c750");
dto.setRegionOperationName("付志凯"); dto.setRegionOperationName("谢先生");
dto.setBusinessType("1"); dto.setBusinessType("1");
dto.setBusinessTypeName("延保"); dto.setBusinessTypeName("延保");
dto.setRecruitmentQuantity(10); dto.setRecruitmentQuantity(11);
dto.setRecruitmentType("1"); dto.setRecruitmentType("3");
dto.setRecruitmentTypeName("老店人员更换"); dto.setRecruitmentTypeName("新店新增");
dto.setRequirementDescription("testtest"); dto.setRequirementDescription("xiehx-自测HRBP取值");
dto.setUrgent((byte) 0);
dto.setBySystemMerchant(false);
dto.setSalesVolume(100);
dto.setBrand("3D Design/777");
dto.setMerchantAddress("河北省保定市");
dto.setMerchantAddressDetail("sdahfajiosjidjao");
dto.setProvince("河北省");
dto.setProvinceCityCode("130000/130600");
dto.setCreatedBy(userName); dto.setCreatedBy(userName);
dto.setCreatedDate(new Date()); dto.setCreatedDate(new Date());
dto.setUpdatedBy(userName); dto.setUpdatedBy(userName);
dto.setUpdatedDate(new Date()); dto.setUpdatedDate(new Date());
RecruitmentDemandDTO result = recruitmentDemandService.recruitmentDemandAdd(dto); RecruitmentDemandDTO result = recruitmentDemandService.recruitmentDemandAdd(dto);
System.out.println(JSON.toJSONString(result)); System.out.println(JSON.toJSONString(result));
} }
@Test @Test
public void testRecruitmentDemandWebPage() { public void testRecruitmentDemandWebPage() {
RecruitmentDemandPageRecordDTO condition = new RecruitmentDemandPageRecordDTO(); RecruitmentDemandPageRecordDTO condition = new RecruitmentDemandPageRecordDTO();
condition.setMerchantName("明明崇文4s店A"); condition.setMerchantName("测试");
RpcPagination<RecruitmentDemandPageRecordDTO> pagination = new RpcPagination(); RpcPagination<RecruitmentDemandPageRecordDTO> pagination = new RpcPagination();
pagination.setCondition(condition); pagination.setCondition(condition);
...@@ -139,4 +148,10 @@ public class RecruitmentDemandServiceTest extends BaseServiceTest { ...@@ -139,4 +148,10 @@ public class RecruitmentDemandServiceTest extends BaseServiceTest {
List<RecruitmentSubSceneDTO> list = recruitmentDemandService.listSubScenes(dto); List<RecruitmentSubSceneDTO> list = recruitmentDemandService.listSubScenes(dto);
System.out.println(JSON.toJSONString(list)); System.out.println(JSON.toJSONString(list));
} }
@Test
public void testListProvinceHrbpRelation() {
List<RecruitmentProvinceHrbpRelation> list = recruitmentDemandService.listProvinceHrbpRelation(new RecruitmentProvinceHrbpRelation());
System.out.println(JSON.toJSONString(list));
}
} }
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.staff.service.recruitment;
import cn.com.glsx.dj.sale.service.BaseServiceTest;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Title:
* @Description:
* @Author xiehx
* @Date 2026/6/29
**/
public class RecruitmentTrialOnboardingServiceTest extends BaseServiceTest {
@Autowired
private RecruitmentTrialOnboardingService recruitmentTrialOnboardingService;
@Test
public void testProcessTrialApproval() {
recruitmentTrialOnboardingService.processTrialApproval(208);
}
}
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!