| | |
| | |
|
| | |
|
| | | if (VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | getCloudInfo(acceptData, goodsDetail, extraVO); // 云发单文案信息
|
| | | getCloudInfo(acceptData, uid, goodsDetail, extraVO); // 云发单文案信息
|
| | | }
|
| | |
|
| | | JSONObject object = new JSONObject();
|
| | |
| | | extraVO.setShare(shareInfoVO);
|
| | |
|
| | | if (VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | getCloudInfo(acceptData, goodsDetail, extraVO); // 云发单文案信息
|
| | | getCloudInfo(acceptData, uid, goodsDetail, extraVO); // 云发单文案信息
|
| | | }
|
| | |
|
| | | JSONObject object = new JSONObject();
|
| | |
| | | }
|
| | |
|
| | | if (VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | getCloudInfo(acceptData, goodsDetail, extraVO); // 云发单文案信息
|
| | | getCloudInfo(acceptData, uid, goodsDetail, extraVO); // 云发单文案信息
|
| | | }
|
| | |
|
| | | JSONObject object = new JSONObject();
|
| | |
| | | extraVO.setShare(shareInfoVO);
|
| | |
|
| | | // 云发单文案信息
|
| | | getCloudInfo(acceptData, goodsDetail, extraVO); |
| | | getCloudInfo(acceptData, uid, goodsDetail, extraVO); |
| | |
|
| | | JSONObject object = new JSONObject();
|
| | | object.put("extra", JsonUtil.getApiCommonGson().toJson(extraVO));
|
| | |
| | | extraVO.setShare(shareInfoVO);
|
| | |
|
| | | // 云发单文案信息
|
| | | getCloudInfo(acceptData, goodsDetail, extraVO); |
| | | getCloudInfo(acceptData, uid, goodsDetail, extraVO); |
| | |
|
| | | JSONObject object = new JSONObject();
|
| | | object.put("extra", JsonUtil.getApiCommonGson().toJson(extraVO));
|
| | |
| | | * // 云发单文案信息
|
| | | * @param goodsDetail
|
| | | */
|
| | | private void getCloudInfo(AcceptData acceptData, GoodsDetailVO goodsDetail, GoodsDetailExtraVO extraVO) {
|
| | | private void getCloudInfo(AcceptData acceptData,Long uid, 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);
|
| | | boolean cloudOpen = configService.isRobotCloudOpen(ConfigKeyEnum.robotCloudOpenGoodsDetail.getKey());
|
| | | if (!cloudOpen && uid != null) {
|
| | | List<String> testUsers = configService.getTestUsers();
|
| | | if (testUsers != null && testUsers.contains(uid+"")) {
|
| | | cloudOpen = true;
|
| | | }
|
| | | }
|
| | | extraVO.setCloudOpen(cloudOpen);
|
| | |
|
| | | |
| | | if (!goodsDetail.isHasCoupon()) {
|
| | | // 无券或者未开启发圈
|
| | | if (!goodsDetail.isHasCoupon() || !cloudOpen) {
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(cloudText) && !StringUtil.isNullOrEmpty(cloudPic)) {
|
| | | |
| | | cloudText = cloudText.replace("[原价]", MoneyBigDecimalUtil.getWithNoZera(goodsDetail.getZkPrice()) + "");
|
| | | if (!goodsDetail.isHasCoupon()) {
|
| | | cloudText = cloudText.replace("领券抢购", "抢购");
|
| | | cloudText = cloudText.replace("【券后价】[券后价]元", "");
|
| | | } else {
|
| | | cloudText = cloudText.replace("[券后价]", MoneyBigDecimalUtil.getWithNoZera(goodsDetail.getCouponPrice()) + "");
|
| | | }
|
| | | cloudText = cloudText.replace("\r\n\r\n", "\r\n").replace("\r\n\r\n", "\r\n").replace("\r\n\r\n", "\r\n");
|
| | | |
| | | extraVO.setCloudPic(cloudPic);
|
| | | extraVO.setCloudText(cloudText);
|
| | | }
|