| | |
| | | Collections.reverse(levelList);
|
| | |
|
| | | BigDecimal fanLiRate = orderHongBaoMoneyComputeService.getFanliRate(levelList.get(0), new Date());
|
| | | |
| | | moneyBigDecial=MoneyBigDecimalUtil.divUp(moneyBigDecial.multiply(new BigDecimal(100)), fanLiRate);
|
| | |
|
| | | moneyBigDecial = MoneyBigDecimalUtil.divUp(moneyBigDecial.multiply(new BigDecimal(100)), fanLiRate);
|
| | |
|
| | | List<UserTeamLevel> bossList = new ArrayList<>();
|
| | | if (levelList.size() > 1)
|
| | |
| | | String st = "";
|
| | | Long uid = bossList.get(i).getUid();
|
| | |
|
| | | if (i < 2) {
|
| | | if (teamRewardMap.get(uid) == null)
|
| | | st += "¥0";
|
| | | else
|
| | | st += "¥" + MoneyBigDecimalUtil.div(
|
| | | MoneyBigDecimalUtil.mul(moneyBigDecial, teamRewardMap.get(uid).getRate()),
|
| | | new BigDecimal(100));
|
| | | if (teamRewardMap.get(uid) == null)
|
| | | st += "¥0";
|
| | | else
|
| | | st += "¥" + MoneyBigDecimalUtil.div(
|
| | | MoneyBigDecimalUtil.mul(moneyBigDecial, teamRewardMap.get(uid).getRate()), new BigDecimal(100));
|
| | |
|
| | | st += "+";
|
| | | }
|
| | | st += "+";
|
| | |
|
| | | if (i >= 2) {
|
| | |
|
| | | if (teamReward2Map.get(uid) == null)
|
| | | st += "¥0";
|
| | | else
|
| | | st += "¥" + MoneyBigDecimalUtil.div(
|
| | | MoneyBigDecimalUtil.mul(moneyBigDecial, teamReward2Map.get(uid).getRate()),
|
| | | new BigDecimal(100));
|
| | | st += "+";
|
| | | }
|
| | | if (teamReward2Map.get(uid) == null)
|
| | | st += "¥0";
|
| | | else
|
| | | st += "¥" + MoneyBigDecimalUtil.div(
|
| | | MoneyBigDecimalUtil.mul(moneyBigDecial, teamReward2Map.get(uid).getRate()),
|
| | | new BigDecimal(100));
|
| | | st += "+";
|
| | |
|
| | | if (teamDividentsMap.get(uid) == null)
|
| | | st += "¥0";
|
| | |
| | |
|
| | | @Resource
|
| | | private RedisManager redisManager;
|
| | | |
| | |
|
| | | @Resource
|
| | | private HongBaoV2CountService hongBaoV2CountService;
|
| | | |
| | |
|
| | | @Resource
|
| | | private UserMoneyDetailService userMoneyDetailService;
|
| | | |
| | |
|
| | | @Resource
|
| | | private OrderMoneyDailyCountService orderMoneyDailyCountService;
|
| | | |
| | |
|
| | | @Resource
|
| | | private CommonOrderService commonOrderService;
|
| | | |
| | |
|
| | | @Resource
|
| | | private PushService pushService;
|
| | | |
| | | |
| | | |
| | |
|
| | | /**
|
| | | * 保存资金信息
|
| | | *
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | @RequestMapping(value = "getMoneyInfo")
|
| | | public void getMoneyInfo(String callback, AcceptData acceptData, Long uid, PrintWriter out) {
|
| | | MoneyStatisticVO dto = null;
|
| | |
| | | vo.setMonthPredict(cratePredictVO(orderMoneyDailyCountService.query(uid, minDate, maxDate)));
|
| | | return vo;
|
| | | }
|
| | | |
| | |
|
| | | private MoneyPredictVO cratePredictVO(List<OrderMoneyDailyCount> list) {
|
| | | MoneyPredictVO predictVO = new MoneyPredictVO();
|
| | | predictVO.setMineNum(0);
|
| | |
| | | predictVO.setTotalMoney(predictVO.getMineMoney().add(predictVO.getTeamMoney()));
|
| | | return predictVO;
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * 保存提现记录
|
| | | *
|
| | |
| | | PreviewInfo previewInfo = previewInfoService.get(uid, PreviewEnum.extractRecord);
|
| | | if (previewInfo != null && !StringUtil.isNullOrEmpty(previewInfo.getContent())) {
|
| | | Gson gson = new Gson();
|
| | | list = gson.fromJson(previewInfo.getContent(), new TypeToken<ArrayList<Extract>>() {}.getType());
|
| | | list = gson.fromJson(previewInfo.getContent(), new TypeToken<ArrayList<Extract>>() {
|
| | | }.getType());
|
| | | }
|
| | | |
| | |
|
| | | if (list == null)
|
| | | list = new ArrayList<>();
|
| | |
|
| | |
| | | JSONArray.add(object);
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | JSONObject json = new JSONObject();
|
| | | json.put("count", JSONArray.size());
|
| | | json.put("list", JSONArray);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(json));
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * 删除提现记录
|
| | | *
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * 删除提现记录
|
| | | *
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "saveMineInfo")
|
| | | public void saveMineInfo(String callback, AcceptData acceptData, MineInfoVO infoVO, PrintWriter out) {
|
| | | public void saveMineInfo(String callback, AcceptData acceptData, MineInfoVO infoVO, PrintWriter out) {
|
| | | if (infoVO == null || infoVO.getUid() == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("用户未登录"));
|
| | | return;
|
| | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("保存失败"));
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | @RequestMapping(value = "getMineInfo")
|
| | | public void getMineInfo(String callback, AcceptData acceptData, Long uid, PrintWriter out) {
|
| | | PreviewInfo previewInfo = previewInfoService.get(uid, PreviewEnum.mineInfo);
|
| | |
| | | if (previewInfo != null && !StringUtil.isNullOrEmpty(previewInfo.getContent())) {
|
| | | dto = new Gson().fromJson(previewInfo.getContent(), MineInfoVO.class);
|
| | | }
|
| | | |
| | |
|
| | | if (dto == null)
|
| | | dto = new MineInfoVO();
|
| | | dto = new MineInfoVO();
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(JsonUtil.getSimpleGson().toJson(dto)));
|
| | | }
|
| | |
|
| | |
| | | JSONObject object = new JSONObject();
|
| | | object.put("link", link);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(object));
|
| | | } catch (PreviewInfoException e) { |
| | | } catch (PreviewInfoException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("预览失败"));
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | @RequestMapping(value = "getMoneyArrivalImg")
|
| | | public void getMoneyArrivalImg(String callback, AcceptData acceptData, Long uid, PrintWriter out) {
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "saveOrderInfo")
|
| | | public void saveOrderInfo(String callback, AcceptData acceptData, Long uid, Integer type, Integer num, PrintWriter out) {
|
| | | public void saveOrderInfo(String callback, AcceptData acceptData, Long uid, Integer type, Integer num,
|
| | | PrintWriter out) {
|
| | | if (uid == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("用户未登录"));
|
| | | return;
|
| | | }
|
| | | |
| | |
|
| | | if (type == null || type < 1 || type > 2) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请选择订单类型"));
|
| | | return;
|
| | | }
|
| | | |
| | |
|
| | | if (num == null || num <= 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请填写推送数量"));
|
| | | return;
|
| | | }
|
| | | |
| | |
|
| | | if (num > 50) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("最多支持50条"));
|
| | | return;
|
| | | }
|
| | | |
| | |
|
| | | // 获取最新订单号
|
| | | String orderNo = commonOrderService.getNewestOrderNoByTaoBao();
|
| | | |
| | |
|
| | | // 随机订单号
|
| | | List<String> list = getRandomOrderNo(orderNo, num);
|
| | | for (String orderId: list) {
|
| | | PushContentDTO dto = PushMsgFactory.createFanLiOrderStatisticed(Constant.SOURCE_TYPE_TAOBAO, |
| | | orderId, BigDecimal.ZERO);
|
| | | // new Thread(new Runnable() {
|
| | | //
|
| | | // @Override
|
| | | // public void run() {
|
| | | for (String orderId : list) {
|
| | | PushContentDTO dto = PushMsgFactory.createInviteOrderStatisticed(Constant.SOURCE_TYPE_TAOBAO, orderId,
|
| | | BigDecimal.ZERO);
|
| | | try {
|
| | | pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null);
|
| | | } catch (NumberFormatException e) {
|
| | |
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | try {
|
| | | Thread.sleep(100);
|
| | | } catch (InterruptedException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | // }
|
| | | // }).start();
|
| | |
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("推送成功"));
|
| | | }
|
| | | |
| | | |
| | |
|
| | | private List<String> getRandomOrderNo(String orderNo, int count) {
|
| | | String newNo = orderNo.substring(0, 3);
|
| | | long lenth = orderNo.length() - 3;
|
| | |
| | | set.add(newNo + randomNum);
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | // 转换list
|
| | | List<String> list = new ArrayList<>();
|
| | | for (String s : set) {
|
| | |
| | | }
|
| | | // 排序
|
| | | Collections.sort(list);
|
| | | |
| | |
|
| | | return list;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.dao.mybatis.vipshop; |
| | | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.entity.vipshop.VipShopAfterSaleDetailInfo; |
| | | |
| | | public interface VipShopAfterSaleDetailInfoMapper extends BaseMapper<VipShopAfterSaleDetailInfo> { |
| | | |
| | | VipShopAfterSaleDetailInfo selectByOrderDetailId(Long id); |
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.dao.mybatis.vipshop; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.entity.vipshop.VipShopOrderDetail; |
| | | |
| | | public interface VipShopOrderDetailMapper extends BaseMapper<VipShopOrderDetail> { |
| | | |
| | | VipShopOrderDetail selectByIdentifyCode(String identifyCode); |
| | | |
| | | List<VipShopOrderDetail> listByOrderSn(String orderSn); |
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.dao.mybatis.vipshop; |
| | | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.entity.vipshop.VipShopOrder; |
| | | |
| | | public interface VipShopOrderMapper extends BaseMapper<VipShopOrder> { |
| | | |
| | | VipShopOrder selectByOrderSn(String orderSn); |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.dto.suning;
|
| | |
|
| | | public class SuningAdvanceSale {
|
| | | private Integer isReserveCommodity;// 是否预售 1:是 0:否
|
| | | private String depositAmount;// 定金
|
| | | private String depositEndTime;// 付定金结束时间
|
| | |
|
| | | public Integer getIsReserveCommodity() {
|
| | | return isReserveCommodity;
|
| | | }
|
| | |
|
| | | public void setIsReserveCommodity(Integer isReserveCommodity) {
|
| | | this.isReserveCommodity = isReserveCommodity;
|
| | | }
|
| | |
|
| | | public String getDepositAmount() {
|
| | | return depositAmount;
|
| | | }
|
| | |
|
| | | public void setDepositAmount(String depositAmount) {
|
| | | this.depositAmount = depositAmount;
|
| | | }
|
| | |
|
| | | public String getDepositEndTime() {
|
| | | return depositEndTime;
|
| | | }
|
| | |
|
| | | public void setDepositEndTime(String depositEndTime) {
|
| | | this.depositEndTime = depositEndTime;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.dto.suning;
|
| | |
|
| | | public class SuningCategoryInfo {
|
| | | private String firstSaleCategoryId;// 一级销售目录ID
|
| | | private String firstSaleCategoryName;// 一级销售目录名称
|
| | | private String secondSaleCategoryId; // 二级销售目录ID
|
| | | private String secondSaleCategoryName; // 二级销售目录名称
|
| | | private String thirdSaleCategoryId; // 三级销售目录ID
|
| | | private String thirdSaleCategoryName; // 三级销售目录名称
|
| | | private String firstPurchaseCategoryId; // 一级采购目录ID
|
| | | private String firstPurchaseCategoryName; // 一级采购目录名称
|
| | | private String secondPurchaseCategoryId; // 二级采购目录ID
|
| | | private String secondPurchaseCategoryName; // 二级采购目录名称
|
| | | private String thirdPurchaseCategoryId; // 三级采购目录ID
|
| | | private String thirdPurchaseCategoryName; // 三级采购目录名称
|
| | | private String goodsGroupCategoryId; // 商品组目录ID
|
| | | private String goodsGroupCategoryName; // 商品组目录名称
|
| | |
|
| | | public String getFirstSaleCategoryId() {
|
| | | return firstSaleCategoryId;
|
| | | }
|
| | |
|
| | | public void setFirstSaleCategoryId(String firstSaleCategoryId) {
|
| | | this.firstSaleCategoryId = firstSaleCategoryId;
|
| | | }
|
| | |
|
| | | public String getFirstSaleCategoryName() {
|
| | | return firstSaleCategoryName;
|
| | | }
|
| | |
|
| | | public void setFirstSaleCategoryName(String firstSaleCategoryName) {
|
| | | this.firstSaleCategoryName = firstSaleCategoryName;
|
| | | }
|
| | |
|
| | | public String getSecondSaleCategoryId() {
|
| | | return secondSaleCategoryId;
|
| | | }
|
| | |
|
| | | public void setSecondSaleCategoryId(String secondSaleCategoryId) {
|
| | | this.secondSaleCategoryId = secondSaleCategoryId;
|
| | | }
|
| | |
|
| | | public String getSecondSaleCategoryName() {
|
| | | return secondSaleCategoryName;
|
| | | }
|
| | |
|
| | | public void setSecondSaleCategoryName(String secondSaleCategoryName) {
|
| | | this.secondSaleCategoryName = secondSaleCategoryName;
|
| | | }
|
| | |
|
| | | public String getThirdSaleCategoryId() {
|
| | | return thirdSaleCategoryId;
|
| | | }
|
| | |
|
| | | public void setThirdSaleCategoryId(String thirdSaleCategoryId) {
|
| | | this.thirdSaleCategoryId = thirdSaleCategoryId;
|
| | | }
|
| | |
|
| | | public String getThirdSaleCategoryName() {
|
| | | return thirdSaleCategoryName;
|
| | | }
|
| | |
|
| | | public void setThirdSaleCategoryName(String thirdSaleCategoryName) {
|
| | | this.thirdSaleCategoryName = thirdSaleCategoryName;
|
| | | }
|
| | |
|
| | | public String getFirstPurchaseCategoryId() {
|
| | | return firstPurchaseCategoryId;
|
| | | }
|
| | |
|
| | | public void setFirstPurchaseCategoryId(String firstPurchaseCategoryId) {
|
| | | this.firstPurchaseCategoryId = firstPurchaseCategoryId;
|
| | | }
|
| | |
|
| | | public String getFirstPurchaseCategoryName() {
|
| | | return firstPurchaseCategoryName;
|
| | | }
|
| | |
|
| | | public void setFirstPurchaseCategoryName(String firstPurchaseCategoryName) {
|
| | | this.firstPurchaseCategoryName = firstPurchaseCategoryName;
|
| | | }
|
| | |
|
| | | public String getSecondPurchaseCategoryId() {
|
| | | return secondPurchaseCategoryId;
|
| | | }
|
| | |
|
| | | public void setSecondPurchaseCategoryId(String secondPurchaseCategoryId) {
|
| | | this.secondPurchaseCategoryId = secondPurchaseCategoryId;
|
| | | }
|
| | |
|
| | | public String getSecondPurchaseCategoryName() {
|
| | | return secondPurchaseCategoryName;
|
| | | }
|
| | |
|
| | | public void setSecondPurchaseCategoryName(String secondPurchaseCategoryName) {
|
| | | this.secondPurchaseCategoryName = secondPurchaseCategoryName;
|
| | | }
|
| | |
|
| | | public String getThirdPurchaseCategoryId() {
|
| | | return thirdPurchaseCategoryId;
|
| | | }
|
| | |
|
| | | public void setThirdPurchaseCategoryId(String thirdPurchaseCategoryId) {
|
| | | this.thirdPurchaseCategoryId = thirdPurchaseCategoryId;
|
| | | }
|
| | |
|
| | | public String getThirdPurchaseCategoryName() {
|
| | | return thirdPurchaseCategoryName;
|
| | | }
|
| | |
|
| | | public void setThirdPurchaseCategoryName(String thirdPurchaseCategoryName) {
|
| | | this.thirdPurchaseCategoryName = thirdPurchaseCategoryName;
|
| | | }
|
| | |
|
| | | public String getGoodsGroupCategoryId() {
|
| | | return goodsGroupCategoryId;
|
| | | }
|
| | |
|
| | | public void setGoodsGroupCategoryId(String goodsGroupCategoryId) {
|
| | | this.goodsGroupCategoryId = goodsGroupCategoryId;
|
| | | }
|
| | |
|
| | | public String getGoodsGroupCategoryName() {
|
| | | return goodsGroupCategoryName;
|
| | | }
|
| | |
|
| | | public void setGoodsGroupCategoryName(String goodsGroupCategoryName) {
|
| | | this.goodsGroupCategoryName = goodsGroupCategoryName;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.dto.suning;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * 苏宁商品信息
|
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | public class SuningCommodityInfo {
|
| | | private String supplierName;// 供应商名称示例,
|
| | | private List<SuningGoodsImg> pictureUrl;
|
| | | private String priceType;// 大聚惠,
|
| | | private String baoyou;// 1,
|
| | | private String sellingPoint;// 商品卖点示例,
|
| | | private String saleStatus;// 0,
|
| | | private String supplierCode;// 0000000000,
|
| | | private String commodityPrice;// 99.00,
|
| | | private String commodityType;// 1,
|
| | | private String monthSales;// 100,
|
| | | private String snPrice;// 100.00,
|
| | | private String priceTypeCode;// 1,
|
| | | private String rate;// 20.00返利比例
|
| | | private String commodityCode;// 761137021,
|
| | | private String commodityName;// 商品名称示例
|
| | |
|
| | | public String getSupplierName() {
|
| | | return supplierName;
|
| | | }
|
| | |
|
| | | public void setSupplierName(String supplierName) {
|
| | | this.supplierName = supplierName;
|
| | | }
|
| | |
|
| | | public List<SuningGoodsImg> getPictureUrl() {
|
| | | return pictureUrl;
|
| | | }
|
| | |
|
| | | public void setPictureUrl(List<SuningGoodsImg> pictureUrl) {
|
| | | this.pictureUrl = pictureUrl;
|
| | | }
|
| | |
|
| | | public String getPriceType() {
|
| | | return priceType;
|
| | | }
|
| | |
|
| | | public void setPriceType(String priceType) {
|
| | | this.priceType = priceType;
|
| | | }
|
| | |
|
| | | public String getBaoyou() {
|
| | | return baoyou;
|
| | | }
|
| | |
|
| | | public void setBaoyou(String baoyou) {
|
| | | this.baoyou = baoyou;
|
| | | }
|
| | |
|
| | | public String getSellingPoint() {
|
| | | return sellingPoint;
|
| | | }
|
| | |
|
| | | public void setSellingPoint(String sellingPoint) {
|
| | | this.sellingPoint = sellingPoint;
|
| | | }
|
| | |
|
| | | public String getSaleStatus() {
|
| | | return saleStatus;
|
| | | }
|
| | |
|
| | | public void setSaleStatus(String saleStatus) {
|
| | | this.saleStatus = saleStatus;
|
| | | }
|
| | |
|
| | | public String getSupplierCode() {
|
| | | return supplierCode;
|
| | | }
|
| | |
|
| | | public void setSupplierCode(String supplierCode) {
|
| | | this.supplierCode = supplierCode;
|
| | | }
|
| | |
|
| | | public String getCommodityPrice() {
|
| | | return commodityPrice;
|
| | | }
|
| | |
|
| | | public void setCommodityPrice(String commodityPrice) {
|
| | | this.commodityPrice = commodityPrice;
|
| | | }
|
| | |
|
| | | public String getCommodityType() {
|
| | | return commodityType;
|
| | | }
|
| | |
|
| | | public void setCommodityType(String commodityType) {
|
| | | this.commodityType = commodityType;
|
| | | }
|
| | |
|
| | | public String getMonthSales() {
|
| | | return monthSales;
|
| | | }
|
| | |
|
| | | public void setMonthSales(String monthSales) {
|
| | | this.monthSales = monthSales;
|
| | | }
|
| | |
|
| | | public String getSnPrice() {
|
| | | return snPrice;
|
| | | }
|
| | |
|
| | | public void setSnPrice(String snPrice) {
|
| | | this.snPrice = snPrice;
|
| | | }
|
| | |
|
| | | public String getPriceTypeCode() {
|
| | | return priceTypeCode;
|
| | | }
|
| | |
|
| | | public void setPriceTypeCode(String priceTypeCode) {
|
| | | this.priceTypeCode = priceTypeCode;
|
| | | }
|
| | |
|
| | | public String getRate() {
|
| | | return rate;
|
| | | }
|
| | |
|
| | | public void setRate(String rate) {
|
| | | this.rate = rate;
|
| | | }
|
| | |
|
| | | public String getCommodityCode() {
|
| | | return commodityCode;
|
| | | }
|
| | |
|
| | | public void setCommodityCode(String commodityCode) {
|
| | | this.commodityCode = commodityCode;
|
| | | }
|
| | |
|
| | | public String getCommodityName() {
|
| | | return commodityName;
|
| | | }
|
| | |
|
| | | public void setCommodityName(String commodityName) {
|
| | | this.commodityName = commodityName;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.dto.suning;
|
| | |
|
| | | public class SuningCouponInfo {
|
| | | private String couponUrl;// 券链接URL
|
| | | private String activityId;// 券活动编码
|
| | | private String activitySecretKey;// 券秘钥
|
| | | private String couponValue;// 券面额
|
| | | private String couponCount;// 券总数
|
| | | private String couponStartTime;// 券领取开始时间
|
| | | private String couponEndTime;// 券领取结束时间
|
| | | private String startTime;// 券使用开始时间
|
| | | private String endTime;// 券使用结束时间
|
| | | private String bounsLimit;// 基数数值
|
| | | private String activityDescription;// 活动描述
|
| | | private String afterCouponPrice;// 券后价
|
| | |
|
| | | public String getCouponUrl() {
|
| | | return couponUrl;
|
| | | }
|
| | |
|
| | | public void setCouponUrl(String couponUrl) {
|
| | | this.couponUrl = couponUrl;
|
| | | }
|
| | |
|
| | | public String getActivityId() {
|
| | | return activityId;
|
| | | }
|
| | |
|
| | | public void setActivityId(String activityId) {
|
| | | this.activityId = activityId;
|
| | | }
|
| | |
|
| | | public String getActivitySecretKey() {
|
| | | return activitySecretKey;
|
| | | }
|
| | |
|
| | | public void setActivitySecretKey(String activitySecretKey) {
|
| | | this.activitySecretKey = activitySecretKey;
|
| | | }
|
| | |
|
| | | public String getCouponValue() {
|
| | | return couponValue;
|
| | | }
|
| | |
|
| | | public void setCouponValue(String couponValue) {
|
| | | this.couponValue = couponValue;
|
| | | }
|
| | |
|
| | | public String getCouponCount() {
|
| | | return couponCount;
|
| | | }
|
| | |
|
| | | public void setCouponCount(String couponCount) {
|
| | | this.couponCount = couponCount;
|
| | | }
|
| | |
|
| | | public String getCouponStartTime() {
|
| | | return couponStartTime;
|
| | | }
|
| | |
|
| | | public void setCouponStartTime(String couponStartTime) {
|
| | | this.couponStartTime = couponStartTime;
|
| | | }
|
| | |
|
| | | public String getCouponEndTime() {
|
| | | return couponEndTime;
|
| | | }
|
| | |
|
| | | public void setCouponEndTime(String couponEndTime) {
|
| | | this.couponEndTime = couponEndTime;
|
| | | }
|
| | |
|
| | | public String getStartTime() {
|
| | | return startTime;
|
| | | }
|
| | |
|
| | | public void setStartTime(String startTime) {
|
| | | this.startTime = startTime;
|
| | | }
|
| | |
|
| | | public String getEndTime() {
|
| | | return endTime;
|
| | | }
|
| | |
|
| | | public void setEndTime(String endTime) {
|
| | | this.endTime = endTime;
|
| | | }
|
| | |
|
| | | public String getBounsLimit() {
|
| | | return bounsLimit;
|
| | | }
|
| | |
|
| | | public void setBounsLimit(String bounsLimit) {
|
| | | this.bounsLimit = bounsLimit;
|
| | | }
|
| | |
|
| | | public String getActivityDescription() {
|
| | | return activityDescription;
|
| | | }
|
| | |
|
| | | public void setActivityDescription(String activityDescription) {
|
| | | this.activityDescription = activityDescription;
|
| | | }
|
| | |
|
| | | public String getAfterCouponPrice() {
|
| | | return afterCouponPrice;
|
| | | }
|
| | |
|
| | | public void setAfterCouponPrice(String afterCouponPrice) {
|
| | | this.afterCouponPrice = afterCouponPrice;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.dto.suning;
|
| | |
|
| | | public class SuningGoodsImg {
|
| | | private Integer locationId;// 位置ID
|
| | | private String picUrl;// 图片链接
|
| | |
|
| | | public Integer getLocationId() {
|
| | | return locationId;
|
| | | }
|
| | |
|
| | | public void setLocationId(Integer locationId) {
|
| | | this.locationId = locationId;
|
| | | }
|
| | |
|
| | | public String getPicUrl() {
|
| | | return picUrl;
|
| | | }
|
| | |
|
| | | public void setPicUrl(String picUrl) {
|
| | | this.picUrl = picUrl;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.dto.suning;
|
| | |
|
| | | public class SuningGoodsInfo {
|
| | |
|
| | | private SuningAdvanceSale advanceSale;
|
| | | private SuningCategoryInfo categoryInfo;
|
| | | private SuningCommodityInfo commodityInfo;
|
| | | private SuningCouponInfo couponInfo;
|
| | | private SuningPgInfo pgInfo;
|
| | |
|
| | | public SuningAdvanceSale getAdvanceSale() {
|
| | | return advanceSale;
|
| | | }
|
| | |
|
| | | public void setAdvanceSale(SuningAdvanceSale advanceSale) {
|
| | | this.advanceSale = advanceSale;
|
| | | }
|
| | |
|
| | | public SuningCategoryInfo getCategoryInfo() {
|
| | | return categoryInfo;
|
| | | }
|
| | |
|
| | | public void setCategoryInfo(SuningCategoryInfo categoryInfo) {
|
| | | this.categoryInfo = categoryInfo;
|
| | | }
|
| | |
|
| | | public SuningCommodityInfo getCommodityInfo() {
|
| | | return commodityInfo;
|
| | | }
|
| | |
|
| | | public void setCommodityInfo(SuningCommodityInfo commodityInfo) {
|
| | | this.commodityInfo = commodityInfo;
|
| | | }
|
| | |
|
| | | public SuningCouponInfo getCouponInfo() {
|
| | | return couponInfo;
|
| | | }
|
| | |
|
| | | public void setCouponInfo(SuningCouponInfo couponInfo) {
|
| | | this.couponInfo = couponInfo;
|
| | | }
|
| | |
|
| | | public SuningPgInfo getPgInfo() {
|
| | | return pgInfo;
|
| | | }
|
| | |
|
| | | public void setPgInfo(SuningPgInfo pgInfo) {
|
| | | this.pgInfo = pgInfo;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.dto.suning;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.suning.SuningOrderInfo;
|
| | |
|
| | | public class SuningOrderQueryResultDTO {
|
| | | private int total;
|
| | | private List<SuningOrderInfo> orderList;
|
| | |
|
| | | public SuningOrderQueryResultDTO(int total, List<SuningOrderInfo> orderList) {
|
| | | super();
|
| | | this.total = total;
|
| | | this.orderList = orderList;
|
| | | }
|
| | |
|
| | | public int getTotal() {
|
| | | return total;
|
| | | }
|
| | |
|
| | | public void setTotal(int total) {
|
| | | this.total = total;
|
| | | }
|
| | |
|
| | | public List<SuningOrderInfo> getOrderList() {
|
| | | return orderList;
|
| | | }
|
| | |
|
| | | public void setOrderList(List<SuningOrderInfo> orderList) {
|
| | | this.orderList = orderList;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.dto.suning;
|
| | |
|
| | | public class SuningPgInfo {
|
| | | private String pgNum;// 成团人数
|
| | | private String pgPrice;// 拼购价
|
| | | private String pgUrl;// 拼购四级页地址
|
| | | private String pgActionId;// 拼购活动ID
|
| | |
|
| | | public String getPgNum() {
|
| | | return pgNum;
|
| | | }
|
| | |
|
| | | public void setPgNum(String pgNum) {
|
| | | this.pgNum = pgNum;
|
| | | }
|
| | |
|
| | | public String getPgPrice() {
|
| | | return pgPrice;
|
| | | }
|
| | |
|
| | | public void setPgPrice(String pgPrice) {
|
| | | this.pgPrice = pgPrice;
|
| | | }
|
| | |
|
| | | public String getPgUrl() {
|
| | | return pgUrl;
|
| | | }
|
| | |
|
| | | public void setPgUrl(String pgUrl) {
|
| | | this.pgUrl = pgUrl;
|
| | | }
|
| | |
|
| | | public String getPgActionId() {
|
| | | return pgActionId;
|
| | | }
|
| | |
|
| | | public void setPgActionId(String pgActionId) {
|
| | | this.pgActionId = pgActionId;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.dto.suning;
|
| | |
|
| | | public class SuningQueryModel {
|
| | | private Integer pageIndex;// 页码 默认为1
|
| | | private String keyword;// 手机 关键字
|
| | | private String Integer;// 50000 销售目录ID
|
| | | private String cityCode;// 025 城市编码 默认025
|
| | | private Integer suningService;// 1 是否苏宁自营 默认为空,1:是
|
| | | private Integer pgSearch;// 1 是否拼购 默认为空 1:是
|
| | | private String startPrice;// 10.00 开始价格
|
| | | private String endPrice;// 20.00 结束价格
|
| | | private Integer sortType;// 排序规则 1:综合(默认) 2:销量由高到低 3:价格由高到低 4:价格由低到高
|
| | | // 5:佣金比例由高到低 6:佣金金额由高到低
|
| | | // 7:两个维度,佣金金额由高到低,销量由高到低8:近30天推广量由高到低9:近30天支出佣金金额由高到低。
|
| | | private Integer picWidth;// 图片宽度 默认200
|
| | | private Integer picHeight;// 图片高度 默认200
|
| | | private Integer size;// 10 每页条数 默认10
|
| | | private Integer branch;// 1:减枝 2:不减枝 sortType=1(综合) 默认不剪枝 其他排序默认剪枝
|
| | | private Integer coupon;// 1:有券;其他:全部
|
| | | private Integer snfwservice;// 是否苏宁服务 1:是
|
| | | private Integer snhwg;// 1是否苏宁国际 1:是
|
| | | private Integer couponMark;// 1表示拿到券后价,不传按照以前逻辑取不到券后价
|
| | |
|
| | | public Integer getPageIndex() {
|
| | | return pageIndex;
|
| | | }
|
| | |
|
| | | public void setPageIndex(Integer pageIndex) {
|
| | | this.pageIndex = pageIndex;
|
| | | }
|
| | |
|
| | | public String getKeyword() {
|
| | | return keyword;
|
| | | }
|
| | |
|
| | | public void setKeyword(String keyword) {
|
| | | this.keyword = keyword;
|
| | | }
|
| | |
|
| | | public String getInteger() {
|
| | | return Integer;
|
| | | }
|
| | |
|
| | | public void setInteger(String integer) {
|
| | | Integer = integer;
|
| | | }
|
| | |
|
| | | public String getCityCode() {
|
| | | return cityCode;
|
| | | }
|
| | |
|
| | | public void setCityCode(String cityCode) {
|
| | | this.cityCode = cityCode;
|
| | | }
|
| | |
|
| | | public Integer getSuningService() {
|
| | | return suningService;
|
| | | }
|
| | |
|
| | | public void setSuningService(Integer suningService) {
|
| | | this.suningService = suningService;
|
| | | }
|
| | |
|
| | | public Integer getPgSearch() {
|
| | | return pgSearch;
|
| | | }
|
| | |
|
| | | public void setPgSearch(Integer pgSearch) {
|
| | | this.pgSearch = pgSearch;
|
| | | }
|
| | |
|
| | | public String getStartPrice() {
|
| | | return startPrice;
|
| | | }
|
| | |
|
| | | public void setStartPrice(String startPrice) {
|
| | | this.startPrice = startPrice;
|
| | | }
|
| | |
|
| | | public String getEndPrice() {
|
| | | return endPrice;
|
| | | }
|
| | |
|
| | | public void setEndPrice(String endPrice) {
|
| | | this.endPrice = endPrice;
|
| | | }
|
| | |
|
| | | public Integer getSortType() {
|
| | | return sortType;
|
| | | }
|
| | |
|
| | | public void setSortType(Integer sortType) {
|
| | | this.sortType = sortType;
|
| | | }
|
| | |
|
| | | public Integer getPicWidth() {
|
| | | return picWidth;
|
| | | }
|
| | |
|
| | | public void setPicWidth(Integer picWidth) {
|
| | | this.picWidth = picWidth;
|
| | | }
|
| | |
|
| | | public Integer getPicHeight() {
|
| | | return picHeight;
|
| | | }
|
| | |
|
| | | public void setPicHeight(Integer picHeight) {
|
| | | this.picHeight = picHeight;
|
| | | }
|
| | |
|
| | | public Integer getSize() {
|
| | | return size;
|
| | | }
|
| | |
|
| | | public void setSize(Integer size) {
|
| | | this.size = size;
|
| | | }
|
| | |
|
| | | public Integer getBranch() {
|
| | | return branch;
|
| | | }
|
| | |
|
| | | public void setBranch(Integer branch) {
|
| | | this.branch = branch;
|
| | | }
|
| | |
|
| | | public Integer getCoupon() {
|
| | | return coupon;
|
| | | }
|
| | |
|
| | | public void setCoupon(Integer coupon) {
|
| | | this.coupon = coupon;
|
| | | }
|
| | |
|
| | | public Integer getSnfwservice() {
|
| | | return snfwservice;
|
| | | }
|
| | |
|
| | | public void setSnfwservice(Integer snfwservice) {
|
| | | this.snfwservice = snfwservice;
|
| | | }
|
| | |
|
| | | public Integer getSnhwg() {
|
| | | return snhwg;
|
| | | }
|
| | |
|
| | | public void setSnhwg(Integer snhwg) {
|
| | | this.snhwg = snhwg;
|
| | | }
|
| | |
|
| | | public Integer getCouponMark() {
|
| | | return couponMark;
|
| | | }
|
| | |
|
| | | public void setCouponMark(Integer couponMark) {
|
| | | this.couponMark = couponMark;
|
| | | }
|
| | | }
|
| | |
| | | public static int SHOP_TYPE_PDD = 30;// 拼多多
|
| | | public static int SHOP_TYPE_VIP = 40;//唯品会自营
|
| | |
|
| | | public static int SHOP_TYPE_SUNING = 50;//苏宁
|
| | | public static int SHOP_TYPE_SUNING_SELF = 51;//苏宁自营
|
| | | |
| | |
|
| | | public static int STATE_NORMAL = 0;// 正常
|
| | | public static int STATE_OFFLINE = 1;// 下线
|
New file |
| | |
| | | package com.yeshi.fanli.entity.suning;
|
| | |
|
| | | import java.util.Date;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | @Table("yeshi_ec_suning_order")
|
| | | public class SuningOrderInfo {
|
| | | private Long id;// 主键ID
|
| | | private String orderCode;// 订单号
|
| | | private String payTime;// 支付时间,格式:yyyy-MM-dd HH:mm:ss
|
| | | private String orderSubmitTime;// 下单时间,格式:yyyy-MM-dd HH:mm:ss
|
| | | private String orderLineNumber;// 订单行项目号
|
| | | private String orderLineStatusDesc;// 订单行项目状态 :等待付款;支付完成;退款;订单已取消;确认收货
|
| | | private String orderLineStatusChangeTime;// 行项目状态更新时间,格式:yyyy-MM-dd HH:mm:ss
|
| | | private String orderLineOrigin;// 订单行来源(PC端、无线端)
|
| | | private String productName;// 商品名称
|
| | | private String saleNum;// 商品数量
|
| | | private String payAmount;// 实付金额
|
| | | private String orderLineFlag;// 订单行标记
|
| | | private String childAccountId;// 子推广账号ID(对应sub_user)
|
| | | private String sellName;// 商户名称
|
| | | private String sellerCode;// 商户编码
|
| | | private String goodsNum;// 商品编码
|
| | | private String commissionRatio;// 佣金比例
|
| | | private String prePayCommission;// 预估佣金
|
| | | private String productFirstCatalog;// 一级目录
|
| | | private String productSecondCatalog;// 二级目录
|
| | | private String productThirdCatalog;// 三级目录
|
| | | private String orderType;// 商品归属
|
| | | private String positionId;// 推广位ID
|
| | | private String goodsGroupCatalog;// 商品组目录编码
|
| | | private String saleType;// 推广类型
|
| | | private String pictureUrl;// 商品主图
|
| | | private Integer promotion;// 1.风控订单
|
| | | private Integer violation;// 是否违规,0:否;1:是
|
| | | private Integer returnCommission;// 是否返佣,0:否;1:是
|
| | | private Date createTime;// 创建时间
|
| | | private Date updateTime;// 更新时间
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getOrderCode() {
|
| | | return orderCode;
|
| | | }
|
| | |
|
| | | public void setOrderCode(String orderCode) {
|
| | | this.orderCode = orderCode;
|
| | | }
|
| | |
|
| | | public String getPayTime() {
|
| | | return payTime;
|
| | | }
|
| | |
|
| | | public void setPayTime(String payTime) {
|
| | | this.payTime = payTime;
|
| | | }
|
| | |
|
| | | public String getOrderSubmitTime() {
|
| | | return orderSubmitTime;
|
| | | }
|
| | |
|
| | | public void setOrderSubmitTime(String orderSubmitTime) {
|
| | | this.orderSubmitTime = orderSubmitTime;
|
| | | }
|
| | |
|
| | | public String getOrderLineNumber() {
|
| | | return orderLineNumber;
|
| | | }
|
| | |
|
| | | public void setOrderLineNumber(String orderLineNumber) {
|
| | | this.orderLineNumber = orderLineNumber;
|
| | | }
|
| | |
|
| | | public String getOrderLineStatusDesc() {
|
| | | return orderLineStatusDesc;
|
| | | }
|
| | |
|
| | | public void setOrderLineStatusDesc(String orderLineStatusDesc) {
|
| | | this.orderLineStatusDesc = orderLineStatusDesc;
|
| | | }
|
| | |
|
| | | public String getOrderLineStatusChangeTime() {
|
| | | return orderLineStatusChangeTime;
|
| | | }
|
| | |
|
| | | public void setOrderLineStatusChangeTime(String orderLineStatusChangeTime) {
|
| | | this.orderLineStatusChangeTime = orderLineStatusChangeTime;
|
| | | }
|
| | |
|
| | | public String getOrderLineOrigin() {
|
| | | return orderLineOrigin;
|
| | | }
|
| | |
|
| | | public void setOrderLineOrigin(String orderLineOrigin) {
|
| | | this.orderLineOrigin = orderLineOrigin;
|
| | | }
|
| | |
|
| | | public String getProductName() {
|
| | | return productName;
|
| | | }
|
| | |
|
| | | public void setProductName(String productName) {
|
| | | this.productName = productName;
|
| | | }
|
| | |
|
| | | public String getSaleNum() {
|
| | | return saleNum;
|
| | | }
|
| | |
|
| | | public void setSaleNum(String saleNum) {
|
| | | this.saleNum = saleNum;
|
| | | }
|
| | |
|
| | | public String getPayAmount() {
|
| | | return payAmount;
|
| | | }
|
| | |
|
| | | public void setPayAmount(String payAmount) {
|
| | | this.payAmount = payAmount;
|
| | | }
|
| | |
|
| | | public String getOrderLineFlag() {
|
| | | return orderLineFlag;
|
| | | }
|
| | |
|
| | | public void setOrderLineFlag(String orderLineFlag) {
|
| | | this.orderLineFlag = orderLineFlag;
|
| | | }
|
| | |
|
| | | public String getChildAccountId() {
|
| | | return childAccountId;
|
| | | }
|
| | |
|
| | | public void setChildAccountId(String childAccountId) {
|
| | | this.childAccountId = childAccountId;
|
| | | }
|
| | |
|
| | | public String getSellName() {
|
| | | return sellName;
|
| | | }
|
| | |
|
| | | public void setSellName(String sellName) {
|
| | | this.sellName = sellName;
|
| | | }
|
| | |
|
| | | public String getSellerCode() {
|
| | | return sellerCode;
|
| | | }
|
| | |
|
| | | public void setSellerCode(String sellerCode) {
|
| | | this.sellerCode = sellerCode;
|
| | | }
|
| | |
|
| | | public String getGoodsNum() {
|
| | | return goodsNum;
|
| | | }
|
| | |
|
| | | public void setGoodsNum(String goodsNum) {
|
| | | this.goodsNum = goodsNum;
|
| | | }
|
| | |
|
| | | public String getCommissionRatio() {
|
| | | return commissionRatio;
|
| | | }
|
| | |
|
| | | public void setCommissionRatio(String commissionRatio) {
|
| | | this.commissionRatio = commissionRatio;
|
| | | }
|
| | |
|
| | | public String getPrePayCommission() {
|
| | | return prePayCommission;
|
| | | }
|
| | |
|
| | | public void setPrePayCommission(String prePayCommission) {
|
| | | this.prePayCommission = prePayCommission;
|
| | | }
|
| | |
|
| | | public String getProductFirstCatalog() {
|
| | | return productFirstCatalog;
|
| | | }
|
| | |
|
| | | public void setProductFirstCatalog(String productFirstCatalog) {
|
| | | this.productFirstCatalog = productFirstCatalog;
|
| | | }
|
| | |
|
| | | public String getProductSecondCatalog() {
|
| | | return productSecondCatalog;
|
| | | }
|
| | |
|
| | | public void setProductSecondCatalog(String productSecondCatalog) {
|
| | | this.productSecondCatalog = productSecondCatalog;
|
| | | }
|
| | |
|
| | | public String getProductThirdCatalog() {
|
| | | return productThirdCatalog;
|
| | | }
|
| | |
|
| | | public void setProductThirdCatalog(String productThirdCatalog) {
|
| | | this.productThirdCatalog = productThirdCatalog;
|
| | | }
|
| | |
|
| | | public String getOrderType() {
|
| | | return orderType;
|
| | | }
|
| | |
|
| | | public void setOrderType(String orderType) {
|
| | | this.orderType = orderType;
|
| | | }
|
| | |
|
| | | public String getPositionId() {
|
| | | return positionId;
|
| | | }
|
| | |
|
| | | public void setPositionId(String positionId) {
|
| | | this.positionId = positionId;
|
| | | }
|
| | |
|
| | | public String getGoodsGroupCatalog() {
|
| | | return goodsGroupCatalog;
|
| | | }
|
| | |
|
| | | public void setGoodsGroupCatalog(String goodsGroupCatalog) {
|
| | | this.goodsGroupCatalog = goodsGroupCatalog;
|
| | | }
|
| | |
|
| | | public String getSaleType() {
|
| | | return saleType;
|
| | | }
|
| | |
|
| | | public void setSaleType(String saleType) {
|
| | | this.saleType = saleType;
|
| | | }
|
| | |
|
| | | public String getPictureUrl() {
|
| | | return pictureUrl;
|
| | | }
|
| | |
|
| | | public void setPictureUrl(String pictureUrl) {
|
| | | this.pictureUrl = pictureUrl;
|
| | | }
|
| | |
|
| | | public Integer getPromotion() {
|
| | | return promotion;
|
| | | }
|
| | |
|
| | | public void setPromotion(Integer promotion) {
|
| | | this.promotion = promotion;
|
| | | }
|
| | |
|
| | | public Integer getViolation() {
|
| | | return violation;
|
| | | }
|
| | |
|
| | | public void setViolation(Integer violation) {
|
| | | this.violation = violation;
|
| | | }
|
| | |
|
| | | public Integer getReturnCommission() {
|
| | | return returnCommission;
|
| | | }
|
| | |
|
| | | public void setReturnCommission(Integer returnCommission) {
|
| | | this.returnCommission = returnCommission;
|
| | | }
|
| | |
|
| | | public Date getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(Date createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | |
|
| | | public Date getUpdateTime() {
|
| | | return updateTime;
|
| | | }
|
| | |
|
| | | public void setUpdateTime(Date updateTime) {
|
| | | this.updateTime = updateTime;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | package com.yeshi.fanli.job.order;
|
| | |
|
| | | import java.util.Calendar;
|
| | | import java.util.Date;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
| | | long startTime = System.currentTimeMillis();
|
| | | if (!StringUtil.isNullOrEmpty(param)) {
|
| | | startTime = TimeUtil.convertToTimeTemp(param, "yyyy-MM-dd");
|
| | | } else {// 每天零点需要同步上一天的数据
|
| | | Calendar calendar = Calendar.getInstance();
|
| | | calendar.setTimeInMillis(startTime);
|
| | | if (calendar.get(Calendar.HOUR_OF_DAY) == 0) {
|
| | | Date start = new Date(TimeUtil.convertToTimeTemp(
|
| | | TimeUtil.getGernalTime(startTime - 1000 * 60 * 60 * 24L, "yyyy-MM-dd"), "yyyy-MM-dd"));
|
| | |
|
| | | Date end = new Date(
|
| | | TimeUtil.convertToTimeTemp(TimeUtil.getGernalTime(startTime, "yyyy-MM-dd"), "yyyy-MM-dd"));
|
| | |
|
| | | orderMoneyStatisticManager.syncFanliAndShareData(start, end);
|
| | | }
|
| | | }
|
| | |
|
| | | Date start = new Date(
|
| | |
| | | long startTime = System.currentTimeMillis();
|
| | | if (!StringUtil.isNullOrEmpty(param)) {
|
| | | startTime = TimeUtil.convertToTimeTemp(param, "yyyy-MM-dd");
|
| | | } else {// 每天零点需要同步上一天的数据
|
| | | Calendar calendar = Calendar.getInstance();
|
| | | calendar.setTimeInMillis(startTime);
|
| | | if (calendar.get(Calendar.HOUR_OF_DAY) == 0) {
|
| | | Date start = new Date(TimeUtil.convertToTimeTemp(
|
| | | TimeUtil.getGernalTime(startTime - 1000 * 60 * 60 * 24L, "yyyy-MM-dd"), "yyyy-MM-dd"));
|
| | |
|
| | | Date end = new Date(
|
| | | TimeUtil.convertToTimeTemp(TimeUtil.getGernalTime(startTime, "yyyy-MM-dd"), "yyyy-MM-dd"));
|
| | |
|
| | | orderMoneyStatisticManager.syncTeamData(start, end);
|
| | | }
|
| | | }
|
| | |
|
| | | Date start = new Date(
|
| | |
| | | long startTime = System.currentTimeMillis();
|
| | | if (!StringUtil.isNullOrEmpty(param)) {
|
| | | startTime = TimeUtil.convertToTimeTemp(param, "yyyy-MM-dd");
|
| | | } else {// 每天零点需要同步上一天的数据
|
| | | Calendar calendar = Calendar.getInstance();
|
| | | calendar.setTimeInMillis(startTime);
|
| | | if (calendar.get(Calendar.HOUR_OF_DAY) == 0) {
|
| | | Date start = new Date(TimeUtil.convertToTimeTemp(
|
| | | TimeUtil.getGernalTime(startTime - 1000 * 60 * 60 * 24L, "yyyy-MM-dd"), "yyyy-MM-dd"));
|
| | |
|
| | | Date end = new Date(
|
| | | TimeUtil.convertToTimeTemp(TimeUtil.getGernalTime(startTime, "yyyy-MM-dd"), "yyyy-MM-dd"));
|
| | |
|
| | | orderMoneyStatisticManager.syncOrderNum(start, end);
|
| | | }
|
| | | }
|
| | |
|
| | | Date start = new Date(
|
| | |
| | | long startTime = System.currentTimeMillis();
|
| | | if (!StringUtil.isNullOrEmpty(param)) {
|
| | | startTime = TimeUtil.convertToTimeTemp(param, "yyyy-MM-dd");
|
| | | } else {// 每天零点需要同步上一天的数据
|
| | | Calendar calendar = Calendar.getInstance();
|
| | | calendar.setTimeInMillis(startTime);
|
| | | if (calendar.get(Calendar.HOUR_OF_DAY) == 0) {
|
| | | Date start = new Date(TimeUtil.convertToTimeTemp(
|
| | | TimeUtil.getGernalTime(startTime - 1000 * 60 * 60 * 24L, "yyyy-MM-dd"), "yyyy-MM-dd"));
|
| | |
|
| | | Date end = new Date(
|
| | | TimeUtil.convertToTimeTemp(TimeUtil.getGernalTime(startTime, "yyyy-MM-dd"), "yyyy-MM-dd"));
|
| | |
|
| | | orderMoneyStatisticManager.syncDividents(start, end);
|
| | | }
|
| | | }
|
| | |
|
| | | Date start = new Date(
|
New file |
| | |
| | | package com.yeshi.fanli.job.order.vipshop;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Component;
|
| | |
|
| | | import com.xxl.job.core.biz.model.ReturnT;
|
| | | import com.xxl.job.core.handler.annotation.XxlJob;
|
| | | import com.yeshi.fanli.dto.vipshop.VipShopOrderQueryModel;
|
| | | import com.yeshi.fanli.dto.vipshop.VipShopQueryOrderResultDTO;
|
| | | import com.yeshi.fanli.entity.vipshop.VipShopOrder;
|
| | | import com.yeshi.fanli.exception.vipshop.VipShopOrderException;
|
| | | import com.yeshi.fanli.service.inter.order.vipshop.VipShopOrderService;
|
| | | import com.yeshi.fanli.util.RedisKeyEnum;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.cmq.order.VipShopOrderCMQManager;
|
| | | import com.yeshi.fanli.util.vipshop.VipShopApiUtil;
|
| | |
|
| | | //从淘宝爬去订单更新
|
| | | @Component
|
| | | public class UpdateVipShopOrderJob {
|
| | |
|
| | | @Resource
|
| | | private VipShopOrderService vipShopOrderService;
|
| | |
|
| | | @Resource
|
| | | private RedisManager redisManager;
|
| | |
|
| | | /**
|
| | | * 保存订单
|
| | | * |
| | | * @param VipShopOrderList
|
| | | */
|
| | | public void saveVipShopOrders(List<VipShopOrder> vipShopOrderList) {
|
| | | for (VipShopOrder order : vipShopOrderList) {
|
| | | try {
|
| | | vipShopOrderService.addOrder(order);
|
| | | /**
|
| | | * 做频率限制
|
| | | */
|
| | | String key = RedisKeyEnum.getRedisKey(RedisKeyEnum.VIPShopOrder, order.getOrderSn() + "");
|
| | | String result = redisManager.getCommonString(key);
|
| | | // 判断
|
| | | if (StringUtil.isNullOrEmpty(result)) {
|
| | | VipShopOrderCMQManager.getInstance().addVipShopOrder(order.getOrderSn() + "");
|
| | | redisManager.cacheCommonString(key, "1", 60 * 60 * 2);// 2小时内不再更新
|
| | | }
|
| | | } catch (VipShopOrderException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 快速订单更新(爬取本小时内的单,每分钟一次)
|
| | | */
|
| | | @XxlJob("updateVipShopOrderHandler")
|
| | | public ReturnT<String> updateVipShopSoonOrder(String param) throws Exception {
|
| | | long endTime = System.currentTimeMillis();
|
| | | if ("1hour".equalsIgnoreCase(param)) {// 更新1小时内的订单
|
| | | updateByOrderTime(endTime - 1000 * 60 * 60 * 1L, endTime);
|
| | | updateByUpdateTime(endTime - 1000 * 60 * 60 * 1L, endTime);
|
| | | } else if ("1day".equalsIgnoreCase(param)) {// 更新最近1天更新的数据
|
| | | updateByOrderTime(endTime - 1000 * 60 * 60 * 24L, endTime);
|
| | | updateByUpdateTime(endTime - 1000 * 60 * 60 * 24L, endTime);
|
| | | }
|
| | | /*
|
| | | * else if ("3day".equalsIgnoreCase(param)) {// 更新最近3天更新的数据
|
| | | * updateByOrderTime(endTime - 1000 * 60 * 60 * 24 * 3L, endTime);
|
| | | * updateByUpdateTime(endTime - 1000 * 60 * 60 * 24 * 3L, endTime); }
|
| | | */
|
| | | return ReturnT.SUCCESS;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 按下单时间更新
|
| | | * @Title: updateByOrderTime
|
| | | * @Description: |
| | | * @param startTime
|
| | | * @param endTime |
| | | * void 返回类型
|
| | | * @throws
|
| | | */
|
| | |
|
| | | public void updateByOrderTime(long startTime, long endTime) {
|
| | | List<VipShopOrder> vipShopOrderList = new ArrayList<>();
|
| | | int page = 1;
|
| | | VipShopQueryOrderResultDTO result = VipShopApiUtil
|
| | | .getOrderList(VipShopOrderQueryModel.createOrderTime(startTime, endTime, null, page));
|
| | |
|
| | | while (result != null && result.getOrderList().size() > 0) {
|
| | | page++;
|
| | | vipShopOrderList.addAll(result.getOrderList());
|
| | | result = VipShopApiUtil
|
| | | .getOrderList(VipShopOrderQueryModel.createOrderTime(startTime, endTime, null, page));
|
| | | }
|
| | |
|
| | | saveVipShopOrders(vipShopOrderList);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 按更新时间更新
|
| | | * @Title: updateByOrderTime
|
| | | * @Description: |
| | | * @param startTime
|
| | | * @param endTime |
| | | * void 返回类型
|
| | | * @throws
|
| | | */
|
| | |
|
| | | public void updateByUpdateTime(long startTime, long endTime) {
|
| | | List<VipShopOrder> vipShopOrderList = new ArrayList<>();
|
| | | int page = 1;
|
| | | VipShopQueryOrderResultDTO result = VipShopApiUtil
|
| | | .getOrderList(VipShopOrderQueryModel.createUpdateTime(startTime, endTime, null, page));
|
| | |
|
| | | while (result != null && result.getOrderList().size() > 0) {
|
| | | page++;
|
| | | vipShopOrderList.addAll(result.getOrderList());
|
| | | result = VipShopApiUtil
|
| | | .getOrderList(VipShopOrderQueryModel.createUpdateTime(startTime, endTime, null, page));
|
| | | }
|
| | | saveVipShopOrders(vipShopOrderList);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | package com.yeshi.fanli.job.team;
|
| | |
|
| | | import java.util.Calendar;
|
| | | import java.util.Date;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
| | | long now = System.currentTimeMillis();
|
| | | if (!StringUtil.isNullOrEmpty(param)) {
|
| | | now = TimeUtil.convertToTimeTemp(param, "yyyy-MM-dd");
|
| | | } else {// 每天零点需要同步上一天的数据
|
| | | Calendar calendar = Calendar.getInstance();
|
| | | calendar.setTimeInMillis(now);
|
| | | if (calendar.get(Calendar.HOUR_OF_DAY) == 0) {
|
| | | Date minTime = new Date(TimeUtil.convertToTimeTemp(
|
| | | TimeUtil.getGernalTime(now - 1000 * 60 * 60 * 24L, "yyyy-MM-dd"), "yyyy-MM-dd"));
|
| | | Date maxTime = new Date(
|
| | | TimeUtil.convertToTimeTemp(TimeUtil.getGernalTime(now, "yyyy-MM-dd"), "yyyy-MM-dd"));
|
| | |
|
| | | userTeamStatisticManager.syncInviteAndTotalData(minTime, maxTime);
|
| | | userTeamStatisticManager.syncVIPData(minTime, maxTime);
|
| | | }
|
| | | }
|
| | | Date minTime = new Date(TimeUtil.convertToTimeTemp(TimeUtil.getGernalTime(now, "yyyy-MM-dd"), "yyyy-MM-dd"));
|
| | | Date maxTime = new Date(TimeUtil
|
| | |
| | | |
| | | <select id="listDividentsOrderByCreateTime" resultMap="BaseResultMap"> |
| | | SELECT |
| | | ou.`sou_target_uid` AS uid, DATE(ou.`sou_create_time`) AS |
| | | `day`,ou.`sou_type` AS `type`,SUM(ou.`sou_money`) AS money,COUNT(*) AS |
| | | orderCount FROM `yeshi_ec_team_dividents_source_order_user` ou WHERE |
| | | ou.`sou_state`!=4 AND ou.`sou_create_time`>=#{minTime} and |
| | | #{maxTime}>ou.`sou_create_time` |
| | | ou.`sou_target_uid` AS uid, DATE(tdo_create_time) AS |
| | | `day`,ou.`sou_type` AS `type`,SUM(TRUNCATE(ou.`sou_money`,2)) AS money,COUNT(*) AS |
| | | orderCount FROM `yeshi_ec_team_dividents_source_order_user` ou LEFT JOIN yeshi_ec_team_dividents_source_order o ON ou.`sou_source_order_id`=o.`tdo_id` WHERE |
| | | ou.`sou_state`!=4 AND tdo_create_time>=#{minTime} and |
| | | #{maxTime}>tdo_create_time |
| | | GROUP BY ou.`sou_target_uid`, |
| | | DATE(ou.`sou_create_time`),ou.`sou_type` |
| | | DATE(tdo_create_time),ou.`sou_type` |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper |
| | | namespace="com.yeshi.fanli.dao.mybatis.vipshop.VipShopAfterSaleDetailInfoMapper"> |
| | | <resultMap id="BaseResultMap" |
| | | type="com.yeshi.fanli.entity.vipshop.VipShopAfterSaleDetailInfo"> |
| | | <id column="sdi_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="sdi_order_detail_id" property="orderDetailId" |
| | | jdbcType="BIGINT" /> |
| | | <result column="sdi_after_sale_changed_commission" property="afterSaleChangedCommission" |
| | | jdbcType="VARCHAR" /> |
| | | <result column="sdi_after_sale_changed_goods_count" property="afterSaleChangedGoodsCount" |
| | | jdbcType="VARCHAR" /> |
| | | <result column="sdi_after_sale_sn" property="afterSaleSn" |
| | | jdbcType="VARCHAR" /> |
| | | <result column="sdi_after_sale_status" property="afterSaleStatus" |
| | | jdbcType="INTEGER" /> |
| | | <result column="sdi_after_sale_type" property="afterSaleType" |
| | | jdbcType="INTEGER" /> |
| | | <result column="sdi_after_sale_finish_time" property="afterSaleFinishTime" |
| | | jdbcType="VARCHAR" /> |
| | | <result column="sdi_create_time" property="createTime" |
| | | jdbcType="TIMESTAMP" /> |
| | | <result column="sdi_update_time" property="updateTime" |
| | | jdbcType="TIMESTAMP" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">sdi_id,sdi_order_detail_id,sdi_after_sale_changed_commission,sdi_after_sale_changed_goods_count,sdi_after_sale_sn,sdi_after_sale_status,sdi_after_sale_type,sdi_after_sale_finish_time,sdi_create_time,sdi_update_time |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_vipshop_after_sale_detail_info where sdi_id = |
| | | #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | <select id="selectByOrderDetailId" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_vipshop_after_sale_detail_info where sdi_order_detail_id |
| | | = |
| | | #{0} |
| | | </select> |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_vipshop_after_sale_detail_info where sdi_id = |
| | | #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" |
| | | parameterType="com.yeshi.fanli.entity.vipshop.VipShopAfterSaleDetailInfo" |
| | | useGeneratedKeys="true" keyProperty="id">insert into |
| | | yeshi_ec_vipshop_after_sale_detail_info |
| | | (sdi_id,sdi_order_detail_id,sdi_after_sale_changed_commission,sdi_after_sale_changed_goods_count,sdi_after_sale_sn,sdi_after_sale_status,sdi_after_sale_type,sdi_after_sale_finish_time,sdi_create_time,sdi_update_time) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{orderDetailId,jdbcType=BIGINT},#{afterSaleChangedCommission,jdbcType=VARCHAR},#{afterSaleChangedGoodsCount,jdbcType=VARCHAR},#{afterSaleSn,jdbcType=VARCHAR},#{afterSaleStatus,jdbcType=INTEGER},#{afterSaleType,jdbcType=INTEGER},#{afterSaleFinishTime,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" |
| | | parameterType="com.yeshi.fanli.entity.vipshop.VipShopAfterSaleDetailInfo" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_vipshop_after_sale_detail_info |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">sdi_id,</if> |
| | | <if test="orderDetailId != null">sdi_order_detail_id,</if> |
| | | <if test="afterSaleChangedCommission != null">sdi_after_sale_changed_commission,</if> |
| | | <if test="afterSaleChangedGoodsCount != null">sdi_after_sale_changed_goods_count,</if> |
| | | <if test="afterSaleSn != null">sdi_after_sale_sn,</if> |
| | | <if test="afterSaleStatus != null">sdi_after_sale_status,</if> |
| | | <if test="afterSaleType != null">sdi_after_sale_type,</if> |
| | | <if test="afterSaleFinishTime != null">sdi_after_sale_finish_time,</if> |
| | | <if test="createTime != null">sdi_create_time,</if> |
| | | <if test="updateTime != null">sdi_update_time,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="orderDetailId != null">#{orderDetailId,jdbcType=BIGINT},</if> |
| | | <if test="afterSaleChangedCommission != null">#{afterSaleChangedCommission,jdbcType=VARCHAR},</if> |
| | | <if test="afterSaleChangedGoodsCount != null">#{afterSaleChangedGoodsCount,jdbcType=VARCHAR},</if> |
| | | <if test="afterSaleSn != null">#{afterSaleSn,jdbcType=VARCHAR},</if> |
| | | <if test="afterSaleStatus != null">#{afterSaleStatus,jdbcType=INTEGER},</if> |
| | | <if test="afterSaleType != null">#{afterSaleType,jdbcType=INTEGER},</if> |
| | | <if test="afterSaleFinishTime != null">#{afterSaleFinishTime,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" |
| | | parameterType="com.yeshi.fanli.entity.vipshop.VipShopAfterSaleDetailInfo">update yeshi_ec_vipshop_after_sale_detail_info set |
| | | sdi_order_detail_id = |
| | | #{orderDetailId,jdbcType=BIGINT},sdi_after_sale_changed_commission = |
| | | #{afterSaleChangedCommission,jdbcType=VARCHAR},sdi_after_sale_changed_goods_count |
| | | = #{afterSaleChangedGoodsCount,jdbcType=VARCHAR},sdi_after_sale_sn = |
| | | #{afterSaleSn,jdbcType=VARCHAR},sdi_after_sale_status = |
| | | #{afterSaleStatus,jdbcType=INTEGER},sdi_after_sale_type = |
| | | #{afterSaleType,jdbcType=INTEGER},sdi_after_sale_finish_time = |
| | | #{afterSaleFinishTime,jdbcType=VARCHAR},sdi_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP},sdi_update_time = |
| | | #{updateTime,jdbcType=TIMESTAMP} where sdi_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" |
| | | parameterType="com.yeshi.fanli.entity.vipshop.VipShopAfterSaleDetailInfo"> |
| | | update yeshi_ec_vipshop_after_sale_detail_info |
| | | <set> |
| | | <if test="orderDetailId != null">sdi_order_detail_id=#{orderDetailId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="afterSaleChangedCommission != null">sdi_after_sale_changed_commission=#{afterSaleChangedCommission,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="afterSaleChangedGoodsCount != null">sdi_after_sale_changed_goods_count=#{afterSaleChangedGoodsCount,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="afterSaleSn != null">sdi_after_sale_sn=#{afterSaleSn,jdbcType=VARCHAR},</if> |
| | | <if test="afterSaleStatus != null">sdi_after_sale_status=#{afterSaleStatus,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="afterSaleType != null">sdi_after_sale_type=#{afterSaleType,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="afterSaleFinishTime != null">sdi_after_sale_finish_time=#{afterSaleFinishTime,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="createTime != null">sdi_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">sdi_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </set> |
| | | where sdi_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.vipshop.VipShopOrderDetailMapper"> |
| | | <resultMap id="BaseResultMap" |
| | | type="com.yeshi.fanli.entity.vipshop.VipShopOrderDetail"> |
| | | <id column="vod_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="vod_identify_code" property="identifyCode" |
| | | jdbcType="VARCHAR" /> |
| | | <result column="vod_goods_id" property="goodsId" jdbcType="VARCHAR" /> |
| | | <result column="vod_goods_name" property="goodsName" jdbcType="VARCHAR" /> |
| | | <result column="vod_goods_thumb" property="goodsThumb" |
| | | jdbcType="VARCHAR" /> |
| | | <result column="vod_goods_count" property="goodsCount" |
| | | jdbcType="INTEGER" /> |
| | | <result column="vod_commission_total_cost" property="commissionTotalCost" |
| | | jdbcType="DECIMAL" /> |
| | | <result column="vod_commission_rate" property="commissionRate" |
| | | jdbcType="DECIMAL" /> |
| | | <result column="vod_commission" property="commission" jdbcType="DECIMAL" /> |
| | | <result column="vod_comm_code" property="commCode" jdbcType="VARCHAR" /> |
| | | <result column="vod_comm_name" property="commName" jdbcType="VARCHAR" /> |
| | | <result column="vod_order_source" property="orderSource" |
| | | jdbcType="VARCHAR" /> |
| | | <result column="vod_size_id" property="sizeId" jdbcType="VARCHAR" /> |
| | | <result column="vod_status" property="status" jdbcType="INTEGER" /> |
| | | <result column="vod_order_sn" property="orderSn" jdbcType="VARCHAR" /> |
| | | <result column="vod_create_time" property="createTime" |
| | | jdbcType="TIMESTAMP" /> |
| | | <result column="vod_update_time" property="updateTime" |
| | | jdbcType="TIMESTAMP" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">vod_id,vod_identify_code,vod_goods_id,vod_goods_name,vod_goods_thumb,vod_goods_count,vod_commission_total_cost,vod_commission_rate,vod_commission,vod_comm_code,vod_comm_name,vod_order_source,vod_size_id,vod_status,vod_order_sn,vod_create_time,vod_update_time |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_vipshop_order_detail where vod_id = |
| | | #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectByIdentifyCode" resultMap="BaseResultMap" |
| | | parameterType="java.lang.String"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_vipshop_order_detail where vod_identify_code = |
| | | #{0} |
| | | </select> |
| | | |
| | | <select id="listByOrderSn" resultMap="BaseResultMap" |
| | | parameterType="java.lang.String"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_vipshop_order_detail where vod_order_sn = |
| | | #{0} |
| | | </select> |
| | | |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_vipshop_order_detail where vod_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.vipshop.VipShopOrderDetail" |
| | | useGeneratedKeys="true" keyProperty="id">insert into |
| | | yeshi_ec_vipshop_order_detail |
| | | (vod_id,vod_identify_code,vod_goods_id,vod_goods_name,vod_goods_thumb,vod_goods_count,vod_commission_total_cost,vod_commission_rate,vod_commission,vod_comm_code,vod_comm_name,vod_order_source,vod_size_id,vod_status,vod_order_sn,vod_create_time,vod_update_time) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{identifyCode,jdbcType=VARCHAR},#{goodsId,jdbcType=VARCHAR},#{goodsName,jdbcType=VARCHAR},#{goodsThumb,jdbcType=VARCHAR},#{goodsCount,jdbcType=INTEGER},#{commissionTotalCost,jdbcType=DECIMAL},#{commissionRate,jdbcType=DECIMAL},#{commission,jdbcType=DECIMAL},#{commCode,jdbcType=VARCHAR},#{commName,jdbcType=VARCHAR},#{orderSource,jdbcType=VARCHAR},#{sizeId,jdbcType=VARCHAR},#{status,jdbcType=INTEGER},#{orderSn,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.vipshop.VipShopOrderDetail" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_vipshop_order_detail |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">vod_id,</if> |
| | | <if test="identifyCode != null">vod_identify_code,</if> |
| | | <if test="goodsId != null">vod_goods_id,</if> |
| | | <if test="goodsName != null">vod_goods_name,</if> |
| | | <if test="goodsThumb != null">vod_goods_thumb,</if> |
| | | <if test="goodsCount != null">vod_goods_count,</if> |
| | | <if test="commissionTotalCost != null">vod_commission_total_cost,</if> |
| | | <if test="commissionRate != null">vod_commission_rate,</if> |
| | | <if test="commission != null">vod_commission,</if> |
| | | <if test="commCode != null">vod_comm_code,</if> |
| | | <if test="commName != null">vod_comm_name,</if> |
| | | <if test="orderSource != null">vod_order_source,</if> |
| | | <if test="sizeId != null">vod_size_id,</if> |
| | | <if test="status != null">vod_status,</if> |
| | | <if test="orderSn != null">vod_order_sn,</if> |
| | | <if test="createTime != null">vod_create_time,</if> |
| | | <if test="updateTime != null">vod_update_time,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="identifyCode != null">#{identifyCode,jdbcType=VARCHAR},</if> |
| | | <if test="goodsId != null">#{goodsId,jdbcType=VARCHAR},</if> |
| | | <if test="goodsName != null">#{goodsName,jdbcType=VARCHAR},</if> |
| | | <if test="goodsThumb != null">#{goodsThumb,jdbcType=VARCHAR},</if> |
| | | <if test="goodsCount != null">#{goodsCount,jdbcType=INTEGER},</if> |
| | | <if test="commissionTotalCost != null">#{commissionTotalCost,jdbcType=DECIMAL},</if> |
| | | <if test="commissionRate != null">#{commissionRate,jdbcType=DECIMAL},</if> |
| | | <if test="commission != null">#{commission,jdbcType=DECIMAL},</if> |
| | | <if test="commCode != null">#{commCode,jdbcType=VARCHAR},</if> |
| | | <if test="commName != null">#{commName,jdbcType=VARCHAR},</if> |
| | | <if test="orderSource != null">#{orderSource,jdbcType=VARCHAR},</if> |
| | | <if test="sizeId != null">#{sizeId,jdbcType=VARCHAR},</if> |
| | | <if test="status != null">#{status,jdbcType=INTEGER},</if> |
| | | <if test="orderSn != null">#{orderSn,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.vipshop.VipShopOrderDetail">update |
| | | yeshi_ec_vipshop_order_detail set vod_identify_code = |
| | | #{identifyCode,jdbcType=VARCHAR},vod_goods_id = |
| | | #{goodsId,jdbcType=VARCHAR},vod_goods_name = |
| | | #{goodsName,jdbcType=VARCHAR},vod_goods_thumb = |
| | | #{goodsThumb,jdbcType=VARCHAR},vod_goods_count = |
| | | #{goodsCount,jdbcType=INTEGER},vod_commission_total_cost = |
| | | #{commissionTotalCost,jdbcType=DECIMAL},vod_commission_rate = |
| | | #{commissionRate,jdbcType=DECIMAL},vod_commission = |
| | | #{commission,jdbcType=DECIMAL},vod_comm_code = |
| | | #{commCode,jdbcType=VARCHAR},vod_comm_name = |
| | | #{commName,jdbcType=VARCHAR},vod_order_source = |
| | | #{orderSource,jdbcType=VARCHAR},vod_size_id = |
| | | #{sizeId,jdbcType=VARCHAR},vod_status = |
| | | #{status,jdbcType=INTEGER},vod_order_sn = |
| | | #{orderSn,jdbcType=VARCHAR},vod_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP},vod_update_time = |
| | | #{updateTime,jdbcType=TIMESTAMP} where vod_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.vipshop.VipShopOrderDetail"> |
| | | update yeshi_ec_vipshop_order_detail |
| | | <set> |
| | | <if test="identifyCode != null">vod_identify_code=#{identifyCode,jdbcType=VARCHAR},</if> |
| | | <if test="goodsId != null">vod_goods_id=#{goodsId,jdbcType=VARCHAR},</if> |
| | | <if test="goodsName != null">vod_goods_name=#{goodsName,jdbcType=VARCHAR},</if> |
| | | <if test="goodsThumb != null">vod_goods_thumb=#{goodsThumb,jdbcType=VARCHAR},</if> |
| | | <if test="goodsCount != null">vod_goods_count=#{goodsCount,jdbcType=INTEGER},</if> |
| | | <if test="commissionTotalCost != null">vod_commission_total_cost=#{commissionTotalCost,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="commissionRate != null">vod_commission_rate=#{commissionRate,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="commission != null">vod_commission=#{commission,jdbcType=DECIMAL},</if> |
| | | <if test="commCode != null">vod_comm_code=#{commCode,jdbcType=VARCHAR},</if> |
| | | <if test="commName != null">vod_comm_name=#{commName,jdbcType=VARCHAR},</if> |
| | | <if test="orderSource != null">vod_order_source=#{orderSource,jdbcType=VARCHAR},</if> |
| | | <if test="sizeId != null">vod_size_id=#{sizeId,jdbcType=VARCHAR},</if> |
| | | <if test="status != null">vod_status=#{status,jdbcType=INTEGER},</if> |
| | | <if test="orderSn != null">vod_order_sn=#{orderSn,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">vod_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">vod_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </set> |
| | | where vod_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.vipshop.VipShopOrderMapper"> |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.vipshop.VipShopOrder"> |
| | | <id column="vo_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="vo_order_sn" property="orderSn" jdbcType="VARCHAR" /> |
| | | <result column="vo_order_status" property="status" jdbcType="INTEGER" /> |
| | | <result column="vo_new_customer" property="newCustomer" |
| | | jdbcType="INTEGER" /> |
| | | <result column="vo_channel_tag" property="channelTag" jdbcType="VARCHAR" /> |
| | | <result column="vo_order_time" property="orderTime" jdbcType="BIGINT" /> |
| | | <result column="vo_sign_time" property="signTime" jdbcType="BIGINT" /> |
| | | <result column="vo_settled_time" property="settledTime" |
| | | jdbcType="BIGINT" /> |
| | | <result column="vo_last_update_time" property="lastUpdateTime" |
| | | jdbcType="BIGINT" /> |
| | | <result column="vo_settled" property="settled" jdbcType="INTEGER" /> |
| | | <result column="vo_self_buy" property="selfBuy" jdbcType="INTEGER" /> |
| | | <result column="vo_order_sub_status_name" property="orderSubStatusName" |
| | | jdbcType="VARCHAR" /> |
| | | <result column="vo_commission" property="commission" jdbcType="DECIMAL" /> |
| | | <result column="vo_after_sale_change_commission" property="afterSaleChangeCommission" |
| | | jdbcType="VARCHAR" /> |
| | | <result column="vo_after_sale_change_goods_count" property="afterSaleChangeGoodsCount" |
| | | jdbcType="INTEGER" /> |
| | | <result column="vo_commission_enter_time" property="commissionEnterTime" |
| | | jdbcType="BIGINT" /> |
| | | <result column="vo_order_source" property="orderSource" |
| | | jdbcType="VARCHAR" /> |
| | | <result column="vo_pid" property="pid" jdbcType="VARCHAR" /> |
| | | <result column="vo_is_prepay" property="isPrepay" jdbcType="INTEGER" /> |
| | | <result column="vo_b2c_user_id" property="b2cUserId" jdbcType="BIGINT" /> |
| | | <result column="vo_create_time" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="vo_update_time" property="updateTime" jdbcType="TIMESTAMP" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">vo_id,vo_order_sn,vo_order_status,vo_new_customer,vo_channel_tag,vo_order_time,vo_sign_time,vo_settled_time,vo_last_update_time,vo_settled,vo_self_buy,vo_order_sub_status_name,vo_commission,vo_after_sale_change_commission,vo_after_sale_change_goods_count,vo_commission_enter_time,vo_order_source,vo_pid,vo_is_prepay,vo_b2c_user_id,vo_create_time,vo_update_time |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_vipshop_order where vo_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectByOrderSn" resultMap="BaseResultMap" |
| | | parameterType="java.lang.String"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_vipshop_order where vo_order_sn = #{0} |
| | | </select> |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_vipshop_order where vo_id = #{id,jdbcType=BIGINT}</delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.vipshop.VipShopOrder" |
| | | useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_vipshop_order |
| | | (vo_id,vo_order_sn,vo_order_status,vo_new_customer,vo_channel_tag,vo_order_time,vo_sign_time,vo_settled_time,vo_last_update_time,vo_settled,vo_self_buy,vo_order_sub_status_name,vo_commission,vo_after_sale_change_commission,vo_after_sale_change_goods_count,vo_commission_enter_time,vo_order_source,vo_pid,vo_is_prepay,vo_b2c_user_id,vo_create_time,vo_update_time) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{orderSn,jdbcType=VARCHAR},#{status,jdbcType=INTEGER},#{newCustomer,jdbcType=INTEGER},#{channelTag,jdbcType=VARCHAR},#{orderTime,jdbcType=BIGINT},#{signTime,jdbcType=BIGINT},#{settledTime,jdbcType=BIGINT},#{lastUpdateTime,jdbcType=BIGINT},#{settled,jdbcType=INTEGER},#{selfBuy,jdbcType=INTEGER},#{orderSubStatusName,jdbcType=VARCHAR},#{commission,jdbcType=DECIMAL},#{afterSaleChangeCommission,jdbcType=VARCHAR},#{afterSaleChangeGoodsCount,jdbcType=INTEGER},#{commissionEnterTime,jdbcType=BIGINT},#{orderSource,jdbcType=VARCHAR},#{pid,jdbcType=VARCHAR},#{isPrepay,jdbcType=INTEGER},#{b2cUserId,jdbcType=BIGINT},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.vipshop.VipShopOrder" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_vipshop_order |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">vo_id,</if> |
| | | <if test="orderSn != null">vo_order_sn,</if> |
| | | <if test="status != null">vo_order_status,</if> |
| | | <if test="newCustomer != null">vo_new_customer,</if> |
| | | <if test="channelTag != null">vo_channel_tag,</if> |
| | | <if test="orderTime != null">vo_order_time,</if> |
| | | <if test="signTime != null">vo_sign_time,</if> |
| | | <if test="settledTime != null">vo_settled_time,</if> |
| | | <if test="lastUpdateTime != null">vo_last_update_time,</if> |
| | | <if test="settled != null">vo_settled,</if> |
| | | <if test="selfBuy != null">vo_self_buy,</if> |
| | | <if test="orderSubStatusName != null">vo_order_sub_status_name,</if> |
| | | <if test="commission != null">vo_commission,</if> |
| | | <if test="afterSaleChangeCommission != null">vo_after_sale_change_commission,</if> |
| | | <if test="afterSaleChangeGoodsCount != null">vo_after_sale_change_goods_count,</if> |
| | | <if test="commissionEnterTime != null">vo_commission_enter_time,</if> |
| | | <if test="orderSource != null">vo_order_source,</if> |
| | | <if test="pid != null">vo_pid,</if> |
| | | <if test="isPrepay != null">vo_is_prepay,</if> |
| | | <if test="b2cUserId != null">vo_b2c_user_id,</if> |
| | | <if test="createTime != null">vo_create_time,</if> |
| | | <if test="updateTime != null">vo_update_time,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="orderSn != null">#{orderSn,jdbcType=VARCHAR},</if> |
| | | <if test="status != null">#{status,jdbcType=INTEGER},</if> |
| | | <if test="newCustomer != null">#{newCustomer,jdbcType=INTEGER},</if> |
| | | <if test="channelTag != null">#{channelTag,jdbcType=VARCHAR},</if> |
| | | <if test="orderTime != null">#{orderTime,jdbcType=BIGINT},</if> |
| | | <if test="signTime != null">#{signTime,jdbcType=BIGINT},</if> |
| | | <if test="settledTime != null">#{settledTime,jdbcType=BIGINT},</if> |
| | | <if test="lastUpdateTime != null">#{lastUpdateTime,jdbcType=BIGINT},</if> |
| | | <if test="settled != null">#{settled,jdbcType=INTEGER},</if> |
| | | <if test="selfBuy != null">#{selfBuy,jdbcType=INTEGER},</if> |
| | | <if test="orderSubStatusName != null">#{orderSubStatusName,jdbcType=VARCHAR},</if> |
| | | <if test="commission != null">#{commission,jdbcType=DECIMAL},</if> |
| | | <if test="afterSaleChangeCommission != null">#{afterSaleChangeCommission,jdbcType=VARCHAR},</if> |
| | | <if test="afterSaleChangeGoodsCount != null">#{afterSaleChangeGoodsCount,jdbcType=INTEGER},</if> |
| | | <if test="commissionEnterTime != null">#{commissionEnterTime,jdbcType=BIGINT},</if> |
| | | <if test="orderSource != null">#{orderSource,jdbcType=VARCHAR},</if> |
| | | <if test="pid != null">#{pid,jdbcType=VARCHAR},</if> |
| | | <if test="isPrepay != null">#{isPrepay,jdbcType=INTEGER},</if> |
| | | <if test="b2cUserId != null">#{b2cUserId,jdbcType=BIGINT},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.vipshop.VipShopOrder">update |
| | | yeshi_ec_vipshop_order set vo_order_sn = |
| | | #{orderSn,jdbcType=VARCHAR},vo_order_status = |
| | | #{status,jdbcType=INTEGER},vo_new_customer = |
| | | #{newCustomer,jdbcType=INTEGER},vo_channel_tag = |
| | | #{channelTag,jdbcType=VARCHAR},vo_order_time = |
| | | #{orderTime,jdbcType=BIGINT},vo_sign_time = |
| | | #{signTime,jdbcType=BIGINT},vo_settled_time = |
| | | #{settledTime,jdbcType=BIGINT},vo_last_update_time = |
| | | #{lastUpdateTime,jdbcType=BIGINT},vo_settled = |
| | | #{settled,jdbcType=INTEGER},vo_self_buy = |
| | | #{selfBuy,jdbcType=INTEGER},vo_order_sub_status_name = |
| | | #{orderSubStatusName,jdbcType=VARCHAR},vo_commission = |
| | | #{commission,jdbcType=DECIMAL},vo_after_sale_change_commission = |
| | | #{afterSaleChangeCommission,jdbcType=VARCHAR},vo_after_sale_change_goods_count |
| | | = |
| | | #{afterSaleChangeGoodsCount,jdbcType=INTEGER},vo_commission_enter_time |
| | | = #{commissionEnterTime,jdbcType=BIGINT},vo_order_source = |
| | | #{orderSource,jdbcType=VARCHAR},vo_pid = |
| | | #{pid,jdbcType=VARCHAR},vo_is_prepay = |
| | | #{isPrepay,jdbcType=INTEGER},vo_b2c_user_id = |
| | | #{b2cUserId,jdbcType=BIGINT},vo_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP},vo_update_time = |
| | | #{updateTime,jdbcType=TIMESTAMP} where vo_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.vipshop.VipShopOrder"> |
| | | update yeshi_ec_vipshop_order |
| | | <set> |
| | | <if test="orderSn != null">vo_order_sn=#{orderSn,jdbcType=VARCHAR},</if> |
| | | <if test="status != null">vo_order_status=#{status,jdbcType=INTEGER},</if> |
| | | <if test="newCustomer != null">vo_new_customer=#{newCustomer,jdbcType=INTEGER},</if> |
| | | <if test="channelTag != null">vo_channel_tag=#{channelTag,jdbcType=VARCHAR},</if> |
| | | <if test="orderTime != null">vo_order_time=#{orderTime,jdbcType=BIGINT},</if> |
| | | <if test="signTime != null">vo_sign_time=#{signTime,jdbcType=BIGINT},</if> |
| | | <if test="settledTime != null">vo_settled_time=#{settledTime,jdbcType=BIGINT},</if> |
| | | <if test="lastUpdateTime != null">vo_last_update_time=#{lastUpdateTime,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="settled != null">vo_settled=#{settled,jdbcType=INTEGER},</if> |
| | | <if test="selfBuy != null">vo_self_buy=#{selfBuy,jdbcType=INTEGER},</if> |
| | | <if test="orderSubStatusName != null">vo_order_sub_status_name=#{orderSubStatusName,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="commission != null">vo_commission=#{commission,jdbcType=DECIMAL},</if> |
| | | <if test="afterSaleChangeCommission != null">vo_after_sale_change_commission=#{afterSaleChangeCommission,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="afterSaleChangeGoodsCount != null">vo_after_sale_change_goods_count=#{afterSaleChangeGoodsCount,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="commissionEnterTime != null">vo_commission_enter_time=#{commissionEnterTime,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="orderSource != null">vo_order_source=#{orderSource,jdbcType=VARCHAR},</if> |
| | | <if test="pid != null">vo_pid=#{pid,jdbcType=VARCHAR},</if> |
| | | <if test="isPrepay != null">vo_is_prepay=#{isPrepay,jdbcType=INTEGER},</if> |
| | | <if test="b2cUserId != null">vo_b2c_user_id=#{b2cUserId,jdbcType=BIGINT},</if> |
| | | <if test="createTime != null">vo_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">vo_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </set> |
| | | where vo_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| | |
| | | @Resource
|
| | | private TeamRewardManager teamRewardManager;
|
| | |
|
| | |
|
| | | // 下级被封禁,红包失效
|
| | | private void invalidHongBaoForbidden(Long id) {
|
| | | HongBaoV2 updateHongBaoV2 = new HongBaoV2(id);
|
| | |
| | |
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | @Override
|
| | | public void inviteSettleVipShop(Long uid, Date maxPregetTime) throws OrderMoneySettleException {
|
| | | // 查询UID的一二级邀请赚
|
| | | int sourceType = Constant.SOURCE_TYPE_VIP;
|
| | | List<Integer> types = new ArrayList<>();
|
| | | types.add(HongBaoV2.TYPE_YIJI);
|
| | | types.add(HongBaoV2.TYPE_ERJI);
|
| | | types.add(HongBaoV2.TYPE_SHARE_YIJI);
|
| | | types.add(HongBaoV2.TYPE_SHARE_ERJI);
|
| | | long count = hongBaoV2Mapper.countCanBalanceHongBaoByTypeAndUid(types, uid, sourceType, maxPregetTime);
|
| | | List<HongBaoV2> hongBaoList = new ArrayList<>();
|
| | | // 1000条数据为1页
|
| | | int page = (int) (count % 1000 == 0 ? count / 1000 : count / 1000 + 1);
|
| | | for (int i = 0; i < page; i++) {
|
| | | List<HongBaoV2> tempHongBaoList = hongBaoV2Mapper.listCanBalanceHongBaoByTypeAndUid(types, uid, sourceType,
|
| | | maxPregetTime, i * 1000, 1000);
|
| | | if (tempHongBaoList != null && tempHongBaoList.size() > 0)
|
| | | hongBaoList.addAll(tempHongBaoList);
|
| | | }
|
| | |
|
| | | for (int i = 0; i < hongBaoList.size(); i++) {
|
| | | HongBaoV2 item = hongBaoList.get(i);
|
| | | if (item != null && item.getParent() != null) {
|
| | | if (item != null) {
|
| | | HongBaoOrder hongBaoOrder = hongBaoOrderMapper.selectByHongBaoId(item.getParent().getId());
|
| | | if (hongBaoOrder != null && hongBaoOrder.getCommonOrder() != null) {
|
| | | CommonOrder co = hongBaoOrder.getCommonOrder();
|
| | | // 上级用户不是正常用户,订单均不能到账
|
| | | UserInfo userInfo = userInfoMapper.selectAvailableByPrimaryKey(co.getUserInfo().getId());
|
| | | if (userInfo == null || userInfo.getState() != UserInfo.STATE_NORMAL) {
|
| | | invalidHongBaoForbidden(item.getId());
|
| | | hongBaoList.remove(i);
|
| | | i--;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | // 邀请赚到账事务消息
|
| | | String taskKey = getTaskKey(uid);
|
| | | TeamRewardPreRecieveMQMsg mqMsg = new TeamRewardPreRecieveMQMsg(taskKey, uid, sourceType, maxPregetTime,
|
| | | new Date());
|
| | | Message msg = MQMsgBodyFactory.create(MQTopicName.TOPIC_ORDER, OrderTopicTagEnum.teamRewardPreRecieved, mqMsg);
|
| | | msg.setKey(taskKey);
|
| | | // 添加事务消息
|
| | | try {
|
| | | orderTransactionProducer.send(msg, new LocalTransactionExecuter() {
|
| | | @Override
|
| | | public TransactionStatus execute(Message arg0, Object arg1) {
|
| | | try {
|
| | | fanliInvite(hongBaoList, uid, sourceType, taskKey, maxPregetTime);
|
| | | } catch (Exception e) {
|
| | | return TransactionStatus.RollbackTransaction;
|
| | | }
|
| | | return TransactionStatus.CommitTransaction;
|
| | | }
|
| | | }, null);
|
| | | } catch (Exception e) {
|
| | | LogHelper.mqError(e.getMessage(), msg.getTopic(), msg.getTag(), new Gson().toJson(mqMsg));
|
| | | }
|
| | | }
|
| | |
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | @Override
|
| | | public void shareSettleTB(Long uid, Date maxPregetTime) throws OrderMoneySettleException {
|
| | | /**
|
| | | * 处理分享赚
|
| | |
| | | @Transactional(rollbackFor = Exception.class)
|
| | | @Override
|
| | | public void shareSettlePDD(Long uid, Date maxPregetTime) throws OrderMoneySettleException {
|
| | | shareSettleVipShop(Constant.SOURCE_TYPE_PDD, uid, maxPregetTime);
|
| | | }
|
| | |
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | @Override
|
| | | public void shareSettleVipShop(Long uid, Date maxPregetTime) throws OrderMoneySettleException {
|
| | | shareSettleVipShop(Constant.SOURCE_TYPE_VIP, uid, maxPregetTime);
|
| | | }
|
| | |
|
| | | private void shareSettleVipShop(int sourceType, Long uid, Date maxPregetTime) throws OrderMoneySettleException {
|
| | | /**
|
| | | * 处理分享赚
|
| | | */
|
| | | int sourceType = Constant.SOURCE_TYPE_PDD;
|
| | | List<Integer> types = new ArrayList<>();
|
| | |
|
| | | // 查询UID的分享赚订单
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | private String getTaskKey(Long uid) {
|
| | | return uid + "-" + UUID.randomUUID().toString();
|
| | |
| | | import com.yeshi.fanli.entity.taobao.TaoBaoUnionConfig;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanDrawBack;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanOrder;
|
| | | import com.yeshi.fanli.entity.vipshop.VipShopOrder;
|
| | | import com.yeshi.fanli.entity.vipshop.VipShopOrderDetail;
|
| | | import com.yeshi.fanli.exception.elme.ElmeOrderException;
|
| | | import com.yeshi.fanli.exception.money.OrderMoneySettleException;
|
| | | import com.yeshi.fanli.exception.money.UserMoneyDetailException;
|
| | |
| | | import com.yeshi.fanli.util.pinduoduo.PinDuoDuoApiUtil;
|
| | | import com.yeshi.fanli.util.rocketmq.MQMsgBodyFactory;
|
| | | import com.yeshi.fanli.util.rocketmq.MQTopicName;
|
| | | import com.yeshi.fanli.util.vipshop.VipShopUtil;
|
| | |
|
| | | @Service
|
| | | public class OrderProcessServiceImpl implements OrderProcessService {
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void processVipShopOrder(VipShopOrder order) {
|
| | | if (order == null || order.getDetailList() == null || order.getDetailList().size() == 0)
|
| | | return;
|
| | |
|
| | | // 根据ext1与subUnionId跟单
|
| | | String channelTag = order.getChannelTag();
|
| | |
|
| | | String uidStr = VipShopUtil.getUidFromChanTag(channelTag);
|
| | |
|
| | | Long uid = null;
|
| | | if (!StringUtil.isNullOrEmpty(uidStr) && NumberUtil.isNumeric(uidStr))
|
| | | uid = Long.parseLong(uidStr);
|
| | | String type = VipShopUtil.getTypeFromChanTag(channelTag);
|
| | | if ("buy".equalsIgnoreCase(type))// 返利订单
|
| | | {
|
| | | processFanLiVipShopOrder(order, uid);
|
| | | lostOrderService.processSuceess(order.getOrderSn() + "", Constant.SOURCE_TYPE_VIP);
|
| | | } else if ("share".equalsIgnoreCase(type)) {// 分享订单
|
| | | if (uid == null)// 分享订单不允许找回
|
| | | return;
|
| | | processShareVipShopOrder(order, uid);
|
| | | } else {// 处理是否有订单找回的状态
|
| | | processFanLiVipShopOrder(order, null);
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 处理京东返利订单
|
| | | * |
| | | * @param jdOrder
|
| | | * @param uid
|
| | | */
|
| | | @Transactional
|
| | | private void processFanLiVipShopOrder(VipShopOrder vipShopOrder, Long uid) {
|
| | | int invalidCount = 0;
|
| | | BigDecimal totalMoney = new BigDecimal(0);
|
| | | // 订单状态判断
|
| | | for (VipShopOrderDetail item : vipShopOrder.getDetailList()) {
|
| | | if (item.getCommissionTotalCost() != null)
|
| | | totalMoney = totalMoney.add(item.getCommissionTotalCost());
|
| | | if (item.getStatus() == VipShopOrderDetail.STATUS_INVALID) {
|
| | | invalidCount++;
|
| | | }
|
| | | }
|
| | |
|
| | | // 加入订单
|
| | | Order oldOrder = orderMapper.selectOrderByOrderIdAndOrderType(vipShopOrder.getOrderSn() + "",
|
| | | Constant.SOURCE_TYPE_VIP);
|
| | | if (uid == null && oldOrder != null && oldOrder.getBeizhu() != null && oldOrder.getBeizhu().contains("补单"))
|
| | | uid = oldOrder.getUserInfo().getId();
|
| | |
|
| | | if (uid == null)
|
| | | return;
|
| | |
|
| | | if (oldOrder == null)// 新增
|
| | | {
|
| | | Order order = new Order();
|
| | | order.setBeizhu("唯品会返利订单");
|
| | | order.setCreatetime(System.currentTimeMillis());
|
| | | order.setOrderId(vipShopOrder.getOrderSn() + "");
|
| | | order.setOrderType(Constant.SOURCE_TYPE_VIP);
|
| | | order.setState(invalidCount == vipShopOrder.getDetailList().size() ? Order.STATE_SHIXIAO : Order.STATE_YIZHIFU);
|
| | | order.setUserInfo(new UserInfo(uid));
|
| | | order.setVersion(2);
|
| | | order.setThirdCreateTime(new Date(vipShopOrder.getOrderTime()));
|
| | | order.setMoney(totalMoney);
|
| | | // 加入到订单表
|
| | | orderMapper.insertSelective(order);
|
| | | } else {
|
| | | Order updateOrder = new Order();
|
| | | updateOrder.setId(oldOrder.getId());
|
| | | updateOrder.setMoney(totalMoney);
|
| | | orderMapper.updateByPrimaryKeySelective(updateOrder);
|
| | | }
|
| | |
|
| | | try {
|
| | | List<CommonOrderAddResultDTO> commonOrderList = commonOrderService.addVipShopOrder(vipShopOrder, uid);
|
| | | addHongBaoWithMQ(commonOrderList, vipShopOrder.getOrderSn() + "", uid, Constant.SOURCE_TYPE_VIP,
|
| | | HongBaoV2.TYPE_ZIGOU);
|
| | |
|
| | | if (isCommonOrderAllAdd(commonOrderList)) {
|
| | | Order order = new Order();
|
| | | order.setOrderId(vipShopOrder.getOrderSn() + "");
|
| | | order.setOrderType(Constant.SOURCE_TYPE_VIP);
|
| | | order.setUserInfo(new UserInfo(uid));
|
| | | try {
|
| | | if (Constant.ENABLE_MQ)
|
| | | PlaceOrderCMQManager.getInstance().addPlaceOrderMsg(order);
|
| | | } catch (Exception e) {
|
| | | }
|
| | | }
|
| | | } catch (CommonOrderException e) {
|
| | | try {
|
| | | LogHelper.errorDetailInfo(e, "addVipShopOrder或addHongBao出错", "订单号:" + vipShopOrder.getOrderSn());
|
| | | } catch (Exception e1) {
|
| | | e1.printStackTrace();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 处理京东分享订单
|
| | | * |
| | | * @param order
|
| | | * @param uid
|
| | | */
|
| | | @Transactional
|
| | | private void processShareVipShopOrder(VipShopOrder jdOrder, Long uid) {
|
| | | try {
|
| | | List<CommonOrderAddResultDTO> commonOrderList = commonOrderService.addVipShopOrder(jdOrder, uid);
|
| | | addHongBaoWithMQ(commonOrderList, jdOrder.getOrderSn() + "", uid, Constant.SOURCE_TYPE_VIP,
|
| | | HongBaoV2.TYPE_SHARE_GOODS);
|
| | | if (isCommonOrderAllAdd(commonOrderList)) {
|
| | | Order order = new Order();
|
| | | order.setOrderId(jdOrder.getOrderSn() + "");
|
| | | order.setOrderType(Constant.SOURCE_TYPE_VIP);
|
| | | order.setUserInfo(new UserInfo(uid));
|
| | | try {
|
| | | if (Constant.ENABLE_MQ)
|
| | | PlaceOrderCMQManager.getInstance().addPlaceOrderMsg(order);
|
| | | } catch (Exception e) {
|
| | | }
|
| | | }
|
| | | } catch (CommonOrderException e) {
|
| | | try {
|
| | | LogHelper.errorDetailInfo(e, "addJDOrder或addHongBao出错", "订单号:" + jdOrder.getOrderSn());
|
| | | } catch (Exception e1) {
|
| | | e1.printStackTrace();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void repairCommonOrderByByTaoBaoOrder(String orderId) {
|
| | | // 根据订单号查询淘宝订单
|
| | | List<TaoBaoOrder> orderList = taoBaoOrderService.getTaoBaoOrderByOrderId(orderId);
|
New file |
| | |
| | | package com.yeshi.fanli.service.impl.order.vipshop;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.vipshop.VipShopAfterSaleDetailInfoMapper;
|
| | | import com.yeshi.fanli.dao.mybatis.vipshop.VipShopOrderDetailMapper;
|
| | | import com.yeshi.fanli.dao.mybatis.vipshop.VipShopOrderMapper;
|
| | | import com.yeshi.fanli.entity.vipshop.VipShopAfterSaleDetailInfo;
|
| | | import com.yeshi.fanli.entity.vipshop.VipShopOrder;
|
| | | import com.yeshi.fanli.entity.vipshop.VipShopOrderDetail;
|
| | | import com.yeshi.fanli.exception.vipshop.VipShopOrderException;
|
| | | import com.yeshi.fanli.service.inter.order.vipshop.VipShopOrderService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.vipshop.VipShopUtil;
|
| | |
|
| | | @Service
|
| | | public class VipShopOrderServiceImpl implements VipShopOrderService {
|
| | |
|
| | | @Resource
|
| | | private VipShopOrderMapper vipShopOrderMapper;
|
| | |
|
| | | @Resource
|
| | | private VipShopOrderDetailMapper vipShopOrderDetailMapper;
|
| | |
|
| | | @Resource
|
| | | private VipShopAfterSaleDetailInfoMapper vipShopAfterSaleDetailInfoMapper;
|
| | |
|
| | | @Override
|
| | | public void addOrder(VipShopOrder order) throws VipShopOrderException {
|
| | |
|
| | | if (order == null || StringUtil.isNullOrEmpty(order.getOrderSn())) {
|
| | | throw new VipShopOrderException(1, "数据不完整");
|
| | | }
|
| | |
|
| | | // 查询是否添加过
|
| | | VipShopOrder old = vipShopOrderMapper.selectByOrderSn(order.getOrderSn());
|
| | | if (old == null) {// 新增
|
| | | // 添加信息
|
| | | if (order.getCreateTime() == null)
|
| | | order.setCreateTime(new Date());
|
| | | vipShopOrderMapper.insertSelective(order);
|
| | | } else {// 更新
|
| | | order.setId(old.getId());
|
| | | order.setUpdateTime(new Date());
|
| | | vipShopOrderMapper.updateByPrimaryKeySelective(order);
|
| | | }
|
| | |
|
| | | for (VipShopOrderDetail detail : order.getDetailList()) {
|
| | | detail.setIdentifyCode(VipShopUtil.getOrderDetailIdentifyCode(order.getOrderSn(), detail.getGoodsId(),
|
| | | detail.getSizeId()));
|
| | | detail.setOrderSn(order.getOrderSn());
|
| | | addOrderDetail(detail);
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 添加详情信息
|
| | | * @Title: addOrderDetail
|
| | | * @Description: |
| | | * @param detail |
| | | * void 返回类型
|
| | | * @throws
|
| | | */
|
| | | private void addOrderDetail(VipShopOrderDetail detail) {
|
| | | VipShopOrderDetail old = vipShopOrderDetailMapper.selectByIdentifyCode(detail.getIdentifyCode());
|
| | | Long detailId = null;
|
| | | if (old == null) {
|
| | | if (detail.getCreateTime() == null)
|
| | | detail.setCreateTime(new Date());
|
| | | vipShopOrderDetailMapper.insertSelective(detail);
|
| | | detailId = detail.getId();
|
| | | } else {
|
| | | detail.setId(old.getId());
|
| | | detail.setUpdateTime(new Date());
|
| | | vipShopOrderDetailMapper.insertSelective(detail);
|
| | | detailId = detail.getId();
|
| | | }
|
| | |
|
| | | if (detail.getAfterSaleInfo() != null)
|
| | | for (VipShopAfterSaleDetailInfo info : detail.getAfterSaleInfo()) {
|
| | | info.setOrderDetailId(detailId);
|
| | | addAfterSaleDetailInfo(info);
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 添加售后信息
|
| | | * @Title: addAfterSaleDetailInfo
|
| | | * @Description: |
| | | * @param detailInfo |
| | | * void 返回类型
|
| | | * @throws
|
| | | */
|
| | | private void addAfterSaleDetailInfo(VipShopAfterSaleDetailInfo detailInfo) {
|
| | | VipShopAfterSaleDetailInfo oldInfo = vipShopAfterSaleDetailInfoMapper.selectByOrderDetailId(detailInfo.getId());
|
| | | if (oldInfo == null) {
|
| | | if (detailInfo.getCreateTime() == null)
|
| | | detailInfo.setCreateTime(new Date());
|
| | | vipShopAfterSaleDetailInfoMapper.insertSelective(detailInfo);
|
| | | } else {
|
| | | detailInfo.setId(oldInfo.getId());
|
| | | detailInfo.setUpdateTime(new Date());
|
| | | vipShopAfterSaleDetailInfoMapper.updateByPrimaryKeySelective(detailInfo);
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public VipShopOrder selectByPrimaryKey(Long orderId) {
|
| | |
|
| | | return vipShopOrderMapper.selectByPrimaryKey(orderId);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<VipShopOrder> listByOrderSn(String orderSn) {
|
| | | List<VipShopOrder> list = new ArrayList<>();
|
| | | VipShopOrder order = vipShopOrderMapper.selectByOrderSn(orderSn);
|
| | | if (order == null)
|
| | | return null;
|
| | | list.add(order);
|
| | | return list;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public VipShopOrder selectDetailByPrimaryKey(Long orderId) {
|
| | | VipShopOrder order = vipShopOrderMapper.selectByPrimaryKey(orderId);
|
| | | if (order == null)
|
| | | return null;
|
| | | List<VipShopOrderDetail> detailList = vipShopOrderDetailMapper.listByOrderSn(order.getOrderSn());
|
| | | order.setDetailList(detailList);
|
| | | return order;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public Long countOrderByDay(String preDay) {
|
| | | // TODO Auto-generated method stub
|
| | | return null;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<VipShopOrderDetail> listDetailQuery(long start, int count, String key) {
|
| | | // TODO Auto-generated method stub
|
| | | return null;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public long countDetailQuery(String key) {
|
| | | // TODO Auto-generated method stub
|
| | | return 0;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | public void inviteSettleJD(Long uid, Date maxPregetTime) throws OrderMoneySettleException;
|
| | |
|
| | | public void inviteSettlePDD(Long uid, Date maxPregetTime) throws OrderMoneySettleException;
|
| | | |
| | | public void inviteSettleVipShop(Long uid, Date maxPregetTime) throws OrderMoneySettleException;
|
| | |
|
| | | /**
|
| | | * 分享赚结算
|
| | |
| | | public void shareSettleJD(Long uid, Date maxPregetTime) throws OrderMoneySettleException;
|
| | |
|
| | | public void shareSettlePDD(Long uid, Date maxPregetTime) throws OrderMoneySettleException;
|
| | | |
| | | public void shareSettleVipShop(Long uid, Date maxPregetTime) throws OrderMoneySettleException;
|
| | |
|
| | | /**
|
| | | * 自购结算
|
| | |
| | | import com.yeshi.fanli.entity.pdd.PDDOrder;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoOrder;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanOrder;
|
| | | import com.yeshi.fanli.entity.vipshop.VipShopOrder;
|
| | | import com.yeshi.fanli.exception.order.HongBaoException;
|
| | | import com.yeshi.fanli.exception.order.OrderItemException;
|
| | | import com.yeshi.fanli.exception.order.TaoBaoWeiQuanException;
|
| | |
| | | * @param pddOrder
|
| | | */
|
| | | public void processPDDOrder(PDDOrder pddOrder);
|
| | | |
| | | /**
|
| | | * 处理唯品会订单
|
| | | * |
| | | * @param pddOrder
|
| | | */
|
| | | public void processVipShopOrder(VipShopOrder vipShopOrder);
|
| | |
|
| | | /**
|
| | | * 根据淘宝订单的排序值修复常规订单的排序值
|
| | |
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.jd.JDOrder;
|
| | | import com.yeshi.fanli.entity.vipshop.VipShopOrder;
|
| | | import com.yeshi.fanli.entity.vipshop.VipShopOrderDetail;
|
| | | import com.yeshi.fanli.exception.jd.JDOrderException;
|
| | | import com.yeshi.fanli.exception.vipshop.VipShopOrderException;
|
| | |
|
| | | public interface VipShopOrderService {
|
| | |
| | | * 添加订单
|
| | | *
|
| | | * @param order
|
| | | * @throws JDOrderException
|
| | | * @throws VipShopOrderException
|
| | | */
|
| | | public void addVipShopOrder(JDOrder order) throws VipShopOrderException;
|
| | | public void addOrder(VipShopOrder order) throws VipShopOrderException;
|
| | |
|
| | | /**
|
| | | * 根据主键ID查询
|
| | |
| | | * @param orderId
|
| | | * @return
|
| | | */
|
| | | public JDOrder selectByPrimaryKey(Long orderId);
|
| | | public VipShopOrder selectByPrimaryKey(Long orderId);
|
| | |
|
| | | /**
|
| | | * 根据订单号查询
|
| | | * |
| | | * @param orderId
|
| | | * @return
|
| | | */
|
| | | public List<VipShopOrder> listByOrderSn(String orderSn);
|
| | |
|
| | | /**
|
| | | * 根据主键查询(包含子订单)
|
| | | * @param orderId
|
| | | * @return
|
| | | */
|
| | | public JDOrder selectDetailByPrimaryKey(Long orderId);
|
| | | public VipShopOrder selectDetailByPrimaryKey(Long orderId);
|
| | |
|
| | | public Long countOrderByDay(String preDay);
|
| | |
|
| | |
| | |
|
| | | count.setYearMonth(
|
| | | TimeUtil.getGernalTime(TimeUtil.convertToTimeTemp(dto.getDay(), "yyyy-MM-dd"), "yyyy-MM"));
|
| | | if(dto.getDay().equalsIgnoreCase("2020-05-03")&&dto.getUid()==389677L){
|
| | | System.out.println(dto);
|
| | | }
|
| | | |
| | | orderMoneyDailyCountService.saveDailyCount(count);
|
| | |
|
| | | }
|
| | |
| | |
|
| | | public static boolean IS_TEST = true;
|
| | |
|
| | | public static boolean ENABLE_MQ = true;
|
| | | public static boolean ENABLE_MQ = false;
|
| | |
|
| | | public static int PAGE_SIZE = 20;
|
| | |
|
| | |
| | | addOrderQueue("addorderqueue-", "添加订单队列"),
|
| | | JDOrder("jd-order-", "京东订单"),
|
| | | PDDOrder("pdd-order-", "拼多多订单"),
|
| | | VIPShopOrder("vipshop-order-", "唯品会订单"),
|
| | | hongBaoFanLi("hongbao-fanli-", "红包返利"),
|
| | |
|
| | | deviceSex("device_sex-", "设备性别版本"),
|
| | |
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoOrder;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanOrder;
|
| | | import com.yeshi.fanli.entity.vipshop.VipShopOrder;
|
| | | import com.yeshi.fanli.exception.order.TaoBaoWeiQuanException;
|
| | | import com.yeshi.fanli.exception.order.dividents.TeamDividentsRecordException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | |
| | | import com.yeshi.fanli.service.inter.order.jd.JDOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.pdd.PDDOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.tb.TaoBaoOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.vipshop.VipShopOrderService;
|
| | | import com.yeshi.fanli.service.inter.push.DeviceActiveService;
|
| | | import com.yeshi.fanli.service.inter.push.IOSPushService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoGoodsUpdateService;
|
| | |
| | | import com.yeshi.fanli.util.cmq.order.PDDOrderCMQManager;
|
| | | import com.yeshi.fanli.util.cmq.order.PlaceOrderCMQManager;
|
| | | import com.yeshi.fanli.util.cmq.order.TeamOrderCMQManager;
|
| | | import com.yeshi.fanli.util.cmq.order.VipShopOrderCMQManager;
|
| | | import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
|
| | |
|
| | | /**
|
| | |
| | | @Resource
|
| | | private TeamEincomeManager teamEincomeManager;
|
| | |
|
| | | @Resource
|
| | | private VipShopOrderService vipShopOrderService;
|
| | |
|
| | | private static boolean isInited = false;
|
| | |
|
| | | public void onApplicationEvent(ContextRefreshedEvent arg0) {
|
| | |
| | | doUpdateGoodsJob(); // 更新商品队列
|
| | | doJDOrderJob();// 京东订单处理
|
| | | doPDDOrderJob();// 拼多多订单处理
|
| | | doVipShopOrderJob();// 唯品会订单处理
|
| | | doImportantTaoBaoGoodsUpdateJob();// 淘宝重要商品的信息更新
|
| | | doHongBaoRecieveIntegralGetJob();// 返利到账,金币增加
|
| | | // doPlaceOrderIntegralJob();// 下单赠送金币任务
|
| | |
| | |
|
| | | }
|
| | |
|
| | | public void doVipShopOrderJob() {
|
| | | executor.execute(new Runnable() {
|
| | | @Override
|
| | | public void run() {
|
| | | while (true) {
|
| | | try {
|
| | | Map<String, String> map = VipShopOrderCMQManager.getInstance().consumeVipShopOrder(16);
|
| | | if (map != null) {
|
| | | Iterator<String> its = map.keySet().iterator();
|
| | | while (its.hasNext()) {
|
| | | String key = its.next();
|
| | | try {
|
| | | String orderId = map.get(key);
|
| | | if (!StringUtil.isNullOrEmpty(orderId)) {
|
| | | List<VipShopOrder> orderList = vipShopOrderService.listByOrderSn(orderId);
|
| | | if (orderList != null)
|
| | | for (VipShopOrder order : orderList)
|
| | | orderProcessService.processVipShopOrder(order);
|
| | | }
|
| | | VipShopOrderCMQManager.getInstance().deleteVipShopOrder(key);
|
| | | } catch (Exception e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | | }
|
| | | } catch (Exception e) {
|
| | | LogHelper.error("拼多多订单:" + e.getMessage());
|
| | | }
|
| | | }
|
| | | }
|
| | | });
|
| | |
|
| | | }
|
| | |
|
| | | /**
|
| | | * 重要的淘宝商品信息更新
|
| | | */
|
New file |
| | |
| | | package com.yeshi.fanli.util.cmq.order;
|
| | |
|
| | | import java.util.HashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | import org.yeshi.utils.CMQUtil;
|
| | |
|
| | | import com.qcloud.cmq.Message;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | public class VipShopOrderCMQManager {
|
| | |
|
| | | private static String secretId = "AKIDTlpgJhLjOozvd6QI2XnpfGbgV4NQJk25";
|
| | | private static String secretKey = "xhCSUHo55oHUQ6XicFcmfIgspX0EEzWo";
|
| | | private static VipShopOrderCMQManager vipShopOrderCMQManager;
|
| | | private static CMQUtil cmqUtil;
|
| | |
|
| | | public static String VIPSHOP_ORDER = "order-vipshop";
|
| | |
|
| | | static {
|
| | | cmqUtil = CMQUtil.getInstance(secretId, secretKey);
|
| | | VIPSHOP_ORDER += "-" + Constant.systemCommonConfig.getProjectName();
|
| | | cmqUtil.createQueue(VIPSHOP_ORDER);
|
| | | }
|
| | |
|
| | | public static VipShopOrderCMQManager getInstance() {
|
| | | if (vipShopOrderCMQManager == null)
|
| | | vipShopOrderCMQManager = new VipShopOrderCMQManager();
|
| | | return vipShopOrderCMQManager;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 添加唯品会订单到队列
|
| | | * |
| | | * @param orderId
|
| | | */
|
| | | public void addVipShopOrder(String orderId) {
|
| | | if (StringUtil.isNullOrEmpty(orderId))
|
| | | return;
|
| | | cmqUtil.sendMsg(VIPSHOP_ORDER, orderId);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 消费队列消息
|
| | | * |
| | | * @param count
|
| | | * @return
|
| | | */
|
| | | public Map<String, String> consumeVipShopOrder(int count) {
|
| | | List<Message> list = cmqUtil.recieveMsg(count, VIPSHOP_ORDER);
|
| | | Map<String, String> map = new HashMap<>();
|
| | | if (list != null)
|
| | | for (Message msg : list) {
|
| | | String result = msg.msgBody;
|
| | | map.put(msg.receiptHandle, result);
|
| | | }
|
| | | return map;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 删除唯品会队列
|
| | | * |
| | | * @param receiptHandle
|
| | | */
|
| | | public void deleteVipShopOrder(String receiptHandle) {
|
| | | cmqUtil.deleteMsg(VIPSHOP_ORDER, receiptHandle);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | import com.yeshi.fanli.dto.jd.JDCouponInfo;
|
| | | import com.yeshi.fanli.dto.jd.JDShopInfo;
|
| | | import com.yeshi.fanli.dto.pdd.PDDGoodsDetail;
|
| | | import com.yeshi.fanli.dto.suning.SuningGoodsInfo;
|
| | | import com.yeshi.fanli.dto.vip.goods.VIPGoodsInfo;
|
| | | import com.yeshi.fanli.entity.goods.CommonGoods;
|
| | | import com.yeshi.fanli.entity.jd.JDGoods;
|
| | |
| | |
|
| | | cg.setCouponTotalCount(0);
|
| | | cg.setGoodsId(Long.parseLong(goods.getGoodsId()));
|
| | | cg.setGoodsType(CommonGoods.GOODS_TYPE_PDD);
|
| | | cg.setGoodsType(CommonGoods.GOODS_TYPE_VIP);
|
| | | cg.setPicture(goods.getGoodsThumbUrl());
|
| | | cg.setPictureWhite(null);
|
| | | cg.setPrice(new BigDecimal(goods.getMarketPrice()));
|
| | |
| | | cg.setRate(new BigDecimal(goods.getCommissionRate()));
|
| | | cg.setSellerId(goods.getBrandId());
|
| | | cg.setSellerName(goods.getBrandName());
|
| | | cg.setShopType(CommonGoods.SHOP_TYPE_PDD);
|
| | | cg.setShopType(CommonGoods.SHOP_TYPE_VIP);
|
| | | cg.setState(CommonGoods.STATE_NORMAL);
|
| | | cg.setTitle(goods.getGoodsName());
|
| | | // 保留字段
|
| | |
| | | return cg;
|
| | | }
|
| | |
|
| | | public static CommonGoods create(SuningGoodsInfo goods) {
|
| | | if (goods == null)
|
| | | return null;
|
| | |
|
| | | CommonGoods cg = new CommonGoods();
|
| | |
|
| | | if (goods.getCouponInfo() != null && !StringUtil.isNullOrEmpty(goods.getCouponInfo().getCouponUrl())) {// 有券
|
| | | cg.setCouponInfo(String.format("满%s元减%s元", goods.getCouponInfo().getBounsLimit(),
|
| | | goods.getCouponInfo().getCouponValue()));
|
| | | cg.setCouponAmount(new BigDecimal(goods.getCouponInfo().getCouponValue()));
|
| | | cg.setCouponLeftCount(Integer.parseInt(goods.getCouponInfo().getCouponCount()));
|
| | | cg.setCouponTotalCount(Integer.parseInt(goods.getCouponInfo().getCouponCount()));
|
| | | cg.setCouponStartPrice(new BigDecimal(goods.getCouponInfo().getBounsLimit()));
|
| | | } else {
|
| | | cg.setCouponLeftCount(0);
|
| | | cg.setCouponTotalCount(0);
|
| | | cg.setCouponAmount(new BigDecimal(0));
|
| | | }
|
| | |
|
| | | cg.setGoodsId(Long.parseLong(goods.getCommodityInfo().getCommodityCode()));
|
| | | cg.setGoodsType(CommonGoods.GOODS_TYPE_SUNING);
|
| | | if (goods.getCommodityInfo().getPictureUrl() != null && goods.getCommodityInfo().getPictureUrl().size() > 0)
|
| | | cg.setPicture(goods.getCommodityInfo().getPictureUrl().get(0).getPicUrl());
|
| | | cg.setPictureWhite(null);
|
| | | cg.setPrice(new BigDecimal(goods.getCommodityInfo().getSnPrice()));
|
| | |
|
| | | cg.setSales(Integer.parseInt(goods.getCommodityInfo().getMonthSales()));
|
| | | cg.setRate(new BigDecimal(goods.getCommodityInfo().getRate()));
|
| | | cg.setSellerId(Long.parseLong(goods.getCommodityInfo().getSupplierCode()));
|
| | | cg.setSellerName(goods.getCommodityInfo().getSupplierName());
|
| | | cg.setShopType(CommonGoods.SHOP_TYPE_PDD);
|
| | | cg.setState(CommonGoods.STATE_NORMAL);
|
| | | cg.setTitle(goods.getCommodityInfo().getCommodityName());
|
| | | // 保留字段
|
| | | cg.setVideoCover(null);
|
| | | cg.setVideoUrl(null);
|
| | | cg.setState(0);
|
| | | cg.setMaterialLibType(1);
|
| | |
|
| | | // 分类信息
|
| | | CategoryInfoDTO categoryInfo = new CategoryInfoDTO();
|
| | | categoryInfo.setCid1(Long.parseLong(goods.getCategoryInfo().getFirstSaleCategoryId()));
|
| | | categoryInfo.setCid1Name(goods.getCategoryInfo().getFirstSaleCategoryName());
|
| | |
|
| | | categoryInfo.setCid2(Long.parseLong(goods.getCategoryInfo().getSecondSaleCategoryId()));
|
| | | categoryInfo.setCid2Name(goods.getCategoryInfo().getSecondSaleCategoryName());
|
| | |
|
| | | cg.setCategoryInfo(JSONObject.toJSON(categoryInfo).toString());
|
| | |
|
| | | return cg;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | sourceOrder.setState(TeamDividentsSourceOrder.STATE_UNKOWN);
|
| | | }
|
| | | sourceOrder.setUid(commonOrderList.get(0).getUserInfo().getId());
|
| | | sourceOrder.setCreateTime(commonOrderList.get(0).getThirdCreateTime());//下单时间
|
| | |
|
| | | return sourceOrder;
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.util.suning;
|
| | |
|
| | | import java.io.IOException;
|
| | | import java.lang.reflect.Type;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Date;
|
| | | import java.util.HashMap;
|
| | | import java.util.Iterator;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | import org.apache.commons.httpclient.HttpClient;
|
| | | import org.apache.commons.httpclient.HttpException;
|
| | | import org.apache.commons.httpclient.methods.PostMethod;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.reflect.TypeToken;
|
| | | import com.yeshi.fanli.dto.suning.SuningGoodsInfo;
|
| | | import com.yeshi.fanli.dto.suning.SuningOrderQueryResultDTO;
|
| | | import com.yeshi.fanli.dto.suning.SuningQueryModel;
|
| | | import com.yeshi.fanli.entity.suning.SuningOrderInfo;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | public class SuningApiUtil {
|
| | |
|
| | | public final static String APP_SECRET = "a217bc7018fd8ca112bb60f09057d996";
|
| | | public final static String APP_KEY = "6fca015e83eff7ef150bebcad418ea32";
|
| | |
|
| | | public final static String PID_SHARE = "666527";
|
| | | public final static String PID_BUY = "666526";
|
| | |
|
| | | private static String post(String url, String entity, Map<String, String> headers) {
|
| | | String charset = "utf-8";
|
| | | HttpClient client = new HttpClient();
|
| | | PostMethod method = new PostMethod(url);
|
| | | method.addRequestHeader("Content-Type", "text/html;charset=" + charset);
|
| | | method.setRequestHeader("Content-Type", "text/html;charset=" + charset);
|
| | | method.setRequestBody(entity);
|
| | | for (Iterator<String> its = headers.keySet().iterator(); its.hasNext();) {
|
| | | String key = its.next();
|
| | | method.addRequestHeader(key, headers.get(key));
|
| | | }
|
| | |
|
| | | try {
|
| | | client.executeMethod(method);
|
| | | return method.getResponseBodyAsString();
|
| | | } catch (HttpException e) {
|
| | | e.printStackTrace();
|
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | return "";
|
| | | }
|
| | |
|
| | | private static String getSign(Map<String, String> baseParams, String resParams) {
|
| | | StringBuffer sb = new StringBuffer();
|
| | | try {
|
| | | sb.append(APP_SECRET);
|
| | | sb.append(baseParams.get("appMethod"));
|
| | | sb.append(baseParams.get("appRequestTime"));
|
| | | sb.append(baseParams.get("appKey"));
|
| | | sb.append(baseParams.get("versionNo"));
|
| | | } catch (Exception e) {
|
| | |
|
| | | }
|
| | |
|
| | | try {
|
| | | sb.append(StringUtil.getBase64String(resParams));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | return StringUtil.Md5(sb.toString());
|
| | | }
|
| | |
|
| | | private static String baseRequest(String method, JSONObject params) {
|
| | | Map<String, String> baseParams = new HashMap<>();
|
| | | baseParams.put("appMethod", method);
|
| | | baseParams.put("appRequestTime", TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss"));
|
| | | baseParams.put("format", "json");
|
| | | baseParams.put("appKey", APP_KEY);
|
| | | baseParams.put("versionNo", "v1.2");
|
| | | String sign = getSign(baseParams, params.toString());
|
| | | baseParams.put("signInfo", sign);
|
| | | String result = post("https://open.suning.com/api/http/sopRequest/" + method, params.toString(), baseParams);
|
| | | System.out.println(result);
|
| | | return result;
|
| | | }
|
| | |
|
| | | private static String baseRequest(String method, String key, JSONObject params) {
|
| | | JSONObject keyJSON = new JSONObject();
|
| | | for (Iterator<String> its = params.keySet().iterator(); its.hasNext();) {
|
| | | String k = its.next();
|
| | | keyJSON.put(k, params.get(k));
|
| | | }
|
| | | JSONObject content = new JSONObject();
|
| | | content.put(key, keyJSON);
|
| | | JSONObject body = new JSONObject();
|
| | | body.put("sn_body", content);
|
| | | JSONObject request = new JSONObject();
|
| | | request.put("sn_request", body);
|
| | | return baseRequest(method, request);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 查询商品
|
| | | * @Title: searchGoods
|
| | | * @Description: |
| | | * @param model
|
| | | * @return |
| | | * List<SuningGoodsInfo> 返回类型
|
| | | * @throws
|
| | | */
|
| | | public static List<SuningGoodsInfo> searchGoods(SuningQueryModel model) {
|
| | | model.setPicWidth(320);
|
| | | model.setPicHeight(320);
|
| | | String key = "querySearchcommoditynew";
|
| | | String json = new Gson().toJson(model);
|
| | | String result = baseRequest("suning.netalliance.searchcommoditynew.query", key, JSONObject.fromObject(json));
|
| | | JSONObject resultJSON = JSONObject.fromObject(result);
|
| | | JSONArray array = resultJSON.optJSONObject("sn_responseContent").optJSONObject("sn_body").optJSONObject(key)
|
| | | .optJSONArray("commodityList");
|
| | | if (array != null) {
|
| | | Type type = new TypeToken<ArrayList<SuningGoodsInfo>>() {
|
| | | }.getType();
|
| | | List<SuningGoodsInfo> goodsList = new Gson().fromJson(array.toString(), type);
|
| | | return goodsList;
|
| | | }
|
| | |
|
| | | return null;
|
| | | }
|
| | |
|
| | | public static SuningGoodsInfo getGoodsDetail(String goodsCode, String supplierCode) {
|
| | | JSONObject model = new JSONObject();
|
| | | model.put("commodityStr", goodsCode + "-" + supplierCode);
|
| | | model.put("picWidth", 600);
|
| | | model.put("picHeight", 600);
|
| | |
|
| | | String key = "queryCommoditydetail";
|
| | | String result = baseRequest("suning.netalliance.commoditydetail.query", key, model);
|
| | | System.out.println(result);
|
| | | JSONObject resultJSON = JSONObject.fromObject(result);
|
| | | JSONArray array = resultJSON.optJSONObject("sn_responseContent").optJSONObject("sn_body").optJSONArray(key);
|
| | | if (array != null && array.size() > 0) {
|
| | | return new Gson().fromJson(array.optJSONObject(0).toString(), SuningGoodsInfo.class);
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | public static String convertLink(String productUrl, String quanUrl, String pid, String subUser) {
|
| | | JSONObject model = new JSONObject();
|
| | | if (productUrl != null)
|
| | | model.put("productUrl", productUrl);
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(quanUrl))
|
| | | model.put("quanUrl", quanUrl);
|
| | |
|
| | | if (pid != null)
|
| | | model.put("promotionId", pid);
|
| | |
|
| | | if (subUser != null)
|
| | | model.put("subUser", subUser);
|
| | |
|
| | | String key = "getExtensionlink";
|
| | | String result = baseRequest("suning.netalliance.extensionlink.get", key, model);
|
| | | System.out.println(result);
|
| | | JSONObject resultJSON = JSONObject.fromObject(result);
|
| | | JSONObject json = resultJSON.optJSONObject("sn_responseContent").optJSONObject("sn_body").optJSONObject(key);
|
| | | String link = json.optString("shortLink");
|
| | | return link;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 0
|
| | | * @Title: getOrderList
|
| | | * @Description: |
| | | * @param startTime
|
| | | * @param endTime
|
| | | * @param page
|
| | | * @param orderLineStatus
|
| | | * @return |
| | | * SuningOrderQueryResultDTO 返回类型
|
| | | * @throws
|
| | | */
|
| | | public static SuningOrderQueryResultDTO getOrderList(Date startTime, Date endTime, int page, int orderLineStatus) {
|
| | | JSONObject model = new JSONObject();
|
| | | model.put("startTime", TimeUtil.getGernalTime(startTime.getTime(), "yyyy-MM-dd HH:mm:ss"));
|
| | | model.put("endTime", TimeUtil.getGernalTime(endTime.getTime(), "yyyy-MM-dd HH:mm:ss"));
|
| | | model.put("pageSize", 20);
|
| | | model.put("pageNo", page);
|
| | | model.put("orderLineStatus", orderLineStatus);
|
| | |
|
| | | String key = "queryOrder";
|
| | | String result = baseRequest("suning.netalliance.order.query", key, model);
|
| | | JSONObject resultJSON = JSONObject.fromObject(result);
|
| | | resultJSON = resultJSON.optJSONObject("sn_responseContent");
|
| | | JSONArray array = resultJSON.optJSONObject("sn_body").optJSONArray(key);
|
| | | Gson gson = new Gson();
|
| | |
|
| | | Type type = new TypeToken<ArrayList<SuningOrderInfo>>() {
|
| | | }.getType();
|
| | |
|
| | | if (array != null) {
|
| | | List<SuningOrderInfo> orderList = new ArrayList<>();
|
| | | for (int i = 0; i < array.size(); i++) {
|
| | | JSONObject data = array.optJSONObject(i);
|
| | | JSONArray itemArray = data.optJSONArray("orderDetail");
|
| | | List<SuningOrderInfo> tempList = gson.fromJson(itemArray.toString(), type);
|
| | | for(SuningOrderInfo info:tempList){
|
| | | info.setOrderCode(data.optString("orderCode"));
|
| | | orderList.add(info);
|
| | | }
|
| | | }
|
| | |
|
| | | return new SuningOrderQueryResultDTO(resultJSON.optJSONObject("sn_head").optInt("totalSize"), orderList);
|
| | | }
|
| | |
|
| | | return null;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | import org.yeshi.utils.StringUtil;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.JsonObject;
|
| | | import com.google.gson.reflect.TypeToken;
|
| | | import com.yeshi.fanli.dto.vip.VIPSearchFilter;
|
| | | import com.yeshi.fanli.dto.vip.VIPSearchResult;
|
| | |
| | |
|
| | | public static String getTypeFromChanTag(String tag) {
|
| | | String decodeTag = StringUtil.getFromBase64(tag);
|
| | | return decodeTag.split("#")[1];
|
| | | return decodeTag.split("#")[0];
|
| | | }
|
| | |
|
| | | public static BigDecimal getGoodsFanLiMoney(VIPGoodsInfo goods, BigDecimal rate) {
|