| | |
| | | }
|
| | |
|
| | | /**
|
| | | * 用户基础信息查询
|
| | | * @param callback
|
| | | * @param pageIndex
|
| | | * @param pageSize
|
| | | * @param key
|
| | | * @param keyType
|
| | | * @param rank
|
| | | * @param userType
|
| | | * @param days
|
| | | * @param startTime
|
| | | * @param endTime
|
| | | * @param type
|
| | | * @param level
|
| | | * @param activeCode
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "queryInfo")
|
| | | public void queryInfo(String callback, Integer pageIndex, Integer pageSize, String key, Integer keyType, Integer rank,Integer userType,
|
| | | Integer days, String startTime, String endTime, Integer state,String level,
|
| | | Integer activeCode, PrintWriter out) {
|
| | | try {
|
| | | if (pageIndex == null)
|
| | | pageIndex = 1;
|
| | |
|
| | | if (pageSize == null)
|
| | | pageSize = Constant.PAGE_SIZE;
|
| | |
|
| | | String userRank = null;
|
| | | if (rank != null) {
|
| | | switch (rank) {
|
| | | case 1:
|
| | | userRank = "青铜";
|
| | | break;
|
| | | case 2:
|
| | | userRank = "白银";
|
| | | break;
|
| | | case 3:
|
| | | userRank = "黄金";
|
| | | break;
|
| | | case 4:
|
| | | userRank = "铂金";
|
| | | break;
|
| | | default:
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | List<UserInfoVO> userList = userInfoService.queryInfo((pageIndex - 1) * pageSize, pageSize, state, key, keyType,
|
| | | userRank, days, startTime, endTime, userType, level, activeCode);
|
| | |
|
| | | if (userList == null || userList.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无相关数据"));
|
| | | return;
|
| | | }
|
| | |
|
| | | long count = userInfoService.countInfo(state, key, keyType, userRank, days, startTime, endTime,userType, level, activeCode);
|
| | |
|
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
|
| | |
|
| | | GsonBuilder gsonBuilder = new GsonBuilder();
|
| | | gsonBuilder.serializeNulls();
|
| | | Gson gson = gsonBuilder.create();
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("pe", pe);
|
| | | data.put("resultList", gson.toJson(userList));
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 统计今日用户总情况
|
| | | *
|
| | | * @param callback
|
| | |
| | | import com.google.gson.GsonBuilder;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.cloud.UserCloud;
|
| | | import com.yeshi.fanli.entity.bus.user.cloud.UserCloudGoods;
|
| | | import com.yeshi.fanli.entity.bus.user.cloud.UserCloudGroup;
|
| | | import com.yeshi.fanli.entity.bus.user.cloud.UserCloudOrder;
|
| | | import com.yeshi.fanli.entity.bus.user.cloud.UserCloudSendContent;
|
| | | import com.yeshi.fanli.entity.bus.user.cloud.UserCloudSendRecord;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.dynamic.GoodsEvaluateService;
|
| | | import com.yeshi.fanli.service.inter.order.OrderHongBaoMoneyComputeService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.cloud.UserCloudGoodsService;
|
| | | import com.yeshi.fanli.service.inter.user.cloud.UserCloudGroupService;
|
| | | import com.yeshi.fanli.service.inter.user.cloud.UserCloudManageService;
|
| | | import com.yeshi.fanli.service.inter.user.cloud.UserCloudOrderService;
|
| | | import com.yeshi.fanli.service.inter.user.cloud.UserCloudSendContentService;
|
| | | import com.yeshi.fanli.service.inter.user.cloud.UserCloudSendRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.cloud.UserCloudService;
|
| | | import com.yeshi.fanli.service.manger.alipay.UserCloudAlipayManager;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | |
| | | private UserInfoService userInfoService;
|
| | |
|
| | | @Resource
|
| | | private OrderHongBaoMoneyComputeService orderHongBaoMoneyComputeService;
|
| | | private UserCloudSendRecordService userCloudSendRecordService;
|
| | |
|
| | | @Resource
|
| | | private UserCloudManageService userCloudManageService;
|
| | |
| | |
|
| | | @Resource
|
| | | private GoodsEvaluateService goodsEvaluateService;
|
| | | |
| | | @Resource
|
| | | private UserCloudSendContentService userCloudSendContentService;
|
| | |
|
| | |
|
| | |
|
| | |
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 查询发送记录
|
| | | * @param callback
|
| | | * @param pageIndex
|
| | | * @param pageSize
|
| | | * @param key
|
| | | * @param origin
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "querySendRecord")
|
| | | public void querySendRecord(String callback, Integer pageIndex, Integer pageSize, String key, Integer origin, PrintWriter out) {
|
| | | try {
|
| | | if (pageIndex == null)
|
| | | pageIndex = 1;
|
| | | if (pageSize == null)
|
| | | pageSize = Constant.PAGE_SIZE;
|
| | | List<UserCloudSendRecord> list = userCloudSendRecordService.query(pageIndex, pageSize, key, origin);
|
| | | if (list == null || list.size() == 0) {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("暂无数据")));
|
| | | return;
|
| | | }
|
| | | |
| | | for (UserCloudSendRecord userCloud: list) {
|
| | | UserInfo userInfo = userInfoService.getUserByIdWithMybatis(userCloud.getUid());
|
| | | if (userInfo == null)
|
| | | continue;
|
| | | |
| | | userCloud.setNickName(userInfo.getNickName());
|
| | | userCloud.setPortrait(userInfo.getPortrait());
|
| | | }
|
| | | |
| | | GsonBuilder gsonBuilder = new GsonBuilder();
|
| | | gsonBuilder.serializeNulls(); // 重点
|
| | | Gson gson = gsonBuilder.setDateFormat("yyyy/MM/dd HH:mm:ss").create();
|
| | |
|
| | | long count = userCloudSendRecordService.count(key, origin);
|
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
|
| | | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("pe", pe);
|
| | | data.put("list", gson.toJson(list));
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(data)));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("操作异常")));
|
| | | e.printStackTrace();
|
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | | |
| | | /**
|
| | | * 查询发送内容
|
| | | * @param callback
|
| | | * @param pid
|
| | | * @param origin
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getSendContent")
|
| | | public void getSendContent(String callback, String pid, Integer origin, PrintWriter out) {
|
| | | try {
|
| | | List<UserCloudSendContent> list = userCloudSendContentService.getByPid(pid);
|
| | | if (list == null || list.size() == 0) {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("暂无数据")));
|
| | | return;
|
| | | }
|
| | | |
| | | GsonBuilder gsonBuilder = new GsonBuilder();
|
| | | gsonBuilder.serializeNulls(); // 重点
|
| | | Gson gson = gsonBuilder.setDateFormat("yyyy/MM/dd HH:mm:ss").create();
|
| | |
|
| | | long count = list.size();
|
| | | int totalPage = (int) (count % 20 == 0 ? count / 20 : count / 20 + 1);
|
| | | PageEntity pe = new PageEntity(1, 20, count, totalPage);
|
| | | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("pe", pe);
|
| | | data.put("list", gson.toJson(list));
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(data)));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("操作异常")));
|
| | | e.printStackTrace();
|
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | | |
| | | /**
|
| | | * 查询用户群信息
|
| | | * @param callback
|
| | | * @param uid
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getUserGroups")
|
| | | public void getUserGroups(String callback, Long uid, PrintWriter out) {
|
| | | try {
|
| | | List<UserCloudGroup> list = userCloudGroupService.listByUid(uid);
|
| | | if (list == null || list.size() == 0) {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("暂无数据")));
|
| | | return;
|
| | | }
|
| | | |
| | | GsonBuilder gsonBuilder = new GsonBuilder();
|
| | | gsonBuilder.serializeNulls(); // 重点
|
| | | Gson gson = gsonBuilder.setDateFormat("yyyy/MM/dd HH:mm:ss").create();
|
| | |
|
| | | long count = list.size();
|
| | | int totalPage = (int) (count % 20 == 0 ? count / 20 : count / 20 + 1);
|
| | | PageEntity pe = new PageEntity(1, 20, count, totalPage);
|
| | | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("pe", pe);
|
| | | data.put("list", gson.toJson(list));
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(data)));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("操作异常")));
|
| | | e.printStackTrace();
|
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 开通成功记录
|
| | | * @param callback
|
| | | * @param pageIndex
|
| | | * @param key
|
| | | * @param state
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "queryGoodsList")
|
| | | public void queryGoodsList(String callback, Integer pageIndex, Integer pageSize, String key, PrintWriter out) {
|
| | | try {
|
| | | if (pageIndex == null)
|
| | | pageIndex = 1;
|
| | | if (pageSize == null)
|
| | | pageSize = Constant.PAGE_SIZE;
|
| | | |
| | | List<UserCloudGoods> list = userCloudGoodsService.query(pageIndex, pageSize, key);
|
| | | if (list == null || list.size() == 0) {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("暂无数据")));
|
| | | return;
|
| | | }
|
| | | |
| | | for (UserCloudGoods userCloud: list) {
|
| | | UserInfo userInfo = userInfoService.getUserByIdWithMybatis(userCloud.getUid());
|
| | | if (userInfo == null)
|
| | | continue;
|
| | | |
| | | userCloud.setNickName(userInfo.getNickName());
|
| | | userCloud.setPortrait(userInfo.getPortrait());
|
| | | }
|
| | | |
| | | GsonBuilder gsonBuilder = new GsonBuilder();
|
| | | gsonBuilder.serializeNulls(); // 重点
|
| | | Gson gson = gsonBuilder.setDateFormat("yyyy/MM/dd HH:mm:ss").create();
|
| | |
|
| | | long count = userCloudGoodsService.count(key);
|
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
|
| | | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("pe", pe);
|
| | | data.put("list", gson.toJson(list));
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(data)));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("操作异常")));
|
| | | e.printStackTrace();
|
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | }
|
| | |
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.FloatAD;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.FloatAD.FloatADTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgDeviceReadState;
|
| | | import com.yeshi.fanli.entity.bus.user.ThreeSale;
|
| | | import com.yeshi.fanli.entity.bus.user.UserActiveLog;
|
| | |
| | |
|
| | | // 云发单链接
|
| | | if (VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | data.put("cloudLink", configService.get(ConfigKeyEnum.robotCloudLink.getKey())); |
| | | // 验证是否开启
|
| | | String cloudState = configService.getByVersion(ConfigKeyEnum.robotCloudOpen.getKey(), acceptData.getPlatform(),
|
| | | Integer.parseInt(acceptData.getVersion()));
|
| | | if (!StringUtil.isNullOrEmpty(cloudState) && "1".equals(cloudState)) {
|
| | | data.put("cloudLink", configService.get(ConfigKeyEnum.robotCloudLink.getKey())); |
| | | }
|
| | | }
|
| | | |
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult("获取失败"));
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | } else if (type == Constant.SOURCE_TYPE_VIP) {
|
| | | if (!NumberUtil.isNumeric(orderId) || (orderId.length() < 10 || orderId.length() > 18)) {
|
| | | orderNum = false;
|
| | | }
|
| | | } else if (type == Constant.SOURCE_TYPE_SUNING) {
|
| | | if (!NumberUtil.isNumeric(orderId) || (orderId.length() < 10 || orderId.length() > 15)) {
|
| | | orderNum = false;
|
| | | }
|
| | | }
|
| | |
|
| | | if (lostOrder.getUserInfo() == null || lostOrder.getUserInfo().getId() == null
|
| | |
| | | import com.yeshi.fanli.entity.taobao.TaoBaoLink; |
| | | import com.yeshi.fanli.exception.goods.ConvertLinkExceptionException; |
| | | import com.yeshi.fanli.exception.share.ShareGoodsException; |
| | | import com.yeshi.fanli.exception.user.cloud.UserCloudException; |
| | | import com.yeshi.fanli.log.LogHelper; |
| | | import com.yeshi.fanli.service.inter.common.JumpDetailV2Service; |
| | | import com.yeshi.fanli.service.inter.config.ConfigService; |
| | |
| | | if (!VersionUtil.greaterThan_2_1_1(acceptData.getPlatform(), acceptData.getVersion())) { |
| | | listNew.addAll(list); |
| | | } else if (list.size() > 0) { // 活动图片不允许跳转 |
| | | |
| | | // 云发单是否开启 |
| | | String cloudState = configService.getByVersion(ConfigKeyEnum.robotCloudOpen.getKey(), acceptData.getPlatform(), |
| | | Integer.parseInt(acceptData.getVersion())); |
| | | boolean cloudOpen = false; |
| | | if (!StringUtil.isNullOrEmpty(cloudState) && "1".equals(cloudState)) { |
| | | cloudOpen = true; |
| | | } |
| | | |
| | | for (GoodsEvaluate goodsEvaluate : list) { |
| | | EvaluateEnum evaluateEnum = goodsEvaluate.getType(); |
| | | // 单品 活动可以一键云发单 |
| | | if (evaluateEnum == EvaluateEnum.activity || evaluateEnum == EvaluateEnum.single ) { |
| | | if (cloudOpen && evaluateEnum == EvaluateEnum.activity || evaluateEnum == EvaluateEnum.single ) { |
| | | goodsEvaluate.setCloud(true); |
| | | } |
| | | |
| | | |
| | | if (evaluateEnum != EvaluateEnum.activity) { |
| | | listNew.add(goodsEvaluate); |
| | |
| | | import com.yeshi.fanli.dto.pdd.PDDPromotionUrl;
|
| | | import com.yeshi.fanli.dto.pdd.PDDSearchFilter;
|
| | | import com.yeshi.fanli.dto.suning.SuningGoodsInfo;
|
| | | import com.yeshi.fanli.dto.suning.SuningGoodsInfoRecommend;
|
| | | import com.yeshi.fanli.dto.taobao.DaTaoKeFilterResult;
|
| | | import com.yeshi.fanli.dto.vip.VIPConvertResultDTO;
|
| | | import com.yeshi.fanli.dto.vip.goods.VIPGoodsInfo;
|
| | |
| | |
|
| | |
|
| | | if (VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | getCloudInfo(goodsDetail, extraVO); // 云发单文案信息
|
| | | getCloudInfo(acceptData, goodsDetail, extraVO); // 云发单文案信息
|
| | | }
|
| | |
|
| | | JSONObject object = new JSONObject();
|
| | |
| | | extraVO.setShare(shareInfoVO);
|
| | |
|
| | | if (VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | getCloudInfo(goodsDetail, extraVO); // 云发单文案信息
|
| | | getCloudInfo(acceptData, goodsDetail, extraVO); // 云发单文案信息
|
| | | }
|
| | |
|
| | | JSONObject object = new JSONObject();
|
| | |
| | | }
|
| | |
|
| | | if (VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | getCloudInfo(goodsDetail, extraVO); // 云发单文案信息
|
| | | getCloudInfo(acceptData, goodsDetail, extraVO); // 云发单文案信息
|
| | | }
|
| | |
|
| | | JSONObject object = new JSONObject();
|
| | |
| | | extraVO.setShare(shareInfoVO);
|
| | |
|
| | | // 云发单文案信息
|
| | | getCloudInfo(goodsDetail, extraVO); |
| | | getCloudInfo(acceptData, goodsDetail, extraVO); |
| | |
|
| | | JSONObject object = new JSONObject();
|
| | | object.put("extra", JsonUtil.getApiCommonGson().toJson(extraVO));
|
| | |
| | | extraVO.setShare(shareInfoVO);
|
| | |
|
| | | // 云发单文案信息
|
| | | getCloudInfo(goodsDetail, extraVO); |
| | | getCloudInfo(acceptData, goodsDetail, extraVO); |
| | |
|
| | | JSONObject object = new JSONObject();
|
| | | object.put("extra", JsonUtil.getApiCommonGson().toJson(extraVO));
|
| | |
| | | * // 云发单文案信息
|
| | | * @param goodsDetail
|
| | | */
|
| | | private void getCloudInfo(GoodsDetailVO goodsDetail, GoodsDetailExtraVO extraVO) {
|
| | | private void getCloudInfo(AcceptData acceptData, GoodsDetailVO goodsDetail, GoodsDetailExtraVO extraVO) {
|
| | | // 云发单是否开启
|
| | | String cloudState = configService.getByVersion(ConfigKeyEnum.robotCloudOpen.getKey(), acceptData.getPlatform(),
|
| | | Integer.parseInt(acceptData.getVersion()));
|
| | | if (!StringUtil.isNullOrEmpty(cloudState) && "1".equals(cloudState)) {
|
| | | extraVO.setCloudOpen(true);
|
| | | }
|
| | | |
| | | |
| | | if (!goodsDetail.isHasCoupon()) {
|
| | | return;
|
| | | }
|
| | | |
| | | GoodsEvaluate evaluate = goodsEvaluateService.queryExistSingle(goodsDetail.getGoodsId() +"", goodsDetail.getGoodsType());
|
| | | if (evaluate != null) {
|
| | | String cloudText = null;
|
| | |
| | | }
|
| | |
|
| | | try {
|
| | |
|
| | | // 京东
|
| | | if (goodsType == Constant.SOURCE_TYPE_JD) {
|
| | | JSONObject data = new JSONObject();
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (goodsType == Constant.SOURCE_TYPE_SUNING) {
|
| | | // 猜你喜欢
|
| | |
|
| | | // 唯品会
|
| | | if (goodsType == Constant.SOURCE_TYPE_VIP) {
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("listGuess", JsonUtil.getApiCommonGson().toJson(new ArrayList<GoodsDetailVO>()));
|
| | | data.put("listQuality", JsonUtil.getApiCommonGson().toJson(new ArrayList<GoodsDetailVO>()));
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | return;
|
| | | }
|
| | | |
| | | // 苏宁
|
| | | if (goodsType == Constant.SOURCE_TYPE_SUNING) {
|
| | | List<SuningGoodsInfo> resultList = null;
|
| | | String[] ids = SuningUtil.getGoodsIdDetail(id);
|
| | | List<SuningGoodsInfoRecommend> list = SuningApiUtil.getRecommendGoods(ids[1], ids[0]);
|
| | | if (list != null && list.size() > 0) {
|
| | | List<String> listId = new ArrayList<>();
|
| | | for (SuningGoodsInfoRecommend goodsInfo: list) {
|
| | | if (goodsInfo != null) {
|
| | | listId.add(goodsInfo.getCommodityCode() + "-" + goodsInfo.getSupplierCode());
|
| | | }
|
| | | }
|
| | | resultList = SuningApiUtil.getGoodsDetailList(listId);
|
| | | }
|
| | | |
| | | List<GoodsDetailVO> listDetailVO = new ArrayList<GoodsDetailVO>();
|
| | | if (resultList != null) {
|
| | | if (resultList != null && resultList.size() > 0) {
|
| | | ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(),
|
| | | acceptData.getVersion());
|
| | |
|
| | | for (SuningGoodsInfo goods : resultList) {
|
| | | GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertSuningGoods(goods, paramsDTO);
|
| | | listDetailVO.add(goodsDetailVO);
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("listQuality", JsonUtil.getApiCommonGson().toJson(listDetailVO));
|
| | | data.put("listGuess", JsonUtil.getApiCommonGson().toJson(new ArrayList<GoodsDetailVO>()));
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | return;
|
| | | }
|
| | | |
| | | List<TaoBaoGoodsBrief> goodsList = TaoKeApiUtil.guessLikeByAuctionId(Long.parseLong(id), 10);
|
| | | // 初始化
|
| | | if (goodsList == null) {
|
| | |
| | | }
|
| | |
|
| | | List<GoodsDetailVO> listExtra = new ArrayList<GoodsDetailVO>();
|
| | | TaoKeAppInfo app = new TaoKeAppInfo();
|
| | | app.setAppKey(TaoBaoConstant.TAOBAO_AUTH_APPKEY);
|
| | | app.setAppSecret(TaoBaoConstant.TAOBAO_AUTH_APPSECRET);
|
| | | app.setAdzoneId(TaoBaoConstant.TAOBAO_SPECIAL_PID_DEFAULT.split("_")[3]);
|
| | | app.setPid(TaoBaoConstant.TAOBAO_SPECIAL_PID_DEFAULT);
|
| | |
|
| | | List<Long> ids = new ArrayList<>();
|
| | | for (TaoBaoGoodsBrief goods : goodsList)
|
| | | ids.add(goods.getAuctionId());
|
| | |
|
| | | try {
|
| | | goodsList = TaoKeApiUtil.getBatchGoodsInfo(ids);
|
| | | } catch (TaoKeApiException e1) {
|
| | | } catch (TaobaoGoodsDownException e1) {
|
| | | }
|
| | |
|
| | | if (goodsList != null && goodsList.size() > 0) {
|
| | |
|
| | | ConfigParamsDTO paramsDTO = getParamsDTO(acceptData.getPlatform(), acceptData.getVersion(), null);
|
| | |
|
| | | goodsList.parallelStream().forEach(goods -> {
|
| | | if (goods != null) {
|
| | | // 获取详情
|
| | | TaoBaoGoodsBrief taoBaoGoodsBrief = null;
|
| | | try {
|
| | | taoBaoGoodsBrief = taoBaoGoodsCacheUtil.getCommonTaoBaoGoodsInfo(goods.getAuctionId());
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | if (taoBaoGoodsBrief == null) {
|
| | | TaoBaoGoodsBrief newGoods = TaoKeApiUtil.specialConvertCoupon(goods.getAuctionId(), app);
|
| | | goods.setCouponInfo(newGoods.getCouponInfo());
|
| | | goods.setCouponLink(newGoods.getCouponLink());
|
| | | goods.setTkRate(newGoods.getTkRate());
|
| | | taoBaoGoodsBrief = goods;
|
| | | }
|
| | |
|
| | | if (taoBaoGoodsBrief != null) {
|
| | | listExtra.add(GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, paramsDTO));
|
| | | }
|
| | | }
|
| | | });
|
| | | }
|
| | | ConfigParamsDTO paramsDTO = getParamsDTO(acceptData.getPlatform(), acceptData.getVersion(), null);
|
| | | goodsList.parallelStream().forEach(goods -> {
|
| | | if (goods != null) { |
| | | listExtra.add(GoodsDetailVOFactory.convertTaoBao(goods, paramsDTO));
|
| | | }
|
| | | });
|
| | |
|
| | | List<GoodsDetailVO> listQuality = new ArrayList<GoodsDetailVO>();
|
| | | // 取偶数个数据
|
| | |
| | | import com.yeshi.fanli.dto.pdd.PDDGoodsDetail;
|
| | | import com.yeshi.fanli.dto.pdd.PDDGoodsResult;
|
| | | import com.yeshi.fanli.dto.pdd.PDDSearchFilter;
|
| | | import com.yeshi.fanli.dto.suning.SuningCommodityInfo;
|
| | | import com.yeshi.fanli.dto.suning.SuningGoodsInfo;
|
| | | import com.yeshi.fanli.dto.suning.SuningQueryModel;
|
| | | import com.yeshi.fanli.dto.vip.VIPSearchFilter;
|
| | |
| | | SuningQueryModel searchFilter = new SuningQueryModel();
|
| | | searchFilter.setKeyword(key);
|
| | | searchFilter.setPageIndex(page);
|
| | | searchFilter.setSize(Constant.PAGE_SIZE);
|
| | | searchFilter.setSize(10);
|
| | |
|
| | | if (order != null) {
|
| | | if (order == 1) { // 销量高到低
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | int count = 0;
|
| | | JSONObject data = new JSONObject();
|
| | | JSONArray array = new JSONArray();
|
| | |
|
| | | List<SuningGoodsInfo> resultList = SuningApiUtil.searchGoods(searchFilter);
|
| | | List<SuningGoodsInfo> resultList = null;
|
| | | List<SuningGoodsInfo> list = SuningApiUtil.searchGoodsOld(searchFilter);
|
| | | if (list != null && list.size() > 0) {
|
| | | List<String> listId = new ArrayList<>();
|
| | | for (SuningGoodsInfo goodsInfo: list) {
|
| | | SuningCommodityInfo info = goodsInfo.getCommodityInfo();
|
| | | if (info != null) {
|
| | | listId.add(info.getCommodityCode() + "-" + info.getSupplierCode());
|
| | | }
|
| | | }
|
| | | resultList = SuningApiUtil.getGoodsDetailList(listId);
|
| | | }
|
| | | |
| | | if (resultList != null) {
|
| | | if (resultList.size() == 0)
|
| | | count = 0;
|
| | | else
|
| | | count = resultList.size() + 1;
|
| | | Gson gson = JsonUtil.getApiCommonGson();
|
| | | if (resultList != null && resultList.size() > 0) {
|
| | | ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(),
|
| | |
| | | }
|
| | |
|
| | | data.put("result", array);
|
| | | data.put("count", count);
|
| | | data.put("count", 1000);
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | |
| | | shareInfo.setDescText(descText); |
| | | |
| | | // |
| | | String imgs = configService.getByVersion(ConfigKeyEnum.goodsShareNotifyImgs.getKey(), acceptData.getPlatform(), |
| | | String imgs = configService.getByVersion(ConfigKeyEnum.goodsShareNotifyImgsVIP.getKey(), acceptData.getPlatform(), |
| | | Integer.parseInt(acceptData.getVersion())); |
| | | JSONArray array = JSONArray.fromObject(imgs); |
| | | shareInfo.setNotifyPicture(imgs); |
| | | shareInfo.setNotifyPictureNew(imgs); |
| | | |
| | | shareInfo.setNotifyPicture(array.size() > 1 ? array.optString(1) : array.optString(0)); |
| | | |
| | | // 2.0.7版本后的提示图片 |
| | | imgs = configService.get(ConfigKeyEnum.goodsShareNotifyImgs207.getKey()); |
| | | array = JSONArray.fromObject(imgs); |
| | | shareInfo.setNotifyPictureNew(array.size() > 1 ? array.optString(1) : array.optString(0)); |
| | | |
| | | shareInfo.setNotifyDesc(configService.get(ConfigKeyEnum.goodsShareNotifyPDD.getKey())); |
| | | shareInfo.setNotifyDesc(configService.get(ConfigKeyEnum.goodsShareNotifyVIP.getKey())); |
| | | |
| | | // 添加分享记录 |
| | | BigDecimal shareRate = hongBaoManageService.getShareRate(); |
| | |
| | | String recommendText = ""; |
| | | String qtemplate = configService.get(ConfigKeyEnum.quickShareGoodsText.getKey()); |
| | | recommendText = qtemplate.replace("[商品标题]", goods.getGoodsName()); |
| | | |
| | | recommendText = recommendText.replace("销量:[销量]", ""); |
| | | recommendText = recommendText.replace("推荐理由:[推荐语]", ""); |
| | | |
| | | String quickCommentText = configService.get(ConfigKeyEnum.quickSharePDDCommentText.getKey()); |
| | | commentText = quickCommentText.replace("[原价]", goods.getMarketPrice()); |
| | | commentText = commentText.replace("[链接]", jumpLink.getUrl()); |
| | | |
| | | commentText = commentText.replace("领券抢购", "抢购"); |
| | | commentText = commentText.replace("【券后价】[券后价]元", ""); |
| | | recommendText = recommendText.replace("优惠券:[券面额]元", ""); |
| | | |
| | | String quickCommentText = configService.get(ConfigKeyEnum.quickShareVIPCommentText.getKey()); |
| | | commentText = commentText.replace("[链接]", jumpLink.getUrl()); |
| | | commentText = quickCommentText.replace("[在售价]", BigDecimalUtil.getWithNoZera(new BigDecimal(goods.getMarketPrice())).toString()); |
| | | commentText = commentText.replace("[折扣价]", "" +MoneyBigDecimalUtil.getWithNoZera(new BigDecimal(goods.getVipPrice()))); |
| | | |
| | | shareInfo.setRecommendText(deleteBlankLine(recommendText)); |
| | | shareInfo.setCommentText(deleteBlankLine(commentText)); |
| | | |
| | |
| | | if (imgList == null) { |
| | | imgList = new ArrayList<>(); |
| | | } |
| | | |
| | | if (imgList.size() > 10) { |
| | | imgList = imgList.subList(0, 9); |
| | | } |
| | | |
| | | history.setPictures(JsonUtil.getGson().toJson(imgList)); |
| | | shareGoodsService.addShareGoodsHistory(history); |
| | | } |
| | |
| | | hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP)))); |
| | | } |
| | | |
| | | String template = shareGoodsTextTemplateService.getTextTemplateByVIP(uid); |
| | | String shareText = shareGoodsTextTemplateService.createContentSuning(template, goods, jumpLink); |
| | | String template = shareGoodsTextTemplateService.getTextTemplateBySuNing(uid); |
| | | //String shareText = shareGoodsTextTemplateService.createQuickShareTextSuNing(template, goods, jumpLink); |
| | | |
| | | String shareText = shareGoodsTextTemplateService.createCommonShareTextSuNing(template, goods, jumpLink); |
| | | shareInfo.setShareText(shareText); |
| | | |
| | | String descText = shareText.replace(goods.getCommodityInfo().getCommodityName(), "").trim(); |
| | |
| | | |
| | | String inviteCode = userInfoExtraService.getInviteCodeByUid(uid); |
| | | |
| | | String commodityPrice = goods.getCommodityInfo().getCommodityPrice(); |
| | | if (StringUtil.isNullOrEmpty(commodityPrice)) { |
| | | commodityPrice = goods.getCommodityInfo().getSnPrice(); |
| | | } |
| | | |
| | | String commentText = ""; |
| | | String recommendText = ""; |
| | | String qtemplate = configService.get(ConfigKeyEnum.quickShareGoodsText.getKey()); |
| | |
| | | |
| | | recommendText = recommendText.replace("推荐理由:[推荐语]", ""); |
| | | |
| | | String quickCommentText = configService.get(ConfigKeyEnum.quickSharePDDCommentText.getKey()); |
| | | commentText = quickCommentText.replace("[原价]", goods.getCommodityInfo().getCommodityPrice()); |
| | | |
| | | String quickCommentText = configService.get(ConfigKeyEnum.quickShareSuNingCommentText.getKey()); |
| | | commentText = quickCommentText.replace("[原价]", BigDecimalUtil.getWithNoZera(new BigDecimal(commodityPrice)).toString()); |
| | | commentText = commentText.replace("[链接]", jumpLink); |
| | | |
| | | |
| | | commentText = commentText.replace("领券抢购", "抢购"); |
| | | commentText = commentText.replace("【券后价】[券后价]元", ""); |
| | | recommendText = recommendText.replace("优惠券:[券面额]元", ""); |
| | | |
| | | String salesCountMidea = ""; |
| | | Integer count = Integer.parseInt(goods.getCommodityInfo().getMonthSales()); |
| | | if (count < 10000) { |
| | | salesCountMidea = count + ""; |
| | | } else { |
| | | double sales = count; |
| | | salesCountMidea = String.format("%.1f", sales / 10000); |
| | | salesCountMidea = salesCountMidea + "万"; |
| | | } |
| | | if (StringUtil.isNullOrEmpty(salesCountMidea) || salesCountMidea.equals("0")) { |
| | | recommendText = recommendText.replace("销量:[销量]", ""); |
| | | } else { |
| | | recommendText = recommendText.replace("[销量]", salesCountMidea.replace("万", "w")); |
| | | } |
| | | |
| | | |
| | | if (goods.getCouponInfo() != null && !StringUtil.isNullOrEmpty(goods.getCouponInfo().getCouponUrl())) {// 有券 |
| | | BigDecimal amount = new BigDecimal(goods.getCouponInfo().getCouponValue()); |
| | | BigDecimal startFee = new BigDecimal(goods.getCouponInfo().getBounsLimit()); |
| | | BigDecimal zkPrice = new BigDecimal(commodityPrice); |
| | | BigDecimal couponPrice = zkPrice; |
| | | if (zkPrice.compareTo(startFee) >= 0) { |
| | | couponPrice = zkPrice.subtract(amount); |
| | | } |
| | | recommendText = recommendText.replace("[券面额]", |
| | | BigDecimalUtil.getWithNoZera(new BigDecimal(goods.getCouponInfo().getCouponValue())).toString()); |
| | | commentText = commentText.replace("[券后价]",BigDecimalUtil.getWithNoZera(couponPrice).toString()); |
| | | } else { |
| | | commentText = commentText.replace("领券抢购", "抢购"); |
| | | commentText = commentText.replace("【券后价】[券后价]元", ""); |
| | | recommendText = recommendText.replace("优惠券:[券面额]元", ""); |
| | | } |
| | | |
| | | shareInfo.setRecommendText(deleteBlankLine(recommendText)); |
| | | shareInfo.setCommentText(deleteBlankLine(commentText)); |
| | | |
| | |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "viewShareTextTemplate", method = RequestMethod.POST) |
| | | public void viewShareTextTemplate(AcceptData acceptData, Long uid, String template, Integer goodsType, Long goodsId, |
| | | public void viewShareTextTemplate(AcceptData acceptData, Long uid, String template, Integer goodsType, String goodsId, |
| | | Long tljId, Boolean hasCoupon, PrintWriter out) { |
| | | if (uid == null) { |
| | | out.print(JsonUtil.loadFalseResult(1, "用户未登录")); |
| | |
| | | return; |
| | | } |
| | | |
| | | if (goodsType == null || goodsType > 3 || goodsType < 1) { |
| | | out.print(JsonUtil.loadFalseResult(3, "平台类型不正确")); |
| | | return; |
| | | } |
| | | |
| | | if (goodsType == Constant.SOURCE_TYPE_TAOBAO) { |
| | | createTaoBaoViewText(goodsType, uid, template, goodsId, tljId, hasCoupon, out); |
| | | createTaoBaoViewText(goodsType, uid, template,Long.parseLong(goodsId) , tljId, hasCoupon, out); |
| | | return; |
| | | } |
| | | |
| | | if (goodsType == Constant.SOURCE_TYPE_JD) { |
| | | createJDViewText(goodsType, uid, template, goodsId, hasCoupon, out); |
| | | createJDViewText(goodsType, uid, template, Long.parseLong(goodsId), hasCoupon, out); |
| | | return; |
| | | } |
| | | |
| | | if (goodsType == Constant.SOURCE_TYPE_PDD) { |
| | | createPDDViewText(goodsType, uid, template, goodsId, hasCoupon, out); |
| | | createPDDViewText(goodsType, uid, template, Long.parseLong(goodsId), hasCoupon, out); |
| | | return; |
| | | } |
| | | |
| | | if (goodsType == Constant.SOURCE_TYPE_VIP) { |
| | | createVIPViewText(goodsType, uid, template, Long.parseLong(goodsId), hasCoupon, out); |
| | | return; |
| | | } |
| | | |
| | | if (goodsType == Constant.SOURCE_TYPE_SUNING) { |
| | | createSuNingViewText(goodsType, uid, template, goodsId, hasCoupon, out); |
| | | return; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 唯品会分享 |
| | | * @param goodsType |
| | | * @param uid |
| | | * @param template |
| | | * @param goodsId |
| | | * @param hasCoupon |
| | | * @param out |
| | | */ |
| | | private void createVIPViewText(Integer goodsType, Long uid, String template, Long goodsId, Boolean hasCoupon, |
| | | PrintWriter out) { |
| | | VIPGoodsInfo goods = VipShopApiUtil.getGoodsDetail(goodsId + ""); |
| | | if (goods == null) { |
| | | out.print(JsonUtil.loadFalseResult(4, "商品已下架")); |
| | | return; |
| | | } |
| | | |
| | | if (StringUtil.isNullOrEmpty(template)) { |
| | | template = getShareTemplate(goodsType, uid, hasCoupon, null); |
| | | } |
| | | |
| | | // 校验券模板是否正确 |
| | | try { |
| | | shareGoodsTextTemplateService.verifyRightVIP(template); |
| | | } catch (ShareGoodsTextTemplateException e) { |
| | | out.print(JsonUtil.loadFalseResult(5, e.getMsg())); |
| | | return; |
| | | } |
| | | |
| | | VIPConvertResultDTO jumpLink = VipShopApiUtil.convertLink(goodsId + "", VipShopUtil.getShareChanTag(uid)); |
| | | |
| | | // 生成分享内容 |
| | | String content = shareGoodsTextTemplateService.createContentVIP(template, goods, jumpLink.getUrl()); |
| | | |
| | | JSONObject data = new JSONObject(); |
| | | data.put("content", content); |
| | | out.print(JsonUtil.loadTrueResult(data)); |
| | | } |
| | | |
| | | |
| | | |
| | | private void createSuNingViewText(Integer goodsType, Long uid, String template, String goodsId, Boolean hasCoupon, |
| | | PrintWriter out) { |
| | | String[] ids = SuningUtil.getGoodsIdDetail(goodsId); |
| | | SuningGoodsInfo goods = SuningApiUtil.getGoodsDetail(ids[1], ids[0]); |
| | | if (goods == null) { |
| | | out.print(JsonUtil.loadFalseResult(4, "商品已下架")); |
| | | return; |
| | | } |
| | | |
| | | if (StringUtil.isNullOrEmpty(template)) { |
| | | template = getShareTemplate(goodsType, uid, hasCoupon, null); |
| | | } |
| | | |
| | | // 校验券模板是否正确 |
| | | try { |
| | | shareGoodsTextTemplateService.verifyRightSuNing(template); |
| | | } catch (ShareGoodsTextTemplateException e) { |
| | | out.print(JsonUtil.loadFalseResult(5, e.getMsg())); |
| | | return; |
| | | } |
| | | |
| | | String couponLink = goods.getCouponInfo().getCouponUrl(); |
| | | String jumpLink = SuningApiUtil.convertLink(SuningUtil.getProductUrl(ids[0], ids[1]), |
| | | StringUtil.isNullOrEmpty(couponLink) ? null : couponLink, SuningApiUtil.PID_SHARE, uid + ""); |
| | | |
| | | // 生成普通分享内容 |
| | | String content = shareGoodsTextTemplateService.createCommonShareTextSuNing(template, goods, jumpLink); |
| | | |
| | | JSONObject data = new JSONObject(); |
| | | data.put("content", content); |
| | | out.print(JsonUtil.loadTrueResult(data)); |
| | | } |
| | | /** |
| | | * 获取分享模板 |
| | | * |
| | | * @param uid |
| | |
| | | template = shareGoodsTextTemplateService.getTextTemplateByJD(uid); |
| | | } else if (goodsType == Constant.SOURCE_TYPE_PDD) { |
| | | template = shareGoodsTextTemplateService.getTextTemplateByPDD(uid); |
| | | } else if (goodsType == Constant.SOURCE_TYPE_VIP) { |
| | | template = shareGoodsTextTemplateService.getTextTemplateByVIP(uid); |
| | | } else if (goodsType == Constant.SOURCE_TYPE_SUNING) { |
| | | template = shareGoodsTextTemplateService.getTextTemplateBySuNing(uid); |
| | | } |
| | | return template; |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "getShareTextTemplateRules", method = RequestMethod.POST) |
| | | public void getShareTextTemplateRules(AcceptData acceptData, Integer goodsType, Long tljId, PrintWriter out) { |
| | | if (goodsType == null || goodsType > 3 || goodsType < 1) { |
| | | out.print(JsonUtil.loadFalseResult(3, "平台类型不正确")); |
| | | return; |
| | | } |
| | | |
| | | if (goodsType == Constant.SOURCE_TYPE_TAOBAO) { |
| | | if (tljId != null) { |
| | | out.print( |
| | |
| | | out.print(JsonUtil.loadTrueResult(configService.get(ConfigKeyEnum.shareGoodsTemplateRulesJD.getKey()))); |
| | | } else if (goodsType == Constant.SOURCE_TYPE_PDD) { |
| | | out.print(JsonUtil.loadTrueResult(configService.get(ConfigKeyEnum.shareGoodsTemplateRulesPDD.getKey()))); |
| | | } else if (goodsType == Constant.SOURCE_TYPE_VIP) { |
| | | out.print(JsonUtil.loadTrueResult(configService.get(ConfigKeyEnum.shareGoodsTemplateRulesVIP.getKey()))); |
| | | } else if (goodsType == Constant.SOURCE_TYPE_SUNING) { |
| | | out.print(JsonUtil.loadTrueResult(configService.get(ConfigKeyEnum.shareGoodsTemplateRulesSuNing.getKey()))); |
| | | } |
| | | } |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | if (goodsType == null || goodsType > 3 || goodsType < 1) { |
| | | out.print(JsonUtil.loadFalseResult(3, "平台类型不正确")); |
| | | return; |
| | | } |
| | | |
| | | try { |
| | | if (goodsType == Constant.SOURCE_TYPE_TAOBAO) { |
| | | shareGoodsTextTemplateService.saveTemplateTB(uid, template); |
| | |
| | | shareGoodsTextTemplateService.saveTemplateJD(uid, template); |
| | | } else if (goodsType == Constant.SOURCE_TYPE_PDD) { |
| | | shareGoodsTextTemplateService.saveTemplatePDD(uid, template); |
| | | } else if (goodsType == Constant.SOURCE_TYPE_VIP) { |
| | | shareGoodsTextTemplateService.saveTemplateVIP(uid, template); |
| | | } else if (goodsType == Constant.SOURCE_TYPE_SUNING) { |
| | | shareGoodsTextTemplateService.saveTemplateSuNing(uid, template); |
| | | } |
| | | } catch (ShareGoodsTextTemplateException e) { |
| | | out.print(JsonUtil.loadFalseResult(5, e.getMsg())); |
| | |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "resetShareTextTemplate", method = RequestMethod.POST) |
| | | public void resetShareTextTemplate(AcceptData acceptData, Long uid, Long goodsId, Long tljId, Boolean hasCoupon, |
| | | public void resetShareTextTemplate(AcceptData acceptData, Long uid, String goodsId, Long tljId, Boolean hasCoupon, |
| | | Integer goodsType, PrintWriter out) { |
| | | if (uid == null) { |
| | | out.print(JsonUtil.loadFalseResult(1, "用户未登录")); |
| | | return; |
| | | } |
| | | |
| | | if (goodsType == null || goodsType > 3 || goodsType < 1) { |
| | | out.print(JsonUtil.loadFalseResult(3, "平台类型不正确")); |
| | | return; |
| | | } |
| | | |
| | |
| | | shareGoodsTextTemplateService.resetCommonTemplateJD(uid); |
| | | } else if (goodsType == Constant.SOURCE_TYPE_PDD) { |
| | | shareGoodsTextTemplateService.resetCommonTemplatePDD(uid); |
| | | } else if (goodsType == Constant.SOURCE_TYPE_VIP) { |
| | | shareGoodsTextTemplateService.resetCommonTemplateVIP(uid); |
| | | } else if (goodsType == Constant.SOURCE_TYPE_SUNING) { |
| | | shareGoodsTextTemplateService.resetCommonTemplateSuNing(uid); |
| | | } |
| | | |
| | | if (goodsId != null) { |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "getShareTextQuick", method = RequestMethod.POST) |
| | | public void getShareTextQuick(AcceptData acceptData, Long goodsId, Integer goodsType, Long uid, PrintWriter out) { |
| | | public void getShareTextQuick(AcceptData acceptData, String goodsId, Integer goodsType, Long uid, PrintWriter out) { |
| | | if (uid == null) { |
| | | out.print(JsonUtil.loadFalseResult(1, "用户未登录")); |
| | | return; |
| | |
| | | paramsDTO.setBaseFanliRate(hongBaoManageService.getBaseFanliRate()); |
| | | |
| | | if (goodsType == Constant.SOURCE_TYPE_TAOBAO) { |
| | | TaoBaoGoodsBrief goods = taoBaoGoodsCacheUtil.getCommonTaoBaoGoodsInfo(goodsId); |
| | | TaoBaoGoodsBrief goods = taoBaoGoodsCacheUtil.getCommonTaoBaoGoodsInfo(Long.parseLong(goodsId)); |
| | | if (goods == null) { |
| | | try { |
| | | goods = redisManager.getTaoBaoGoodsBrief(goodsId); |
| | | goods = redisManager.getTaoBaoGoodsBrief(Long.parseLong(goodsId)); |
| | | } catch (TaobaoGoodsDownException e) { |
| | | goods = null; |
| | | } |
| | |
| | | goodsDetail = GoodsDetailVOFactory.convertTaoBao(goods, paramsDTO); |
| | | } |
| | | } else if (goodsType == Constant.SOURCE_TYPE_JD) { |
| | | JDGoods goods = jdGoodsCacheUtil.getGoodsInfo(goodsId); |
| | | JDGoods goods = jdGoodsCacheUtil.getGoodsInfo(Long.parseLong(goodsId)); |
| | | if (goods != null) { |
| | | goodsDetail = GoodsDetailVOFactory.convertJDGoods(goods, paramsDTO); |
| | | } |
| | | } else if (goodsType == Constant.SOURCE_TYPE_PDD) { |
| | | PDDGoodsDetail goods = pinDuoDuoCacheUtil.getGoodsInfo(goodsId); |
| | | PDDGoodsDetail goods = pinDuoDuoCacheUtil.getGoodsInfo(Long.parseLong(goodsId)); |
| | | if (goods != null) { |
| | | goodsDetail = GoodsDetailVOFactory.convertPDDGoods(goods, paramsDTO); |
| | | } |
| | | } else if (goodsType == Constant.SOURCE_TYPE_VIP) { |
| | | VIPGoodsInfo goods = VipShopApiUtil.getGoodsDetail(goodsId + ""); |
| | | if (goods == null) { |
| | | goodsDetail = GoodsDetailVOFactory.convertVIPGoods(goods, paramsDTO); |
| | | } |
| | | } else if (goodsType == Constant.SOURCE_TYPE_SUNING) { |
| | | String[] ids = SuningUtil.getGoodsIdDetail(goodsId); |
| | | SuningGoodsInfo goods = SuningApiUtil.getGoodsDetail(ids[1], ids[0]); |
| | | if (goods != null) { |
| | | goodsDetail = GoodsDetailVOFactory.convertSuningGoods(goods, paramsDTO); |
| | | } |
| | | } |
| | | |
| | | if (goodsDetail == null) { |
| | |
| | | import java.math.BigDecimal;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Date;
|
| | | import java.util.HashSet;
|
| | | import java.util.List;
|
| | | import java.util.Set;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | |
| | | import com.yeshi.fanli.exception.taobao.TaoKeApiException;
|
| | | import com.yeshi.fanli.exception.taobao.TaobaoGoodsDownException;
|
| | | import com.yeshi.fanli.exception.user.cloud.UserCloudException;
|
| | | import com.yeshi.fanli.exception.user.cloud.UserCloudGoodsException;
|
| | | import com.yeshi.fanli.exception.user.cloud.UserCloudGroupException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | |
| | | JSONObject data = new JSONObject();
|
| | | QrcodeLoginDTO dto = AitaokerApiUtil.getQrcodeMacloginCheck(robotId, wId);
|
| | | if (dto != null) {
|
| | | LogHelper.cloudInfo("方法macloginCheck: [uid=" + uid + "][wxID=" + dto.getWcId() + "][ NickName=" + dto.getNickName() + "]" );
|
| | | try {
|
| | | // 更新微信信息
|
| | | userCloudService.updateWXInfo(uid, dto.getWcId(), dto.getNickName(), dto.getHeadUrl());
|
| | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | /**
|
| | | * 添加、取消发单库
|
| | | * 删除云发单备选库
|
| | | *
|
| | | * @param callback
|
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param goodsId
|
| | | * @param goodsType
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "accordGoods")
|
| | | public void accordGoods(String callback, AcceptData acceptData, Long uid, String goodsId, Integer goodsType,
|
| | | PrintWriter out) {
|
| | | if (uid == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("用户未登录"));
|
| | | return;
|
| | | }
|
| | |
|
| | | if (goodsType == null || goodsId == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(1, "参数不完整"));
|
| | | return;
|
| | | }
|
| | |
|
| | | try {
|
| | | boolean state = false;
|
| | | String queryGoodsId = goodsId;
|
| | | if (goodsType == Constant.SOURCE_TYPE_SUNING) { // 苏宁
|
| | | String[] ids = SuningUtil.getGoodsIdDetail(goodsId);
|
| | | queryGoodsId = ids[1];
|
| | | }
|
| | | |
| | | UserCloudGoods cloudGoods = userCloudGoodsService.getByUidAndGoods(uid, Long.parseLong(queryGoodsId), goodsType);
|
| | | if (cloudGoods != null) { // 取消加入选品库
|
| | | userCloudGoodsService.deleteByPrimaryKeyAndUid(cloudGoods.getId(), uid);
|
| | | } else { // 加入选品库
|
| | | Set<String> set = new HashSet<String>();
|
| | | set.add(goodsId);
|
| | | userCloudGoodsService.addGoods(uid, set, goodsType);
|
| | | state = true;
|
| | | }
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("state", state);
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | } catch (UserCloudGoodsException e) {
|
| | | out.print(JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult("操作失败"));
|
| | | LogHelper.errorDetailInfo(e);
|
| | | ;
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 添加、取消发单库
|
| | | * |
| | | * @param callback
|
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param goodsId
|
| | | * @param goodsType
|
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "deleteGoods")
|
| | |
| | | userCloudService.sendByDynamic(uid, id);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("一键发单成功"));
|
| | | } catch (UserCloudException e) {
|
| | | if (e.getCode() > 1000) {
|
| | | if (e.getCode() > 1000 && e.getCode() < 1100) {
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("msg", e.getMsg());
|
| | | data.put("link", configService.get(ConfigKeyEnum.robotCloudLink.getKey()));
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(1000, data));
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrue(e.getCode(), data, e.getMsg()).toString());
|
| | | } else {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getCode(),e.getMsg()));
|
| | | }
|
| | |
| | | } else {
|
| | | gid = Long.parseLong(goodsId);
|
| | | }
|
| | | |
| | | userCloudService.sendCustomGoods(uid, gid, goodsType, sellerId);
|
| | | }
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("一键发单成功"));
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("加入发单库成功"));
|
| | | } catch (UserCloudException e) {
|
| | | if (e.getCode() > 1000 && e.getCode() < 1100) {
|
| | | JSONObject data = new JSONObject();
|
| | |
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.VersionUtil;
|
| | | import com.yeshi.fanli.util.account.UserUtil;
|
| | | import com.yeshi.fanli.vo.money.IncomeDetailVO;
|
| | | import com.yeshi.fanli.vo.money.MoneyPredictVO;
|
| | |
| | | if (vo != null) {
|
| | | vo.setLink(configService.get(ConfigKeyEnum.autoExtractHelpUrl.getKey()));
|
| | | vo.setExtractDesc("提现金额就是已成功提现到支付宝的资金");
|
| | | vo.setMoneyArrivalDesc("订单已到账后提现时间和金额均不受限制");
|
| | | if (VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | vo.setMoneyArrivalDesc("尽早确认收货可以促使资金尽早到账");
|
| | | } else {
|
| | | vo.setMoneyArrivalDesc("订单已到账后提现时间和金额均不受限制");
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (vo == null) {
|
| | | vo = createMoneyStatistic(uid);
|
| | | vo = createMoneyStatistic(uid, acceptData);
|
| | | }
|
| | |
|
| | | Gson gson = getGson();
|
| | | out.print(JsonUtil.loadTrueResult(gson.toJson(vo)));
|
| | | }
|
| | |
|
| | | public MoneyStatisticVO createMoneyStatistic(Long uid) {
|
| | | private MoneyStatisticVO createMoneyStatistic(Long uid, AcceptData acceptData) {
|
| | | UserInfo user = userInfoService.getUserById(uid);
|
| | |
|
| | | MoneyStatisticVO vo = new MoneyStatisticVO();
|
| | | vo.setLink(configService.get(ConfigKeyEnum.autoExtractHelpUrl.getKey()));
|
| | | vo.setBalanceMoney(user.getMyHongBao());
|
| | | vo.setExtractDesc("提现金额就是已成功提现到支付宝的资金");
|
| | | vo.setMoneyArrivalDesc("订单已到账后提现时间和金额均不受限制");
|
| | |
|
| | | // 获取提现中的信息
|
| | | BigDecimal extractingMoney = extractService.sumVerifyingMoney(uid);
|
| | |
| | | vo.setTotalInviteMoney(
|
| | | userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate).abs());
|
| | |
|
| | | // 本月收货
|
| | | maxDate = new Date(timeStamp);
|
| | | calendar = Calendar.getInstance();
|
| | | minDate = new Date(TimeUtil
|
| | | .convertToTimeTemp(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1), "yyyy-M"));
|
| | | calendar.add(Calendar.MONTH, -1);
|
| | | vo.setMonthSettleMoney(hongBaoV2CountService.sumMoneyBySettleTimeAndUid(uid, minDate, maxDate));
|
| | | |
| | | if (VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | vo.setMoneyArrivalDesc("尽早确认收货可以促使资金尽早到账");
|
| | | |
| | | minDate = new Date(TimeUtil.convertToTimeTemp(TimeUtil.getGernalTime(timeStamp, "yyyy-MM"), "yyyy-MM"));
|
| | | Calendar ca = Calendar.getInstance();
|
| | | ca.setTime(new Date(timeStamp));
|
| | | ca.add(Calendar.MONTH, 1);
|
| | | maxDate = new Date(
|
| | | TimeUtil.convertToTimeTemp(TimeUtil.getGernalTime(ca.getTimeInMillis(), "yyyy-MM"), "yyyy-MM"));
|
| | | // 本月未到账
|
| | | BigDecimal monthUnRecievedMoney = hongBaoV2Service.getUnRecievedMoneyWithPreGetTime(uid, minDate, maxDate);
|
| | | vo.setMonthUnRecievedMoney(monthUnRecievedMoney);
|
| | | |
| | | // 全部未到账
|
| | | minDate = new Date(0);
|
| | | maxDate = new Date(timeStamp);
|
| | | vo.setTotalUnRecievedMoney(hongBaoV2Service.getUnRecievedMoneyWithCreateTime(uid, minDate, maxDate));
|
| | | } else {
|
| | | vo.setMoneyArrivalDesc("订单已到账后提现时间和金额均不受限制");
|
| | | // 本月收货
|
| | | maxDate = new Date(timeStamp);
|
| | | calendar = Calendar.getInstance();
|
| | | minDate = new Date(TimeUtil
|
| | | .convertToTimeTemp(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1), "yyyy-M"));
|
| | | calendar.add(Calendar.MONTH, -1);
|
| | | vo.setMonthSettleMoney(hongBaoV2CountService.sumMoneyBySettleTimeAndUid(uid, minDate, maxDate));
|
| | |
|
| | | // 上月收货
|
| | | maxDate = new Date(TimeUtil
|
| | | .convertToTimeTemp(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1), "yyyy-M"));
|
| | | calendar.add(Calendar.MONTH, -1);
|
| | | minDate = new Date(TimeUtil
|
| | | .convertToTimeTemp(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1), "yyyy-M"));
|
| | | vo.setLastMonthSettleMoney(hongBaoV2CountService.sumMoneyBySettleTimeAndUid(uid, minDate, maxDate));
|
| | |
|
| | | // 上月收货
|
| | | maxDate = new Date(TimeUtil
|
| | | .convertToTimeTemp(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1), "yyyy-M"));
|
| | | calendar.add(Calendar.MONTH, -1);
|
| | | minDate = new Date(TimeUtil
|
| | | .convertToTimeTemp(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1), "yyyy-M"));
|
| | | vo.setLastMonthSettleMoney(hongBaoV2CountService.sumMoneyBySettleTimeAndUid(uid, minDate, maxDate));
|
| | | }
|
| | | |
| | | // 待确认收货(180天内)
|
| | | vo.setNotSettleMoney(hongBaoV2CountService.sumMoneyByANotSettleAndUid(uid));
|
| | |
|
| | |
| | | */
|
| | | void connectUser(@Param("mainUid") Long mainUid, @Param("lessUid") Long lessUid);
|
| | |
|
| | | |
| | | List<UserInfoVO> queryInfo(@Param("start") long start, @Param("count") int count, @Param("userState") Integer userState,
|
| | | @Param("key") String key, @Param("keyType") Integer keyType, @Param("userRank") String userRank,
|
| | | @Param("days") Integer days, @Param("startTime") String startTime, @Param("endTime") String endTime,
|
| | | @Param("userType") Integer userType, @Param("level")String level, @Param("activeCode") Integer activeCode);
|
| | |
|
| | | long countInfo(@Param("userState") Integer userState, @Param("key") String key, @Param("keyType") Integer keyType,
|
| | | @Param("userRank") String userRank, @Param("days") Integer days, @Param("startTime") String startTime,
|
| | | @Param("endTime") String endTime,@Param("userType") Integer userType, @Param("level")String level,
|
| | | @Param("activeCode") Integer activeCode);
|
| | |
|
| | | |
| | | /**
|
| | | *
|
| | | * @param start
|
| | |
| | | List<IntegralDetail> listQuery(@Param("start")long start, @Param("count")int count, @Param("key")String key);
|
| | |
|
| | | Long countQuery(@Param("key")String key);
|
| | | |
| | | /**
|
| | | * 共计已消耗金币数
|
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | Long sumUseGoldCoin(@Param("uid")Long uid);
|
| | | } |
| | |
| | | Long countOrderBySourceAndNearDay(@Param("uid") Long uid, @Param("source") int source, @Param("day") int day); |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 统计历史订单数量 -不区分状态、来源 订单号为主 |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | Long countHistoryOrderNum(@Param("uid") Long uid); |
| | | |
| | | } |
| | |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | List<UserCloudGoods> query(@Param("start") long start, @Param("count") int count, |
| | | @Param("key") String key); |
| | | |
| | | long count(@Param("key") String key); |
| | | |
| | | |
| | | /** |
| | | * 查询列表 |
| | | * @param start |
| | | * @param count |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | List<UserCloudGoods> listByUid(@Param("start") long start, @Param("count") int count, |
| | | @Param("uid") Long uid); |
| | | |
| | |
| | | package com.yeshi.fanli.dao.user.cloud;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | |
|
| | | import org.springframework.data.mongodb.core.query.Criteria;
|
| | | import org.springframework.data.mongodb.core.query.Query;
|
| | | import org.springframework.stereotype.Repository;
|
| | |
|
| | | import com.yeshi.fanli.dao.MongodbBaseDao;
|
| | |
| | | public class UserCloudSendContentDao extends MongodbBaseDao<UserCloudSendContent> {
|
| | |
|
| | |
|
| | | |
| | | /**
|
| | | * 查询发布内容
|
| | | * @param uid
|
| | | * @param pid
|
| | | * @return
|
| | | */
|
| | | public List<UserCloudSendContent> getByPid(String pid) {
|
| | | List<Criteria> list = new ArrayList<Criteria>();
|
| | | list.add(Criteria.where("pid").is(pid));
|
| | | Query query = new Query();
|
| | | if (list.size() > 0) {
|
| | | Criteria[] cas = new Criteria[list.size()];
|
| | | for (int i = 0; i < list.size(); i++)
|
| | | cas[i] = list.get(i);
|
| | | query.addCriteria(new Criteria().andOperator(cas));
|
| | | }
|
| | | return findList(query);
|
| | | }
|
| | | }
|
| | |
| | | package com.yeshi.fanli.dao.user.cloud;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | | import java.util.regex.Pattern;
|
| | |
|
| | | import org.springframework.data.domain.Sort;
|
| | | import org.springframework.data.mongodb.core.query.Criteria;
|
| | |
| | |
|
| | | import com.yeshi.fanli.dao.MongodbBaseDao;
|
| | | import com.yeshi.fanli.entity.bus.user.cloud.UserCloudSendRecord;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | @Repository
|
| | | public class UserCloudSendRecordDao extends MongodbBaseDao<UserCloudSendRecord> {
|
| | |
| | |
|
| | | return findList(query);
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 查询
|
| | | * @param start
|
| | | * @param count
|
| | | * @param key
|
| | | * @param sendOrigin
|
| | | * @return
|
| | | */
|
| | | public List<UserCloudSendRecord> query(int start, int count, String key, Integer sendOrigin){
|
| | | List<Criteria> list = new ArrayList<Criteria>();
|
| | | if (sendOrigin != null)
|
| | | list.add(Criteria.where("sendOrigin").is(sendOrigin));
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(key)) {
|
| | | list.add(new Criteria().orOperator( Criteria.where("uid")
|
| | | .regex(Pattern.compile("^.*" + key + ".*$",
|
| | | Pattern.CASE_INSENSITIVE))));
|
| | | }
|
| | | |
| | | Query query = new Query();
|
| | | if (list.size() > 0) {
|
| | | Criteria[] cas = new Criteria[list.size()];
|
| | | for (int i = 0; i < list.size(); i++)
|
| | | cas[i] = list.get(i);
|
| | | query.addCriteria(new Criteria().andOperator(cas));
|
| | | }
|
| | | query.with(new Sort(Sort.Direction.DESC,"sendTime"));
|
| | | query.skip(start).limit(count);
|
| | | return findList(query);
|
| | | }
|
| | | |
| | | |
| | | public long count(String key, Integer sendOrigin){
|
| | | List<Criteria> list = new ArrayList<Criteria>();
|
| | | if (sendOrigin != null)
|
| | | list.add(Criteria.where("sendOrigin").is(sendOrigin));
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(key)) {
|
| | | list.add(new Criteria().orOperator( Criteria.where("uid")
|
| | | .regex(Pattern.compile("^.*" + key + ".*$",
|
| | | Pattern.CASE_INSENSITIVE))));
|
| | | }
|
| | | |
| | | Query query = new Query();
|
| | | if (list.size() > 0) {
|
| | | Criteria[] cas = new Criteria[list.size()];
|
| | | for (int i = 0; i < list.size(); i++)
|
| | | cas[i] = list.get(i);
|
| | | query.addCriteria(new Criteria().andOperator(cas));
|
| | | }
|
| | | return count(query);
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.dto.suning;
|
| | |
|
| | | public class SuningGoodsInfoRecommend {
|
| | |
|
| | | private String isReserveCommodity;
|
| | | private String commodityName;
|
| | | private String commodityCode;
|
| | | private String supplierCode;
|
| | | private String imgVersion;
|
| | | private String isOwnCommodity;
|
| | | private String commodityType;
|
| | | private String baoyou;
|
| | | private String sellingPoint;
|
| | | private String monthlySales;
|
| | | private String originRate;
|
| | | private String originCommission;
|
| | | private String commodityPrice;
|
| | | private String commissionPrice;
|
| | | private String commissionRate;
|
| | | private String snPrice;
|
| | | private String priceType;
|
| | | private String priceTypeCode;
|
| | | private String pgPrice;
|
| | | private String pgActionId;
|
| | | private String pgNum;
|
| | | private String commodityPriceFlag;
|
| | | private String handwork;
|
| | | private String saleStatus;
|
| | | private String noConponCommision;
|
| | | private String rebateCommissionRate;
|
| | | private String couponAmount;
|
| | | private String couponSpecialPrice;
|
| | | private String couponActiveId;
|
| | | private String activitySecretKey;
|
| | | private String couponPrice;
|
| | | private String picList;
|
| | |
|
| | | public String getIsReserveCommodity() {
|
| | | return isReserveCommodity;
|
| | | }
|
| | |
|
| | | public void setIsReserveCommodity(String isReserveCommodity) {
|
| | | this.isReserveCommodity = isReserveCommodity;
|
| | | }
|
| | |
|
| | | public String getCommodityName() {
|
| | | return commodityName;
|
| | | }
|
| | |
|
| | | public void setCommodityName(String commodityName) {
|
| | | this.commodityName = commodityName;
|
| | | }
|
| | |
|
| | | public String getCommodityCode() {
|
| | | return commodityCode;
|
| | | }
|
| | |
|
| | | public void setCommodityCode(String commodityCode) {
|
| | | this.commodityCode = commodityCode;
|
| | | }
|
| | |
|
| | | public String getSupplierCode() {
|
| | | return supplierCode;
|
| | | }
|
| | |
|
| | | public void setSupplierCode(String supplierCode) {
|
| | | this.supplierCode = supplierCode;
|
| | | }
|
| | |
|
| | | public String getImgVersion() {
|
| | | return imgVersion;
|
| | | }
|
| | |
|
| | | public void setImgVersion(String imgVersion) {
|
| | | this.imgVersion = imgVersion;
|
| | | }
|
| | |
|
| | | public String getIsOwnCommodity() {
|
| | | return isOwnCommodity;
|
| | | }
|
| | |
|
| | | public void setIsOwnCommodity(String isOwnCommodity) {
|
| | | this.isOwnCommodity = isOwnCommodity;
|
| | | }
|
| | |
|
| | | public String getCommodityType() {
|
| | | return commodityType;
|
| | | }
|
| | |
|
| | | public void setCommodityType(String commodityType) {
|
| | | this.commodityType = commodityType;
|
| | | }
|
| | |
|
| | | public String getBaoyou() {
|
| | | return baoyou;
|
| | | }
|
| | |
|
| | | public void setBaoyou(String baoyou) {
|
| | | this.baoyou = baoyou;
|
| | | }
|
| | |
|
| | | public String getSellingPoint() {
|
| | | return sellingPoint;
|
| | | }
|
| | |
|
| | | public void setSellingPoint(String sellingPoint) {
|
| | | this.sellingPoint = sellingPoint;
|
| | | }
|
| | |
|
| | | public String getMonthlySales() {
|
| | | return monthlySales;
|
| | | }
|
| | |
|
| | | public void setMonthlySales(String monthlySales) {
|
| | | this.monthlySales = monthlySales;
|
| | | }
|
| | |
|
| | | public String getOriginRate() {
|
| | | return originRate;
|
| | | }
|
| | |
|
| | | public void setOriginRate(String originRate) {
|
| | | this.originRate = originRate;
|
| | | }
|
| | |
|
| | | public String getOriginCommission() {
|
| | | return originCommission;
|
| | | }
|
| | |
|
| | | public void setOriginCommission(String originCommission) {
|
| | | this.originCommission = originCommission;
|
| | | }
|
| | |
|
| | | public String getCommodityPrice() {
|
| | | return commodityPrice;
|
| | | }
|
| | |
|
| | | public void setCommodityPrice(String commodityPrice) {
|
| | | this.commodityPrice = commodityPrice;
|
| | | }
|
| | |
|
| | | public String getCommissionPrice() {
|
| | | return commissionPrice;
|
| | | }
|
| | |
|
| | | public void setCommissionPrice(String commissionPrice) {
|
| | | this.commissionPrice = commissionPrice;
|
| | | }
|
| | |
|
| | | public String getCommissionRate() {
|
| | | return commissionRate;
|
| | | }
|
| | |
|
| | | public void setCommissionRate(String commissionRate) {
|
| | | this.commissionRate = commissionRate;
|
| | | }
|
| | |
|
| | | public String getSnPrice() {
|
| | | return snPrice;
|
| | | }
|
| | |
|
| | | public void setSnPrice(String snPrice) {
|
| | | this.snPrice = snPrice;
|
| | | }
|
| | |
|
| | | public String getPriceType() {
|
| | | return priceType;
|
| | | }
|
| | |
|
| | | public void setPriceType(String priceType) {
|
| | | this.priceType = priceType;
|
| | | }
|
| | |
|
| | | public String getPriceTypeCode() {
|
| | | return priceTypeCode;
|
| | | }
|
| | |
|
| | | public void setPriceTypeCode(String priceTypeCode) {
|
| | | this.priceTypeCode = priceTypeCode;
|
| | | }
|
| | |
|
| | | public String getPgPrice() {
|
| | | return pgPrice;
|
| | | }
|
| | |
|
| | | public void setPgPrice(String pgPrice) {
|
| | | this.pgPrice = pgPrice;
|
| | | }
|
| | |
|
| | | public String getPgActionId() {
|
| | | return pgActionId;
|
| | | }
|
| | |
|
| | | public void setPgActionId(String pgActionId) {
|
| | | this.pgActionId = pgActionId;
|
| | | }
|
| | |
|
| | | public String getPgNum() {
|
| | | return pgNum;
|
| | | }
|
| | |
|
| | | public void setPgNum(String pgNum) {
|
| | | this.pgNum = pgNum;
|
| | | }
|
| | |
|
| | | public String getCommodityPriceFlag() {
|
| | | return commodityPriceFlag;
|
| | | }
|
| | |
|
| | | public void setCommodityPriceFlag(String commodityPriceFlag) {
|
| | | this.commodityPriceFlag = commodityPriceFlag;
|
| | | }
|
| | |
|
| | | public String getHandwork() {
|
| | | return handwork;
|
| | | }
|
| | |
|
| | | public void setHandwork(String handwork) {
|
| | | this.handwork = handwork;
|
| | | }
|
| | |
|
| | | public String getSaleStatus() {
|
| | | return saleStatus;
|
| | | }
|
| | |
|
| | | public void setSaleStatus(String saleStatus) {
|
| | | this.saleStatus = saleStatus;
|
| | | }
|
| | |
|
| | | public String getNoConponCommision() {
|
| | | return noConponCommision;
|
| | | }
|
| | |
|
| | | public void setNoConponCommision(String noConponCommision) {
|
| | | this.noConponCommision = noConponCommision;
|
| | | }
|
| | |
|
| | | public String getRebateCommissionRate() {
|
| | | return rebateCommissionRate;
|
| | | }
|
| | |
|
| | | public void setRebateCommissionRate(String rebateCommissionRate) {
|
| | | this.rebateCommissionRate = rebateCommissionRate;
|
| | | }
|
| | |
|
| | | public String getCouponAmount() {
|
| | | return couponAmount;
|
| | | }
|
| | |
|
| | | public void setCouponAmount(String couponAmount) {
|
| | | this.couponAmount = couponAmount;
|
| | | }
|
| | |
|
| | | public String getCouponSpecialPrice() {
|
| | | return couponSpecialPrice;
|
| | | }
|
| | |
|
| | | public void setCouponSpecialPrice(String couponSpecialPrice) {
|
| | | this.couponSpecialPrice = couponSpecialPrice;
|
| | | }
|
| | |
|
| | | public String getCouponActiveId() {
|
| | | return couponActiveId;
|
| | | }
|
| | |
|
| | | public void setCouponActiveId(String couponActiveId) {
|
| | | this.couponActiveId = couponActiveId;
|
| | | }
|
| | |
|
| | | public String getActivitySecretKey() {
|
| | | return activitySecretKey;
|
| | | }
|
| | |
|
| | | public void setActivitySecretKey(String activitySecretKey) {
|
| | | this.activitySecretKey = activitySecretKey;
|
| | | }
|
| | |
|
| | | public String getCouponPrice() {
|
| | | return couponPrice;
|
| | | }
|
| | |
|
| | | public void setCouponPrice(String couponPrice) {
|
| | | this.couponPrice = couponPrice;
|
| | | }
|
| | |
|
| | | public String getPicList() {
|
| | | return picList;
|
| | | }
|
| | |
|
| | | public void setPicList(String picList) {
|
| | | this.picList = picList;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | |
|
| | | @Column(name = "ug_update_time")
|
| | | private Date updateTime;
|
| | | |
| | | private String nickName;// 昵称
|
| | | private String portrait;// 头像
|
| | | |
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | |
| | | this.updateTime = updateTime;
|
| | | }
|
| | |
|
| | | public Date getSendTime() {
|
| | | return sendTime;
|
| | | }
|
| | |
|
| | | public void setSendTime(Date sendTime) {
|
| | | this.sendTime = sendTime;
|
| | | }
|
| | |
|
| | | public String getNickName() {
|
| | | return nickName;
|
| | | }
|
| | |
|
| | | public void setNickName(String nickName) {
|
| | | this.nickName = nickName;
|
| | | }
|
| | |
|
| | | public String getPortrait() {
|
| | | return portrait;
|
| | | }
|
| | |
|
| | | public void setPortrait(String portrait) {
|
| | | this.portrait = portrait;
|
| | | }
|
| | | |
| | | |
| | |
|
| | | }
|
| | |
| | | @Field
|
| | | private Date sendTime; // 发送时间
|
| | |
|
| | | |
| | | private String nickName;// 昵称
|
| | | private String portrait;// 头像
|
| | | |
| | | |
| | | public String getId() {
|
| | | return id;
|
| | | }
|
| | |
| | | public void setWxId(String wxId) {
|
| | | this.wxId = wxId;
|
| | | }
|
| | |
|
| | | public String getNickName() {
|
| | | return nickName;
|
| | | }
|
| | |
|
| | | public void setNickName(String nickName) {
|
| | | this.nickName = nickName;
|
| | | }
|
| | |
|
| | | public String getPortrait() {
|
| | | return portrait;
|
| | | }
|
| | |
|
| | | public void setPortrait(String portrait) {
|
| | | this.portrait = portrait;
|
| | | }
|
| | | |
| | | }
|
| | |
| | | |
| | | |
| | | // 是否云发单 |
| | | @Expose |
| | | private boolean cloud; |
| | | |
| | | |
| | |
| | | private String sharePDDTextTemplateCoupon;// 拼多多有券分享模板
|
| | | @Column(name = "st_share_vip_text_template")
|
| | | private String shareVIPTextTemplate;// 唯品会无券分享模板
|
| | | |
| | | |
| | | |
| | | |
| | | @Column(name = "st_share_vip_text_template_coupon")
|
| | | private String shareVIPTextTemplateCoupon;// 唯品会有券分享模板
|
| | | @Column(name = "st_share_suning_text_template")
|
| | | private String shareSuNingTextTemplate;// 苏宁无券分享模板
|
| | | @Column(name = "st_share_suning_text_template_coupon")
|
| | | private String shareSuNingTextTemplateCoupon;// 苏宁有券分享模板
|
| | |
|
| | | public String getShareVIPTextTemplate() {
|
| | | return shareVIPTextTemplate;
|
| | | }
|
| | |
| | | this.updateTime = updateTime;
|
| | | }
|
| | |
|
| | | public String getShareVIPTextTemplateCoupon() {
|
| | | return shareVIPTextTemplateCoupon;
|
| | | }
|
| | |
|
| | | public void setShareVIPTextTemplateCoupon(String shareVIPTextTemplateCoupon) {
|
| | | this.shareVIPTextTemplateCoupon = shareVIPTextTemplateCoupon;
|
| | | }
|
| | |
|
| | | public String getShareSuNingTextTemplate() {
|
| | | return shareSuNingTextTemplate;
|
| | | }
|
| | |
|
| | | public void setShareSuNingTextTemplate(String shareSuNingTextTemplate) {
|
| | | this.shareSuNingTextTemplate = shareSuNingTextTemplate;
|
| | | }
|
| | |
|
| | | public String getShareSuNingTextTemplateCoupon() {
|
| | | return shareSuNingTextTemplateCoupon;
|
| | | }
|
| | |
|
| | | public void setShareSuNingTextTemplateCoupon(String shareSuNingTextTemplateCoupon) {
|
| | | this.shareSuNingTextTemplateCoupon = shareSuNingTextTemplateCoupon;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | // 内容不同、版本但一样 |
| | | shareGoodsTemplateRulesJD("share_goods_template_rules_jd", "京东模板规则"), |
| | | shareGoodsTemplateRulesPDD("share_goods_template_rules_pdd", "拼多多模板规则"), |
| | | shareGoodsTemplateRulesVIP("share_goods_template_rules_vip", "唯品会模板规则"), |
| | | shareGoodsTemplateRulesSuNing("share_goods_template_rules_suning", "苏宁模板规则"), |
| | | goodsShareNotifyImgs("goods_share_notify_imgs", "单个商品分享的券提示图片"), |
| | | goodsShareMultipleNotify("goods_share_multiple_notify", "多个商品分享提醒"), |
| | | goodsShareNotifyImgs207("goods_share_notify_imgs_207", "单个商品分享的券提示图片(2.0.7及以后)"), |
| | | goodsShareNotifyImgsVIP("goods_share_notify_imgs_vip", "单个商品分享的券提示图片(唯品会)"), |
| | | goodsShareNotify("goods_share_notify", "单个商品分享提醒"), |
| | | goodsShareNotifyJD("goods_share_notify_jd", "京东分享提醒"), |
| | | goodsShareNotifyPDD("goods_share_notify_pdd", "拼多多分享提醒"), |
| | |
| | | quickShareTBCommentText("quick_share_tb_comment_text", "快捷分享商品文本"), |
| | | quickShareJDCommentText("quick_share_jd_comment_text", "快捷分享商品文本"), |
| | | quickSharePDDCommentText("quick_share_pdd_comment_text", "快捷分享商品文本"), |
| | | quickShareVIPCommentText("quick_share_vip_comment_text", "快捷分享商品文本"), |
| | | quickShareSuNingCommentText("quick_share_suning_comment_text", "快捷分享商品文本"), |
| | | |
| | | |
| | | shareCommentTextTB("share_comment_text_tb", "淘宝单图多图分享商品文本"), |
| | | shareCommentTextJD("share_comment_text_jd", "京东单图多图分享商品文本"), |
| | | shareCommentTextPDD("share_comment_text_pdd", "拼多多单图多图分享商品文本"), |
| | | shareCommentTextVIP("share_comment_text_vip", "唯品会单图多图分享商品文本"), |
| | | shareCommentTextSuNing("share_comment_text_suning", "苏宁单图多图分享商品文本"), |
| | | |
| | | |
| | | evaluateEmojis("evaluate_emojis", "发圈评论Emojis"), |
| | | evaluateText("evaluate_text", "发圈评论文本"), |
| | |
| | | |
| | | showSplashAd("show_splash_ad","是否显示开屏广告"), |
| | | |
| | | robotCloudOpen("robot_cloud_open","云发单链接"), |
| | | robotCloudLink("robot_cloud_link","云发单链接"); |
| | | |
| | | |
| | | private final String key; |
| | | private final String desc; |
| | |
| | | // 自动选品
|
| | | @Scheduled(cron = "0 0 23 * * ? ")
|
| | | public void setShareHotGoods() {
|
| | | if (!Constant.IS_TASK)
|
| | | return;
|
| | | |
| | | String day = TimeUtil.getGernalTime(System.currentTimeMillis() + 1000 * 60 * 60 * 24L, "yyyy-MM-dd");
|
| | | List<TaoBaoGoodsBrief> goodsList = shareHotGoodsService.listPreGoods(1);
|
| | | Collections.shuffle(goodsList);
|
| | |
| | |
|
| | | @Scheduled(cron = "0 30 7,11,18,23 * * ? ")
|
| | | public void syncGoodsBeiYong() {
|
| | | if (!Constant.IS_TASK)
|
| | | return;
|
| | | |
| | | long latestUpdateCount = daTaoKeGoodsDetailV2Service
|
| | | .countByMinUpdateTime(new Date(System.currentTimeMillis() - 1000 * 60 * 60 * 24L));
|
| | | if (latestUpdateCount < 50000L) {// 若每天没有超过5w数据更新就需要重新更新数据
|
| | |
| | | <result column="alipayAccountInvalid" property="alipayAccountInvalid"
|
| | | jdbcType="VARCHAR" />
|
| | |
|
| | | <result column="tuls_level" property="userLevel" jdbcType="VARCHAR" />
|
| | | <result column="uie_gold_coin" property="goldCoin" jdbcType="INTEGER" />
|
| | | <result column="uie_mark" property="mark" jdbcType="VARCHAR" />
|
| | | <result column="userLevel" property="userLevel" jdbcType="VARCHAR" />
|
| | | <result column="inviteCode" property="inviteCode" jdbcType="VARCHAR" />
|
| | | <result column="uie_invite_code" property="inviteCode" jdbcType="VARCHAR" />
|
| | | <result column="uie_invite_code_vip" property="inviteCodeVip" jdbcType="VARCHAR" />
|
| | | <result column="uie_weixin" property="wxId" jdbcType="VARCHAR" />
|
| | | </resultMap>
|
| | |
|
| | | <resultMap id="ChartMap" type="com.yeshi.fanli.dto.ChartTDO">
|
| | |
| | | call procedure_connect_user(#{mainUid},#{lessUid})
|
| | | </select>
|
| | |
|
| | |
|
| | | <select id="queryInfo" resultMap="BaseResultMapVO">
|
| | | SELECT * FROM yeshi_ec_user u
|
| | | LEFT JOIN yeshi_ec_user_info_extra ext ON u.`id` = ext.uie_uid
|
| | | LEFT JOIN yeshi_ec_user_rank rak ON rak.ur_id = ext.uie_rank_id
|
| | | <if test="keyType == 4">
|
| | | LEFT JOIN yeshi_ec_binding_account b ON u.`id` = b.`uid`
|
| | | </if>
|
| | | WHERE 1=1
|
| | | <if test="userState != null">
|
| | | AND u.`state` = #{userState}
|
| | | </if>
|
| | | <if test="userType!=null">
|
| | | AND u.type=#{userType}
|
| | | </if>
|
| | | <if test="startTime != null and startTime !='' ">
|
| | | AND DATE_FORMAT(FROM_UNIXTIME(u.createtime/1000),'%Y%m%d')<![CDATA[>=]]>
|
| | | DATE_FORMAT(#{startTime},'%Y%m%d')
|
| | | </if>
|
| | | <if test="endTime != null and endTime !=''">
|
| | | AND DATE_FORMAT(FROM_UNIXTIME(u.createtime/1000),'%Y%m%d')<![CDATA[<=]]>
|
| | | DATE_FORMAT(#{endTime},'%Y%m%d')
|
| | | </if>
|
| | | <if test="userRank != null">
|
| | | AND rak.ur_name = #{userRank}
|
| | | </if>
|
| | | <if test = "level != null and level != ''">
|
| | | AND lc.tuls_level = #{level}
|
| | | </if>
|
| | | <if test="activeCode == 0">
|
| | | AND (ext.`uie_invite_code` is null OR ext.`uie_invite_code`='')
|
| | | </if>
|
| | | <if test="activeCode == 1">
|
| | | AND (ext.`uie_invite_code` is not null OR ext.`uie_invite_code`<![CDATA[<>]]>'')
|
| | | </if>
|
| | | <if test="key != null and key !='' ">
|
| | | <if test="keyType == 1">
|
| | | AND u.id = #{key}
|
| | | </if>
|
| | | <if test="keyType == 2">
|
| | | AND u.`nick_name` LIKE '%${key}%'
|
| | | </if>
|
| | | <if test="keyType == 3">
|
| | | AND u.`phone` = #{key}
|
| | | </if>
|
| | | <if test="keyType == 4">
|
| | | AND b.`account` = #{key}
|
| | | </if>
|
| | | <if test="keyType == 5">
|
| | | AND (ext.`uie_invite_code` = #{key} OR ext.`uie_invite_code_vip`= #{key})
|
| | | </if>
|
| | | </if>
|
| | | ORDER BY u.id DESC
|
| | | LIMIT ${start},${count}
|
| | | </select>
|
| | |
|
| | | <select id="countInfo" resultType="java.lang.Long">
|
| | | SELECT IFNULL(count(u.id),0) FROM yeshi_ec_user u
|
| | | LEFT JOIN yeshi_ec_user_info_extra ext ON u.`id` = ext.uie_uid
|
| | | LEFT JOIN yeshi_ec_user_rank rak ON rak.ur_id = ext.uie_rank_id
|
| | | LEFT JOIN yeshi_ec_team_user_level_statistic lc ON lc.`tuls_uid` = u.id
|
| | | <if test="keyType == 4">
|
| | | LEFT JOIN yeshi_ec_binding_account b ON u.`id` = b.`uid`
|
| | | </if>
|
| | | where 1=1
|
| | | <if test="userState != null">
|
| | | AND u.`state` = #{userState}
|
| | | </if>
|
| | | <if test="userType!=null">
|
| | | AND u.type=#{userType}
|
| | | </if>
|
| | | <if test="startTime != null and startTime !='' ">
|
| | | AND DATE_FORMAT(FROM_UNIXTIME(u.createtime/1000),'%Y%m%d')<![CDATA[>=]]>
|
| | | DATE_FORMAT(#{startTime},'%Y%m%d')
|
| | | </if>
|
| | | <if test="endTime != null and endTime !=''">
|
| | | AND DATE_FORMAT(FROM_UNIXTIME(u.createtime/1000),'%Y%m%d')<![CDATA[<=]]>
|
| | | DATE_FORMAT(#{endTime},'%Y%m%d')
|
| | | </if>
|
| | | <if test="userRank != null">
|
| | | AND rak.ur_name = #{userRank}
|
| | | </if>
|
| | | <if test = "level != null and level != ''">
|
| | | AND lc.tuls_level = #{level}
|
| | | </if>
|
| | | <if test="activeCode == 0">
|
| | | AND (ext.`uie_invite_code` is null OR ext.`uie_invite_code`='')
|
| | | </if>
|
| | | <if test="activeCode == 1">
|
| | | AND (ext.`uie_invite_code` is not null OR ext.`uie_invite_code`<![CDATA[<>]]>'')
|
| | | </if>
|
| | | <if test="key != null and key !='' ">
|
| | | <if test="keyType == 1">
|
| | | AND u.id = #{key}
|
| | | </if>
|
| | | <if test="keyType == 2">
|
| | | AND u.`nick_name` LIKE '%${key}%'
|
| | | </if>
|
| | | <if test="keyType == 3">
|
| | | AND u.`phone` = #{key}
|
| | | </if>
|
| | | <if test="keyType == 4">
|
| | | AND b.`account` = #{key}
|
| | | </if>
|
| | | <if test="keyType == 5">
|
| | | AND (ext.`uie_invite_code` = #{key} OR ext.`uie_invite_code_vip`= #{key})
|
| | | </if>
|
| | | </if>
|
| | | </select>
|
| | |
|
| | |
|
| | | <select id="query" resultMap="BaseResultMapVO">
|
| | | SELECT *
|
| | | ,(SELECT COUNT(hb.hb_id) FROM `yeshi_ec_hongbao_v2` hb
|
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
| | |
|
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.goods.ShareGoodsTextTemplateMapper">
|
| | | <resultMap id="BaseResultMap"
|
| | | type="com.yeshi.fanli.entity.goods.ShareGoodsTextTemplate">
|
| | | <id column="st_id" property="id" jdbcType="BIGINT" />
|
| | | <result column="st_uid" property="uid" jdbcType="BIGINT" />
|
| | | <result column="st_share_text_template" property="shareTextTemplate"
|
| | | jdbcType="VARCHAR" />
|
| | | <result column="st_share_coupon_text_template" property="shareCouponTextTemplate"
|
| | | jdbcType="VARCHAR" />
|
| | | |
| | | <result column="st_share_taolijin_text_template" property="shareTaoLiJinTextTemplate" jdbcType="VARCHAR" />
|
| | | |
| | | <result column="st_share_jd_text_template" property="shareJDTextTemplate" jdbcType="VARCHAR" />
|
| | | <result column="st_share_jd_text_template_coupon" property="shareJDTextTemplateCoupon" jdbcType="VARCHAR" />
|
| | | <result column="st_share_pdd_text_template" property="sharePDDTextTemplate" jdbcType="VARCHAR" />
|
| | | <result column="st_share_pdd_text_template_coupon" property="sharePDDTextTemplateCoupon" jdbcType="VARCHAR" />
|
| | | |
| | | <result column="st_create_time" property="createTime" jdbcType="TIMESTAMP" />
|
| | | <result column="st_update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
| | | </resultMap>
|
| | | <sql id="Base_Column_List">st_id,st_uid,st_share_text_template,st_share_coupon_text_template,st_share_taolijin_text_template,st_create_time,st_share_jd_text_template,st_share_jd_text_template_coupon,st_share_pdd_text_template,st_share_pdd_text_template_coupon,st_update_time
|
| | | </sql>
|
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.goods.ShareGoodsTextTemplate">
|
| | | <id column="st_id" property="id" jdbcType="BIGINT"/>
|
| | | <result column="st_uid" property="uid" jdbcType="BIGINT"/>
|
| | | <result column="st_share_text_template" property="shareTextTemplate" jdbcType="VARCHAR"/>
|
| | | <result column="st_share_coupon_text_template" property="shareCouponTextTemplate" jdbcType="VARCHAR"/>
|
| | | <result column="st_share_taolijin_text_template" property="shareTaoLiJinTextTemplate" jdbcType="VARCHAR"/>
|
| | | <result column="st_share_jd_text_template" property="shareJDTextTemplate" jdbcType="VARCHAR"/>
|
| | | <result column="st_share_jd_text_template_coupon" property="shareJDTextTemplateCoupon" jdbcType="VARCHAR"/>
|
| | | <result column="st_share_pdd_text_template" property="sharePDDTextTemplate" jdbcType="VARCHAR"/>
|
| | | <result column="st_share_pdd_text_template_coupon" property="sharePDDTextTemplateCoupon" jdbcType="VARCHAR"/>
|
| | | <result column="st_share_vip_text_template" property="shareVIPTextTemplate" jdbcType="VARCHAR"/>
|
| | | <result column="st_share_vip_text_template_coupon" property="shareVIPTextTemplateCoupon" jdbcType="VARCHAR"/>
|
| | | <result column="st_share_suning_text_template" property="shareSuNingTextTemplate" jdbcType="VARCHAR"/>
|
| | | <result column="st_share_suning_text_template_coupon" property="shareSuNingTextTemplateCoupon" jdbcType="VARCHAR"/>
|
| | | <result column="st_create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
| | | <result column="st_update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
| | | </resultMap>
|
| | | <sql id="Base_Column_List">st_id,st_uid,st_share_text_template,st_share_coupon_text_template,st_share_taolijin_text_template,st_share_jd_text_template,st_share_jd_text_template_coupon,st_share_pdd_text_template,st_share_pdd_text_template_coupon,st_share_vip_text_template,st_share_vip_text_template_coupon,st_share_suning_text_template,st_share_suning_text_template_coupon,st_create_time,st_update_time</sql>
|
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
| | | parameterType="java.lang.Long">
|
| | | select
|
| | |
| | | from yeshi_ec_share_template where st_uid = #{0}
|
| | | </select>
|
| | |
|
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
|
| | | yeshi_ec_share_template where st_id = #{id,jdbcType=BIGINT}
|
| | | </delete>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.goods.ShareGoodsTextTemplate"
|
| | | useGeneratedKeys="true" keyProperty="id">insert into
|
| | | yeshi_ec_share_template
|
| | | (st_id,st_uid,st_share_text_template,st_share_coupon_text_template,st_share_taolijin_text_template,st_share_jd_text_template,st_share_jd_text_template_coupon,st_share_pdd_text_template,st_share_pdd_text_template_coupon,st_create_time,st_update_time)
|
| | | values
|
| | | (#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{shareTextTemplate,jdbcType=VARCHAR},#{shareCouponTextTemplate,jdbcType=VARCHAR},#{shareTaoLiJinTextTemplate,jdbcType=VARCHAR},#{shareJDTextTemplate,jdbcType=VARCHAR},#{shareJDTextTemplateCoupon,jdbcType=VARCHAR},#{sharePDDTextTemplate,jdbcType=VARCHAR},#{sharePDDTextTemplateCoupon,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
|
| | | </insert>
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.goods.ShareGoodsTextTemplate"
|
| | | useGeneratedKeys="true" keyProperty="id">
|
| | | insert into yeshi_ec_share_template
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">st_id,</if>
|
| | | <if test="uid != null">st_uid,</if>
|
| | | <if test="shareTextTemplate != null">st_share_text_template,</if>
|
| | | <if test="shareCouponTextTemplate != null">st_share_coupon_text_template,</if>
|
| | | <if test="shareTaoLiJinTextTemplate != null">st_share_taolijin_text_template,</if>
|
| | | <if test="shareJDTextTemplate != null">st_share_jd_text_template,</if>
|
| | | <if test="shareJDTextTemplateCoupon != null">st_share_jd_text_template_coupon,</if>
|
| | | <if test="sharePDDTextTemplate != null">st_share_pdd_text_template,</if>
|
| | | <if test="sharePDDTextTemplateCoupon != null">st_share_pdd_text_template_coupon,</if>
|
| | | <if test="createTime != null">st_create_time,</if>
|
| | | <if test="updateTime != null">st_update_time,</if>
|
| | | </trim>
|
| | | values
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if>
|
| | | <if test="uid != null">#{uid,jdbcType=BIGINT},</if>
|
| | | <if test="shareTextTemplate != null">#{shareTextTemplate,jdbcType=VARCHAR},</if>
|
| | | <if test="shareCouponTextTemplate != null">#{shareCouponTextTemplate,jdbcType=VARCHAR},</if>
|
| | | <if test="shareTaoLiJinTextTemplate != null">#{shareTaoLiJinTextTemplate,jdbcType=VARCHAR},</if>
|
| | | <if test="shareJDTextTemplate != null">#{shareJDTextTemplate,jdbcType=VARCHAR},</if>
|
| | | <if test="shareJDTextTemplateCoupon != null">#{shareJDTextTemplateCoupon,jdbcType=VARCHAR},</if>
|
| | | <if test="sharePDDTextTemplate != null">#{sharePDDTextTemplate,jdbcType=VARCHAR},</if>
|
| | | <if test="sharePDDTextTemplateCoupon != null">#{sharePDDTextTemplateCoupon,jdbcType=VARCHAR},</if>
|
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | </trim>
|
| | | </insert>
|
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.goods.ShareGoodsTextTemplate">update
|
| | | yeshi_ec_share_template set st_uid =
|
| | | #{uid,jdbcType=BIGINT},st_share_text_template =
|
| | | #{shareTextTemplate,jdbcType=VARCHAR},st_share_coupon_text_template =
|
| | | #{shareCouponTextTemplate,jdbcType=VARCHAR},
|
| | | st_share_taolijin_text_template =#{shareTaoLiJinTextTemplate,jdbcType=VARCHAR},
|
| | | st_share_jd_text_template =#{shareJDTextTemplate,jdbcType=VARCHAR},
|
| | | st_share_jd_text_template_coupon =#{shareJDTextTemplateCoupon,jdbcType=VARCHAR},
|
| | | st_share_pdd_text_template =#{sharePDDTextTemplate,jdbcType=VARCHAR},
|
| | | st_share_pdd_text_template_coupon =#{sharePDDTextTemplateCoupon,jdbcType=VARCHAR},
|
| | | st_create_time =#{createTime,jdbcType=TIMESTAMP},st_update_time =
|
| | | #{updateTime,jdbcType=TIMESTAMP} where st_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.goods.ShareGoodsTextTemplate">
|
| | | update yeshi_ec_share_template
|
| | | <set>
|
| | | <if test="uid != null">st_uid=#{uid,jdbcType=BIGINT},</if>
|
| | | <if test="shareTextTemplate != null">st_share_text_template=#{shareTextTemplate,jdbcType=VARCHAR},
|
| | | </if>
|
| | | <if test="shareCouponTextTemplate != null">st_share_coupon_text_template=#{shareCouponTextTemplate,jdbcType=VARCHAR},
|
| | | </if>
|
| | | <if test="shareTaoLiJinTextTemplate != null">st_share_taolijin_text_template=#{shareTaoLiJinTextTemplate,jdbcType=VARCHAR},
|
| | | </if>
|
| | | <if test="shareJDTextTemplate != null">st_share_jd_text_template=#{shareJDTextTemplate,jdbcType=VARCHAR},
|
| | | </if>
|
| | | <if test="shareJDTextTemplateCoupon != null">st_share_jd_text_template_coupon=#{shareJDTextTemplateCoupon,jdbcType=VARCHAR},
|
| | | </if>
|
| | | <if test="sharePDDTextTemplate != null">st_share_pdd_text_template=#{sharePDDTextTemplate,jdbcType=VARCHAR},
|
| | | </if>
|
| | | <if test="sharePDDTextTemplateCoupon != null">st_share_pdd_text_template_coupon=#{sharePDDTextTemplateCoupon,jdbcType=VARCHAR},
|
| | | </if>
|
| | | <if test="createTime != null">st_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">st_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | </set>
|
| | | where st_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_share_template where st_id = #{id,jdbcType=BIGINT}</delete>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.goods.ShareGoodsTextTemplate" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_share_template (st_id,st_uid,st_share_text_template,st_share_coupon_text_template,st_share_taolijin_text_template,st_share_jd_text_template,st_share_jd_text_template_coupon,st_share_pdd_text_template,st_share_pdd_text_template_coupon,st_share_vip_text_template,st_share_vip_text_template_coupon,st_share_suning_text_template,st_share_suning_text_template_coupon,st_create_time,st_update_time) values (#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{shareTextTemplate,jdbcType=VARCHAR},#{shareCouponTextTemplate,jdbcType=VARCHAR},#{shareTaoLiJinTextTemplate,jdbcType=VARCHAR},#{shareJDTextTemplate,jdbcType=VARCHAR},#{shareJDTextTemplateCoupon,jdbcType=VARCHAR},#{sharePDDTextTemplate,jdbcType=VARCHAR},#{sharePDDTextTemplateCoupon,jdbcType=VARCHAR},#{shareVIPTextTemplate,jdbcType=VARCHAR},#{shareVIPTextTemplateCoupon,jdbcType=VARCHAR},#{shareSuNingTextTemplate,jdbcType=VARCHAR},#{shareSuNingTextTemplateCoupon,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.goods.ShareGoodsTextTemplate" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_share_template
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">st_id,</if>
|
| | | <if test="uid != null">st_uid,</if>
|
| | | <if test="shareTextTemplate != null">st_share_text_template,</if>
|
| | | <if test="shareCouponTextTemplate != null">st_share_coupon_text_template,</if>
|
| | | <if test="shareTaoLiJinTextTemplate != null">st_share_taolijin_text_template,</if>
|
| | | <if test="shareJDTextTemplate != null">st_share_jd_text_template,</if>
|
| | | <if test="shareJDTextTemplateCoupon != null">st_share_jd_text_template_coupon,</if>
|
| | | <if test="sharePDDTextTemplate != null">st_share_pdd_text_template,</if>
|
| | | <if test="sharePDDTextTemplateCoupon != null">st_share_pdd_text_template_coupon,</if>
|
| | | <if test="shareVIPTextTemplate != null">st_share_vip_text_template,</if>
|
| | | <if test="shareVIPTextTemplateCoupon != null">st_share_vip_text_template_coupon,</if>
|
| | | <if test="shareSuNingTextTemplate != null">st_share_suning_text_template,</if>
|
| | | <if test="shareSuNingTextTemplateCoupon != null">st_share_suning_text_template_coupon,</if>
|
| | | <if test="createTime != null">st_create_time,</if>
|
| | | <if test="updateTime != null">st_update_time,</if>
|
| | | </trim>values
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if>
|
| | | <if test="uid != null">#{uid,jdbcType=BIGINT},</if>
|
| | | <if test="shareTextTemplate != null">#{shareTextTemplate,jdbcType=VARCHAR},</if>
|
| | | <if test="shareCouponTextTemplate != null">#{shareCouponTextTemplate,jdbcType=VARCHAR},</if>
|
| | | <if test="shareTaoLiJinTextTemplate != null">#{shareTaoLiJinTextTemplate,jdbcType=VARCHAR},</if>
|
| | | <if test="shareJDTextTemplate != null">#{shareJDTextTemplate,jdbcType=VARCHAR},</if>
|
| | | <if test="shareJDTextTemplateCoupon != null">#{shareJDTextTemplateCoupon,jdbcType=VARCHAR},</if>
|
| | | <if test="sharePDDTextTemplate != null">#{sharePDDTextTemplate,jdbcType=VARCHAR},</if>
|
| | | <if test="sharePDDTextTemplateCoupon != null">#{sharePDDTextTemplateCoupon,jdbcType=VARCHAR},</if>
|
| | | <if test="shareVIPTextTemplate != null">#{shareVIPTextTemplate,jdbcType=VARCHAR},</if>
|
| | | <if test="shareVIPTextTemplateCoupon != null">#{shareVIPTextTemplateCoupon,jdbcType=VARCHAR},</if>
|
| | | <if test="shareSuNingTextTemplate != null">#{shareSuNingTextTemplate,jdbcType=VARCHAR},</if>
|
| | | <if test="shareSuNingTextTemplateCoupon != null">#{shareSuNingTextTemplateCoupon,jdbcType=VARCHAR},</if>
|
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | </trim>
|
| | | </insert>
|
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.goods.ShareGoodsTextTemplate">update yeshi_ec_share_template set st_uid = #{uid,jdbcType=BIGINT},st_share_text_template = #{shareTextTemplate,jdbcType=VARCHAR},st_share_coupon_text_template = #{shareCouponTextTemplate,jdbcType=VARCHAR},st_share_taolijin_text_template = #{shareTaoLiJinTextTemplate,jdbcType=VARCHAR},st_share_jd_text_template = #{shareJDTextTemplate,jdbcType=VARCHAR},st_share_jd_text_template_coupon = #{shareJDTextTemplateCoupon,jdbcType=VARCHAR},st_share_pdd_text_template = #{sharePDDTextTemplate,jdbcType=VARCHAR},st_share_pdd_text_template_coupon = #{sharePDDTextTemplateCoupon,jdbcType=VARCHAR},st_share_vip_text_template = #{shareVIPTextTemplate,jdbcType=VARCHAR},st_share_vip_text_template_coupon = #{shareVIPTextTemplateCoupon,jdbcType=VARCHAR},st_share_suning_text_template = #{shareSuNingTextTemplate,jdbcType=VARCHAR},st_share_suning_text_template_coupon = #{shareSuNingTextTemplateCoupon,jdbcType=VARCHAR},st_create_time = #{createTime,jdbcType=TIMESTAMP},st_update_time = #{updateTime,jdbcType=TIMESTAMP} where st_id = #{id,jdbcType=BIGINT}</update>
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.goods.ShareGoodsTextTemplate">update yeshi_ec_share_template
|
| | | <set>
|
| | | <if test="uid != null">st_uid=#{uid,jdbcType=BIGINT},</if>
|
| | | <if test="shareTextTemplate != null">st_share_text_template=#{shareTextTemplate,jdbcType=VARCHAR},</if>
|
| | | <if test="shareCouponTextTemplate != null">st_share_coupon_text_template=#{shareCouponTextTemplate,jdbcType=VARCHAR},</if>
|
| | | <if test="shareTaoLiJinTextTemplate != null">st_share_taolijin_text_template=#{shareTaoLiJinTextTemplate,jdbcType=VARCHAR},</if>
|
| | | <if test="shareJDTextTemplate != null">st_share_jd_text_template=#{shareJDTextTemplate,jdbcType=VARCHAR},</if>
|
| | | <if test="shareJDTextTemplateCoupon != null">st_share_jd_text_template_coupon=#{shareJDTextTemplateCoupon,jdbcType=VARCHAR},</if>
|
| | | <if test="sharePDDTextTemplate != null">st_share_pdd_text_template=#{sharePDDTextTemplate,jdbcType=VARCHAR},</if>
|
| | | <if test="sharePDDTextTemplateCoupon != null">st_share_pdd_text_template_coupon=#{sharePDDTextTemplateCoupon,jdbcType=VARCHAR},</if>
|
| | | <if test="shareVIPTextTemplate != null">st_share_vip_text_template=#{shareVIPTextTemplate,jdbcType=VARCHAR},</if>
|
| | | <if test="shareVIPTextTemplateCoupon != null">st_share_vip_text_template_coupon=#{shareVIPTextTemplateCoupon,jdbcType=VARCHAR},</if>
|
| | | <if test="shareSuNingTextTemplate != null">st_share_suning_text_template=#{shareSuNingTextTemplate,jdbcType=VARCHAR},</if>
|
| | | <if test="shareSuNingTextTemplateCoupon != null">st_share_suning_text_template_coupon=#{shareSuNingTextTemplateCoupon,jdbcType=VARCHAR},</if>
|
| | | <if test="createTime != null">st_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
| | | <if test="updateTime != null">st_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | </set> where st_id = #{id,jdbcType=BIGINT}
|
| | | </update>
|
| | | </mapper>
|
| | |
| | | SELECT COUNT(d.`td_id`) FROM `yeshi_ec_integral_detail` d
|
| | | <if test="key != null and key != ''">WHERE d.`td_uid` LIKE '%${key}%'</if>
|
| | | </select>
|
| | | |
| | | <select id="sumUseGoldCoin" resultType = "Long">
|
| | | SELECT SUM(d.`td_money`) FROM `yeshi_ec_integral_detail` d
|
| | | WHERE d.`td_uid` = #{uid} AND d.`td_money`<![CDATA[<]]> 0
|
| | | </select>
|
| | | |
| | | |
| | | </mapper>
|
| | |
| | | GROUP BY d.`co_order_no`,d.`co_source_type`)A |
| | | </select> |
| | | |
| | | <select id="countHistoryOrderNum" resultType="Long"> |
| | | SELECT COUNT(hb_id) FROM (SELECT v2.`hb_id` FROM yeshi_ec_hongbao_v2 v2 |
| | | LEFT JOIN yeshi_ec_hongbao_order ho ON IF(v2.hb_pid IS NULL,v2.hb_id,v2.hb_pid)=ho.`ho_hongbao_id` |
| | | LEFT JOIN yeshi_ec_common_order co ON co.`co_id`=ho.`ho_order_id` |
| | | WHERE v2.hb_uid = #{uid} |
| | | GROUP BY co.`co_order_no`, co.`co_source_type`)A |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | </delete> |
| | | |
| | | |
| | | <select id="query" resultMap="BaseResultMap"> |
| | | SELECT * FROM yeshi_ec_user_cloud_goods tg |
| | | LEFT JOIN `yeshi_ec_common_goods` cg ON tg.`ug_common_id` = cg.`cg_id` |
| | | WHERE 1=1 |
| | | <if test="key != null and key != ''">AND tg.`ug_uid` = #{key}</if> |
| | | ORDER BY tg.ug_id DESC |
| | | LIMIT #{start},#{count} |
| | | </select> |
| | | |
| | | <select id="count" resultType="java.lang.Long"> |
| | | SELECT IFNULL(count(ug_id),0) FROM yeshi_ec_user_cloud_goods tg |
| | | WHERE 1=1 |
| | | <if test="key != null and key != ''"> AND tg.`ug_uid` = #{key}</if> |
| | | </select> |
| | | |
| | | |
| | | <select id="listByUid" resultMap="BaseResultMap"> |
| | | SELECT * FROM yeshi_ec_user_cloud_goods tg |
| | | LEFT JOIN `yeshi_ec_common_goods` cg ON tg.`ug_common_id` = cg.`cg_id` |
| | |
| | | return count; |
| | | } |
| | | |
| | | @Override |
| | | public long countHistoryOrderNum(Long uid) { |
| | | Long count = commonOrderCountMapper.countHistoryOrderNum(uid); |
| | | if (count == null) { |
| | | count = 0L; |
| | | } |
| | | return count; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | public String getTextTemplateByVIP(Long uid) {
|
| | | String template = "";
|
| | | ShareGoodsTextTemplate objct = shareGoodsTextTemplateMapper.selectByUid(uid);
|
| | | if (objct != null && !StringUtil.isNullOrEmpty(objct.getSharePDDTextTemplate())) {
|
| | | template = objct.getSharePDDTextTemplate();
|
| | | if (template.contains("{商品原价}") || template.contains("{总销量}") || template.contains("{短链接}")) {
|
| | | template = ""; // 老板分享
|
| | | }
|
| | | if (objct != null && !StringUtil.isNullOrEmpty(objct.getShareVIPTextTemplate())) {
|
| | | template = objct.getShareVIPTextTemplate();
|
| | | }
|
| | | if (StringUtil.isNullOrEmpty(template)) {
|
| | | template = configService.get(ConfigKeyEnum.shareCommentTextPDD.getKey());
|
| | | template = configService.get(ConfigKeyEnum.shareCommentTextVIP.getKey());
|
| | | }
|
| | |
|
| | | return template;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public String createContentSuning(String template, SuningGoodsInfo goods, String jumpLink) {
|
| | | String commentText = template.replace("{原价}", goods.getCommodityInfo().getCommodityPrice());
|
| | | commentText = commentText.replace("{链接}", jumpLink);
|
| | | public String getTextTemplateBySuNing(Long uid) {
|
| | | String template = "";
|
| | | ShareGoodsTextTemplate objct = shareGoodsTextTemplateMapper.selectByUid(uid);
|
| | | if (objct != null && !StringUtil.isNullOrEmpty(objct.getShareSuNingTextTemplate())) {
|
| | | template = objct.getShareSuNingTextTemplate();
|
| | | }
|
| | | if (StringUtil.isNullOrEmpty(template)) {
|
| | | template = configService.get(ConfigKeyEnum.shareCommentTextSuNing.getKey());
|
| | | }
|
| | |
|
| | | commentText = commentText.replace("领券抢购", "抢购");
|
| | | commentText = commentText.replace("【券后价】{券后价}元", "");
|
| | |
|
| | | return deleteBlankLine(commentText);
|
| | | return template;
|
| | | }
|
| | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override
|
| | | public void saveTemplateTB(Long uid, String template) throws ShareGoodsTextTemplateException {
|
| | | verifyRightTB(template);
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public void saveTemplateVIP(Long uid, String template) throws ShareGoodsTextTemplateException {
|
| | | verifyRightVIP(template);
|
| | | ShareGoodsTextTemplate old = shareGoodsTextTemplateMapper.selectByUid(uid);
|
| | | if (old != null) {
|
| | | ShareGoodsTextTemplate update = new ShareGoodsTextTemplate();
|
| | | update.setId(old.getId());
|
| | | update.setShareVIPTextTemplate(template);
|
| | | update.setUpdateTime(new Date());
|
| | | shareGoodsTextTemplateMapper.updateByPrimaryKeySelective(update);
|
| | | } else {
|
| | | ShareGoodsTextTemplate textTemplate = new ShareGoodsTextTemplate();
|
| | | textTemplate.setCreateTime(new Date());
|
| | | textTemplate.setShareVIPTextTemplate(template);
|
| | | textTemplate.setUid(uid);
|
| | | shareGoodsTextTemplateMapper.insertSelective(textTemplate);
|
| | | }
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public void saveTemplateSuNing(Long uid, String template) throws ShareGoodsTextTemplateException {
|
| | | verifyRightSuNing(template);
|
| | | ShareGoodsTextTemplate old = shareGoodsTextTemplateMapper.selectByUid(uid);
|
| | | if (old != null) {
|
| | | ShareGoodsTextTemplate update = new ShareGoodsTextTemplate();
|
| | | update.setId(old.getId());
|
| | | update.setShareSuNingTextTemplate(template);
|
| | | update.setUpdateTime(new Date());
|
| | | shareGoodsTextTemplateMapper.updateByPrimaryKeySelective(update);
|
| | | } else {
|
| | | ShareGoodsTextTemplate textTemplate = new ShareGoodsTextTemplate();
|
| | | textTemplate.setCreateTime(new Date());
|
| | | textTemplate.setShareSuNingTextTemplate(template);
|
| | | textTemplate.setUid(uid);
|
| | | shareGoodsTextTemplateMapper.insertSelective(textTemplate);
|
| | | }
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public void verifyRightTB(String template) throws ShareGoodsTextTemplateException {
|
| | | String[] keys = new String[] { "{原价}", "{券后价}", "{淘口令}" };
|
| | |
| | | throw new ShareGoodsTextTemplateException(1, "模板格式有误");
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public void verifyRightVIP(String template) throws ShareGoodsTextTemplateException {
|
| | | String[] keys = new String[] { "{在售价}", "{折扣价}", "{链接}" };
|
| | | int keysCount = 0;
|
| | | for (String key : keys)
|
| | | if (template != null && template.contains(key))
|
| | | keysCount++;
|
| | | if (keysCount == 0)
|
| | | throw new ShareGoodsTextTemplateException(1, "模板格式有误");
|
| | | }
|
| | | |
| | | @Override
|
| | | public void verifyRightSuNing(String template) throws ShareGoodsTextTemplateException {
|
| | | String[] keys = new String[] { "{原价}", "{券后价}", "{链接}" };
|
| | | int keysCount = 0;
|
| | | for (String key : keys)
|
| | | if (template != null && template.contains(key))
|
| | | keysCount++;
|
| | | if (keysCount == 0)
|
| | | throw new ShareGoodsTextTemplateException(1, "模板格式有误");
|
| | | }
|
| | | |
| | | @Override
|
| | | public String createContentTB(String template, TaoBaoGoodsBrief goods, String token, boolean coupon) {
|
| | | String commentText = template.replace("{原价}", goods.getZkPrice().toString());
|
| | |
| | |
|
| | | @Override
|
| | | public String createContentVIP(String template, VIPGoodsInfo goods, String jumpLink) {
|
| | | String commentText = template.replace("{原价}", goods.getMarketPrice());
|
| | | String commentText = template.replace("{在售价}", ""+BigDecimalUtil.getWithNoZera(new BigDecimal(goods.getMarketPrice())));
|
| | | commentText = commentText.replace("{链接}", jumpLink);
|
| | |
|
| | | commentText = commentText.replace("领券抢购", "抢购");
|
| | | commentText = commentText.replace("【券后价】{券后价}元", "");
|
| | |
|
| | | commentText = commentText.replace("{折扣价}", "" +MoneyBigDecimalUtil.getWithNoZera(new BigDecimal(goods.getVipPrice())));
|
| | | return deleteBlankLine(commentText);
|
| | | }
|
| | |
|
| | | |
| | | |
| | | @Override
|
| | | public void isCommonTemplateRight(String template) throws ShareGoodsTextTemplateException {
|
| | | String[] keys = new String[] { "{标题}", "{店铺类型}", "{商品原价}", "{月销量}", "{短链}", "{淘口令}" };
|
| | |
| | | shareGoodsTextTemplateMapper.updateByPrimaryKeySelective(update);
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public void resetCommonTemplateVIP(Long uid) {
|
| | | ShareGoodsTextTemplate template = shareGoodsTextTemplateMapper.selectByUid(uid);
|
| | | if (template != null) {
|
| | | ShareGoodsTextTemplate update = new ShareGoodsTextTemplate();
|
| | | update.setId(template.getId());
|
| | | update.setShareVIPTextTemplate("");
|
| | | update.setUpdateTime(new Date());
|
| | | shareGoodsTextTemplateMapper.updateByPrimaryKeySelective(update);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void resetCouponTemplateVIP(Long uid) {
|
| | | ShareGoodsTextTemplate template = shareGoodsTextTemplateMapper.selectByUid(uid);
|
| | | if (template != null) {
|
| | | ShareGoodsTextTemplate update = new ShareGoodsTextTemplate();
|
| | | update.setId(template.getId());
|
| | | update.setShareVIPTextTemplateCoupon("");
|
| | | update.setUpdateTime(new Date());
|
| | | shareGoodsTextTemplateMapper.updateByPrimaryKeySelective(update);
|
| | | }
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public void resetCommonTemplateSuNing(Long uid) {
|
| | | ShareGoodsTextTemplate template = shareGoodsTextTemplateMapper.selectByUid(uid);
|
| | | if (template != null) {
|
| | | ShareGoodsTextTemplate update = new ShareGoodsTextTemplate();
|
| | | update.setId(template.getId());
|
| | | update.setShareSuNingTextTemplate("");
|
| | | update.setUpdateTime(new Date());
|
| | | shareGoodsTextTemplateMapper.updateByPrimaryKeySelective(update);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void resetCouponTemplateSuNing(Long uid) {
|
| | | ShareGoodsTextTemplate template = shareGoodsTextTemplateMapper.selectByUid(uid);
|
| | | if (template != null) {
|
| | | ShareGoodsTextTemplate update = new ShareGoodsTextTemplate();
|
| | | update.setId(template.getId());
|
| | | update.setShareSuNingTextTemplateCoupon("");
|
| | | update.setUpdateTime(new Date());
|
| | | shareGoodsTextTemplateMapper.updateByPrimaryKeySelective(update);
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public void resetTaoLijinTemplate(Long uid) {
|
| | | ShareGoodsTextTemplate template = shareGoodsTextTemplateMapper.selectByUid(uid);
|
| | |
| | |
|
| | | return commentText.replace("\r\n\r\n", "\r\n").replace("\r\n\r\n", "\r\n").replace("\r\n\r\n", "\r\n");
|
| | | }
|
| | | |
| | | |
| | | |
| | | @Override
|
| | | public String createQuickShareTextSuNing(String template, SuningGoodsInfo goods, String jumpLink) {
|
| | | String commodityPrice = goods.getCommodityInfo().getCommodityPrice();
|
| | | if (StringUtil.isNullOrEmpty(commodityPrice)) {
|
| | | commodityPrice = goods.getCommodityInfo().getSnPrice();
|
| | | }
|
| | | |
| | | String commentText = template.replace("[原价]", BigDecimalUtil.getWithNoZera(new BigDecimal(commodityPrice)).toString());
|
| | | commentText = commentText.replace("[链接]", jumpLink);
|
| | | if (goods.getCouponInfo() != null && !StringUtil.isNullOrEmpty(goods.getCouponInfo().getCouponUrl())) {// 有券
|
| | | BigDecimal amount = new BigDecimal(goods.getCouponInfo().getCouponValue());
|
| | | BigDecimal startFee = new BigDecimal(goods.getCouponInfo().getBounsLimit());
|
| | | BigDecimal zkPrice = new BigDecimal(commodityPrice);
|
| | | BigDecimal couponPrice = zkPrice;
|
| | | if (zkPrice.compareTo(startFee) >= 0) {
|
| | | couponPrice = zkPrice.subtract(amount);
|
| | | commentText = commentText.replace("[券后价]",BigDecimalUtil.getWithNoZera(couponPrice).toString());
|
| | | } else {
|
| | | commentText = commentText.replace("【券后价】[券后价]元", "");
|
| | | }
|
| | | } else {
|
| | | commentText = commentText.replace("领券抢购", "抢购");
|
| | | commentText = commentText.replace("【券后价】[券后价]元", "");
|
| | | }
|
| | | return deleteBlankLine(commentText);
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public String createCommonShareTextSuNing(String template, SuningGoodsInfo goods, String jumpLink) {
|
| | | String commodityPrice = goods.getCommodityInfo().getCommodityPrice();
|
| | | if (StringUtil.isNullOrEmpty(commodityPrice)) {
|
| | | commodityPrice = goods.getCommodityInfo().getSnPrice();
|
| | | }
|
| | | String commentText = template.replace("{原价}", BigDecimalUtil.getWithNoZera(new BigDecimal(commodityPrice)).toString());
|
| | | commentText = commentText.replace("{链接}", jumpLink);
|
| | | if (goods.getCouponInfo() != null && !StringUtil.isNullOrEmpty(goods.getCouponInfo().getCouponUrl())) {// 有券
|
| | | BigDecimal amount = new BigDecimal(goods.getCouponInfo().getCouponValue());
|
| | | BigDecimal startFee = new BigDecimal(goods.getCouponInfo().getBounsLimit());
|
| | | BigDecimal zkPrice = new BigDecimal(commodityPrice);
|
| | | BigDecimal couponPrice = zkPrice;
|
| | | if (zkPrice.compareTo(startFee) >= 0) {
|
| | | couponPrice = zkPrice.subtract(amount);
|
| | | commentText = commentText.replace("{券后价}",BigDecimalUtil.getWithNoZera(couponPrice).toString());
|
| | | } else {
|
| | | commentText = commentText.replace("{券后价}", BigDecimalUtil.getWithNoZera(new BigDecimal(commodityPrice)).toString());
|
| | | }
|
| | | } else {
|
| | | commentText = commentText.replace("领券抢购", "抢购");
|
| | | commentText = commentText.replace("【券后价】{券后价}元", "");
|
| | | }
|
| | | return deleteBlankLine(commentText);
|
| | | }
|
| | |
|
| | | |
| | | }
|
| | |
| | | import com.yeshi.fanli.exception.user.UserInfoException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.count.HongBaoV2CountService;
|
| | | import com.yeshi.fanli.service.inter.order.CommonOrderCountService;
|
| | | import com.yeshi.fanli.service.inter.user.SpreadUserImgService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoModifyRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.integral.IntegralDetailService;
|
| | | import com.yeshi.fanli.service.inter.user.invite.ThreeSaleSerivce;
|
| | | import com.yeshi.fanli.service.inter.user.tb.TaoBaoUnionAuthRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.tb.UserExtraTaoBaoInfoService;
|
| | |
| | |
|
| | | @Resource
|
| | | private HongBaoV2CountService hongBaoV2CountService;
|
| | |
|
| | | |
| | | @Lazy
|
| | | @Resource
|
| | | private CommonOrderCountService commonOrderCountService;
|
| | |
|
| | | @Resource
|
| | | private UserExtraTaoBaoInfoService userExtraTaoBaoInfoService;
|
| | |
| | |
|
| | | @Resource
|
| | | private SpreadUserImgService spreadUserImgService;
|
| | |
|
| | | |
| | | @Lazy
|
| | | @Resource
|
| | | private IntegralDetailService integralDetailService;
|
| | | |
| | | @Lazy
|
| | | @Resource
|
| | | private UserInfoModifyRecordService userInfoModifyRecordService;
|
| | | |
| | | |
| | |
|
| | | public UserInfo getUserByLoginTypeAndOpenId(int loginType, String openid, String appid) {
|
| | | List<UserInfo> list = null;
|
| | |
| | | return UserUtil.filterForClientUser(user);
|
| | | }
|
| | |
|
| | | |
| | | |
| | | @Override
|
| | | public long countInfo(Integer userState, String key, Integer keyType, String userRank, Integer days,
|
| | | String startTime, String endTime,Integer userType, String level, Integer activeCode) {
|
| | | return userInfoMapper.countInfo(userState, key, keyType, userRank, days, startTime, endTime,userType, level, activeCode);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<UserInfoVO> queryInfo(long start, int count, Integer userState, String key, Integer keyType,
|
| | | String userRank, Integer days, String startTime, String endTime, Integer userType, String level, Integer activeCode) {
|
| | |
|
| | | List<UserInfoVO> userList = userInfoMapper.queryInfo(start, count, userState, key, keyType, userRank, days,
|
| | | startTime, endTime, userType, level, activeCode);
|
| | |
|
| | | if (userList == null || userList.size() == 0) {
|
| | | return null;
|
| | | }
|
| | |
|
| | | for (UserInfoVO userInfoVO : userList) {
|
| | | Long uid = userInfoVO.getId();
|
| | | String rankName = userInfoVO.getRankName();
|
| | | if (rankName == null || rankName.trim().length() == 0) {
|
| | | userInfoVO.setRankName("青铜");
|
| | | userInfoVO.setRankPicture("http://img.flqapp.com/resource/rank/rank_picture_new_1.png");
|
| | | }
|
| | |
|
| | | String userLevel = userInfoVO.getUserLevel();
|
| | | if (!StringUtil.isNullOrEmpty(userLevel)) {
|
| | | userInfoVO.setUserLevel(UserLevelUtil.getByEnumName(userLevel).getName());
|
| | | }
|
| | | // 累计提现
|
| | | userInfoVO.setTotalExtract(payInfoMapper.sumMoneyByUid(uid));
|
| | | |
| | | // 累计订单数量
|
| | | userInfoVO.setTotalOrder(commonOrderCountService.countHistoryOrderNum(uid));
|
| | | |
| | | // 累计兑换金币
|
| | | userInfoVO.setTotalGoldCoinUsed(integralDetailService.sumUseGoldCoin(uid));
|
| | | |
| | | // 邀请人
|
| | | UserInfo boss = threeSaleSerivce.getBoss(uid);
|
| | | if (boss == null) {
|
| | | userInfoVO.setBossName("");
|
| | | } else {
|
| | | userInfoVO.setBossName("上级:" + boss.getNickName());
|
| | | }
|
| | | }
|
| | |
|
| | | return userList;
|
| | | }
|
| | |
|
| | | |
| | | |
| | | |
| | | @Override
|
| | | public long queryCount(Integer userState, String key, Integer keyType, String userRank, Integer days,
|
| | | String startTime, String endTime,Integer userType, String level, Integer activeCode) {
|
| | |
| | |
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | | import java.util.Set;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | |
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.goods.CommonGoodsService;
|
| | | import com.yeshi.fanli.service.inter.user.cloud.UserCloudGoodsService;
|
| | | import com.yeshi.fanli.service.inter.user.cloud.UserCloudManageService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.cache.JDGoodsCacheUtil;
|
| | |
| | | import com.yeshi.fanli.util.rocketmq.MQMsgBodyFactory;
|
| | | import com.yeshi.fanli.util.rocketmq.MQTopicName;
|
| | | import com.yeshi.fanli.util.suning.SuningApiUtil;
|
| | | import com.yeshi.fanli.util.suning.SuningUtil;
|
| | | import com.yeshi.fanli.util.vipshop.VipShopApiUtil;
|
| | |
|
| | |
|
| | | @Service
|
| | | public class UserCloudGoodsServiceImpl implements UserCloudGoodsService {
|
| | |
|
| | | @Resource
|
| | | private UserCloudGoodsMapper userCloudGoodsMapper;
|
| | | |
| | |
|
| | | @Resource
|
| | | private RedisManager redisManager;
|
| | | |
| | |
|
| | | @Resource
|
| | | private JDGoodsCacheUtil jdGoodsCacheUtil;
|
| | | |
| | |
|
| | | @Resource
|
| | | private PinDuoDuoCacheUtil pinDuoDuoCacheUtil;
|
| | | |
| | |
|
| | | @Resource
|
| | | private CommonGoodsService commonGoodsService;
|
| | | |
| | |
|
| | | @Resource
|
| | | private UserCloudManageService userCloudManageService;
|
| | |
|
| | | @Resource(name = "producer")
|
| | | private Producer producer;
|
| | | |
| | | |
| | |
|
| | | @Override
|
| | | public void deleteByPrimaryKeyAndUid(Long id, Long uid) {
|
| | | userCloudGoodsMapper.deleteByPrimaryKeyAndUid(id, uid);
|
| | | }
|
| | | |
| | |
|
| | | @Override
|
| | | public UserCloudGoods selectByPrimaryKey(Long id) {
|
| | | return userCloudGoodsMapper.selectByPrimaryKey(id);
|
| | | }
|
| | | |
| | |
|
| | | @Override
|
| | | public void updateByPrimaryKeySelective(UserCloudGoods record) {
|
| | | userCloudGoodsMapper.updateByPrimaryKeySelective(record);
|
| | | }
|
| | | |
| | | |
| | |
|
| | | @Override
|
| | | public List<UserCloudGoods> query(int page, int pageSize, String key) {
|
| | | return userCloudGoodsMapper.query((page - 1) * pageSize, pageSize, key);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public long count(String key) {
|
| | | return userCloudGoodsMapper.count(key);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<UserCloudGoods> listByUid(long start, int count, Long uid) {
|
| | | return userCloudGoodsMapper.listByUid(start, count, uid);
|
| | |
| | | return userCloudGoodsMapper.listByNotShare(uid);
|
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | | public long countByUid(Long uid) {
|
| | | return userCloudGoodsMapper.countByUid(uid);
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public UserCloudGoods getByUidAndGoods(Long uid, Long goodsId, Integer goodsType) {
|
| | | return userCloudGoodsMapper.getByUidAndGoods(uid, goodsId, goodsType);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void addGoods(Long uid, Set<String> set, Integer goodsType) throws UserCloudGoodsException {
|
| | | if (uid == null) {
|
| | | public UserCloudGoods addGoods(Long uid, Long goodsId, Integer goodsType, Long sellerId) throws UserCloudGoodsException {
|
| | | if (uid == null)
|
| | | throw new UserCloudGoodsException(1, "用户尚未登录");
|
| | | }
|
| | |
|
| | | if (set == null || set.size() == 0 || goodsType == null) {
|
| | | if (goodsId == null || goodsType == null)
|
| | | throw new UserCloudGoodsException(1, "系统参数不正确");
|
| | | |
| | | CommonGoods commonGoods = null;
|
| | | if (goodsType == Constant.SOURCE_TYPE_TAOBAO) { // 淘宝
|
| | | try {
|
| | | TaoBaoGoodsBrief goodsBrief = redisManager.getTaoBaoGoodsBrief(goodsId);
|
| | | commonGoods = CommonGoodsFactory.create(goodsBrief);
|
| | | } catch (TaobaoGoodsDownException e) {
|
| | | throw new UserCloudGoodsException(1, goodsId + "商品已下架");
|
| | | }
|
| | | } else if (goodsType == Constant.SOURCE_TYPE_JD) { // 京东
|
| | | JDGoods goods = jdGoodsCacheUtil.getGoodsInfo(goodsId);
|
| | | if (goods == null)
|
| | | throw new UserCloudGoodsException(1, goodsId + "未找到商品信息");
|
| | | commonGoods = CommonGoodsFactory.create(goods);
|
| | | } else if (goodsType == Constant.SOURCE_TYPE_PDD) { // 拼多多
|
| | | PDDGoodsDetail goods = pinDuoDuoCacheUtil.getGoodsInfo(goodsId);
|
| | | if (goods == null)
|
| | | throw new UserCloudGoodsException(1, goodsId + "未找到商品信息");
|
| | | commonGoods = CommonGoodsFactory.create(goods);
|
| | | } else if (goodsType == Constant.SOURCE_TYPE_VIP) { // 唯品会
|
| | | VIPGoodsInfo goods = VipShopApiUtil.getGoodsDetail(goodsId +"");
|
| | | if (goods == null)
|
| | | throw new UserCloudGoodsException(1, goodsId + "未找到商品信息");
|
| | | commonGoods = CommonGoodsFactory.create(goods);
|
| | | } else if (goodsType == Constant.SOURCE_TYPE_SUNING) { // 苏宁
|
| | | SuningGoodsInfo goods = SuningApiUtil.getGoodsDetail(goodsId +"", sellerId + "");
|
| | | if (goods == null)
|
| | | throw new UserCloudGoodsException(1, goodsId + "未找到商品信息");
|
| | | commonGoods = CommonGoodsFactory.create(goods);
|
| | | }
|
| | |
|
| | | for (String goodsId : set) {
|
| | | CommonGoods commonGoods = null;
|
| | | if (goodsType == Constant.SOURCE_TYPE_TAOBAO) { // 淘宝
|
| | | try {
|
| | | TaoBaoGoodsBrief goodsBrief = redisManager.getTaoBaoGoodsBrief(Long.parseLong(goodsId));
|
| | | commonGoods = CommonGoodsFactory.create(goodsBrief);
|
| | | } catch (TaobaoGoodsDownException e) {
|
| | | throw new UserCloudGoodsException(1, goodsId + "商品已下架");
|
| | | }
|
| | | } else if (goodsType == Constant.SOURCE_TYPE_JD) { // 京东
|
| | | JDGoods goods = jdGoodsCacheUtil.getGoodsInfo(Long.parseLong(goodsId));
|
| | | if (goods == null)
|
| | | throw new UserCloudGoodsException(1, goodsId + "未找到商品信息");
|
| | | commonGoods = CommonGoodsFactory.create(goods);
|
| | | } else if (goodsType == Constant.SOURCE_TYPE_PDD) { // 拼多多
|
| | | PDDGoodsDetail goods = pinDuoDuoCacheUtil.getGoodsInfo(Long.parseLong(goodsId));
|
| | | if (goods == null)
|
| | | throw new UserCloudGoodsException(1, goodsId + "未找到商品信息");
|
| | | commonGoods = CommonGoodsFactory.create(goods);
|
| | | } else if (goodsType == Constant.SOURCE_TYPE_VIP) { // 唯品会
|
| | | VIPGoodsInfo goods = VipShopApiUtil.getGoodsDetail(goodsId);
|
| | | if (goods == null)
|
| | | throw new UserCloudGoodsException(1, goodsId + "未找到商品信息");
|
| | | commonGoods = CommonGoodsFactory.create(goods);
|
| | | } else if (goodsType == Constant.SOURCE_TYPE_SUNING) { // 苏宁
|
| | | String[] ids = SuningUtil.getGoodsIdDetail(goodsId);
|
| | | SuningGoodsInfo goods = SuningApiUtil.getGoodsDetail(ids[1], ids[0]);
|
| | | if (goods == null)
|
| | | throw new UserCloudGoodsException(1, goodsId + "未找到商品信息");
|
| | | commonGoods = CommonGoodsFactory.create(goods);
|
| | | }
|
| | | if (commonGoods == null) {
|
| | | LogHelper.test("云发单未找到商品详情,id=" + goodsId + "type=" + goodsType);
|
| | | throw new UserCloudGoodsException(1, "商品信息获取失败");
|
| | | }
|
| | |
|
| | | if (commonGoods == null) {
|
| | | LogHelper.test("云发单未找到商品详情,id=" + goodsId + "type=" + goodsType);
|
| | | continue;
|
| | | }
|
| | | |
| | | try {
|
| | | commonGoodsService.addOrUpdateCommonGoods(commonGoods);
|
| | | } catch (CommonGoodsException e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | throw new UserCloudGoodsException(1, "商品信息更新失败");
|
| | | }
|
| | | try {
|
| | | commonGoodsService.addOrUpdateCommonGoods(commonGoods);
|
| | | } catch (CommonGoodsException e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | throw new UserCloudGoodsException(1, "商品信息更新失败");
|
| | | }
|
| | | |
| | | UserCloudGoods result = null;
|
| | | UserCloudGoods cloudGoods = userCloudGoodsMapper.getByUidAndCommonGoodsId(uid, commonGoods.getId());
|
| | | if (cloudGoods != null) {
|
| | | result = cloudGoods;
|
| | | |
| | | UserCloudGoods update = new UserCloudGoods();
|
| | | update.setId(cloudGoods.getId());
|
| | | update.setState(UserCloudGoods.STATE_NORMAL);
|
| | | update.setUpdateTime(new Date());
|
| | | userCloudGoodsMapper.updateByPrimaryKeySelective(update);
|
| | | } else {
|
| | | cloudGoods = new UserCloudGoods();
|
| | | cloudGoods.setUid(uid);
|
| | | cloudGoods.setState(UserCloudGoods.STATE_NORMAL);
|
| | | cloudGoods.setCommonGoods(commonGoods);
|
| | | cloudGoods.setCreateTime(new Date());
|
| | | cloudGoods.setUpdateTime(new Date());
|
| | | userCloudGoodsMapper.insertSelective(cloudGoods);
|
| | | |
| | | result = cloudGoods;
|
| | | }
|
| | | return result;
|
| | | }
|
| | |
|
| | | UserCloudGoods cloudGoods = userCloudGoodsMapper.getByUidAndCommonGoodsId(uid, commonGoods.getId());
|
| | | if (cloudGoods != null) {
|
| | | UserCloudGoods update = new UserCloudGoods();
|
| | | update.setId(cloudGoods.getId());
|
| | | update.setState(UserCloudGoods.STATE_NORMAL);
|
| | | update.setUpdateTime(new Date());
|
| | | userCloudGoodsMapper.updateByPrimaryKeySelective(update);
|
| | | } else {
|
| | | cloudGoods = new UserCloudGoods();
|
| | | cloudGoods.setUid(uid);
|
| | | cloudGoods.setState(UserCloudGoods.STATE_NORMAL);
|
| | | cloudGoods.setCommonGoods(commonGoods);
|
| | | cloudGoods.setCreateTime(new Date());
|
| | | cloudGoods.setUpdateTime(new Date());
|
| | | userCloudGoodsMapper.insertSelective(cloudGoods);
|
| | | }
|
| | | |
| | | if (cloudGoods.getId() != null) {
|
| | | if (!Constant.IS_TEST) {
|
| | | UserCloudMQMsg msg = new UserCloudMQMsg(uid, cloudGoods.getId() +"", UserCloudMQMsg.TYPE_STORE);
|
| | | Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_USER, UserTopicTagEnum.userCloud, msg);
|
| | | producer.send(message);
|
| | | }
|
| | | }
|
| | | |
| | | @Override
|
| | | public void sendGoodsMQMsg(Long uid) {
|
| | | if (Constant.IS_TEST) {
|
| | | return;
|
| | | }
|
| | |
|
| | | List<UserCloudGoods> list = userCloudGoodsMapper.listByNotShare(uid);
|
| | | if (list == null || list.size() == 0) {
|
| | | return;
|
| | | }
|
| | |
|
| | | long deliverTime = java.lang.System.currentTimeMillis();
|
| | | for (UserCloudGoods cloudGoods : list) {
|
| | | UserCloudMQMsg msg = new UserCloudMQMsg(uid, cloudGoods.getId() + "", UserCloudMQMsg.TYPE_STORE);
|
| | | Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_USER, UserTopicTagEnum.userCloud, msg);
|
| | | message.setStartDeliverTime(deliverTime);
|
| | | producer.send(message);
|
| | | // 每5分钟查询一次
|
| | | deliverTime = deliverTime + 1000 * 60 * 5;
|
| | | }
|
| | | }
|
| | | |
| | | |
| | |
|
| | | }
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.context.annotation.Lazy;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.user.cloud.UserCloudManageMapper;
|
| | | import com.yeshi.fanli.entity.bus.user.cloud.UserCloudManage;
|
| | | import com.yeshi.fanli.service.inter.user.cloud.UserCloudGoodsService;
|
| | | import com.yeshi.fanli.service.inter.user.cloud.UserCloudManageService;
|
| | |
|
| | |
|
| | |
| | | @Resource
|
| | | private UserCloudManageMapper userCloudManageMapper;
|
| | |
|
| | | @Lazy
|
| | | @Resource
|
| | | private UserCloudGoodsService userCloudGoodsService;
|
| | | |
| | | @Override
|
| | | public void save(Long uid, Boolean official, Boolean custom) {
|
| | | if (uid == null)
|
| | | return;
|
| | |
|
| | | boolean send = false;
|
| | | UserCloudManage cloudManage = userCloudManageMapper.selectByPrimaryKey(uid);
|
| | | if (cloudManage != null) {
|
| | | UserCloudManage update = new UserCloudManage();
|
| | | if (official != null)
|
| | | update.setOfficial(official);
|
| | | if (custom != null)
|
| | | if (custom != null) {
|
| | | update.setCustom(custom);
|
| | | send = custom;
|
| | | }
|
| | | update.setId(uid);
|
| | | update.setUpdateTime(new Date());
|
| | | userCloudManageMapper.updateByPrimaryKeySelective(update);
|
| | |
| | | manage.setOfficial(official);
|
| | | manage.setCreateTime(new Date());
|
| | | userCloudManageMapper.insertSelective(manage);
|
| | | |
| | | send = manage.getCustom();
|
| | | }
|
| | | |
| | | if (send) {
|
| | | userCloudGoodsService.sendGoodsMQMsg(uid);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | package com.yeshi.fanli.service.impl.user.cloud;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | |
| | | public UserCloudSendContent save(UserCloudSendContent record){
|
| | | return userCloudSendContentDao.save(record);
|
| | | }
|
| | | |
| | | @Override
|
| | | public List<UserCloudSendContent> getByPid(String pid){
|
| | | return userCloudSendContentDao.getByPid(pid);
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | return null;
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public List<UserCloudSendRecord> query (int page , int count, String key, Integer sendOrigin){
|
| | | return userCloudSendRecordDao.query((page-1) * count, count, key, sendOrigin);
|
| | | }
|
| | | |
| | | @Override
|
| | | public long count (String key, Integer sendOrigin){
|
| | | return userCloudSendRecordDao.count(key, sendOrigin);
|
| | | }
|
| | | }
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.cloud.UserCloud;
|
| | | import com.yeshi.fanli.entity.bus.user.cloud.UserCloudGoods;
|
| | | import com.yeshi.fanli.entity.bus.user.cloud.UserCloudGroup;
|
| | | import com.yeshi.fanli.entity.bus.user.cloud.UserCloudManage;
|
| | | import com.yeshi.fanli.entity.bus.user.cloud.UserCloudSendContent;
|
| | | import com.yeshi.fanli.entity.bus.user.cloud.UserCloudSendRecord;
|
| | | import com.yeshi.fanli.entity.dynamic.CommentInfo;
|
| | |
| | | import com.yeshi.fanli.exception.goods.ConvertLinkExceptionException;
|
| | | import com.yeshi.fanli.exception.share.ShareGoodsException;
|
| | | import com.yeshi.fanli.exception.user.cloud.UserCloudException;
|
| | | import com.yeshi.fanli.exception.user.cloud.UserCloudGoodsException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.dynamic.GoodsEvaluateService;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.cloud.UserCloudGoodsService;
|
| | | import com.yeshi.fanli.service.inter.user.cloud.UserCloudGroupService;
|
| | | import com.yeshi.fanli.service.inter.user.cloud.UserCloudManageService;
|
| | | import com.yeshi.fanli.service.inter.user.cloud.UserCloudSendContentService;
|
| | | import com.yeshi.fanli.service.inter.user.cloud.UserCloudSendRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.cloud.UserCloudService;
|
| | |
| | | @Resource
|
| | | private UserCloudSendContentService userCloudSendContentService;
|
| | |
|
| | | @Resource
|
| | | private UserCloudManageService userCloudManageService;
|
| | | |
| | | @Resource(name = "producer")
|
| | | private Producer producer;
|
| | |
|
| | |
| | | count = 0L;
|
| | | return count;
|
| | | }
|
| | | |
| | | |
| | | |
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | |
| | | renew = true;
|
| | | // 验证套餐是否相同
|
| | | if (renew && userCloud.getRobotType() != menuEnum.getType()) {
|
| | | LogHelper.error("方法openCloud: [uid=" + uid + "][订单ID=" + orderId + "]已有其他云发单套餐还未结束");
|
| | | LogHelper.cloudInfo("方法openCloud: [uid=" + uid + "][订单ID=" + orderId + "]已有其他云发单套餐还未结束");
|
| | | throw new UserCloudException(1, "已有其他云发单套餐还未结束");
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | if (dto == null) {
|
| | | LogHelper.error("方法openCloud: [uid=" + uid + "][订单ID=" + orderId + "]机器人失败: 返回空值");
|
| | | LogHelper.cloudInfo("方法openCloud: [uid=" + uid + "][订单ID=" + orderId + "]机器人失败: 返回空值");
|
| | | throw new UserCloudException(1, "机器人获取失败");
|
| | | }
|
| | |
|
| | | String endTimeStr = dto.getEndTime();
|
| | | if (StringUtil.isNullOrEmpty(endTimeStr)) {
|
| | | LogHelper.error("方法openCloud: [uid=" + uid + "][订单ID=" + orderId + "]机器人失败: 返回时间为空");
|
| | | LogHelper.cloudInfo("方法openCloud: [uid=" + uid + "][订单ID=" + orderId + "]机器人失败: 返回时间为空");
|
| | | throw new UserCloudException(1, "机器人返回时间为空");
|
| | | }
|
| | |
|
| | |
| | | try {
|
| | | endTime = Long.parseLong(endTimeStr);
|
| | | } catch (Exception e) {
|
| | | LogHelper.error("方法openCloud: [uid=" + uid + "][订单ID=" + orderId + "]机器人失败: 返回时间格式不正确");
|
| | | LogHelper.cloudInfo("方法openCloud: [uid=" + uid + "][订单ID=" + orderId + "]机器人失败: 返回时间格式不正确");
|
| | | throw new UserCloudException(1, "机器人返回时间格式不正确");
|
| | | }
|
| | |
|
| | | Integer robotId = dto.getId();
|
| | | if (robotId == null) {
|
| | | LogHelper.error("方法openCloud: [uid=" + uid + "][订单ID=" + orderId + "]机器人失败: 机器人ID返回为空");
|
| | | LogHelper.cloudInfo("方法openCloud: [uid=" + uid + "][订单ID=" + orderId + "]机器人失败: 机器人ID返回为空");
|
| | | throw new UserCloudException(1, "机器人ID返回为空");
|
| | | }
|
| | |
|
| | | Integer groupNum = dto.getGroupNum();
|
| | | if (groupNum == null) {
|
| | | LogHelper.error("方法openCloud: [uid=" + uid + "][订单ID=" + orderId + "]机器人失败: groupNum返回为空");
|
| | | LogHelper.cloudInfo("方法openCloud: [uid=" + uid + "][订单ID=" + orderId + "]机器人失败: groupNum返回为空");
|
| | | throw new UserCloudException(1, "groupNum返回为空");
|
| | | }
|
| | |
|
| | |
| | | newCloud.setGroupNum(groupNum);
|
| | | newCloud.setRobotId(robotId);
|
| | | newCloud.setRobotType(menuEnum.getType());
|
| | | newCloud.setStartTime(new Date());
|
| | | if (renew) {
|
| | | newCloud.setStartTime(userCloud.getStartTime());
|
| | | } else {
|
| | | newCloud.setStartTime(new Date());
|
| | | }
|
| | | newCloud.setEndTime(new Date(endTime * 1000)); // Unix 转换 普通时间
|
| | | newCloud.setCreateTime(new Date());
|
| | | userCloudMapper.insertSelective(newCloud);
|
| | | |
| | | // 开启发圈功能
|
| | | userCloudManageService.save(uid, null, null);
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void autoSendByDynamic(Long uid, String id) {
|
| | | boolean official = false;
|
| | | UserCloudManage cloudManage = userCloudManageService.selectByPrimaryKey(uid);
|
| | | if (cloudManage != null) {
|
| | | if (cloudManage.getOfficial() != null)
|
| | | official = cloudManage.getOfficial();
|
| | | }
|
| | | |
| | | if (!official)
|
| | | return;
|
| | | |
| | | try {
|
| | | sendCircleByDynamic(uid, id, UserCloudSendRecord.SEND_WAY_AUTO);
|
| | | } catch (UserCloudException e) {
|
| | |
| | | if (comments == null || comments.size() == 0)
|
| | | throw new UserCloudException(1, "该内容不能转链");
|
| | |
|
| | | // 检测微信是否登录状态
|
| | | if (!AitaokerApiUtil.onlineCheck(robotId)) {
|
| | | throw new UserCloudException(1003, "请重新登录微信");
|
| | | }
|
| | | |
| | |
|
| | | boolean hasToken = false;
|
| | | List<String> listComment = new ArrayList<>();
|
| | |
| | | }
|
| | |
|
| | |
|
| | | |
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void sendCustomGoods(Long uid, Long goodsId, Integer goodsType, Long sellerId) throws UserCloudException{
|
| | | sendCircleByGoods(uid, goodsId, goodsType, null, sellerId);
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void autoSendCustomGoods(Long uid, Long id) {
|
| | | boolean custom = false;
|
| | | UserCloudManage cloudManage = userCloudManageService.selectByPrimaryKey(uid);
|
| | | if (cloudManage != null) {
|
| | | if (cloudManage.getCustom() != null)
|
| | | custom = cloudManage.getCustom();
|
| | | }
|
| | | |
| | | if (!custom) {
|
| | | return;
|
| | | }
|
| | | |
| | | UserCloudGoods cloudGoods = userCloudGoodsService.selectByPrimaryKey(id);
|
| | | if (cloudGoods == null) {
|
| | | return;
|
| | |
| | | try {
|
| | | // 发送商品
|
| | | sendCircleByGoods(uid, cgoods.getGoodsId(), cgoods.getGoodsType(), id, cgoods.getSellerId());
|
| | | |
| | | UserCloudGoods record = new UserCloudGoods();
|
| | | record.setId(id);
|
| | | record.setState(UserCloudGoods.STATE_SHARED);
|
| | | record.setUpdateTime(new Date());
|
| | | userCloudGoodsService.updateByPrimaryKeySelective(record);
|
| | | } catch (UserCloudException e) {
|
| | | LogHelper.cloudInfo("autoSendCustomGoods - [uid:" +uid + " 库id:"+ id + "]原因:"+ e.getMsg());
|
| | | }
|
| | |
| | | if (userCloud == null)
|
| | | throw new UserCloudException(1001, "云发单已过期");
|
| | |
|
| | | |
| | | // 加入我的备选库
|
| | | if (storeId == null) {
|
| | | try {
|
| | | UserCloudGoods cloudGoods = userCloudGoodsService.addGoods(uid, goodsId, goodsType, sellerId);
|
| | | if (cloudGoods != null)
|
| | | storeId =cloudGoods.getId();
|
| | | } catch (UserCloudGoodsException e) {
|
| | | LogHelper.cloudInfo("sendCustomGoods - [uid:" +uid + "goodsId:"+ goodsId + "goodsType" + goodsType +"]原因:"+ e.getMsg());
|
| | | throw new UserCloudException(1, "加入云发单备选库失败");
|
| | | }
|
| | | }
|
| | | |
| | | // 自选库商品是否打开
|
| | | boolean custom = false;
|
| | | UserCloudManage cloudManage = userCloudManageService.selectByPrimaryKey(uid);
|
| | | if (cloudManage != null) {
|
| | | if (cloudManage.getCustom() != null)
|
| | | custom = cloudManage.getCustom();
|
| | | }
|
| | | if (!custom) {
|
| | | throw new UserCloudException(0, "成功加入云发单库");
|
| | | }
|
| | | |
| | | Integer robotId = userCloud.getRobotId();
|
| | | if (robotId == null)
|
| | | throw new UserCloudException(1, "云发单机器人不存在");
|
| | |
| | |
|
| | | if (listOpen.size() == 0)
|
| | | throw new UserCloudException(1004, "请先开启云发单群功能");
|
| | | |
| | | |
| | | // 检测微信是否登录状态
|
| | | if (!AitaokerApiUtil.onlineCheck(robotId)) {
|
| | | throw new UserCloudException(1003, "请重新登录微信");
|
| | | }
|
| | | |
| | |
|
| | | // 保存发送记录
|
| | | UserCloudSendRecord sendRecord = new UserCloudSendRecord();
|
| | |
| | | sendVIPGoods(user, robotId, wxId, goodsId, relationId, listOpen, result.getId());
|
| | | } else if (goodsType == Constant.SOURCE_TYPE_SUNING) {
|
| | | sendSuNingGoods(user, robotId, wxId, goodsId, sellerId, relationId, listOpen, result.getId());
|
| | | }
|
| | | |
| | | // 更新发单记录
|
| | | if (storeId != null) {
|
| | | UserCloudGoods record = new UserCloudGoods();
|
| | | record.setId(storeId);
|
| | | record.setState(UserCloudGoods.STATE_SHARED);
|
| | | record.setSendTime(new Date());
|
| | | record.setUpdateTime(new Date());
|
| | | userCloudGoodsService.updateByPrimaryKeySelective(record);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | couponAmount, null);
|
| | | // 获取评论语
|
| | | String commentText = shareGoodsTextTemplateService.getCommentTextByLink(coupon, jumpLink, goods.getMarketPrice(),
|
| | | quanPrice, ConfigKeyEnum.quickShareJDCommentText);
|
| | | quanPrice, ConfigKeyEnum.quickShareVIPCommentText);
|
| | |
|
| | | // 云发单
|
| | | sendGoods(robotId, wxId, listOpen, recommendText, commentText, goods.getGoodsDetailPictures(), user.getId(), pid);
|
| | |
| | |
|
| | |
|
| | | boolean coupon = false;
|
| | | String quanPrice = "";
|
| | | String couponAmount = "";
|
| | | String sales = null;
|
| | | if (goods.getCouponInfo() != null && !StringUtil.isNullOrEmpty(goods.getCouponInfo().getCouponUrl())) {// 有券
|
| | | couponAmount = new BigDecimal(goods.getCouponInfo().getCouponValue()).toString();
|
| | | coupon = true;
|
| | | } |
| | | |
| | | // 获取推荐语
|
| | | String recommendText = shareGoodsTextTemplateService.getRecommendText(coupon, goods.getCommodityInfo().getCommodityName(), sales,
|
| | | couponAmount, null);
|
| | |
|
| | | // 获取评论语
|
| | | String zkPrice = goods.getCommodityInfo().getCommodityPrice().toString();
|
| | | String commentText = shareGoodsTextTemplateService.getCommentTextByLink(coupon, jumpLink, zkPrice, quanPrice, |
| | | ConfigKeyEnum.quickShareJDCommentText);
|
| | | // 生成快捷分享内容
|
| | | String template = configService.get(ConfigKeyEnum.quickShareSuNingCommentText.getKey());
|
| | | String commentText = shareGoodsTextTemplateService.createQuickShareTextSuNing(template, goods, jumpLink);
|
| | | |
| | |
|
| | | List<String> imgList = new ArrayList<>();
|
| | | for (SuningGoodsImg img : goods.getCommodityInfo().getPictureUrl()) {
|
| | |
| | | return;
|
| | |
|
| | | // 一个小时之前
|
| | | long rand = 1000 * 60 * 60 ;
|
| | | long time = java.lang.System.currentTimeMillis() - rand;
|
| | | long time = java.lang.System.currentTimeMillis() - 1000 * 60 * 60 ;
|
| | | Date lastTime = new Date(time);
|
| | | |
| | |
|
| | | for (int i = 0; i < 1000; i ++) {
|
| | | List<Long> list = userCloudMapper.listValidUid((i-1)*1000, 1000);
|
| | |
| | | if (last != null)
|
| | | continue;
|
| | |
|
| | | if (!Constant.IS_TEST) {
|
| | | boolean official = false;
|
| | | UserCloudManage cloudManage = userCloudManageService.selectByPrimaryKey(uid);
|
| | | if (cloudManage != null) {
|
| | | if (cloudManage.getOfficial() != null)
|
| | | official = cloudManage.getOfficial();
|
| | | }
|
| | | |
| | | if (!Constant.IS_TEST && official) {
|
| | | UserCloudMQMsg msg = new UserCloudMQMsg(uid, id, UserCloudMQMsg.TYPE_EVALUATE);
|
| | | Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_USER, UserTopicTagEnum.userCloud, msg);
|
| | | producer.send(message);
|
| | |
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.integral.IntegralDetailMapper;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
|
| | | import com.yeshi.fanli.entity.integral.IntegralDetail;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.integral.IntegralDetailService;
|
| | |
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | | public long sumUseGoldCoin(Long uid) {
|
| | | Long count = integralDetailMapper.sumUseGoldCoin(uid);
|
| | | if (count == null) {
|
| | | count = 0L;
|
| | | }
|
| | | return count;
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | |
| | |
|
| | | public String createContentVIP(String template, VIPGoodsInfo goods, String jumpLink);
|
| | |
|
| | | public String createContentSuning(String template, SuningGoodsInfo goods, String jumpLink);
|
| | |
|
| | | public String getTextTemplateByJD(Long uid);
|
| | |
|
| | |
| | | */
|
| | | public String getCommentTextByLink(boolean coupon, String link, String zkPrice, String quanPrice, ConfigKeyEnum keyEnum);
|
| | |
|
| | | public void resetCommonTemplateVIP(Long uid);
|
| | |
|
| | | public void resetCouponTemplateVIP(Long uid);
|
| | |
|
| | | public void resetCommonTemplateSuNing(Long uid);
|
| | |
|
| | | public void resetCouponTemplateSuNing(Long uid);
|
| | |
|
| | | public String getTextTemplateBySuNing(Long uid);
|
| | |
|
| | | public void verifyRightVIP(String template) throws ShareGoodsTextTemplateException;
|
| | |
|
| | | public void verifyRightSuNing(String template) throws ShareGoodsTextTemplateException;
|
| | |
|
| | | /**
|
| | | * 苏宁快捷分享
|
| | | * @param template
|
| | | * @param goods
|
| | | * @param jumpLink
|
| | | * @return
|
| | | */
|
| | | public String createQuickShareTextSuNing(String template, SuningGoodsInfo goods, String jumpLink);
|
| | | |
| | | |
| | | /**
|
| | | * 苏宁普通分享
|
| | | * @param template
|
| | | * @param goods
|
| | | * @param jumpLink
|
| | | * @return
|
| | | */
|
| | | public String createCommonShareTextSuNing(String template, SuningGoodsInfo goods, String jumpLink);
|
| | |
|
| | | public void saveTemplateVIP(Long uid, String template) throws ShareGoodsTextTemplateException;
|
| | |
|
| | | public void saveTemplateSuNing(Long uid, String template) throws ShareGoodsTextTemplateException;
|
| | |
|
| | | }
|
| | |
| | | * @return |
| | | */ |
| | | public long countOrderBySourceAndNearDay(Long uid, int source, int day); |
| | | |
| | | /** |
| | | * 统计历史订单数量 -不区分状态、来源 订单号为主 |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | public long countHistoryOrderNum(Long uid); |
| | | } |
| | |
| | | */
|
| | | public UserInfo selectAvailableByPrimaryKey(Long uid);
|
| | |
|
| | | |
| | | |
| | | public long countInfo(Integer userState, String key, Integer keyType, String userRank, Integer days, String startTime,
|
| | | String endTime, Integer userType, String level, Integer activeCode);
|
| | |
|
| | | public List<UserInfoVO> queryInfo(long start, int count, Integer userState, String key, Integer keyType, String userRank,
|
| | | Integer days, String startTime, String endTime, Integer userType, String level, Integer activeCode);
|
| | |
|
| | |
|
| | |
|
| | | }
|
| | |
| | | package com.yeshi.fanli.service.inter.user.cloud;
|
| | |
|
| | | import java.util.List;
|
| | | import java.util.Set;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.cloud.UserCloudGoods;
|
| | | import com.yeshi.fanli.exception.user.cloud.UserCloudGoodsException;
|
| | |
| | | * @param goodsType
|
| | | * @throws UserCloudGoodsException
|
| | | */
|
| | | public void addGoods(Long uid, Set<String> set, Integer goodsType) throws UserCloudGoodsException;
|
| | | public UserCloudGoods addGoods(Long uid, Long goodsId, Integer goodsType, Long sellerId) throws UserCloudGoodsException;
|
| | |
|
| | |
|
| | | /**
|
| | |
| | | */
|
| | | public void updateByPrimaryKeySelective(UserCloudGoods record);
|
| | |
|
| | | |
| | | |
| | | /**
|
| | | * 查询
|
| | | * @param page
|
| | | * @param pageSize
|
| | | * @param key
|
| | | * @return
|
| | | */
|
| | | public List<UserCloudGoods> query(int page, int pageSize, String key);
|
| | |
|
| | | public long count(String key);
|
| | |
|
| | | /**
|
| | | * 选品库
|
| | | * @param uid
|
| | | */
|
| | | public void sendGoodsMQMsg(Long uid);
|
| | | }
|
| | |
| | | package com.yeshi.fanli.service.inter.user.cloud;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.cloud.UserCloudSendContent;
|
| | |
|
| | | public interface UserCloudSendContentService {
|
| | |
| | | * @return
|
| | | */
|
| | | public UserCloudSendContent save(UserCloudSendContent record);
|
| | |
|
| | | /**
|
| | | * 查询具体内容
|
| | | * @param uid
|
| | | * @param pid
|
| | | * @return
|
| | | */
|
| | | public List<UserCloudSendContent> getByPid(String pid);
|
| | |
|
| | | }
|
| | |
| | | package com.yeshi.fanli.service.inter.user.cloud;
|
| | |
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.cloud.UserCloudSendRecord;
|
| | |
|
| | |
| | | * @return
|
| | | */
|
| | | public UserCloudSendRecord getLastByUid(Long uid, Date lastTime);
|
| | |
|
| | | /**
|
| | | * 后台查询
|
| | | * @param page
|
| | | * @param count
|
| | | * @param key
|
| | | * @param sendOrigin
|
| | | * @return
|
| | | */
|
| | | public List<UserCloudSendRecord> query(int page, int count, String key, Integer sendOrigin);
|
| | |
|
| | | public long count(String key, Integer sendOrigin);
|
| | |
|
| | | }
|
| | |
| | |
|
| | | public long countQuery(String key);
|
| | |
|
| | | /**
|
| | | * 统计用户消耗金币数量
|
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public long sumUseGoldCoin(Long uid);
|
| | |
|
| | | }
|
| | |
| | | cg.setCouponInfo(String.format("满%s元减%s元", goods.getCouponInfo().getBounsLimit(),
|
| | | goods.getCouponInfo().getCouponValue()));
|
| | | cg.setCouponAmount(new BigDecimal(goods.getCouponInfo().getCouponValue()));
|
| | | cg.setCouponLeftCount(Integer.parseInt(goods.getCouponInfo().getCouponCount()));
|
| | | cg.setCouponTotalCount(Integer.parseInt(goods.getCouponInfo().getCouponCount()));
|
| | | |
| | | if (goods.getCouponInfo().getCouponCount() == null) {
|
| | | cg.setCouponLeftCount(500000);
|
| | | cg.setCouponTotalCount(500000);
|
| | | } else {
|
| | | cg.setCouponLeftCount(Integer.parseInt(goods.getCouponInfo().getCouponCount()));
|
| | | cg.setCouponTotalCount(Integer.parseInt(goods.getCouponInfo().getCouponCount()));
|
| | | }
|
| | | |
| | | cg.setCouponStartPrice(new BigDecimal(goods.getCouponInfo().getBounsLimit()));
|
| | | } else {
|
| | | cg.setCouponLeftCount(0);
|
| | |
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | public class CommonOrderGoodsFactory {
|
| | |
|
| | |
| | | goods.setGoodsType(Constant.SOURCE_TYPE_SUNING);
|
| | | if (suningGoods.getCommodityInfo().getPictureUrl().size() > 0)
|
| | | goods.setPicture(suningGoods.getCommodityInfo().getPictureUrl().get(0).getPicUrl());
|
| | | goods.setPrice(new BigDecimal(suningGoods.getCommodityInfo().getCommodityPrice()));
|
| | | |
| | | String commodityPrice = suningGoods.getCommodityInfo().getCommodityPrice();
|
| | | if (StringUtil.isNullOrEmpty(commodityPrice)) {
|
| | | commodityPrice = suningGoods.getCommodityInfo().getSnPrice();
|
| | | }
|
| | | goods.setPrice(new BigDecimal(commodityPrice));
|
| | | goods.setShopId(Long.parseLong(suningGoods.getCommodityInfo().getSupplierCode()));
|
| | | goods.setShopName(suningGoods.getCommodityInfo().getSupplierName());
|
| | | goods.setShopType("苏宁");
|
| | |
| | | goodsInfo.setPriceName("原价");
|
| | | if (goods.getCommodityInfo().getPictureUrl().size() > 0)
|
| | | goodsInfo.setPicUrl(goods.getCommodityInfo().getPictureUrl().get(0).getPicUrl()); // 缩略图
|
| | | goodsInfo.setZkPrice(
|
| | | MoneyBigDecimalUtil.getWithNoZera(new BigDecimal(goods.getCommodityInfo().getCommodityPrice())));
|
| | | |
| | | |
| | | String commodityPrice = goods.getCommodityInfo().getCommodityPrice();
|
| | | if (StringUtil.isNullOrEmpty(commodityPrice)) {
|
| | | commodityPrice = goods.getCommodityInfo().getSnPrice();
|
| | | }
|
| | | goodsInfo.setZkPrice(MoneyBigDecimalUtil.getWithNoZera(new BigDecimal(commodityPrice)));
|
| | | goodsInfo.setShopType(CommonGoods.SHOP_TYPE_SUNING);
|
| | |
|
| | | List<String> imgList = new ArrayList<>();
|
| | |
| | | moneyInfoVO
|
| | | .setMaxMoney("¥" + commission.add(MoneyBigDecimalUtil.mul(commission, params.getMaxRewardRate())));
|
| | | else {
|
| | | BigDecimal price = new BigDecimal(goods.getCommodityInfo().getCommodityPrice());
|
| | | BigDecimal price = new BigDecimal(commodityPrice);
|
| | | BigDecimal rate = MoneyBigDecimalUtil.div(commission.multiply(new BigDecimal(100)), price);
|
| | | moneyInfoVO.setRateInfo("返利比 " + rate + "%");
|
| | |
|
New file |
| | |
| | | package com.yeshi.fanli.util.rocketmq.consumer.user;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Component;
|
| | |
|
| | | import com.aliyun.openservices.ons.api.Action;
|
| | | import com.aliyun.openservices.ons.api.ConsumeContext;
|
| | | import com.aliyun.openservices.ons.api.Message;
|
| | | import com.aliyun.openservices.ons.api.MessageListener;
|
| | | import com.google.gson.Gson;
|
| | | import com.yeshi.fanli.dto.mq.order.OrderTopicTagEnum;
|
| | | import com.yeshi.fanli.dto.mq.order.body.OrderConfirmMQMsg;
|
| | | import com.yeshi.fanli.dto.mq.order.body.OrderMoneyRecievedMQMsg;
|
| | | import com.yeshi.fanli.dto.mq.user.UserTopicTagEnum;
|
| | | import com.yeshi.fanli.dto.mq.user.body.UserCloudMQMsg;
|
| | | import com.yeshi.fanli.entity.bus.user.UserActiveLog;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.user.cloud.UserCloudService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.VersionUtil;
|
| | | import com.yeshi.fanli.util.rocketmq.MQTopicName;
|
| | |
|
| | | /**
|
| | | * 用户云发单
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Component
|
| | | public class UserCloudMessageListener implements MessageListener {
|
| | |
|
| | | @Resource
|
| | | private UserCloudService userCloudService;
|
| | |
|
| | | @Override
|
| | | public Action consume(Message message, ConsumeContext context) {
|
| | | LogHelper.mqInfo("consumer-UserCloudMessageListener", message.getMsgID(), message.getTopic(), message.getTag(),
|
| | | new String(message.getBody()));
|
| | | String tag = message.getTag();
|
| | | if (tag == null)
|
| | | tag = "";
|
| | |
|
| | | if (java.lang.System.currentTimeMillis() <= Constant.NEW_ORDER_FANLI_RULE_TIME) {
|
| | | return Action.CommitMessage;
|
| | | }
|
| | |
|
| | | // 邀请相关
|
| | | if (MQTopicName.TOPIC_USER.name().equalsIgnoreCase(message.getTopic())) {
|
| | | if (tag.equalsIgnoreCase(UserTopicTagEnum.userCloud.name())) {// 用户等级发生变化
|
| | | UserCloudMQMsg msg = new Gson().fromJson(new String(message.getBody()),UserCloudMQMsg.class);
|
| | | if (msg.getType() == UserCloudMQMsg.TYPE_EVALUATE) {
|
| | | userCloudService.autoSendByDynamic(msg.getUid(), msg.getId());
|
| | | } else {
|
| | | userCloudService.autoSendCustomGoods(msg.getUid(), Long.parseLong(msg.getId()));
|
| | | }
|
| | | } |
| | | }
|
| | |
|
| | | return Action.CommitMessage;
|
| | | }
|
| | | }
|
| | |
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.reflect.TypeToken;
|
| | | import com.yeshi.fanli.dto.suning.SuningGoodsInfo;
|
| | | import com.yeshi.fanli.dto.suning.SuningGoodsInfoRecommend;
|
| | | import com.yeshi.fanli.dto.suning.SuningOrderQueryResultDTO;
|
| | | import com.yeshi.fanli.dto.suning.SuningQueryModel;
|
| | | import com.yeshi.fanli.entity.suning.SuningOrderInfo;
|
| | |
| | | model.setPicHeight(320);
|
| | | String key = "querySearchcommoditynew";
|
| | | String json = new Gson().toJson(model);
|
| | | //String result = baseRequest("suning.netalliance.searchcommoditynew.query", key, JSONObject.fromObject(json));
|
| | | String result = baseRequest("suning.netalliance.searchcommoditynew.query", key, JSONObject.fromObject(json));
|
| | | JSONObject resultJSON = JSONObject.fromObject(result);
|
| | | JSONArray array = resultJSON.optJSONObject("sn_responseContent").optJSONObject("sn_body").optJSONObject(key)
|
| | |
| | | return null;
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 查询商品
|
| | | * @Title: searchGoods
|
| | | * @Description: |
| | | * @param model
|
| | | * @return |
| | | * List<SuningGoodsInfo> 返回类型
|
| | | * @throws
|
| | | */
|
| | | public static List<SuningGoodsInfo> searchGoodsOld(SuningQueryModel model) {
|
| | | model.setPicWidth(320);
|
| | | model.setPicHeight(320);
|
| | | String key = "querySearchcommodity";
|
| | | String json = new Gson().toJson(model);
|
| | | String result = baseRequest("suning.netalliance.searchcommodity.query", key, JSONObject.fromObject(json));
|
| | | JSONObject resultJSON = JSONObject.fromObject(result);
|
| | | JSONObject responseContent = resultJSON.optJSONObject("sn_responseContent");
|
| | | if (responseContent != null) {
|
| | | JSONObject snBody = responseContent.optJSONObject("sn_body");
|
| | | if (snBody != null) {
|
| | | JSONArray array = snBody.optJSONArray(key);
|
| | | if (array != null) {
|
| | | Type type = new TypeToken<ArrayList<SuningGoodsInfo>>() {
|
| | | }.getType();
|
| | | List<SuningGoodsInfo> goodsList = new Gson().fromJson(array.toString(), type);
|
| | | return goodsList;
|
| | | }
|
| | | }
|
| | | }
|
| | | return null;
|
| | | }
|
| | | |
| | | public static SuningGoodsInfo getGoodsDetail(String goodsCode, String supplierCode) {
|
| | | JSONObject model = new JSONObject();
|
| | | model.put("commodityStr", goodsCode + "-" + supplierCode);
|
| | |
| | | }
|
| | | return null;
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 查询关联商品
|
| | | * @Title: searchGoods
|
| | | * @Description: |
| | | * @param model
|
| | | * @return |
| | | * List<SuningGoodsInfo> 返回类型
|
| | | * @throws
|
| | | */
|
| | | public static List<SuningGoodsInfoRecommend> getRecommendGoods(String goodsCode, String supplierCode) {
|
| | | JSONObject model = new JSONObject();
|
| | | model.put("commodityCode", goodsCode);
|
| | | model.put("supplierCode", supplierCode);
|
| | | model.put("picWidth", 320);
|
| | | model.put("picHeight", 320);
|
| | | |
| | | String key = "getMorerecommend";
|
| | | String json = new Gson().toJson(model);
|
| | | String result = baseRequest("suning.netalliance.morerecommend.get", key, JSONObject.fromObject(json));
|
| | | JSONObject resultJSON = JSONObject.fromObject(result);
|
| | | JSONArray array = resultJSON.optJSONObject("sn_responseContent").optJSONObject("sn_body").optJSONObject(key)
|
| | | .optJSONArray("commodityList");
|
| | | if (array != null) {
|
| | | Type type = new TypeToken<ArrayList<SuningGoodsInfoRecommend>>() {
|
| | | }.getType();
|
| | | List<SuningGoodsInfoRecommend> goodsList = new Gson().fromJson(array.toString(), type);
|
| | | return goodsList;
|
| | | }
|
| | | return null;
|
| | | }
|
| | | |
| | |
|
| | | public static List<SuningGoodsInfo> getGoodsDetailList(List<String> list) {
|
| | | String sts = "";
|
| | |
| | |
|
| | | BigDecimal hundred = new BigDecimal(100);
|
| | | rate = MoneyBigDecimalUtil.div(rate, hundred);
|
| | | |
| | | String commodityPrice = goods.getCommodityInfo().getCommodityPrice();
|
| | | if (StringUtil.isNullOrEmpty(commodityPrice)) {
|
| | | commodityPrice = goods.getCommodityInfo().getSnPrice();
|
| | | }
|
| | |
|
| | | BigDecimal afterUseCouponPrice = new BigDecimal(goods.getCommodityInfo().getCommodityPrice());
|
| | | BigDecimal afterUseCouponPrice = new BigDecimal(commodityPrice);
|
| | | if (goods.getCouponInfo() != null && !StringUtil.isNullOrEmpty(goods.getCouponInfo().getCouponUrl())) {
|
| | | // 有券
|
| | | BigDecimal startPrice = new BigDecimal(goods.getCouponInfo().getBounsLimit());
|
| | |
| | | if (resultJson.optInt("returnCode") == 0) {
|
| | | resultJson = resultJson.optJSONObject("result");
|
| | | int count = resultJson.optInt("total");
|
| | | |
| | | JSONArray array = resultJson.optJSONArray("goodsInfoList");
|
| | | for (int i = 0; i < array.size(); i++) {
|
| | | VIPGoodsInfo info = gson.fromJson(array.optJSONObject(i).toString(), VIPGoodsInfo.class);
|
| | | if (info != null)
|
| | | goodsList.add(info);
|
| | | if (array != null && array.size() > 0) {
|
| | | for (int i = 0; i < array.size(); i++) {
|
| | | JSONObject optJSONObject = array.optJSONObject(i);
|
| | | if (optJSONObject == null) {
|
| | | continue;
|
| | | }
|
| | | VIPGoodsInfo info = gson.fromJson(array.optJSONObject(i).toString(), VIPGoodsInfo.class);
|
| | | if (info != null)
|
| | | goodsList.add(info);
|
| | | }
|
| | | }
|
| | | |
| | | return new VIPSearchResult(goodsList, count);
|
| | | }
|
| | | return null;
|
| | |
| | | @Expose
|
| | | private Boolean vip;// 是否为VIP
|
| | |
|
| | | // 云发单图片
|
| | | // 云发单文字
|
| | | @Expose
|
| | | private boolean cloudOpen;
|
| | | @Expose
|
| | | private String cloudPic;
|
| | | // 云发单文字
|
| | | @Expose
|
| | | private String cloudText;
|
| | | |
| | | |
| | | |
| | |
|
| | | public Boolean getVip() {
|
| | | return vip;
|
| | |
| | | public void setCloudText(String cloudText) {
|
| | | this.cloudText = cloudText;
|
| | | }
|
| | |
|
| | | public boolean isCloudOpen() {
|
| | | return cloudOpen;
|
| | | }
|
| | |
|
| | | public void setCloudOpen(boolean cloudOpen) {
|
| | | this.cloudOpen = cloudOpen;
|
| | | }
|
| | | |
| | | }
|
| | |
| | | private BigDecimal lastMonthSettleMoney;// 上月已收货
|
| | | private BigDecimal notSettleMoney;// 待确认收货
|
| | |
|
| | | private BigDecimal monthUnRecievedMoney; // 本月未到账
|
| | | private BigDecimal totalUnRecievedMoney; // 全部未到账
|
| | |
|
| | | private MoneyPredictVO todayPredict;// 今日预估
|
| | | private MoneyPredictVO monthPredict;// 本月预估
|
| | | |
| | |
|
| | |
|
| | | public BigDecimal getBalanceMoney() {
|
| | | return balanceMoney;
|
| | |
| | | public void setLink(String link) {
|
| | | this.link = link;
|
| | | }
|
| | |
|
| | | public BigDecimal getMonthUnRecievedMoney() {
|
| | | return monthUnRecievedMoney;
|
| | | }
|
| | |
|
| | | public void setMonthUnRecievedMoney(BigDecimal monthUnRecievedMoney) {
|
| | | this.monthUnRecievedMoney = monthUnRecievedMoney;
|
| | | }
|
| | |
|
| | | public BigDecimal getTotalUnRecievedMoney() {
|
| | | return totalUnRecievedMoney;
|
| | | }
|
| | |
|
| | | public void setTotalUnRecievedMoney(BigDecimal totalUnRecievedMoney) {
|
| | | this.totalUnRecievedMoney = totalUnRecievedMoney;
|
| | | }
|
| | | |
| | | }
|
| | |
| | | // 用户VIP等级
|
| | | private String userLevel;
|
| | |
|
| | | // 邀请人
|
| | | private String bossName;
|
| | | // 邀请码
|
| | | private String inviteCode;
|
| | | // 邀请码
|
| | | private String inviteCodeVip;
|
| | | // 微信号
|
| | | private String wxId;
|
| | |
|
| | | // 总消耗金币
|
| | | private long totalGoldCoinUsed;
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | public String getRankId() {
|
| | |
| | | public void setInviteCode(String inviteCode) {
|
| | | this.inviteCode = inviteCode;
|
| | | }
|
| | |
|
| | | public String getInviteCodeVip() {
|
| | | return inviteCodeVip;
|
| | | }
|
| | |
|
| | | public void setInviteCodeVip(String inviteCodeVip) {
|
| | | this.inviteCodeVip = inviteCodeVip;
|
| | | }
|
| | |
|
| | | public long getTotalGoldCoinUsed() {
|
| | | return totalGoldCoinUsed;
|
| | | }
|
| | |
|
| | | public void setTotalGoldCoinUsed(long totalGoldCoinUsed) {
|
| | | this.totalGoldCoinUsed = totalGoldCoinUsed;
|
| | | }
|
| | |
|
| | | public String getBossName() {
|
| | | return bossName;
|
| | | }
|
| | |
|
| | | public void setBossName(String bossName) {
|
| | | this.bossName = bossName;
|
| | | }
|
| | |
|
| | | public String getWxId() {
|
| | | return wxId;
|
| | | }
|
| | |
|
| | | public void setWxId(String wxId) {
|
| | | this.wxId = wxId;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | </bean>
|
| | |
|
| | |
|
| | | <!-- 云发单消息接收 -->
|
| | | <bean id="userCloudMessageListener"
|
| | | class="com.yeshi.fanli.util.rocketmq.consumer.user.UserCloudMessageListener"></bean>
|
| | |
|
| | | <bean id="userCloudConsumer" class="com.aliyun.openservices.ons.api.bean.ConsumerBean"
|
| | | init-method="start" destroy-method="shutdown">
|
| | | <property name="properties"> <!--消费者配置信息 -->
|
| | | <props>
|
| | | <prop key="AccessKey">${rocketmq.AccessKey}</prop>
|
| | | <prop key="SecretKey">${rocketmq.SecretKey}</prop>
|
| | | <prop key="GROUP_ID">GID_USER_CLOUD</prop>
|
| | | <prop key="NAMESRV_ADDR">${rocketmq.NAMESRV_ADDR}</prop>
|
| | | <prop key="ConsumeThreadNums">50</prop>
|
| | | </props>
|
| | | </property>
|
| | | <property name="subscriptionTable">
|
| | | <map>
|
| | | <entry value-ref="userCloudMessageListener">
|
| | | <key>
|
| | | <bean class="com.aliyun.openservices.ons.api.bean.Subscription">
|
| | | <property name="topic" value="TOPIC_USER" />
|
| | | <property name="expression" value="userCloud" />
|
| | | </bean>
|
| | | </key>
|
| | | </entry>
|
| | | </map>
|
| | | </property>
|
| | | </bean>
|
| | |
|
| | |
|
| | |
|
| | |
| | | <version>2.11.2</version>
|
| | | </dependency>
|
| | |
|
| | | <dependency>
|
| | | <!-- <dependency>
|
| | | <groupId>org.bouncycastle</groupId>
|
| | | <artifactId>bcprov-jdk16</artifactId>
|
| | | <version>1.46</version>
|
| | | </dependency>
|
| | | </dependency> -->
|
| | |
|
| | | <!-- 支付宝相关 -->
|
| | | <dependency>
|