| | |
| | |
|
| | | // 云发单链接
|
| | | if (VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | // 验证是否开启
|
| | | String cloudState = configService.getByVersion(ConfigKeyEnum.robotCloudOpen.getKey(), acceptData.getPlatform(),
|
| | | Integer.parseInt(acceptData.getVersion()));
|
| | | if (!StringUtil.isNullOrEmpty(cloudState) && "1".equals(cloudState)) {
|
| | | boolean cloudOpen = configService.isRobotCloudOpen();
|
| | | if (!cloudOpen && uid != null) {
|
| | | List<String> testUsers = configService.getTestUsers();
|
| | | if (testUsers != null && testUsers.contains(uid+"")) {
|
| | | cloudOpen = true;
|
| | | }
|
| | | }
|
| | | |
| | | if (cloudOpen) {
|
| | | data.put("cloudLink", configService.get(ConfigKeyEnum.robotCloudLink.getKey()));
|
| | | }
|
| | | }
|
| | |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "getDynamicList", method = RequestMethod.POST) |
| | | public void getDynamicListNew(AcceptData acceptData, Integer page, Long cid, String subId, PrintWriter out) { |
| | | public void getDynamicListNew(AcceptData acceptData, Integer page, Long cid, String subId, Long uid, PrintWriter out) { |
| | | try { |
| | | int type = 1; |
| | | if (cid == TYPE_FAQUAN) { |
| | |
| | | } 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)) { |
| | | boolean cloudOpen = configService.isRobotCloudOpen(); |
| | | if (!cloudOpen && uid != null) { |
| | | List<String> testUsers = configService.getTestUsers(); |
| | | if (testUsers != null && testUsers.contains(uid+"")) { |
| | | cloudOpen = true; |
| | | } |
| | | } |
| | | |
| | | for (GoodsEvaluate goodsEvaluate : list) { |
| | | GoodsEvaluate evaluateNew = new GoodsEvaluate(); |
| | |
| | |
|
| | |
|
| | | 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();
|
| | | if (!cloudOpen && uid != null) {
|
| | | List<String> testUsers = configService.getTestUsers();
|
| | | if (testUsers != null && testUsers.contains(uid+"")) {
|
| | | cloudOpen = true;
|
| | | }
|
| | | |
| | | }
|
| | | extraVO.setCloudOpen(cloudOpen);
|
| | |
|
| | | if (!goodsDetail.isHasCoupon()) {
|
| | | return;
|
| | |
| | | |
| | | showSplashAd("show_splash_ad","是否显示开屏广告"), |
| | | |
| | | robotCloudOpen("robot_cloud_open","云发单链接"), |
| | | testUserArray("test_user_array","测试用户数组"), |
| | | |
| | | robotCloudOpen("robot_cloud_open","云发单是否开启"), |
| | | robotCloudLink("robot_cloud_link","云发单链接"), |
| | | cloudAlipayJumpLink("cloud_alipay_jump_link","云发单支付跳转地址"), |
| | | cloudAlipayReturnLink("cloud_alipay_return_link","云发单支付成功后返回哪个前端页面"), |
| | |
| | | package com.yeshi.fanli.service.impl.config;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.Arrays;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | |
| | | import com.yeshi.fanli.entity.config.AppHomeFloatImg;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.xcx.XCXSettingConfig;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
| | | return value;
|
| | | }
|
| | |
|
| | | |
| | | @Cacheable(value = "config", key = "'isRobotCloudOpen'")
|
| | | @Override
|
| | | public boolean isRobotCloudOpen() {
|
| | | String value = get(ConfigKeyEnum.robotCloudOpen.getKey());
|
| | | if (StringUtil.isNullOrEmpty(value))
|
| | | return false;
|
| | | if ("1".equalsIgnoreCase(value.trim())) {
|
| | | return true;
|
| | | } else {
|
| | | return false;
|
| | | }
|
| | | }
|
| | |
|
| | | |
| | | @Cacheable(value = "config", key = "'getTestUsers'")
|
| | | @Override
|
| | | public List<String> getTestUsers() {
|
| | | String value = get(ConfigKeyEnum.testUserArray.getKey());
|
| | | if (StringUtil.isNullOrEmpty(value))
|
| | | return null;
|
| | | try {
|
| | | return Arrays.asList(value.split(","));
|
| | | } catch (Exception e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | return null;
|
| | | }
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override
|
| | | public Config getConfig(long id) {
|
| | | return configMapper.selectByPrimaryKey(id);
|
| | |
| | |
|
| | | import org.springframework.context.annotation.Lazy;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.user.cloud.UserCloudOrderMapper;
|
| | | import com.yeshi.fanli.entity.bus.user.cloud.CloudOrderMenuEnum;
|
| | |
| | |
|
| | | if (dto == null) {
|
| | | LogHelper.cloudInfo("方法openCloud: [uid=" + uid + "][订单ID=" + orderId + "]机器人失败: 机器人创建失败");
|
| | | throw new UserCloudException(1, "机器人创建失败");
|
| | | }
|
| | |
|
| | | Integer robotId = dto.getId();
|
| | |
| | | * @return
|
| | | */
|
| | | public Config getConfigBykeyNoCache(String key);
|
| | |
|
| | | /**
|
| | | * 云发单是否开启
|
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public boolean isRobotCloudOpen();
|
| | |
|
| | | /**
|
| | | * 测试用户信息
|
| | | * @return
|
| | | */
|
| | | public List<String> getTestUsers();
|
| | | }
|