| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.util.*;
|
| | | import org.springframework.core.task.TaskExecutor;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
| | | import com.yeshi.fanli.service.inter.order.config.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.user.UserGoodsStorageService;
|
| | | import com.yeshi.fanli.service.inter.user.UserShareGoodsRecordService;
|
| | | import com.yeshi.fanli.util.CommonGoodsUtil;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.factory.CommonGoodsFactory;
|
| | | import com.yeshi.fanli.util.jd.JDApiUtil;
|
| | | import com.yeshi.fanli.util.pinduoduo.PinDuoDuoApiUtil;
|
| | |
| | | private UserShareGoodsRecordService userShareGoodsRecordService;
|
| | | @Resource
|
| | | private HongBaoManageService hongBaoManageService;
|
| | |
|
| | | @Resource
|
| | | private UserInfoService userInfoService;
|
| | |
|
| | | @Override
|
| | | public int deleteByPrimaryKey(Long id) {
|
| | |
| | | FileUploadResult uploadResult = new FileUploadResult();
|
| | | uploadResult.setUrl(shareRecord.getSharePictureUrl());
|
| | |
|
| | | UserInfo user=userInfoService.selectByPKey(uid);
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("revenue", listGoodsBrief.size() + "个商品预估分享奖金:¥" + totalMoney);
|
| | | data.put("shareId", shareRecord.getRedisKey());
|
| | | data.put("shareImg", uploadResult);
|
| | | data.put("notifyDesc", configService.get(ConfigKeyEnum.goodsShareMultipleNotify.getKey()));
|
| | | data.put("notifyDesc", configService.getValue(ConfigKeyEnum.goodsShareMultipleNotify.getKey(), user.getSystem()));
|
| | | return data;
|
| | | }
|
| | |
|
| | |
| | | data.put("shareId", shareRecord.getRedisKey());
|
| | | data.put("shareImg", uploadResult);
|
| | |
|
| | | SystemEnum system=userInfoService.getUserSystem(uid);
|
| | | // 提示语不同
|
| | | if (goodsType == Constant.SOURCE_TYPE_JD) {
|
| | | // 京东
|
| | | data.put("notifyDesc", configService.get(ConfigKeyEnum.goodsShareNotifyJD.getKey()));
|
| | | data.put("notifyDesc", configService.getValue(ConfigKeyEnum.goodsShareNotifyJD.getKey(),system));
|
| | | } else if (goodsType == Constant.SOURCE_TYPE_PDD) {
|
| | | // 拼多多
|
| | | data.put("notifyDesc", configService.get(ConfigKeyEnum.goodsShareNotifyPDD.getKey()));
|
| | | data.put("notifyDesc", configService.getValue(ConfigKeyEnum.goodsShareNotifyPDD.getKey(),system));
|
| | | } else {
|
| | | data.put("notifyDesc", configService.get(ConfigKeyEnum.goodsShareMultipleNotify.getKey()));
|
| | | data.put("notifyDesc", configService.getValue(ConfigKeyEnum.goodsShareMultipleNotify.getKey(),system));
|
| | | }
|
| | | return data;
|
| | | }
|