| | |
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import com.yeshi.fanli.util.*;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
| | | import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailV2Service;
|
| | | import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.JumpDetailUtil;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
|
| | | import com.yeshi.fanli.vo.goods.GoodsDetailVO;
|
| | | import com.yeshi.fanli.vo.homemodule.BannerVO;
|
| | |
| | |
|
| | | // 轮播图
|
| | | List<BannerVO> picList = swiperPictureService.getByBannerCardAndVersion("index_top", platform,
|
| | | version);
|
| | | version,acceptData.getSystem());
|
| | | if (picList == null) {
|
| | | picList = new ArrayList<>();
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | // 圆形专题
|
| | | List<SpecialVO> specials = specialService.listByVersion(0, 10, "index_arc_1.6.5", platform, version);
|
| | | List<SpecialVO> specials = specialService.listByVersion(0, 10, "index_arc_1.6.5", platform, version,acceptData.getSystem());
|
| | | if (specials == null)
|
| | | specials = new ArrayList<>();
|
| | |
|
| | |
| | |
|
| | | // 活动
|
| | | List<BannerVO> activitys = swiperPictureService.getByBannerCardAndVersion("index_invite", platform,
|
| | | version);
|
| | | version,acceptData.getSystem());
|
| | | if (activitys == null)
|
| | | activitys = new ArrayList<>();
|
| | |
|
| | |
| | | * @param out
|
| | | */
|
| | | private void getIndexJDGoods(WXMPAcceptData acceptData, int page, PrintWriter out) {
|
| | | JDSearchResult result = jdGoodsService.getIndexJDGoods(page);
|
| | | JDSearchResult result = jdGoodsService.getIndexJDGoods(page, SystemInfoUtil.getSystemByWXCXCAppId(acceptData.getAppId()));
|
| | | long count = 0;
|
| | | JSONObject data = new JSONObject();
|
| | | JSONArray array = new JSONArray();
|
| | |
| | | List<JDGoods> goodsList = result.getGoodsList();
|
| | | if (goodsList != null && goodsList.size() > 0) {
|
| | | ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(),
|
| | | acceptData.getVersion());
|
| | | acceptData.getVersion(),acceptData.getSystem());
|
| | |
|
| | | Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
|
| | | .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
|
| | |
| | | List<PDDGoodsDetail> goodsList = result.getGoodsList();
|
| | | if (goodsList != null && goodsList.size() > 0) {
|
| | | ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(),
|
| | | acceptData.getVersion());
|
| | | acceptData.getVersion(),acceptData.getSystem());
|
| | |
|
| | | for (PDDGoodsDetail goods : goodsList) {
|
| | | GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertPDDGoods(goods, paramsDTO);
|
| | |
| | | *
|
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param callback
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getGuide")
|
| | | public void getGuide(AcceptData acceptData, Long uid, PrintWriter out) {
|
| | | String tips = null;
|
| | | if (uid == null || uid <= 0) {
|
| | | tips = configService.get(ConfigKeyEnum.tipGuideNewUser.getKey());
|
| | | tips = configService.getValue(ConfigKeyEnum.tipGuideNewUser.getKey(),acceptData.getSystem());
|
| | | } 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(),acceptData.getSystem());
|
| | | } else if (rebateOrder > 0 && shareOrInviteOrder <= 0) {
|
| | | // 省钱版
|
| | | tips = configService.get(ConfigKeyEnum.tipGuideSaveMoney.getKey());
|
| | | tips = configService.getValue(ConfigKeyEnum.tipGuideSaveMoney.getKey(),acceptData.getSystem());
|
| | | } else {
|
| | | // 赚钱版
|
| | | tips = configService.get(ConfigKeyEnum.tipGuideShareInvite.getKey());
|
| | | tips = configService.getValue(ConfigKeyEnum.tipGuideShareInvite.getKey(),acceptData.getSystem());
|
| | | }
|
| | | }
|
| | |
|