| | |
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RequestMethod;
|
| | | import org.yeshi.utils.HttpUtil;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | | import org.yeshi.utils.taobao.TbImgUtil;
|
| | |
|
| | |
| | | import com.yeshi.fanli.entity.bus.recommend.RecommendBanner;
|
| | | import com.yeshi.fanli.entity.bus.share.UserShareGoodsHistory;
|
| | | import com.yeshi.fanli.entity.bus.su.recommend.SuperRecommendBanner;
|
| | | import com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinRecord;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.entity.taobao.ClientTBPid;
|
| | | import com.yeshi.fanli.entity.taobao.PidUser;
|
| | |
| | | * @param out
|
| | | */
|
| | | private void doTaoLiJin(String callback, Long uid, Long tid, PrintWriter out) {
|
| | | String tljLink = "";
|
| | | Long auctionId = null;
|
| | | BigDecimal tljMoney=null;
|
| | | // 查询商品淘礼金
|
| | | UserTaoLiJinRecord record = userTaoLiJinRecordService.selectByPrimaryKey(tid);
|
| | | if (record == null) {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("商品信息获取失败")));
|
| | | return;
|
| | | }
|
| | | |
| | | Long auctionId = record.getGoodsId();
|
| | | String tljLink = record.getSendUrl();
|
| | | BigDecimal tljMoney= record.getPerFace();
|
| | | |
| | | TaoBaoGoodsBrief goods = null;
|
| | | try {
|
| | | goods = redisManager.getTaoBaoGoodsBrief(auctionId);
|
| | |
| | | } else {
|
| | | data.put("coupon", false);
|
| | | }
|
| | | |
| | | data.put("tljMoney", tljMoney);
|
| | |
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(data)));
|
| | |
| | |
|
| | | @SuppressWarnings("unused")
|
| | | @RequestMapping(value = "getGoodsDetail", method = RequestMethod.GET)
|
| | | public void getGoodsDetail(final AcceptData acceptData, final String id, Long tid, String uid, String callback,
|
| | | public void getGoodsDetail(final AcceptData acceptData, final String id, String tid, String uid, String callback,
|
| | | PrintWriter out) {
|
| | | long begin = java.lang.System.currentTimeMillis();
|
| | | if (StringUtil.isNullOrEmpty(id)) {
|
| | |
| | | uid = AESUtil.decrypt(uid, Constant.UIDAESKEY);
|
| | | }
|
| | |
|
| | | if (tid != null && tid != 0) {
|
| | | if (!StringUtil.isNullOrEmpty(tid)) {
|
| | | tid = AESUtil.decrypt(tid, Constant.UIDAESKEY);
|
| | | doTaoLiJin(callback, StringUtil.isNullOrEmpty(uid) || Long.parseLong(uid) == 0 ? null : Long.parseLong(uid),
|
| | | tid, out);
|
| | | Long.parseLong(tid), out);
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | | data.put("coupon", false);
|
| | | // 老版本兼容
|
| | | data.put("quan", true);
|
| | | }
|
| | | |
| | | |
| | | // 查询商品淘礼金
|
| | | BigDecimal taoLiJin = userTaoLiJinRecordService.getShareHongBaoByUidAndGoodsId(Long.parseLong(uid), Long.parseLong(id));
|
| | | if (taoLiJin != null && taoLiJin.compareTo(new BigDecimal(0)) == 1) {
|
| | | data.put("taoLiJin", "可获淘礼金红包 ¥" + taoLiJin);
|
| | | }
|
| | |
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(data)));
|