| | |
| | | return R.ok(shopIPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过手机号校验店长 |
| | | */ |
| | | @PostMapping("/cheUserByPhone") |
| | | @ApiOperation(value = "通过手机号校验店长", tags = {"后台管理-门店管理"}) |
| | | public R<Void> cheUserByPhone(@RequestParam("phone") String phone) { |
| | | R<AppUser> r = appUserClient.getAppUserByPhone(phone); |
| | | if (R.isError(r)){ |
| | | return R.fail("检验失败"); |
| | | } |
| | | if (r.getData() == null){ |
| | | return R.fail("未查询到用户"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 附近门店列表 |
| | | */ |
| | | @GetMapping("/nearbyShopList") |
| | | @ApiOperation(value = "附近门店列表", tags = {"小程序-首页-附近门店列表"}) |
| | | @ApiOperation(value = "附近门店列表", tags = {"小程序-首页"}) |
| | | public R<List<NearbyShopVO>> nearbyShopList(@ApiParam("经度") @RequestParam BigDecimal longitude, |
| | | @ApiParam("纬度") @RequestParam BigDecimal latitude) { |
| | | return R.ok(shopService.nearbyShopList(longitude, latitude)); |
| | |
| | | |
| | | |
| | | @GetMapping("/shopDetail") |
| | | @ApiOperation(value = "门店详情", tags = {"小程序-首页-门店详情"}) |
| | | @ApiOperation(value = "门店详情", tags = {"小程序-首页"}) |
| | | public R<ShopDetailVO> shopDetail(@ApiParam("门店id") @RequestParam Integer shopId, |
| | | @ApiParam("经度") @RequestParam BigDecimal longitude, |
| | | @ApiParam("纬度") @RequestParam BigDecimal latitude) { |
| | |
| | | * 查询当前店长所属门店 |
| | | */ |
| | | @GetMapping("/shopByUser") |
| | | @ApiOperation(value = "查询当前店长所属门店", tags = {"小程序-个人中心-首页"}, notes = "可绑定的门店列表") |
| | | @ApiOperation(value = "查询当前店长所属门店", tags = {"小程序-个人中心"}, notes = "可绑定的门店列表") |
| | | public R<List<Shop>> shopByUser() { |
| | | R<List<AppUserShop>> r = appUserClient.getAppUserShop(SecurityUtils.getUserId()); |
| | | if (R.isSuccess(r)){ |
| | |
| | | * 绑定门店 |
| | | */ |
| | | @GetMapping("/bindShop") |
| | | @ApiOperation(value = "绑定门店", tags = {"小程序-个人中心-绑定门店"}) |
| | | @ApiOperation(value = "绑定门店", tags = {"小程序-个人中心"}) |
| | | public R<Void> bindShop(@ApiParam("门店id") @RequestParam Long shopId) { |
| | | AppUser appUser = appUserClient.getAppUserById(SecurityUtils.getUserId()); |
| | | appUser.setShopId(shopId); |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/shopScore") |
| | | @ApiOperation(value = "门店打分", tags = {"小程序-个人中心-门店打分"}) |
| | | @ApiOperation(value = "门店打分", tags = {"小程序-个人中心"}) |
| | | public R<Void> shopScore(@RequestBody ShopScore shopScore) { |
| | | LoginUser loginUserApplet = tokenService.getLoginUserApplet(); |
| | | shopScore.setAppUserId(loginUserApplet.getUserid()); |