| | |
| | | |
| | | import com.doumee.core.annotation.LoginRequired; |
| | | import com.doumee.core.annotation.LoginShopRequired; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.config.jwt.JwtTokenUtil; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | |
| | | import com.doumee.dao.vo.ShopDetailVO; |
| | | import com.doumee.dao.vo.ShopCenterVO; |
| | | import com.doumee.dao.vo.ShopNearbyVO; |
| | | import com.doumee.dao.vo.ShopSalesStatsVO; |
| | | import com.doumee.dao.vo.ShopWebDetailVO; |
| | | import com.doumee.dao.vo.PayResponse; |
| | | import com.doumee.service.business.OrdersService; |
| | |
| | | } |
| | | |
| | | @LoginShopRequired |
| | | @ApiOperation("门店销售统计") |
| | | @GetMapping("/salesStats") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "门店token值", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "period", value = "统计周期:0=今日, 1=本月, 2=上月", required = true) |
| | | }) |
| | | public ApiResponse<ShopSalesStatsVO> salesStats(@RequestParam Integer period) { |
| | | return ApiResponse.success("查询成功", shopInfoService.getShopSalesStats(getShopId(), period)); |
| | | } |
| | | |
| | | @LoginShopRequired |
| | | @ApiOperation("维护门店信息(支付押金后)") |
| | | @PostMapping("/maintain") |
| | | public ApiResponse maintain(@RequestBody ShopInfoMaintainDTO dto) { |
| | |
| | | return ApiResponse.success(shopInfoService.getShopMaintainInfo(this.getMemberId())); |
| | | } |
| | | |
| | | @LoginShopRequired |
| | | @LoginRequired |
| | | @ApiOperation("门店支付押金") |
| | | @PostMapping("/payDeposit") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "门店token值", required = true) |
| | | }) |
| | | public ApiResponse<PayResponse> payDeposit() { |
| | | return ApiResponse.success("操作成功", ordersService.payShopDeposit(getShopId())); |
| | | return ApiResponse.success("操作成功", ordersService.payShopDeposit(getMemberId())); |
| | | } |
| | | |
| | | @LoginShopRequired |
| | | @Trace |
| | | @ApiOperation(value = "门店修改密码", notes = "新密码必须同时包含字母和数字,修改成功后需重新登录") |
| | | @PostMapping("/changePassword") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "门店token值", required = true), |
| | | }) |
| | | public ApiResponse changePassword(@RequestParam String newPassword) { |
| | | String token = this.getRequest().getHeader(JwtTokenUtil.HEADER_KEY); |
| | | shopInfoService.changePassword(this.getShopId(), newPassword, token); |
| | | return ApiResponse.success("密码修改成功,请重新登录"); |
| | | } |
| | | |
| | | } |