| | |
| | | @TableField("lave_point") |
| | | private Integer lavePoint; |
| | | |
| | | @TableField(exist = false) |
| | | private Integer laveUsePoint; |
| | | |
| | | @ApiModelProperty(value = "门店分佣总金额") |
| | | @TableField("giveaway_all_money") |
| | | private BigDecimal giveawayAllMoney; |
| | |
| | | import com.ruoyi.other.api.domain.CouponInfo; |
| | | import com.ruoyi.other.api.factory.CouponClientFallbackFactory; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | |
| | | public interface CouponClient { |
| | | |
| | | |
| | | @PostMapping("/coupon-info/detail") |
| | | @GetMapping("/coupon-info/detail") |
| | | R<CouponInfo> detail(@RequestParam("id") Integer id); |
| | | |
| | | |
| | |
| | | @ApiParam("每一页数据大小") Integer pageSize, |
| | | AppUser appUser) { |
| | | IPage<AppUser> appuserPage = appUserService.getAppuserPage(pageNum, pageSize, appUser); |
| | | for (AppUser record : appuserPage.getRecords()) { |
| | | if (record.getInviteUserId() != null) { |
| | | AppUser byId1 = appUserService.getById(record.getInviteUserId()); |
| | | if (byId1!=null) { |
| | | record.setInviteUserName(byId1.getName()); |
| | | } |
| | | } |
| | | if (record.getShopId()!=null){ |
| | | R<Shop> shopById = shopClient.getShopById(record.getShopId()); |
| | | if (shopById.getData()!=null){ |
| | | record.setShopName(shopById.getData().getName()); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(appuserPage); |
| | | } |
| | | |
| | |
| | | //推广人 |
| | | if (byId.getInviteUserId() != null) { |
| | | AppUser byId1 = appUserService.getById(byId.getInviteUserId()); |
| | | byId1.setInviteUserName(byId1.getInviteUserName()); |
| | | byId.setInviteUserName(byId1.getInviteUserName()); |
| | | } |
| | | //最后下单时间 |
| | | R<Order> lastOrder = remoteOrderGoodsClient.getLastOrder(id); |
| | |
| | | Long userid = tokenService.getLoginUserApplet().getUserid(); |
| | | AppUser byId = appUserService.getById(userid); |
| | | |
| | | CouponInfo data = couponClient.detail(couponId).getData(); |
| | | R<CouponInfo> detail = couponClient.detail(couponId); |
| | | CouponInfo data = detail.getData(); |
| | | //检验当前优惠券是否存在 |
| | | if (data==null){ |
| | | return R.fail("当前优惠券不存在,请刷新后重试"); |
| | |
| | | </select> |
| | | |
| | | <select id="getAppuserPage" resultType="com.ruoyi.account.api.model.AppUser"> |
| | | SELECT ta.id, ta.`name`, ta.vip_id, ta.shop_id |
| | | SELECT * |
| | | FROM t_app_user ta |
| | | <where> |
| | | ta.del_flag = 0 |
| | |
| | | public R<List<RechargeSet>> detail(@RequestBody RechargeDto rechargeDto) { |
| | | List<RechargeSet> list = rechargeSetService.list(); |
| | | rechargeSetService.removeBatchByIds(list); |
| | | rechargeSetService.saveBatch(rechargeDto.getRechargeSets()); |
| | | rechargeSetService.saveBatch(rechargeDto.getRechargeDto()); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | for (Share record : page.getRecords()) { |
| | | if (record.getAddType() == 2) { |
| | | AppUser appUserById = appUserClient.getAppUserById(Long.valueOf(record.getObjectId())); |
| | | record.setAuthName(appUserById.getName()); |
| | | record.setAuthPhone(appUserById.getPhone()); |
| | | if (appUserById!=null) { |
| | | record.setAuthName(appUserById.getName()); |
| | | record.setAuthPhone(appUserById.getPhone()); |
| | | } |
| | | } |
| | | if (record.getAddType() == 3) { |
| | | R<Shop> shopById = shopClient.getShopById(Integer.valueOf(record.getObjectId())); |
| | |
| | | @ApiOperation(value = "门店列表", tags = {"管理后台-门店管理"}) |
| | | public R<IPage<Shop>> list(@ApiParam("页码") @RequestParam Integer pageNum,@ApiParam("每一页数据大小") Integer pageSize,Shop shop){ |
| | | IPage<Shop> shopIPage = shopService.getShopList(pageNum, pageSize, shop); |
| | | for (Shop record : shopIPage.getRecords()) { |
| | | record.setLaveUsePoint(record.getLavePoint()); |
| | | } |
| | | return R.ok(shopIPage); |
| | | } |
| | | |
| | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/getShopByUserId") |
| | | public R<List<Shop>> getShopByUserId(@RequestParam("id") Integer id){ |
| | | public R<List<Shop>> getShopByUserId(@RequestParam("id") Long id){ |
| | | List<Shop> list = shopService.lambdaQuery().eq(Shop::getAppUserId, id).list(); |
| | | return R.ok(list); |
| | | } |
| | |
| | | */ |
| | | @Data |
| | | public class RechargeDto { |
| | | private List<RechargeSet> rechargeSets; |
| | | private List<RechargeSet> rechargeDto; |
| | | } |
| | |
| | | </select> |
| | | <select id="selectShopList" resultType="com.ruoyi.other.api.domain.Shop"> |
| | | SELECT |
| | | ts.id, |
| | | ts.`name`, |
| | | ts.business_date, |
| | | ts.start_time, |
| | | ts.end_time, |
| | | ts.phone, |
| | | ts.address, |
| | | ts.`status`, |
| | | ts.shop_manager |
| | | ts.* |
| | | FROM |
| | | t_shop ts |
| | | <where> |