jiangqs
2023-08-05 7c9dda6138ceea88a312583a3fcc9b2bb356fbc4
ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/activity/ActivityServiceImpl.java
@@ -29,6 +29,7 @@
import com.ruoyi.system.api.domain.vo.MgtSimpleShopVo;
import com.ruoyi.system.api.domain.vo.MgtUserIdByKeywordVo;
import com.ruoyi.system.api.service.RemoteConfigService;
import com.ruoyi.system.api.service.RemoteFileService;
import com.ruoyi.system.api.service.RemoteMemberService;
import com.ruoyi.system.api.service.RemoteShopService;
import org.redisson.api.RLock;
@@ -81,8 +82,12 @@
    @Resource
    private RedisService redisService;
    @Autowired
    private RedissonClient redissonClient;
    @Resource
    private RemoteFileService remoteFileService;
    /**
     * @param mgtActivityEditDto
@@ -122,6 +127,12 @@
            activityTotal.setRefundTotal(0);
            activityTotal.setOrderMoneyTotal(BigDecimal.ZERO);
            activityTotalService.save(activityTotal);
            CodeGetDto codeGetDto = new CodeGetDto();
            String url = "https://wxapp.hhhrt.cn/mini/activity?activityId="+activityId;
            codeGetDto.setUrl(url);
            codeGetDto.setFileName("activity-"+activityId);
            String codeUrl = remoteFileService.getAppOrderTotal(codeGetDto).getData();
            activity.setActivityCode(codeUrl);
        }
        // 获取活动开始时间和结束时间
        Date activityStartTime = mgtActivityEditDto.getActivityStartTime();
@@ -408,6 +419,7 @@
        String goodsId = activityGoodsGetDto.getGoodsId();
        Activity activity = this.getById(activityId);
        ActivityGoods activityGoods = activityGoodsService.getByGoodsId(activityId,goodsId);
        activityGoodsGetVo.setActivityName(activity.getActivityName());
        activityGoodsGetVo.setActivityPrice(activityGoods.getActivityPrice());
        activityGoodsGetVo.setActivitySubscription(activityGoods.getActivitySubscription());
        activityGoodsGetVo.setActivityStatus(activity.getActivityStatus());
@@ -596,4 +608,11 @@
    public List<MgtActivityListVo> listStaffActivity(StaffActivityListDto staffActivityListDto){
        return activityMapper.listStaffActivity(staffActivityListDto);
    }
    private void createActivityCode(String activityId){
    }
}