| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.admin.entity.WorkerProcess; |
| | | import com.ruoyi.admin.service.WorkerProcessService; |
| | | import com.ruoyi.common.core.constant.Constants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.security.annotation.RequiresPermissions; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | * @param pageNum 页码 |
| | | * @param pageSize 每页显示条数 |
| | | */ |
| | | @RequiresPermissions("master_worker_process") |
| | | @ApiOperation(value = "师傅入驻审核分页查询列表", tags = {"后台-师傅管理-师傅入驻审核管理"}) |
| | | @GetMapping(value = "/page") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "用户ID", name = "userNumber", dataType = "String"), |
| | | @ApiImplicitParam(value = "真实姓名", name = "workerName", dataType = "String"), |
| | | @ApiImplicitParam(value = "用户ID", name = "id", dataType = "String"), |
| | | @ApiImplicitParam(value = "真实姓名", name = "realName", dataType = "String"), |
| | | @ApiImplicitParam(value = "所属城市", name = "city", dataType = "String"), |
| | | @ApiImplicitParam(value = "当前状态(0:待审核 1:已通过 2:已驳回)", name = "state", dataType = "Integer"), |
| | | @ApiImplicitParam(value = "页码", name = "pageNum", dataType = "Integer", required = true), |
| | | @ApiImplicitParam(value = "每页条数", name = "pageSize", dataType = "Integer", required = true) |
| | | }) |
| | | public R<IPage<WorkerProcess>> queryPageList(String userNumber, String workerName, String city, Integer state, |
| | | public R<IPage<WorkerProcess>> queryPageList(String id, String realName, String city, Integer state, |
| | | @RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum, |
| | | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) { |
| | | LambdaQueryChainWrapper<WorkerProcess> wrapper = workerProcessService.lambdaQuery(); |
| | | wrapper = StringUtils.isNotBlank(workerName) ? wrapper.like(WorkerProcess::getRealName, workerName) : wrapper; |
| | | wrapper = StringUtils.isNotBlank(id) ? wrapper.like(WorkerProcess::getId, id) : wrapper; |
| | | wrapper = StringUtils.isNotBlank(realName) ? wrapper.like(WorkerProcess::getRealName, realName) : wrapper; |
| | | wrapper = StringUtils.isNotBlank(city) ? wrapper.like(WorkerProcess::getCity, city) : wrapper; |
| | | wrapper = null != state ? wrapper.eq(WorkerProcess::getState, state) : wrapper; |
| | | return R.ok(wrapper.eq(WorkerProcess::getIsDelete, 0) |
| | |
| | | * |
| | | * @param id 师傅入驻审核id |
| | | */ |
| | | @RequiresPermissions("master_worker_process") |
| | | @ApiOperation(value = "师傅入驻审核详情", tags = {"后台-师傅管理-师傅入驻审核管理"}) |
| | | @GetMapping(value = "/detail") |
| | | @ApiImplicitParams({ |
| | |
| | | * |
| | | * @param prize 师傅入驻审核信息 |
| | | */ |
| | | @RequiresPermissions("master_worker_process") |
| | | @ApiOperation(value = "新增师傅入驻审核", tags = {"后台-师傅管理-师傅入驻审核管理"}) |
| | | @PostMapping(value = "/save") |
| | | public R<String> save(@RequestBody WorkerProcess prize) { |
| | | prize.setState(Constants.ZERO); |
| | | return workerProcessService.save(prize) ? R.ok() : R.fail(); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param ids 师傅入驻审核id拼接 |
| | | */ |
| | | @RequiresPermissions("master_worker_process") |
| | | @ApiOperation(value = "批量删除师傅入驻审核", tags = {"后台-师傅管理-师傅入驻审核管理"}) |
| | | @GetMapping(value = "/batchDelete") |
| | | @ApiImplicitParams({ |
| | |
| | | * |
| | | * @param id 师傅入驻审核id |
| | | */ |
| | | @RequiresPermissions("master_worker_process") |
| | | @ApiOperation(value = "师傅入驻审核", tags = {"后台-师傅管理-师傅入驻审核管理"}) |
| | | @GetMapping(value = "/examine") |
| | | @ApiImplicitParams({ |