| | |
| | | package com.yeshi.fanli.controller.client.v2;
|
| | |
|
| | | import java.io.PrintWriter;
|
| | | import java.math.BigDecimal;
|
| | | import java.util.ArrayList;
|
| | | import java.util.HashSet;
|
| | | import java.util.List;
|
| | |
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.user.UserGoodsStorage;
|
| | | import com.yeshi.fanli.entity.goods.CommonGoods;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.exception.share.UserShareGoodsRecordException;
|
| | | import com.yeshi.fanli.exception.taobao.TaoKeApiException;
|
| | | import com.yeshi.fanli.exception.taobao.TaobaoGoodsDownException;
|
| | | import com.yeshi.fanli.exception.user.UserGoodsStorageException;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.order.OrderHongBaoMoneyComputeService;
|
| | | import com.yeshi.fanli.service.inter.order.config.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.user.UserGoodsStorageService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | |
| | |
|
| | | @Resource
|
| | | private HongBaoManageService hongBaoManageService;
|
| | | |
| | | @Resource
|
| | | private OrderHongBaoMoneyComputeService orderHongBaoMoneyComputeService;
|
| | |
|
| | | @Resource
|
| | | private UserGoodsStorageService userGoodsStorageService;
|
| | |
| | | JSONObject data = new JSONObject();
|
| | |
|
| | | if (goodsType == Constant.SOURCE_TYPE_JD) {
|
| | | String open = configService.get("share_jd_open");
|
| | | String open = configService.get(ConfigKeyEnum.shareOpenJD.getKey());
|
| | | if (!"1".equals(open.trim())) {
|
| | | data.put("count", 0);
|
| | | data.put("result_list", array);
|
| | |
| | | Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
|
| | | .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
|
| | |
|
| | | BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
|
| | | BigDecimal shareRate = hongBaoManageService.getShareRate();
|
| | | ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE);
|
| | | ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(),
|
| | | acceptData.getVersion());
|
| | |
|
| | | for (UserGoodsStorage userGoodsStorage : listStorage) {
|
| | | CommonGoods commonGoods = userGoodsStorage.getCommonGoods();
|
| | |
| | | List<Long> listStorageID = gson.fromJson(storageIds, new TypeToken<ArrayList<Long>>() {
|
| | | }.getType());
|
| | |
|
| | | if (!VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | |
|
| | | if (listStorageID == null || listStorageID.size() < 9) {
|
| | | out.print(JsonUtil.loadFalseResult("分享商品数量不足"));
|