| | |
| | | import com.yeshi.fanli.entity.taobao.TBPid;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoUnionConfig;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.order.CommonOrderCountService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoUnionConfigService;
|
| | | import com.yeshi.fanli.service.inter.user.TBPidService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | |
| | | @Resource
|
| | | private TaoBaoUnionConfigService taoBaoUnionConfigService;
|
| | |
|
| | | @Resource
|
| | | private CommonOrderCountService commonOrderCountService;
|
| | |
|
| | | /**
|
| | | * 首页配置信息
|
| | | *
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getHomeConfig", method = RequestMethod.POST)
|
| | | public void getHomeConfig(AcceptData acceptData, PrintWriter out) {
|
| | | public void getHomeConfig(AcceptData acceptData, Long uid, PrintWriter out) {
|
| | | AppHomeFloatImg appHomeFloatImg = configService.getAppHomeFloatImg();
|
| | | if ("ios".equalsIgnoreCase(acceptData.getPlatform()) && !Constant.IS_TEST)
|
| | | appHomeFloatImg = null;
|
| | | JSONObject data =new JSONObject();
|
| | | JSONObject data = new JSONObject();
|
| | | if (appHomeFloatImg != null)
|
| | | data.put("floatImg", appHomeFloatImg);
|
| | | String notifyImg = configService.getAppHomeFloatNotifyImg();
|
| | |
| | | //
|
| | | String config = configService.get("home_float_img_new");
|
| | | if (!StringUtil.isNullOrEmpty(config)) {
|
| | | data.put("floatImgDetail", config);
|
| | | if (uid != null) {
|
| | | if (!commonOrderCountService.hasRebateAndShareOrder(uid))
|
| | | data.put("floatImgDetail", config);
|
| | | } else
|
| | | data.put("floatImgDetail", config);
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | String cartJS = configService.get("taobao_cart_js");
|
| | | String cartUrl=configService.get("taobao_cart_link");
|
| | | String js = null;
|
| | | String link=null;
|
| | | try {
|
| | | js = DESUtil.encode(cartJS, StringUtil.getBase64String("YeShiFANLI889*+"),
|
| | | StringUtil.getBase64String("*M#34f?,"));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | |
| | | try {
|
| | | link = DESUtil.encode(cartUrl, StringUtil.getBase64String("YeShiFANLI889*+"),
|
| | | StringUtil.getBase64String("*M#34f?,"));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("js", js);
|
| | | data.put("link", link);
|
| | | data.put("tbPidInfo", clientTBPid);
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|