@ -307,7 +307,7 @@ public class TaskDefinitionController extends BaseController {
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
public Result genTaskCodeList(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("genNum") Integer genNum) {
Map<String, Object> result = taskDefinitionService.genTaskCodeList(loginUser, genNum);
Map<String, Object> result = taskDefinitionService.genTaskCodeList(genNum);
return returnDataList(result);
}
@ -151,11 +151,9 @@ public interface TaskDefinitionService {
/**
* gen task code list
*
* @param loginUser login user
* @param genNum gen num
* @return task code list
*/
Map<String, Object> genTaskCodeList(User loginUser,
Integer genNum);
Map<String, Object> genTaskCodeList(Integer genNum);
@ -411,7 +411,7 @@ public class TaskDefinitionServiceImpl extends BaseServiceImpl implements TaskDe
@Override
public Map<String, Object> genTaskCodeList(User loginUser, Integer genNum) {
public Map<String, Object> genTaskCodeList(Integer genNum) {
Map<String, Object> result = new HashMap<>();
if (genNum == null || genNum < 1 || genNum > 100) {
logger.error("the genNum must be great than 1 and less than 100");
@ -270,10 +270,7 @@ public class TaskDefinitionServiceImplTest {
@Test
public void genTaskCodeList() {
User loginUser = new User();
loginUser.setId(-1);
loginUser.setUserType(UserType.GENERAL_USER);
Map<String, Object> genTaskCodeList = taskDefinitionService.genTaskCodeList(loginUser, 10);
Map<String, Object> genTaskCodeList = taskDefinitionService.genTaskCodeList(10);
Assert.assertEquals(Status.SUCCESS, genTaskCodeList.get(Constants.STATUS));