diff --git a/src/main/java/cn/com/tenlion/controller/api/apply/ApplyController.java b/src/main/java/cn/com/tenlion/controller/api/apply/ApplyController.java index 416720a..1794f07 100644 --- a/src/main/java/cn/com/tenlion/controller/api/apply/ApplyController.java +++ b/src/main/java/cn/com/tenlion/controller/api/apply/ApplyController.java @@ -16,6 +16,7 @@ import cn.com.tenlion.pojo.dtos.apply.ApplyDTO; import cn.com.tenlion.pojo.vos.apply.ApplyVO; import cn.com.tenlion.service.apply.IApplyService; import io.swagger.annotations.*; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -149,6 +150,9 @@ public class ApplyController extends DefaultBaseController { @GetMapping("listpage") public SuccessResultList> listPage(ListPage page) { Map params = requestParams(); + if(!StringUtils.isBlank(params.get("applyAuditStates").toString())){ + params.put("applyAuditStates",Arrays.asList(params.get("applyAuditStates"))); + } page.setParams(params); return applyService.listPage(page); } diff --git a/src/main/java/cn/com/tenlion/controller/app/api/traininginstitution/TrainingInstitutionController.java b/src/main/java/cn/com/tenlion/controller/app/api/traininginstitution/TrainingInstitutionController.java new file mode 100644 index 0000000..9b8c3d4 --- /dev/null +++ b/src/main/java/cn/com/tenlion/controller/app/api/traininginstitution/TrainingInstitutionController.java @@ -0,0 +1,61 @@ +package cn.com.tenlion.controller.app.api.traininginstitution; + +import cn.com.tenlion.institutionmanagement.pojo.dtos.institution.InstitutionDTO; +import cn.com.tenlion.institutionmanagement.service.institution.IInstitutionService; +import ink.wgink.common.base.DefaultBaseController; +import ink.wgink.interfaces.consts.ISystemConstant; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.result.ErrorResult; +import ink.wgink.pojo.result.SuccessResultList; +import io.swagger.annotations.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; +import java.util.Map; + +/** + * 培训机构 + */ + +@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "培训机构接口") +@RestController +@RequestMapping(ISystemConstant.APP_PREFIX + "/traininginstitution") +public class TrainingInstitutionController extends DefaultBaseController { + @Autowired + private IInstitutionService iInstitutionService; + + + @ApiOperation(value = "培训机构分页列表", notes = "培训机构分页列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpage"+ISystemConstant.APP_RELEASE_SUFFIX) + public SuccessResultList> listPage(ListPage page) { + Map params = requestParams(); + params.put("institutionType","training"); + page.setParams(params); + return iInstitutionService.listPage(page); + } + + + @ApiOperation(value = "培训机构详情(通过ID)", notes = "培训机构详情(通过ID)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "applyId", value = "培训机构ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("get/"+ISystemConstant.APP_RELEASE_SUFFIX+"/{applyId}") + public InstitutionDTO get( @PathVariable("applyId") String applyId) { + return iInstitutionService.get(applyId); + } + + +} diff --git a/src/main/resources/static/route/apply/list.html b/src/main/resources/static/route/apply/list.html index 5233e83..9dd2132 100644 --- a/src/main/resources/static/route/apply/list.html +++ b/src/main/resources/static/route/apply/list.html @@ -28,6 +28,16 @@
+
+ +
@@ -242,7 +252,8 @@ where: { keywords: $('#keywords').val(), startTime: $('#startTime').val(), - endTime: $('#endTime').val() + endTime: $('#endTime').val(), + applyAuditStates:$('#applyAuditStates').val() }, page: { curr: currentPage