| | |
| | | import com.yeshi.fanli.dto.ConfigParamsDTO;
|
| | | import com.yeshi.fanli.entity.bus.activity.RecommendActivity;
|
| | | import com.yeshi.fanli.entity.bus.activity.RecommendActivityInviteInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.vip.UserLevelEnum;
|
| | | import com.yeshi.fanli.entity.dynamic.GoodsPicture;
|
| | | import com.yeshi.fanli.entity.dynamic.WXMPDynamicInfo;
|
| | | import com.yeshi.fanli.entity.goods.jd.NYouHuiGoods;
|
| | |
| | | import com.yeshi.fanli.service.inter.activity.ActivityUserService;
|
| | | import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
|
| | | import com.yeshi.fanli.service.inter.dynamic.DynamicInfoService;
|
| | | import com.yeshi.fanli.service.inter.dynamic.GoodsEvaluateService;
|
| | | import com.yeshi.fanli.service.inter.dynamic.WXMPDynamicInfoService;
|
| | | import com.yeshi.fanli.service.inter.goods.jd.NYouHuiService;
|
| | | import com.yeshi.fanli.service.inter.order.config.HongBaoManageService;
|
| | |
| | |
|
| | | @Resource
|
| | | private WXMPDynamicInfoService wxmpDynamicInfoService;
|
| | | |
| | |
|
| | | @Resource
|
| | | private ConvertLinkManager convertLinkManager;
|
| | |
|
| | |
| | | @Resource
|
| | | private JumpDetailV2Service jumpDetailV2Service;
|
| | |
|
| | | @Resource
|
| | | private GoodsEvaluateService goodsEvaluateService;
|
| | |
|
| | | /**
|
| | | * 每10分钟 晚上00:00~06:00不下发任何一个商品
|
| | | * 每10分钟 晚上00:00~06:00不下发任何一个商品
|
| | | */
|
| | | @Scheduled(cron = "0 0/10 6-23 * * ?")
|
| | | public void insetDynamicInfo() {
|
| | |
| | | }
|
| | |
|
| | | /**
|
| | | * 后台编辑动态: 每3分钟检索
|
| | | * 后台编辑动态: 每3分钟检索
|
| | | */
|
| | | @Scheduled(cron = "0 0/3 * * * ?")
|
| | | public void activityNeedPublish() {
|
| | |
| | |
|
| | | /**
|
| | | *
|
| | | * @Title: demoJobHandler
|
| | | * @Description: 更新小程序动态商品
|
| | | * @param param
|
| | | * @return
|
| | | * @throws Exception |
| | | * ReturnT<String> 返回类型
|
| | | * @throws
|
| | | * @Title: demoJobHandler @Description: 更新小程序动态商品 @param
|
| | | * param @return @throws Exception ReturnT<String> 返回类型 @throws
|
| | | */
|
| | | @XxlJob("dynamic-updateWXMPDynamicInfo")
|
| | | public ReturnT<String> updateWXMPDynamicInfoHandler(String param) throws Exception {
|
| | |
| | | return ReturnT.SUCCESS;
|
| | | }
|
| | |
|
| | |
|
| | | /**
|
| | | * 添加内优惠相关商品
|
| | | * @Title: addJDNYHInfo
|
| | | * @Description: |
| | | * void 返回类型
|
| | | * @throws
|
| | | * 添加内优惠相关商品 @Title: addJDNYHInfo @Description: void 返回类型 @throws
|
| | | */
|
| | | private void addJDNYHInfo() throws Exception {
|
| | |
|
| | |
| | | GoodsDetailVOFactory.convertJDGoods(jdGoods,
|
| | | new ConfigParamsDTO(hongBaoManageService.getFanLiRate(),
|
| | | hongBaoManageService.getShareRate(), null,
|
| | | hongBaoManageService.getVIPFanLiRate())));
|
| | | hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP))));
|
| | | picture.setGoodState(0);
|
| | | picture.setJumpDetail(jumpDetailV2Service.getByTypeCache("goodsdetail"));
|
| | | picture.setParams(null);
|
| | |
| | | else if (jdGoods.getImageList().size() > 1)
|
| | | lastPicture.addAll(jdGoods.getImageList().subList(1, jdGoods.getImageList().size()));
|
| | | }
|
| | | info.setShareMoney(totalMoney);
|
| | | int count = 0;
|
| | | while (imgs.size() < 4 && count < 4) {
|
| | | count++;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 动态发圈
|
| | | * |
| | | * @param param
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | // @Scheduled(cron = "0 0 6,7,15,16,21,22,23 * * ? ")
|
| | | @XxlJob("dynamic-insertEvaluate")
|
| | | public ReturnT<String> insertEvaluate(String param) throws Exception {
|
| | | try {
|
| | | goodsEvaluateService.addGoodsEvaluateByDaTaoKe();
|
| | | } catch (Exception e) {
|
| | | try {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | } catch (Exception e1) {
|
| | | e1.printStackTrace();
|
| | | }
|
| | | }
|
| | | return ReturnT.SUCCESS;
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 每一个小时随机在分享数的基础上加10~100。增加的时间段是每天8~22点。
|
| | | * 早上6,7,15,16,21,22,23点更新1次
|
| | | */
|
| | | @Scheduled(cron = "0 0 8,9,10,11,12,13,14,15,16,17,18,19,20,21,22 * * ? ")
|
| | | public void addRanDomShareCount() {
|
| | | if (!Constant.IS_TASK) {
|
| | | return;
|
| | | }
|
| | |
|
| | | try {
|
| | | goodsEvaluateService.addRanDomShareCount();
|
| | | } catch (Exception e) {
|
| | | try {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | } catch (Exception e1) {
|
| | | e1.printStackTrace();
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|