|
@@ -4734,9 +4734,11 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
expireDateTime = expireDateTime.toLocalDate().atTime(23, 59, 59);
|
|
expireDateTime = expireDateTime.toLocalDate().atTime(23, 59, 59);
|
|
|
Date updateTime = Date.from(expireDateTime.atZone(ZoneId.systemDefault()).toInstant());
|
|
Date updateTime = Date.from(expireDateTime.atZone(ZoneId.systemDefault()).toInstant());
|
|
|
|
|
|
|
|
- Long businessId = addLuckyBagCollectRecord(param.getLuckyBagId(),param.getUserId(),updateTime,String.valueOf(param.getCompanyUserId()),String.valueOf(param.getCompanyId()));
|
|
|
|
|
-
|
|
|
|
|
- return R.ok().put("data",businessId);
|
|
|
|
|
|
|
+ Map<String,Object> business = addLuckyBagCollectRecord(param.getLuckyBagId(),param.getUserId(),updateTime,String.valueOf(param.getCompanyUserId()),String.valueOf(param.getCompanyId()));
|
|
|
|
|
+ String json = configService.selectConfigByKey("luckyBag.config");
|
|
|
|
|
+ Map<String, Object> luckyBagConfig = JSON.parseObject(json, Map.class);
|
|
|
|
|
+ business.put("img",luckyBagConfig.get("miniprogramPicUrl"));
|
|
|
|
|
+ return R.ok().put("data",business);
|
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
return R.error("发放福袋失败!");
|
|
return R.error("发放福袋失败!");
|
|
@@ -4754,7 +4756,7 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
* @param companyId
|
|
* @param companyId
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- private Long addLuckyBagCollectRecord(Long luckyBagId,
|
|
|
|
|
|
|
+ private Map<String,Object> addLuckyBagCollectRecord(Long luckyBagId,
|
|
|
Long userId,
|
|
Long userId,
|
|
|
Date sendTime,
|
|
Date sendTime,
|
|
|
String companyUserId,
|
|
String companyUserId,
|
|
@@ -4810,7 +4812,10 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
log.info("福袋记录添加成功 [recordId:{}, luckyBagId:{}]", recordId, luckyBagId);
|
|
log.info("福袋记录添加成功 [recordId:{}, luckyBagId:{}]", recordId, luckyBagId);
|
|
|
- return recordId;
|
|
|
|
|
|
|
+ Map<String,Object> map = new HashMap<>();
|
|
|
|
|
+ map.put("recordId",recordId);
|
|
|
|
|
+ map.put("luckyBag",luckyBag);
|
|
|
|
|
+ return map;
|
|
|
|
|
|
|
|
} catch (NumberFormatException e) {
|
|
} catch (NumberFormatException e) {
|
|
|
log.error("ID转换失败 [companyId:{}, companyUserId:{}]", companyId, companyUserId, e);
|
|
log.error("ID转换失败 [companyId:{}, companyUserId:{}]", companyId, companyUserId, e);
|