| | |
| | | |
| | | import com.ruoyi.account.api.model.AppUser; |
| | | import com.ruoyi.account.api.model.UserCancellationLog; |
| | | import com.ruoyi.account.api.model.UserCoupon; |
| | | import com.ruoyi.account.service.AppUserService; |
| | | import com.ruoyi.account.service.UserCancellationLogService; |
| | | import com.ruoyi.account.service.UserCouponService; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.other.api.domain.Shop; |
| | |
| | | private AppUserService appUserService; |
| | | @Resource |
| | | private StoreClient storeClient; |
| | | @Resource |
| | | private UserCouponService userCouponService; |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/mobileLogin") |
| | | @ApiOperation(value = "手机号登录") |
| | | public AjaxResult<LoginVo> mobileLogin(@RequestBody MobileLogin mobileLogin){ |
| | | return appUserService.mobileLogin(mobileLogin); |
| | | } |
| | | |
| | | @PostMapping("getAppUserById") |
| | | AppUser getAppUserById(@RequestParam("id") Long id){ |
| | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/getAppUserById") |
| | | public AppUser getAppUserById(@RequestParam("id") Long id){ |
| | | return appUserService.getById(id); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/editAppUserById") |
| | | public R<Void> editAppUserById(@RequestParam("appUser") AppUser appUser){ |
| | | appUserService.updateById(appUser); |
| | | return R.ok(); |
| | | @PostMapping("/mobileLogin") |
| | | @ApiOperation(value = "手机号登录") |
| | | public R<LoginVo> mobileLogin(@RequestBody MobileLogin mobileLogin){ |
| | | return appUserService.mobileLogin(mobileLogin); |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/getCouponCount") |
| | | public R<Long> getCouponCount(@RequestParam("userId")Long userId, @RequestParam("couponId") Integer couponId ){ |
| | | Long count = userCouponService.lambdaQuery().eq(UserCoupon::getAppUserId, userId).eq(UserCoupon::getCouponId, couponId).count(); |
| | | return R.ok(count); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/getVipCount") |
| | | public R<Long> getVipCount(@RequestParam("userId")Long userId, @RequestParam("vipId") Integer vipId ){ |
| | | appUserService.lambdaQuery().eq(AppUser::getInviteUserId, userId).eq(AppUser::getVipId, vipId).count() |
| | | return R.ok(count); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @PostMapping("/index") |
| | | @ApiOperation(value = "个人中心首页", tags = {"小程序-个人中心首页"}) |
| | | public R<AppUser> index(){ |