| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.util.*;
|
| | | import org.json.simple.JSONArray;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.UserShareGoodsRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.vip.UserVIPInfoService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.JumpDetailUtil;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.ThreadUtil;
|
| | | import com.yeshi.fanli.util.cache.JDGoodsCacheUtil;
|
| | | import com.yeshi.fanli.util.cache.PinDuoDuoCacheUtil;
|
| | | import com.yeshi.fanli.util.factory.CommonGoodsFactory;
|
| | |
| | | */
|
| | | @RequestMapping(value = "getTopCategory", method = RequestMethod.POST)
|
| | | public void getTopCategory(WXMPAcceptData acceptData, Long uid, PrintWriter out) {
|
| | |
|
| | | SystemEnum system= SystemInfoUtil.getSystemByWXCXCAppId(acceptData.getAppId());
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("list", configService.get(ConfigKeyEnum.jdWXMPClass.getKey()));
|
| | | data.put("list", configService.getValue(ConfigKeyEnum.jdWXMPClass.getKey(),system));
|
| | |
|
| | | String tips = null;
|
| | | if (uid == null || uid <= 0) {
|
| | | tips = configService.get(ConfigKeyEnum.tipGuideNewUser.getKey());
|
| | | tips = configService.getValue(ConfigKeyEnum.tipGuideNewUser.getKey(),system);
|
| | | } else {
|
| | | long rebateOrder = hongBaoV2CountService.countRebateOrder(uid);
|
| | | long shareOrInviteOrder = hongBaoV2CountService.countShareOrInviteOrder(uid);
|
| | |
| | | // 熟客版
|
| | | } else if (rebateOrder <= 0 && shareOrInviteOrder <= 0) {
|
| | | // 新人版
|
| | | tips = configService.get(ConfigKeyEnum.tipGuideNewUser.getKey());
|
| | | tips = configService.getValue(ConfigKeyEnum.tipGuideNewUser.getKey(),system);
|
| | | } else if (rebateOrder > 0 && shareOrInviteOrder <= 0) {
|
| | | // 省钱版
|
| | | tips = configService.get(ConfigKeyEnum.tipGuideSaveMoney.getKey());
|
| | | tips = configService.getValue(ConfigKeyEnum.tipGuideSaveMoney.getKey(),system);
|
| | | } else {
|
| | | // 赚钱版
|
| | | tips = configService.get(ConfigKeyEnum.tipGuideShareInvite.getKey());
|
| | | tips = configService.getValue(ConfigKeyEnum.tipGuideShareInvite.getKey(),system);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | String platform = acceptData.getPlatform();
|
| | | int version = Integer.parseInt(acceptData.getVersion());
|
| | | List<BannerVO> picList = swiperPictureService.getByBannerCardAndVersion("index_top", platform,
|
| | | version);
|
| | | version,acceptData.getSystem());
|
| | | if (picList == null) {
|
| | | picList = new ArrayList<>();
|
| | | }
|
| | |
| | | * @param goodsId
|
| | | * 商品id
|
| | | * @param uid
|
| | | * @param code
|
| | | * 邀请码
|
| | | * @param goodsType
|
| | | * 商品类型
|
| | |
| | | }
|
| | |
|
| | | goodsDetail.getMoneyInfo()
|
| | | .setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
|
| | | .setRateInfoHelpUrl(configService.getValue(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey(),acceptData.getSystem()));
|
| | |
|
| | | // 附加信息
|
| | | OtherInfo otherInfo = new OtherInfo();
|
| | |
| | | // IOS是否正在上线
|
| | | if ("ios".equalsIgnoreCase(acceptData.getPlatform())) {
|
| | | String version = acceptData.getVersion();
|
| | | extraVO.setIosOnling(configService.iosOnLining(Integer.parseInt(version)));
|
| | | extraVO.setIosOnling(configService.iosOnLining(Integer.parseInt(version),acceptData.getSystem()));
|
| | | }
|
| | |
|
| | | Long inOrderCount30Days = jdGoods.getInOrderCount30Days();
|
| | | List<ShamUser> listShareUser = new ArrayList<ShamUser>();
|
| | |
|
| | | // 京东开启分享
|
| | | String open = configService.get(ConfigKeyEnum.shareOpenJD.getKey());
|
| | | String open = configService.getValue(ConfigKeyEnum.shareOpenJD.getKey(),acceptData.getSystem());
|
| | | if ("1".equals(open.trim())) {
|
| | | extraVO.setShareValid(true);
|
| | | MoneyInfoVO moneyInfo = goodsDetail.getMoneyInfo();
|
| | |
| | | extraVO.setDetailUrl("https://in.m.jd.com/product/jieshao/video/" + id + ".html");
|
| | |
|
| | | // 商品链接
|
| | | String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(),
|
| | | String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(acceptData.getSystem()),
|
| | | Constant.systemCommonConfig.getShareGoodsPagePathJD(), "", id + "");
|
| | | try {
|
| | | extraVO.setH5Url(HttpUtil.getShortLink(h5Url));
|
| | |
| | | extraVO.setFanliValid(true);
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(helpLink)) {
|
| | | helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
|
| | | helpLink = configService.getValue(ConfigKeyEnum.noRebateHelpLink.getKey(),acceptData.getSystem());
|
| | | }
|
| | |
|
| | | ShareVO shareInfoVO = new ShareVO();
|
| | |
| | | }
|
| | |
|
| | | // 分享路径
|
| | | String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(),
|
| | | String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(acceptData.getSystem()),
|
| | | Constant.systemCommonConfig.getShareGoodsPagePathPDD(), "", id + "");
|
| | | try {
|
| | | extraVO.setH5Url(HttpUtil.getShortLink(h5Url));
|
| | |
| | | extraVO.setShareValid(true);
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(helpLink)) {
|
| | | helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
|
| | | helpLink = configService.getValue(ConfigKeyEnum.noRebateHelpLink.getKey(),acceptData.getSystem());
|
| | | }
|
| | |
|
| | | ShareVO shareInfoVO = new ShareVO();
|
| | |
| | | * @param goodsId
|
| | | * 商品id
|
| | | * @param uid
|
| | | * @param code
|
| | | * 邀请码
|
| | | * @param goodsType
|
| | | * 商品类型
|