| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.dto.ChangePasswordDTO; |
| | | import com.doumee.dao.dto.ShopApplyDTO; |
| | | import com.doumee.dao.dto.ShopDetailQueryDTO; |
| | | import com.doumee.dao.dto.ShopInfoMaintainDTO; |
| | | import com.doumee.dao.dto.ShopNearbyDTO; |
| | | import com.doumee.dao.vo.ShopDetailVO; |
| | | import com.doumee.dao.vo.ShopCenterVO; |
| | | import com.doumee.dao.vo.LocationTagShopCountVO; |
| | | import com.doumee.dao.vo.ShopNearbyVO; |
| | | import com.doumee.dao.vo.ShopSalesStatsVO; |
| | | import com.doumee.dao.vo.ShopWebDetailVO; |
| | |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import javax.validation.Valid; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 门店入驻(小程序端) |
| | |
| | | @PostMapping("/nearby") |
| | | public ApiResponse<PageData<ShopNearbyVO>> nearby(@RequestBody @Validated PageWrap<ShopNearbyDTO> pageWrap) { |
| | | return ApiResponse.success(shopInfoService.findNearbyShops(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("按位置标签统计门店数量") |
| | | @GetMapping("/locationTagShopCount") |
| | | public ApiResponse<List<LocationTagShopCountVO>> locationTagShopCount( |
| | | @RequestParam(required = false) Integer cityId) { |
| | | return ApiResponse.success(shopInfoService.countShopsByLocationTag(cityId)); |
| | | } |
| | | |
| | | @ApiOperation("门店详情") |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "门店token值", required = true), |
| | | }) |
| | | public ApiResponse changePassword(@RequestParam String oldPassword, |
| | | @RequestParam String newPassword) { |
| | | public ApiResponse changePassword(@RequestBody @Valid ChangePasswordDTO dto) { |
| | | String token = this.getRequest().getHeader(JwtTokenUtil.HEADER_KEY); |
| | | shopInfoService.changePassword(this.getShopId(), oldPassword, newPassword, token); |
| | | shopInfoService.changePassword(this.getShopId(), dto.getOldPassword(), dto.getNewPassword(), token); |
| | | return ApiResponse.success("密码修改成功,请重新登录"); |
| | | } |
| | | |
| | | @LoginShopRequired |
| | | @ApiOperation("门店打印订单标签") |
| | | @GetMapping("/printOrderLabel/{orderId}") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "门店token值", required = true), |
| | | @ApiImplicitParam(paramType = "path", dataType = "Integer", name = "orderId", value = "订单主键", required = true) |
| | | }) |
| | | public ApiResponse printOrderLabel(@PathVariable Integer orderId) { |
| | | ordersService.printOrderLabel(orderId, this.getShopId()); |
| | | return ApiResponse.success("打印成功"); |
| | | } |
| | | |
| | | } |