| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.yeshi.utils.JsonUtil; |
| | | import org.yeshi.utils.MoneyBigDecimalUtil; |
| | | import org.yeshi.utils.NumberUtil; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.PrintWriter; |
| | |
| | | @RequestMapping("api/lijin/goods") |
| | | public class GoodsControllerLijin { |
| | | Logger userGoodsScanLogger = LoggerFactory.getLogger("userGoodsScanLog"); |
| | | |
| | | |
| | | |
| | | |
| | | @Resource |
| | |
| | | public void run() { |
| | | try { |
| | | userGoodsScanLogger.info("{}", new Gson().toJson(UserGoodsScanLog.UserGoodsScanLogFactory.create(goodsDetailVO.getGoods(), uid, acceptData.getUtdid(), acceptData.getDevice()))); |
| | | }catch(Exception e){ |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | } |
| | |
| | | //是否收藏 |
| | | extraVO.setCollected(false); |
| | | if (uid != null) { |
| | | CollectionGoodsV2 collectionGoodsV2 = collectionGoodsV2Service.findByUidAndAuctionId(uid, goodsType == Constant.SOURCE_TYPE_SUNING ? goodsIdSuning+"" : goodsDetailVO.getGoods().getGoodsId(), goodsType); |
| | | CollectionGoodsV2 collectionGoodsV2 = collectionGoodsV2Service.findByUidAndAuctionId(uid, goodsType == Constant.SOURCE_TYPE_SUNING ? goodsIdSuning + "" : goodsDetailVO.getGoods().getGoodsId(), goodsType); |
| | | if (collectionGoodsV2 != null) { |
| | | extraVO.setCollected(true); |
| | | } |
| | |
| | | extraVO.setBuyValid(true); |
| | | extraVO.setListCouponUser(listCouponUser); |
| | | goodsDetailVO.setExtra(extraVO); |
| | | loadLijinInfo(uid, acceptData.getSystem(), goodsDetailVO); |
| | | try { |
| | | loadLijinInfo(uid, acceptData.getSystem(), goodsDetailVO); |
| | | } catch (Exception e) { |
| | | if (goodsDetailVO.getGoods().getMoneyInfo() != null) { |
| | | goodsDetailVO.getGoods().getMoneyInfo().setHongBaoMoney("0.00"); |
| | | } |
| | | } |
| | | //清除临时信息 |
| | | goodsDetailVO.getGoods().setTempCoupon(null); |
| | | if (goodsDetailVO.getGoods().getLabels() == null) |
| | |
| | | return goods; |
| | | } |
| | | TaoKeAppInfo app = new TaoKeAppInfo(); |
| | | app.setAppKey(TaoBaoConstant.TAOBAO_COMMON_APPKEY); |
| | | app.setAppSecret(TaoBaoConstant.TAOBAO_COMMON_APPSECRET); |
| | | app.setPid(TaoBaoConstant.TAOBAO_COMMON_PID); |
| | | app.setAdzoneId(TaoBaoConstant.TAOBAO_COMMON_PID.split("_")[3]); |
| | | if (NumberUtil.isNumeric(id)) { |
| | | app.setAppKey(TaoBaoConstant.TAOBAO_AUTH_APPKEY); |
| | | app.setAppSecret(TaoBaoConstant.TAOBAO_AUTH_APPSECRET); |
| | | app.setPid(TaoBaoConstant.TAOBAO_PID_DEFAULT); |
| | | } else { |
| | | app.setAppKey(TaoBaoConstant.TAOBAO_COMMON_APPKEY); |
| | | app.setAppSecret(TaoBaoConstant.TAOBAO_COMMON_APPSECRET); |
| | | app.setPid(TaoBaoConstant.TAOBAO_COMMON_PID); |
| | | } |
| | | app.setAdzoneId(app.getPid().split("_")[3]); |
| | | goods = TaoKeApiUtil.searchGoodsDetail(id, app); |
| | | |
| | | final TaoBaoGoodsBrief finalGoods = goods; |