| | |
| | | package com.yeshi.fanli.controller.client.v1; |
| | | |
| | | import java.io.PrintWriter; |
| | | import java.util.Date; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | |
| | | import com.yeshi.fanli.entity.SystemPIDInfo; |
| | | import com.yeshi.fanli.exception.taobao.TaoBaoConvertLinkException; |
| | | import com.yeshi.fanli.lijin.manager.UserLijinMnager; |
| | | import com.yeshi.fanli.service.inter.user.UserFunctionsLimitService; |
| | | import com.yeshi.fanli.service.manger.PIDManager; |
| | | import com.yeshi.fanli.service.manger.goods.TaoBaoLinkManager; |
| | | import com.yeshi.fanli.util.SystemInfoUtil; |
| | |
| | | @Resource |
| | | private UserLijinMnager userLijinMnager; |
| | | |
| | | private void doTaoLiJinBuy(AcceptData acceptData, Long uid, Long auctionId, PrintWriter out) { |
| | | @Resource |
| | | private UserFunctionsLimitService userFunctionsLimitService; |
| | | |
| | | private void doTaoLiJinBuy(AcceptData acceptData, Long uid, String auctionId, PrintWriter out) { |
| | | JSONObject data = new JSONObject(); |
| | | TaoBaoLink taoBaoLink = null; |
| | | try { |
| | |
| | | } |
| | | |
| | | |
| | | private void getTaoBaoLinkWithoutFanLi(AcceptData acceptData, Long auctionId, String from, String source, |
| | | private void getTaoBaoLinkWithoutFanLi(AcceptData acceptData, String auctionId, String from, String source, |
| | | HttpServletRequest request, PrintWriter out) { |
| | | |
| | | try { |
| | |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "gettaobaolink") |
| | | public void getTaoBaoLink(AcceptData acceptData, Long uid, Long auctionId, String from, String source, |
| | | public void getTaoBaoLink(AcceptData acceptData, Long uid, String auctionId, String from, String source, |
| | | HttpServletRequest request, PrintWriter out) { |
| | | |
| | | if (auctionId == null || auctionId <= 0) { |
| | | if (StringUtil.isNullOrEmpty(auctionId)) { |
| | | out.print(JsonUtil.loadFalseResult(2, "商品ID不能为空")); |
| | | return; |
| | | } |
| | |
| | | out.print(JsonUtil.loadFalseResult(Constant.CODE_FORBIDDEN_USER, Constant.FORBIDDEN_USER_REASON_DESC)); |
| | | return; |
| | | } |
| | | if (userFunctionsLimitService.isLimit(uid, SystemFunction.fanli, new Date())) { |
| | | out.print(JsonUtil.loadFalseResult(1, "该功能限制使用")); |
| | | return; |
| | | } |
| | | |
| | | try { |
| | | // 日志记录 |
| | |
| | | TaoBaoGoodsBrief goods = null; |
| | | |
| | | try { |
| | | goods = TaoKeApiUtil.getSimpleGoodsInfo(auctionId); |
| | | goods = TaoKeApiUtil.getSimpleGoodsInfoForOwnBuy(auctionId); |
| | | } catch (TaobaoGoodsDownException e) { |
| | | out.print(JsonUtil.loadFalseResult(3, "商品已下架")); |
| | | return; |
| | |
| | | if ("TB".equalsIgnoreCase(goodsType)) { |
| | | TaoBaoGoodsBrief goods = null; |
| | | try { |
| | | goods = TaoKeApiUtil.getSimpleGoodsInfo(Long.parseLong(goodsId)); |
| | | goods = TaoKeApiUtil.getSimpleGoodsInfo(goodsId); |
| | | } catch (NumberFormatException e) { |
| | | e.printStackTrace(); |
| | | } catch (TaobaoGoodsDownException e) { |
| | |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "deleteRecommendGoods") |
| | | public void deleteRecommendGoods(AcceptData acceptData, Long goodsId, Integer source, Long uid, String reason, |
| | | public void deleteRecommendGoods(AcceptData acceptData, String goodsId, Integer source, Long uid, String reason, |
| | | PrintWriter out) { |
| | | if (goodsId == null) { |
| | | out.print(JsonUtil.loadFalseResult(1, "请上传商品")); |