xiaoyong931011
2022-09-23 19ab08f041d6773f22594ed393105c623e09f543
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package cc.mrbird.febs.mall.controller;
 
import cc.mrbird.febs.common.entity.FebsResponse;
import cc.mrbird.febs.mall.dto.ShopApplyDto;
import cc.mrbird.febs.mall.dto.ShopListDto;
import cc.mrbird.febs.mall.service.IApiMallMemberService;
import cc.mrbird.febs.mall.vo.ShopListVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
 
/**
 * @author wzy
 * @date 2022-05-12
 **/
@Slf4j
@RestController
@RequestMapping(value = "/api/apply")
@RequiredArgsConstructor
@Api(value = "ApiApplyController", tags = "申请通道接口类")
public class ApiApplyController {
 
    private final IApiMallMemberService memberService;
 
    @ApiOperation(value = "申请通道")
    @PostMapping(value = "/shopApply")
    public FebsResponse shopApply(@RequestBody ShopApplyDto shopApplyDto) {
        memberService.shopApply(shopApplyDto);
        return new FebsResponse().success().message("申请成功");
    }
 
    @ApiOperation(value = "获取申请信息")
    @GetMapping(value = "/findApply")
    public FebsResponse findApply() {
        return new FebsResponse().success().data(memberService.findNewestApply());
    }
 
 
    @ApiOperation(value = "获取商铺列表")
    @ApiResponses({
            @ApiResponse(code = 200, message = "success", response = ShopListVo.class)
    })
    @PostMapping(value = "/findShopList")
    public FebsResponse findShopList(@RequestBody ShopListDto shopListDto) {
        return new FebsResponse().success().data(memberService.findShopListVo(shopListDto));
    }
}