| | |
| | | import com.ruoyi.system.api.domain.poji.member.Member; |
| | | import com.ruoyi.system.api.domain.poji.member.MemberGiftRecord; |
| | | import com.ruoyi.system.api.domain.vo.*; |
| | | import com.ruoyi.system.api.model.AddIntegralRecordVo; |
| | | import com.ruoyi.system.api.model.AppMiniLoginDto; |
| | | import com.ruoyi.system.api.model.AppMiniLoginVo; |
| | | import com.ruoyi.system.api.service.RemoteMemberService; |
| | |
| | | |
| | | |
| | | @Override |
| | | public R addIntegralRecord(Integer integral, Long userId, String orderId) { |
| | | public R addIntegralRecord(AddIntegralRecordVo addIntegralRecordVo) { |
| | | return R.fail("手动添加用户积分失败:" + throwable.getMessage()); |
| | | } |
| | | |
New file |
| | |
| | | package com.ruoyi.system.api.model; |
| | | |
| | | import lombok.Data; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2025/7/29 10:54 |
| | | */ |
| | | @Data |
| | | public class AddIntegralRecordVo { |
| | | private Integer integral; |
| | | |
| | | private Long userId; |
| | | |
| | | private String orderId; |
| | | } |
| | |
| | | import com.ruoyi.system.api.domain.poji.member.MemberGiftRecord; |
| | | import com.ruoyi.system.api.domain.vo.*; |
| | | import com.ruoyi.system.api.factory.RemoteMemberFallbackFactory; |
| | | import com.ruoyi.system.api.model.AddIntegralRecordVo; |
| | | import com.ruoyi.system.api.model.AppMiniLoginDto; |
| | | import com.ruoyi.system.api.model.AppMiniLoginVo; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/member/addIntegralRecord") |
| | | R addIntegralRecord(@RequestParam("integral") Integer integral, @RequestParam("userId") Long userId, @RequestParam("orderId") String orderId); |
| | | R addIntegralRecord(@RequestBody AddIntegralRecordVo addIntegralRecordVo); |
| | | |
| | | /** |
| | | * 添加奖品数据 |
| | |
| | | import com.ruoyi.system.api.domain.poji.member.Member; |
| | | import com.ruoyi.system.api.domain.poji.member.MemberGiftRecord; |
| | | import com.ruoyi.system.api.domain.poji.shop.Shop; |
| | | import com.ruoyi.system.api.model.AddIntegralRecordVo; |
| | | import com.ruoyi.system.api.model.AddOrderVo; |
| | | import com.ruoyi.system.api.service.RemoteCouponService; |
| | | import com.ruoyi.system.api.service.RemoteMemberService; |
| | |
| | | } |
| | | //中奖积分 |
| | | if (4 == lotteryEventPrize.getPrizeType()) { |
| | | remoteMemberService.addIntegralRecord(lotteryEventPrize.getNumber(), userId, id); |
| | | AddIntegralRecordVo addIntegralRecordVo = new AddIntegralRecordVo(); |
| | | addIntegralRecordVo.setIntegral(lotteryEventPrize.getNumber()); |
| | | addIntegralRecordVo.setUserId(userId); |
| | | addIntegralRecordVo.setOrderId(id); |
| | | remoteMemberService.addIntegralRecord(addIntegralRecordVo); |
| | | } |
| | | userLotteryEvent.setCreateTime(LocalDateTime.now()); |
| | | userLotteryEventService.save(userLotteryEvent); |
| | |
| | | a.cover_image as coverImage, |
| | | if(ifnull(b.num, 0) = 0, false, true) as participation, |
| | | CASE |
| | | WHEN NOW() > a.start_time and now() <= a.end_time and ifnull(b.num, 0) > 0 THEN 1 |
| | | WHEN NOW() > a.start_time and now() <= a.end_time and ifnull(b.num, 0) = 0 THEN 2 |
| | | ELSE 3 END as sort |
| | | WHEN NOW() > a.start_time and now() <= a.end_time and ifnull(b.num, 0) = 0 THEN 1 |
| | | WHEN NOW() > a.start_time and now() <= a.end_time and ifnull(b.num, 0) > 0 THEN 2 |
| | | WHEN NOW() < a.start_time THEN 3 |
| | | ELSE 4 END as sort |
| | | from t_lottery_event a |
| | | left join (select count(1) as num, lottery_event_id |
| | | from t_user_lottery_event |
| | |
| | | import com.ruoyi.system.api.domain.poji.member.MemberGiftRecord; |
| | | import com.ruoyi.system.api.domain.poji.shop.Shop; |
| | | import com.ruoyi.system.api.domain.vo.*; |
| | | import com.ruoyi.system.api.model.AddIntegralRecordVo; |
| | | import com.ruoyi.system.api.model.AppMiniLoginDto; |
| | | import com.ruoyi.system.api.model.AppMiniLoginVo; |
| | | import com.ruoyi.system.api.service.RemoteShopService; |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/addIntegralRecord") |
| | | public R addIntegralRecord(@RequestParam("integral") Integer integral, @RequestParam("userId") Long userId, @RequestParam("orderId") String orderId) { |
| | | return memberService.addIntegralRecord(integral, userId, orderId); |
| | | public R addIntegralRecord(@RequestBody AddIntegralRecordVo addIntegralRecordVo) { |
| | | return memberService.addIntegralRecord(addIntegralRecordVo.getIntegral(), addIntegralRecordVo.getUserId(), addIntegralRecordVo.getOrderId()); |
| | | } |
| | | |
| | | |
| | |
| | | one.setCreateTime(LocalDateTime.now()); |
| | | shopAppointableTimeService.save(one); |
| | | //发送短信给商家 |
| | | String msg = "{}"; |
| | | String msg = "{\"name\":\"\"}"; |
| | | try { |
| | | MsgUtils.sendMsg(shop.getShopownerPhone(), "", msg); |
| | | MsgUtils.sendMsg(shop.getShopownerPhone(), "SMS_491310429", msg); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |