package com.doumee.api.web;
|
|
import com.doumee.core.annotation.LoginRequired;
|
import com.doumee.core.model.ApiResponse;
|
import com.doumee.dao.business.model.Member;
|
import com.doumee.dao.dto.ShopApplyDTO;
|
import com.doumee.dao.vo.ShopDetailVO;
|
import com.doumee.service.business.ShopInfoService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.validation.annotation.Validated;
|
import org.springframework.web.bind.annotation.*;
|
|
/**
|
* 门店入驻(小程序端)
|
* @author rk
|
* @date 2026/04/10
|
*/
|
@Api(tags = "门店入驻")
|
@RestController
|
@RequestMapping("/web/shopInfo")
|
public class ShopInfoApi extends ApiController {
|
|
@Autowired
|
private ShopInfoService shopInfoService;
|
|
@LoginRequired
|
@ApiOperation("门店入驻申请/修改")
|
@PostMapping("/apply")
|
public ApiResponse apply(@RequestBody @Validated ShopApplyDTO request) {
|
Member member = this.getMemberResponse();
|
shopInfoService.applyShop(request, member);
|
return ApiResponse.success("操作成功");
|
}
|
|
@LoginRequired
|
@ApiOperation("查询我的门店信息")
|
@GetMapping("/myShop")
|
public ApiResponse<ShopDetailVO> myShop() {
|
return ApiResponse.success(shopInfoService.getMyShop(this.getMemberId()));
|
}
|
|
}
|