| | |
| | | package com.sinata.web.controller.backend; |
| | | |
| | | import com.sinata.common.core.domain.R; |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.system.domain.dto.MwApplicationDTO; |
| | | import com.sinata.system.domain.query.MwApplicationQuery; |
| | | import com.sinata.system.domain.vo.MwApplicationVO; |
| | | import com.sinata.system.service.MwApplicationService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author mitao |
| | | * @since 2024-12-02 |
| | | */ |
| | | @Validated |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @Api(tags = {"单位入驻审核相关接口"}) |
| | | @RequestMapping("/backend/mwApplication") |
| | | public class MwApplicationController { |
| | | private final MwApplicationService mwApplicationService; |
| | | |
| | | /** |
| | | * 分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @ApiOperation("分页列表") |
| | | @PostMapping("/page") |
| | | public R<PageDTO<MwApplicationVO>> pageList(@Valid @RequestBody MwApplicationQuery query) { |
| | | return R.ok(mwApplicationService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation("详情") |
| | | @GetMapping("/{id}") |
| | | public R<MwApplicationVO> detail(@ApiParam(name = "id", value = "入驻申请id", required = true) @PathVariable("id") Long id) { |
| | | return R.ok(mwApplicationService.detail(id)); |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @ApiOperation("审核") |
| | | @PostMapping("/audit") |
| | | public R<?> audit(@Valid @RequestBody MwApplicationDTO dto) { |
| | | mwApplicationService.audit(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation("删除") |
| | | @DeleteMapping("/{id}") |
| | | public R<?> delete(@ApiParam(name = "id", value = "申请记录id", required = true) @PathVariable("id") Long id) { |
| | | mwApplicationService.removeById(id); |
| | | return R.ok(); |
| | | } |
| | | } |