| | |
| | | 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 |
| | |
| | | extraVO.setBuyValid(true); |
| | | extraVO.setListCouponUser(listCouponUser); |
| | | goodsDetailVO.setExtra(extraVO); |
| | | 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(); |
| | | 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(TaoBaoConstant.TAOBAO_COMMON_PID.split("_")[3]); |
| | | } |
| | | app.setAdzoneId(app.getPid().split("_")[3]); |
| | | goods = TaoKeApiUtil.searchGoodsDetail(id, app); |
| | | |
| | | final TaoBaoGoodsBrief finalGoods = goods; |