| | |
| | | |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "删除(0=否,1=是)") |
| | |
| | | public R<List<Order>> byUserId(Long appUserId) { |
| | | return R.fail(); |
| | | } |
| | | |
| | | @Override |
| | | public R<List<Order>> byShopId(Integer shopId) { |
| | | return R.fail(); |
| | | } |
| | | }; |
| | | |
| | | } |
| | |
| | | |
| | | @PostMapping("/order/byUserId") |
| | | public R<List<Order>> byUserId(@RequestParam("appUserId")Long appUserId); |
| | | @PostMapping("/order/byShopId") |
| | | public R<List<Order>> byShopId(@RequestParam("shopId")Integer shopId); |
| | | |
| | | |
| | | /** |
| | |
| | | public R<AppUser> info(){ |
| | | Long userId = tokenService.getLoginUserApplet().getUserid(); |
| | | AppUser user = appUserService.getById(userId); |
| | | |
| | | |
| | | |
| | | return R.ok(user); |
| | | } |
| | | @Resource |
| | |
| | | return R.ok(appuserPage); |
| | | } |
| | | |
| | | @GetMapping("/shop/getAppuserPage") |
| | | @ApiOperation(value = "用户列表", tags = {"门店后台"}) |
| | | public R<IPage<AppUser>> shopGetAppuserPage(@ApiParam("页码") @RequestParam Integer pageNum, |
| | | @ApiParam("每一页数据大小") Integer pageSize, |
| | | AppUser appUser) |
| | | { |
| | | Integer objectId = tokenService.getLoginUser().getSysUser().getObjectId(); |
| | | |
| | | List<Long> userIds = new ArrayList<>(); |
| | | userIds.add(-1L); |
| | | //获取在该本店下单的用户ids |
| | | R<List<Order>> listR = remoteOrderGoodsClient.byShopId(objectId); |
| | | for (Order datum : listR.getData()) { |
| | | userIds.add(datum.getAppUserId()); |
| | | } |
| | | IPage<AppUser> appuserPage = appUserService.getAppuserPage1(pageNum, pageSize, appUser,objectId); |
| | | return R.ok(appuserPage); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/danger/info") |
| | | @ApiOperation(value = "用户列表-保级条件详情", tags = {"管理后台"}) |
| | | public R<DangerInfoDto> dangerinfo(Long id) |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.account.api.model.AppUser; |
| | | import com.ruoyi.account.api.model.BalanceChangeRecord; |
| | | import com.ruoyi.account.api.model.WithdrawalRequests; |
| | | import com.ruoyi.account.dto.WithQuery; |
| | | import com.ruoyi.account.dto.WithdrawalRequestsDTO; |
| | | import com.ruoyi.account.service.AppUserService; |
| | | import com.ruoyi.account.service.WithdrawalRequestsService; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private WithdrawalRequestsService withdrawalRequestsService; |
| | | @Resource |
| | | private AppUserService appUserService; |
| | | |
| | | /** |
| | | * 提现申请 |
| | |
| | | @ApiOperation(value = "提现申请列表", tags = {"后台"}) |
| | | public R<IPage<WithdrawalRequests>> page(@RequestBody WithQuery withQuery){ |
| | | return R.ok(withdrawalRequestsService.pageList(withQuery)); |
| | | |
| | | } |
| | | // @PostMapping("/auth") |
| | | // @ApiOperation(value = "提现申请", tags = {"后台"}) |
| | | // public R<IPage<WithdrawalRequests>> page(@RequestBody WithQuery withQuery){ |
| | | // return R.ok(withdrawalRequestsService.pageList(withQuery)); |
| | | // |
| | | // } |
| | | @PostMapping("/auth") |
| | | @ApiOperation(value = "提现申请审批", tags = {"后台"}) |
| | | public R<IPage<WithdrawalRequests>> auth(@RequestParam Long id,@ApiParam("2'审核通过',3'审核拒绝'") Integer auditStatus){ |
| | | WithdrawalRequests byId = withdrawalRequestsService.getById(id); |
| | | if (auditStatus==2){ |
| | | |
| | | //将用户待审核金额减少,已提现金额增加 |
| | | AppUser byId1 = appUserService.getById(byId.getAppUserId()); |
| | | byId1.setWithdrawnAmount(byId1.getWithdrawnAmount().add(byId.getWithdrawalAmount())); |
| | | appUserService.updateById(byId1); |
| | | //执行对应的第三方提现 todo |
| | | } |
| | | //通过 |
| | | byId.setAuditStatus(auditStatus); |
| | | withdrawalRequestsService.updateById(byId); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | List<NearbyReferrerVo> getNearbyReferrer(@Param("cityCode") String cityCode, @Param("nearbyReferrer") NearbyReferrer nearbyReferrer); |
| | | |
| | | IPage<AppUser> getAppuserPage(@Param("page") IPage<AppUser> page, @Param("appUser") AppUser appUser); |
| | | |
| | | IPage<AppUser> getAppuserPage1(@Param("page") IPage<AppUser> page, @Param("appUser") AppUser appUser,Integer objectId); |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | void onlineRecord(); |
| | | |
| | | IPage<AppUser> getAppuserPage(Integer pageNum, Integer pageSize, AppUser appUser); |
| | | IPage<AppUser> getAppuserPage1(Integer pageNum, Integer pageSize, AppUser appUser,Integer objectId); |
| | | } |
| | |
| | | } |
| | | return appUserMapper.getAppuserPage(new Page<>(pageNum, pageSize), appUser); |
| | | } |
| | | @Override |
| | | public IPage<AppUser> getAppuserPage1(Integer pageNum, Integer pageSize, AppUser appUser,Integer objectId) { |
| | | |
| | | return appUserMapper.getAppuserPage1(new Page<>(pageNum, pageSize), appUser,objectId); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | @PostMapping("/byUserId") |
| | | public R<List<Order>> byUserId(@RequestParam("appUserId") Long appUserId){ |
| | | return R.ok(orderService.lambdaQuery().eq(Order::getAppUserId, appUserId).list()); |
| | | } |
| | | @PostMapping("/byShopId") |
| | | public R<List<Order>> byShopId(@RequestParam("shopId") Integer shopId){ |
| | | return R.ok(orderService.lambdaQuery().isNotNull(Order::getEndTime).eq(Order::getShopId, shopId).groupBy(Order::getAppUserId).list()); |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | |
| | | @ApiOperation(value = "广告管理-分享管理-列表", tags = {"管理后台"}) |
| | | @GetMapping("/manage/list") |
| | | public R<Page<Share>> managelist(String name, Integer addType, @RequestParam Integer pageNum, Integer pageSize) { |
| | | Page<Share> page = shareService.lambdaQuery().eq(Share::getAuditStatus, 1).like(name != null, Share::getName, name).eq(addType != null, Share::getAddType, addType).page(Page.of(pageNum, pageSize)); |
| | | return R.ok(page); |
| | | //判断当前登陆人是平台还是门店 |
| | | if (tokenService.getLoginUser().getSysUser().getRoleType()==1) { |
| | | Page<Share> page = shareService.lambdaQuery().eq(Share::getAuditStatus, 1).like(name != null, Share::getName, name).eq(addType != null, Share::getAddType, addType).page(Page.of(pageNum, pageSize)); |
| | | return R.ok(page); |
| | | }else { |
| | | Page<Share> page = shareService.lambdaQuery().eq(Share::getAddType,3).eq(Share::getObjectId, tokenService.getLoginUser().getSysUser().getObjectId()).like(name != null, Share::getName, name).eq(addType != null, Share::getAddType, addType).page(Page.of(pageNum, pageSize)); |
| | | return R.ok(page); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "广告管理-分享管理-设为小程序分享", tags = {"管理后台"}) |