New file |
| | |
| | | package com.yeshi.goods.facade.dto.taobao.haodanku; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author hxh |
| | | * @title: HaoDanKuTaokeGoods |
| | | * @description: 好单库淘特商品信息 |
| | | * @date 2021/12/13 10:49 |
| | | */ |
| | | public class HDKTaoteGoods { |
| | | |
| | | |
| | | /** |
| | | * itemid : 635100550079 |
| | | * couponmoney : 0 |
| | | * itempic : http://img.alicdn.com/bao/uploaded/i1/2209041379559/O1CN016zmp0h2KU4iZCUDNo_!!2209041379559-0-C2M.jpg |
| | | * itemendprice : 0.01 |
| | | * tkrates : 1.60 |
| | | * itemtitle : 桌布防水防烫防油免洗PVC塑料餐桌垫书桌ins学生布艺台布北欧茶几 |
| | | * itemprice : 2.60 |
| | | * user_type : 3 |
| | | * taobao_image : https://img.alicdn.com/i4/3937219703/O1CN01HZ1yHV2LY1bLT1RO2_!!3937219703.jpg,https://img.alicdn.com/i4/3937219703/O1CN01bTXQKw2LY1bE9Oqmx_!!3937219703.jpg,https://img.alicdn.com/i4/3937219703/O1CN01J1WZ932LY1bJ01s5O_!!3937219703.jpg,https://img.alicdn.com/i1/3937219703/O1CN01n3a9ic2LY1bKQXusm_!!3937219703.jpg |
| | | * category_id : 121458013 |
| | | * couponinfo : 0.00 |
| | | * couponendtime : |
| | | * couponstarttime : |
| | | * itemshorttitle : 防水防烫防油免洗pvc塑料书桌台布 |
| | | * shopname : 淘宝特价版直营店 |
| | | * itemdesc : |
| | | * seller_id : 2209041379559 |
| | | * coupon_share_url : null |
| | | * commission_rate : 1.60 |
| | | * zk_final_price : 1.00 |
| | | * itemsale : 10万+ |
| | | * volume : 3978 |
| | | * tkmoney : 0.01 |
| | | * shoptype : C |
| | | */ |
| | | |
| | | private String itemid; |
| | | private BigDecimal couponmoney; |
| | | private String itempic; |
| | | private String itemendprice; |
| | | private BigDecimal tkrates; |
| | | private String itemtitle; |
| | | private String itemprice; |
| | | private Integer user_type;//店铺信息-卖家类型,0表示集市,1表示商城 |
| | | private String taobao_image; |
| | | private String category_id; |
| | | private String couponinfo; |
| | | private String couponendtime; |
| | | private String couponstarttime; |
| | | private String itemshorttitle; |
| | | private String shopname; |
| | | private String itemdesc; |
| | | private String seller_id; |
| | | private String coupon_share_url; |
| | | private String commission_rate; |
| | | private BigDecimal zk_final_price; |
| | | private String itemsale; |
| | | private String volume; |
| | | private BigDecimal tkmoney; |
| | | private String shoptype;//B天猫、C淘宝 |
| | | |
| | | public String getItemid() { |
| | | return itemid; |
| | | } |
| | | |
| | | public void setItemid(String itemid) { |
| | | this.itemid = itemid; |
| | | } |
| | | |
| | | public BigDecimal getCouponmoney() { |
| | | return couponmoney; |
| | | } |
| | | |
| | | public void setCouponmoney(BigDecimal couponmoney) { |
| | | this.couponmoney = couponmoney; |
| | | } |
| | | |
| | | public String getItempic() { |
| | | return itempic; |
| | | } |
| | | |
| | | public void setItempic(String itempic) { |
| | | this.itempic = itempic; |
| | | } |
| | | |
| | | public String getItemendprice() { |
| | | return itemendprice; |
| | | } |
| | | |
| | | public void setItemendprice(String itemendprice) { |
| | | this.itemendprice = itemendprice; |
| | | } |
| | | |
| | | public BigDecimal getTkrates() { |
| | | return tkrates; |
| | | } |
| | | |
| | | public void setTkrates(BigDecimal tkrates) { |
| | | this.tkrates = tkrates; |
| | | } |
| | | |
| | | public String getItemtitle() { |
| | | return itemtitle; |
| | | } |
| | | |
| | | public void setItemtitle(String itemtitle) { |
| | | this.itemtitle = itemtitle; |
| | | } |
| | | |
| | | public String getItemprice() { |
| | | return itemprice; |
| | | } |
| | | |
| | | public void setItemprice(String itemprice) { |
| | | this.itemprice = itemprice; |
| | | } |
| | | |
| | | public Integer getUser_type() { |
| | | return user_type; |
| | | } |
| | | |
| | | public void setUser_type(Integer user_type) { |
| | | this.user_type = user_type; |
| | | } |
| | | |
| | | public String getTaobao_image() { |
| | | return taobao_image; |
| | | } |
| | | |
| | | public void setTaobao_image(String taobao_image) { |
| | | this.taobao_image = taobao_image; |
| | | } |
| | | |
| | | public String getCategory_id() { |
| | | return category_id; |
| | | } |
| | | |
| | | public void setCategory_id(String category_id) { |
| | | this.category_id = category_id; |
| | | } |
| | | |
| | | public String getCouponinfo() { |
| | | return couponinfo; |
| | | } |
| | | |
| | | public void setCouponinfo(String couponinfo) { |
| | | this.couponinfo = couponinfo; |
| | | } |
| | | |
| | | public String getCouponendtime() { |
| | | return couponendtime; |
| | | } |
| | | |
| | | public void setCouponendtime(String couponendtime) { |
| | | this.couponendtime = couponendtime; |
| | | } |
| | | |
| | | public String getCouponstarttime() { |
| | | return couponstarttime; |
| | | } |
| | | |
| | | public void setCouponstarttime(String couponstarttime) { |
| | | this.couponstarttime = couponstarttime; |
| | | } |
| | | |
| | | public String getItemshorttitle() { |
| | | return itemshorttitle; |
| | | } |
| | | |
| | | public void setItemshorttitle(String itemshorttitle) { |
| | | this.itemshorttitle = itemshorttitle; |
| | | } |
| | | |
| | | public String getShopname() { |
| | | return shopname; |
| | | } |
| | | |
| | | public void setShopname(String shopname) { |
| | | this.shopname = shopname; |
| | | } |
| | | |
| | | public String getItemdesc() { |
| | | return itemdesc; |
| | | } |
| | | |
| | | public void setItemdesc(String itemdesc) { |
| | | this.itemdesc = itemdesc; |
| | | } |
| | | |
| | | public String getSeller_id() { |
| | | return seller_id; |
| | | } |
| | | |
| | | public void setSeller_id(String seller_id) { |
| | | this.seller_id = seller_id; |
| | | } |
| | | |
| | | public String getCoupon_share_url() { |
| | | return coupon_share_url; |
| | | } |
| | | |
| | | public void setCoupon_share_url(String coupon_share_url) { |
| | | this.coupon_share_url = coupon_share_url; |
| | | } |
| | | |
| | | public String getCommission_rate() { |
| | | return commission_rate; |
| | | } |
| | | |
| | | public void setCommission_rate(String commission_rate) { |
| | | this.commission_rate = commission_rate; |
| | | } |
| | | |
| | | public BigDecimal getZk_final_price() { |
| | | return zk_final_price; |
| | | } |
| | | |
| | | public void setZk_final_price(BigDecimal zk_final_price) { |
| | | this.zk_final_price = zk_final_price; |
| | | } |
| | | |
| | | public String getItemsale() { |
| | | return itemsale; |
| | | } |
| | | |
| | | public void setItemsale(String itemsale) { |
| | | this.itemsale = itemsale; |
| | | } |
| | | |
| | | public String getVolume() { |
| | | return volume; |
| | | } |
| | | |
| | | public void setVolume(String volume) { |
| | | this.volume = volume; |
| | | } |
| | | |
| | | public BigDecimal getTkmoney() { |
| | | return tkmoney; |
| | | } |
| | | |
| | | public void setTkmoney(BigDecimal tkmoney) { |
| | | this.tkmoney = tkmoney; |
| | | } |
| | | |
| | | public String getShoptype() { |
| | | return shoptype; |
| | | } |
| | | |
| | | public void setShoptype(String shoptype) { |
| | | this.shoptype = shoptype; |
| | | } |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | public class HaoDanKuListResult { |
| | | private List resultList; |
| | | public class HaoDanKuListResult<T> { |
| | | private List<T> resultList; |
| | | private Integer minId; |
| | | |
| | | public HaoDanKuListResult(List resultList, Integer minId) { |
| | | public HaoDanKuListResult(List<T> resultList, Integer minId) { |
| | | this.resultList = resultList; |
| | | this.minId = minId; |
| | | } |
| | | |
| | | public List getResultList() { |
| | | public List<T> getResultList() { |
| | | return resultList; |
| | | } |
| | | |
| | | public void setResultList(List resultList) { |
| | | public void setResultList(List<T> resultList) { |
| | | this.resultList = resultList; |
| | | } |
| | | |
| | |
| | | @Document(collection = "haoDanKuGoods") |
| | | public class HDKGoodsDetail { |
| | | @Id |
| | | private Integer product_id;// 自增ID |
| | | private String product_id;// 自增ID |
| | | |
| | | @Field |
| | | @Indexed |
| | | private Long itemid;// 宝贝ID |
| | |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | public Integer getProduct_id() { |
| | | public String getProduct_id() { |
| | | return product_id; |
| | | } |
| | | |
| | | public void setProduct_id(Integer product_id) { |
| | | public void setProduct_id(String product_id) { |
| | | this.product_id = product_id; |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | getHotSearch(); |
| | | DaTaoKeResult result = DaTaoKeApiUtil.listTipOff(4, null, 50); |
| | | System.out.println(result); |
| | | } |
| | | } |
| | |
| | | |
| | | import java.io.IOException; |
| | | import java.lang.reflect.Type; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | Integer newMinId = resultData.optInt("min_id"); |
| | | Type type = new TypeToken<ArrayList<HDKGoodsDetail>>() { |
| | | }.getType(); |
| | | List<HDKGoodsDetail> list = new Gson().fromJson(resultData.optJSONArray("data").toString(), type); |
| | | List<HDKGoodsDetail> list = null; |
| | | try { |
| | | list = new Gson().fromJson(resultData.optJSONArray("data").toString(), type); |
| | | } catch (Exception e) { |
| | | list = new ArrayList<>(); |
| | | JSONArray array = resultData.optJSONArray("data"); |
| | | for (int i = 0; i < array.size(); i++) { |
| | | JSONObject item = array.optJSONObject(i); |
| | | Object desc = item.opt("itemdesc"); |
| | | if (!(desc instanceof String)) { |
| | | item.put("itemdesc", ""); |
| | | } |
| | | list.add(new Gson().fromJson(item.toString(), HDKGoodsDetail.class)); |
| | | } |
| | | |
| | | |
| | | } |
| | | return new HDKGoodsListResultDTO(list, newMinId); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @return void |
| | | * @author hxh |
| | | * @description 获取淘特商品列表 |
| | | * @date 10:37 2021/12/13 |
| | | * @param: type 商品类型:默认1全量商品、2定向商品、3精选榜单、4品牌补贴、5工厂直供 |
| | | * @param: sort 排序:0综合排序、1券后价倒序、2佣金比倒序、3券后价升序 |
| | | * @param: startPrice 到手价筛选:起始价 |
| | | * @param: endPrice 到手价筛选:结束价 |
| | | * @param: startRate 佣金比率筛选:起始价 |
| | | * @param: minId |
| | | **/ |
| | | public HaoDanKuListResult getTaoTeGoodsList(Integer type, Integer sort, BigDecimal startPrice, BigDecimal endPrice, BigDecimal startRate, Integer minId) { |
| | | |
| | | List<ParamsKeyValue> params = new ArrayList<>(); |
| | | params.add(new ParamsKeyValue("sale_type", 1 + "")); |
| | | if (type != null) |
| | | params.add(new ParamsKeyValue("type", type + "")); |
| | | if (sort != null) |
| | | params.add(new ParamsKeyValue("sort", sort + "")); |
| | | if (startPrice != null) |
| | | params.add(new ParamsKeyValue("start_price", startPrice + "")); |
| | | if (endPrice != null) |
| | | params.add(new ParamsKeyValue("end_price", endPrice + "")); |
| | | if (startRate != null) |
| | | params.add(new ParamsKeyValue("start_rate", startRate + "")); |
| | | if (minId != null) |
| | | params.add(new ParamsKeyValue("min_id", minId + "")); |
| | | String result = baseGetRequest("taote_item_list", params); |
| | | System.out.println(result); |
| | | JSONObject resultJSON = JSONObject.fromObject(result); |
| | | if (resultJSON.optInt("code") == 200) { |
| | | Type gsonType = new TypeToken<List<HDKTaoteGoods>>() { |
| | | }.getType(); |
| | | List<HDKTaoteGoods> list = new Gson().fromJson(resultJSON.optJSONArray("data").toString(), gsonType); |
| | | int min_id = resultJSON.optInt("min_id"); |
| | | HaoDanKuListResult listResult = new HaoDanKuListResult<>(list, min_id); |
| | | return listResult; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | public class NullStringToEmptyAdapterFactory<T> implements TypeAdapterFactory { |
| | | @SuppressWarnings("unchecked") |
| | | public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { |
| | |
| | | } |
| | | return reader.nextString(); |
| | | } |
| | | |
| | | @Override |
| | | public void write(JsonWriter writer, String value) throws IOException { |
| | | if (value == null) { |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | HaoDanKuListResult result = HaoDanKuApiUtil.getInstance().getTBHotGoods(null, null); |
| | | System.out.println(result); |
| | | HaoDanKuApiUtil.getInstance().getTaoTeGoodsList(1, null, null, null, null, null); |
| | | } |
| | | } |
| | |
| | | |
| | | AdminUser admin = (AdminUser) request.getSession().getAttribute(Constant.SESSION_ADMIN); |
| | | |
| | | if(Constant.IS_TEST){ |
| | | admin=new AdminUser(); |
| | | admin.setId(1L); |
| | | admin.setName("Ceshi"); |
| | | admin.setAccount("ceshi"); |
| | | } |
| | | |
| | | |
| | | if (admin == null) { |
| | | |
| | | |
| | | String from = request.getParameter("from"); |
| | | // 邮件H5来源的不判断是否登录 |
| | | if ("emailh5".equalsIgnoreCase(from)) { |
| | |
| | | import com.yeshi.fanli.util.RedisManager; |
| | | import com.yeshi.fanli.util.StringUtil; |
| | | import com.yeshi.fanli.util.db.MongoDBManager; |
| | | import com.yeshi.fanli.util.email.MailSenderUtil; |
| | | import com.yeshi.fanli.util.push.OPPOPushUtil; |
| | | import com.yeshi.fanli.util.taobao.TaoKeApiUtil; |
| | | import com.yeshi.goods.facade.entity.taobao.TaoBaoCouponCache; |
| | |
| | | taoBaoCouponCacheService.save(cache); |
| | | } |
| | | |
| | | @RequestMapping("email") |
| | | public void testEmail(PrintWriter out) { |
| | | MailSenderUtil.sendEmail("1101184511@qq.com", "kuaisheng110@163.com", "CMZASWUPTJSFXCNP", "测试", "测试内容:" + System.currentTimeMillis()); |
| | | out.print("success"); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import com.google.gson.*; |
| | | import com.yeshi.common.entity.PageEntity; |
| | | import com.yeshi.fanli.dao.mybatis.HongBaoV2Mapper; |
| | | import com.yeshi.fanli.dao.mybatis.order.CommonOrderMapper; |
| | | import com.yeshi.fanli.dao.mybatis.order.HongBaoOrderMapper; |
| | | import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoOrderMapper; |
| | | import com.yeshi.fanli.dao.taobao.TaoBaoOrderBackUpDao; |
| | | import com.yeshi.fanli.entity.accept.AdminAcceptData; |
| | | import com.yeshi.fanli.entity.bus.user.HongBaoV2; |
| | | import com.yeshi.fanli.entity.order.CommonOrder; |
| | | import com.yeshi.fanli.entity.order.HongBaoOrder; |
| | | import com.yeshi.fanli.entity.taobao.TaoBaoOrder; |
| | | import com.yeshi.fanli.entity.taobao.TaoBaoOrderBackUp; |
| | | import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanOrder; |
| | |
| | | import com.yeshi.fanli.service.inter.order.OrderProcessService; |
| | | import com.yeshi.fanli.service.inter.order.tb.TaoBaoOrderService; |
| | | import com.yeshi.fanli.service.inter.order.tb.TaoBaoWeiQuanOrderService; |
| | | import com.yeshi.fanli.util.BeanUtil; |
| | | import com.yeshi.fanli.util.Constant; |
| | | import com.yeshi.fanli.util.StringUtil; |
| | | import com.yeshi.fanli.util.ThreadUtil; |
| | |
| | | import java.io.IOException; |
| | | import java.io.PrintWriter; |
| | | import java.lang.reflect.Type; |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | |
| | | @Controller |
| | |
| | | |
| | | @Resource |
| | | private TaoBaoOrderUpdateJob taoBaoOrderUpdateJob; |
| | | |
| | | |
| | | @Resource |
| | | private CommonOrderMapper commonOrderMapper; |
| | | @Resource |
| | | private HongBaoOrderMapper hongBaoOrderMapper; |
| | | @Resource |
| | | private HongBaoV2Mapper hongBaoV2Mapper; |
| | | |
| | | /** |
| | | * 查询列表 - 新后台 |
| | |
| | | }); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * @return void |
| | | * @author hxh |
| | | * @description 违规订单处理 |
| | | * @date 15:06 2021/10/23 |
| | | * @param: acceptData |
| | | * @param: content |
| | | * @param: out |
| | | **/ |
| | | @RequestMapping(value = "weiGui") |
| | | public void weiGuiOrder(AdminAcceptData acceptData, String content, String callback, PrintWriter out) { |
| | | |
| | | if (StringUtil.isNullOrEmpty(content)) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请上传订单号")); |
| | | return; |
| | | } |
| | | |
| | | List<String> orderIdList = new ArrayList<>(); |
| | | Scanner scanner = new Scanner(content); |
| | | while (scanner.hasNextLine()) { |
| | | String line = scanner.nextLine(); |
| | | if (!StringUtil.isNullOrEmpty(line)) |
| | | orderIdList.add(line.trim()); |
| | | } |
| | | scanner.close(); |
| | | |
| | | if (orderIdList.size() == 0) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请上传订单号")); |
| | | return; |
| | | } |
| | | |
| | | BigDecimal fanliMoney = new BigDecimal(0); |
| | | BigDecimal unFanliMoney = new BigDecimal(0); |
| | | BigDecimal childFanliMoney = new BigDecimal(0); |
| | | int validCount = 0; |
| | | int inValidCount = 0; |
| | | Set<Long> uids = new HashSet<>(); |
| | | try { |
| | | for (int c = 0; c < orderIdList.size(); c++) { |
| | | String orderId = orderIdList.get(c); |
| | | List<CommonOrder> orderList = commonOrderMapper.listBySourceTypeAndOrderNo(Constant.SOURCE_TYPE_TAOBAO, |
| | | orderId); |
| | | if (orderList.size() > 0) { |
| | | validCount++; |
| | | for (CommonOrder commonOrder : orderList) { |
| | | uids.add(commonOrder.getUserInfo().getId()); |
| | | HongBaoOrder hongBaoOrder = hongBaoOrderMapper.selectByCommonOrderId(commonOrder.getId()); |
| | | if (hongBaoOrder != null) { |
| | | HongBaoV2 v2 = hongBaoOrder.getHongBaoV2(); |
| | | if (v2.getState() == 3) { |
| | | fanliMoney = fanliMoney.add(v2.getMoney()); |
| | | // 查询上级是否到账 |
| | | List<HongBaoV2> children = hongBaoV2Mapper.listChildrenById(v2.getId()); |
| | | if (children != null && children.size() > 0) { |
| | | for (HongBaoV2 hongBao : children) { |
| | | if (hongBao.getState() == HongBaoV2.STATE_BUKELINGQU |
| | | || hongBao.getState() == HongBaoV2.STATE_KELINGQU) { |
| | | HongBaoV2 updateHongBao = new HongBaoV2(hongBao.getId()); |
| | | updateHongBao.setState(HongBaoV2.STATE_SHIXIAO); |
| | | updateHongBao.setBeizhu("联盟违规"); |
| | | updateHongBao.setUpdateTime(new Date()); |
| | | hongBaoV2Mapper.updateByPrimaryKeySelective(updateHongBao); |
| | | } else {// |
| | | childFanliMoney = childFanliMoney.add(hongBao.getMoney()); |
| | | } |
| | | } |
| | | } |
| | | } else if (v2.getState() == 1 || v2.getState() == 2) { |
| | | unFanliMoney = unFanliMoney.add(v2.getMoney()); |
| | | HongBaoV2 update = new HongBaoV2(v2.getId()); |
| | | update.setState(HongBaoV2.STATE_SHIXIAO); |
| | | update.setBeizhu("联盟违规"); |
| | | update.setUpdateTime(new Date()); |
| | | hongBaoV2Mapper.updateByPrimaryKeySelective(update); |
| | | // 发现子订单 |
| | | List<HongBaoV2> children = hongBaoV2Mapper.listChildrenById(v2.getId()); |
| | | if (children != null && children.size() > 0) { |
| | | for (HongBaoV2 hongBao : children) { |
| | | HongBaoV2 updateHongBao = new HongBaoV2(hongBao.getId()); |
| | | updateHongBao.setState(HongBaoV2.STATE_SHIXIAO); |
| | | updateHongBao.setBeizhu("联盟违规"); |
| | | updateHongBao.setUpdateTime(new Date()); |
| | | hongBaoV2Mapper.updateByPrimaryKeySelective(updateHongBao); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } else |
| | | inValidCount++; |
| | | } |
| | | |
| | | System.out.println( |
| | | validCount + "-" + inValidCount + "-" + fanliMoney + "-" + unFanliMoney + "-" + childFanliMoney); |
| | | Iterator<Long> its = uids.iterator(); |
| | | while (its.hasNext()) { |
| | | System.out.println(its.next()); |
| | | } |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("处理成功")); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("处理出错:" + e.getMessage())); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | String platform = acceptData.getPlatform().toLowerCase(); |
| | | List<AppVersionInfo> versionList = appVersionService.listByPlatformAndMinVersionCode(platform, version, acceptData.getSystem()); |
| | | if (versionList == null || versionList.size() <= 0) { |
| | | //降级 |
| | | versionList = appVersionService.listByPlatformAndMaxVersionCode(platform, version, acceptData.getSystem()); |
| | | if(versionList!=null&&versionList.size()>0) { |
| | | version = versionList.get(versionList.size() - 1).getVersionCode(); |
| | | versionList = appVersionService.listByPlatformAndMinVersionCode(platform, version, acceptData.getSystem()); |
| | | } |
| | | } |
| | | if (versionList == null || versionList.size() <= 0) { |
| | | list.clear(); |
| | | } else { |
| | | List<Long> sourceIdList = new ArrayList<>(); |
| | |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "getClass") |
| | | //TODO 改进版本过高的问题 |
| | | public void getClass(String callback, AcceptData acceptData, PrintWriter out) { |
| | | if (acceptData.getSystem() == null) |
| | | acceptData.setSystem(SystemEnum.blks); |
| | |
| | | String platform = acceptData.getPlatform().toLowerCase(); |
| | | List<AppVersionInfo> versionList = appVersionService.listByPlatformAndMinVersionCode(platform, version, acceptData.getSystem()); |
| | | if (versionList == null || versionList.size() <= 0) { |
| | | //降级 |
| | | versionList = appVersionService.listByPlatformAndMaxVersionCode(platform, version, acceptData.getSystem()); |
| | | if(versionList!=null&&versionList.size()>0) { |
| | | version = versionList.get(versionList.size() - 1).getVersionCode(); |
| | | versionList = appVersionService.listByPlatformAndMinVersionCode(platform, version, acceptData.getSystem()); |
| | | } |
| | | } |
| | | |
| | | if (versionList == null || versionList.size() <= 0) { |
| | | resultList.clear(); |
| | | } else { |
| | | List<Long> sourceIdList = new ArrayList<>(); |
| | |
| | | stateInfo = "该订单申诉已通过,请稍后查看。"; |
| | | } else if (state == -5) { |
| | | stateInfo = "该订单为分享奖金订单"; |
| | | } else if (state == -1001) { |
| | | stateInfo = "该订单为违规订单"; |
| | | } else if (state == -1002) { |
| | | stateInfo = "该订单已发起维权"; |
| | | } |
| | | } |
| | | JSONObject data = new JSONObject(); |
| | |
| | | package com.yeshi.fanli.controller.client.v2; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.io.PrintWriter; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLDecoder; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | |
| | | |
| | | import com.yeshi.fanli.entity.SystemEnum; |
| | | import com.yeshi.fanli.entity.SystemPIDInfo; |
| | | import com.yeshi.fanli.entity.common.Config; |
| | | import com.yeshi.fanli.exception.goods.ConvertLinkException; |
| | | import com.yeshi.fanli.service.manger.PIDManager; |
| | | import com.yeshi.fanli.service.manger.goods.ConvertLinkManager; |
| | | import com.yeshi.fanli.util.email.MailSenderUtil; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.yeshi.utils.HttpUtil; |
| | | import org.yeshi.utils.JsonUtil; |
| | | import org.yeshi.utils.TimeUtil; |
| | | import org.yeshi.utils.encrypt.DESUtil; |
| | | import org.yeshi.utils.entity.FileUploadResult; |
| | | import org.yeshi.utils.tencentcloud.COSManager; |
| | |
| | | data.put("link", configService.getValue(ConfigKeyEnum.accountLogoutProtocolLink.getKey(), acceptData.getSystem())); |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data)); |
| | | } |
| | | |
| | | /** |
| | | * @return void |
| | | * @author hxh |
| | | * @description 隐私投诉 |
| | | * @date 17:51 2021/10/18 |
| | | * @param: acceptData |
| | | * @param: content |
| | | * @param: images |
| | | * @param: out |
| | | **/ |
| | | @RequestMapping(value = "reportPrivacy") |
| | | public void reportPrivacy(AcceptData acceptData, String content, MultipartFile[] images, PrintWriter out) { |
| | | String urlList = ""; |
| | | if (images != null && images.length > 0) |
| | | for (MultipartFile f : images) { |
| | | try { |
| | | String name = TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyyMMddHHmmssSSS") + "_" + ((int) (Math.random() * 100000)) + ".jpg"; |
| | | FileUploadResult result = COSManager.getInstance().uploadFile(f.getInputStream(), "privacy/report/" + name); |
| | | if (result != null) |
| | | urlList += result.getUrl() + " , "; |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | String title = null; |
| | | try { |
| | | title = "隐私投诉:" + URLDecoder.decode(content, "UTF-8"); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | StringBuffer buffer = new StringBuffer(); |
| | | buffer.append("包名:" + acceptData.getPackages()); |
| | | buffer.append("\n\r"); |
| | | buffer.append("UTDID:" + acceptData.getUtdid()); |
| | | buffer.append("\n\r"); |
| | | buffer.append("DEVICE:" + acceptData.getDevice()); |
| | | buffer.append("\n\r"); |
| | | buffer.append("投诉内容:"); |
| | | buffer.append(content); |
| | | buffer.append("\n\r"); |
| | | buffer.append("提供的截图为:" + urlList); |
| | | |
| | | Config config = configService.getConfig(ConfigKeyEnum.extractCodeEmailFrom.getKey(), acceptData.getSystem()); |
| | | String[] sts = config.getValue().split(","); |
| | | String account = sts[0]; |
| | | String pwd = sts[1]; |
| | | MailSenderUtil.sendEmail("help@banliapp.com", account, pwd, title, buffer.toString()); |
| | | out.print(JsonUtil.loadTrueResult("")); |
| | | } |
| | | } |
| | |
| | | try { |
| | | TaoKeOfficialActivityConvertResultDTO dto = null; |
| | | try { |
| | | dto = convertLinkManager.taobaoOfficialActivityConvert(uid, "mm_124933865_56750082_19507100253", "20150318020005224", info.getRelationId(), false); |
| | | dto = convertLinkManager.taobaoOfficialActivityConvert(uid, "mm_124933865_56750082_19507100253", "20150318020008790", info.getRelationId(), false); |
| | | } catch (ConvertLinkException e) { |
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult(e.getCode(), e.getMessage()))); |
| | | return; |
| | |
| | | String link = dto.getClick_url(); |
| | | |
| | | if (!StringUtil.isNullOrEmpty(link)) { |
| | | token = TaoKeApiUtil.getTKToken("http://img.flqapp.com/resource/s11/banner.jpg", "【天猫双12】上亿红包等你来拆!", |
| | | token = TaoKeApiUtil.getTKToken("http://img.flqapp.com/resource/s11/banner.jpg", "【年货节】上亿红包等你来拆!", |
| | | link); |
| | | if (!StringUtil.isNullOrEmpty(token)) |
| | | redisManager.cacheCommonString(key, token, 60 * 60 * 24);// 缓存1天 |
| | |
| | | TaoKeOfficialActivityConvertResultDTO dto = null; |
| | | try { |
| | | dto = convertLinkManager.taobaoOfficialActivityConvert(uid, "mm_124933865_56750082_19507100253", |
| | | "20150318020005224", info.getRelationId(), true); |
| | | "20150318020008790", info.getRelationId(), true); |
| | | } catch (ConvertLinkException e) { |
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult(e.getCode(), e.getMessage()))); |
| | | return; |
| | |
| | | |
| | | public void updateSelective(HDKGoodsDetail goods) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("product_id").is(goods.getProduct_id())); |
| | | query.addCriteria(Criteria.where("_id").is(goods.getProduct_id())); |
| | | |
| | | Update update = new Update(); |
| | | if (goods.getItemsale() != null) |
| | |
| | | */ |
| | | TeamDividentsSourceUser selectBySourceUidAndDayAndUid(@Param("sourceUid") Long sourceUid, |
| | | @Param("targetUid") Long targetUid, @Param("day") String day); |
| | | |
| | | TeamDividentsSourceUser selectBySourceUidAndDayAndUidAndTypeForUpdate(@Param("sourceUid") Long sourceUid, |
| | | @Param("targetUid") Long targetUid, @Param("day") String day,@Param("type") int type); |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.dto.taobao; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author hxh |
| | | * @title: ListResult |
| | | * @description: 列表结果 |
| | | * @date 2021/11/25 17:28 |
| | | */ |
| | | public class TaoKeListResult<T> { |
| | | private List<T> data; |
| | | private int totalCount; |
| | | |
| | | |
| | | public TaoKeListResult(List<T> data, int totalCount) { |
| | | this.data = data; |
| | | this.totalCount = totalCount; |
| | | } |
| | | |
| | | public List<T> getData() { |
| | | return data; |
| | | } |
| | | |
| | | public void setData(List<T> data) { |
| | | this.data = data; |
| | | } |
| | | |
| | | public int getTotalCount() { |
| | | return totalCount; |
| | | } |
| | | |
| | | public void setTotalCount(int totalCount) { |
| | | this.totalCount = totalCount; |
| | | } |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.dto.taobao.koubei; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author hxh |
| | | * @title: KouBeiGoodsDTO |
| | | * @description: 口碑商品 |
| | | * @date 2021/11/25 17:51 |
| | | */ |
| | | public class KouBeiGoodsDTO { |
| | | |
| | | |
| | | /** |
| | | * apply_shop_num : 1 |
| | | * commission : 24.00 |
| | | * discount : 0.028591953 |
| | | * image_url : https://img.alicdn.com/i4/2212708618441/O1CN01s2e1Fk2CE1uS6QfnL_!!2212708618441-0-koubei.jpg |
| | | * item_id : 660118081713 |
| | | * item_sale_end_time : 1644681599 |
| | | * item_sale_start_time : 1636646400 |
| | | * original_price : 696.0 |
| | | * price : 19.9 |
| | | * stock : 20 |
| | | * title : 多国留学规划咨询 |
| | | * valid_cities : {"string":["成都"]} |
| | | * wx_app_id : wx7d26a9e29d2a69c7 |
| | | * wx_path : ad-bdlm/pages/guide/index?scene=1f6ee87254fd4526af0eb098979684c2 |
| | | */ |
| | | |
| | | private Integer apply_shop_num;//商品可适用门店数量 |
| | | private String commission;//预估佣金,单位元 |
| | | private BigDecimal discount;//折扣 |
| | | private String image_url;//商品图片 |
| | | private Long item_id;//商品标题 |
| | | private Long item_sale_end_time;//商品可售卖结束时间 |
| | | private Long item_sale_start_time;//商品可售卖开始时间 |
| | | private String original_price;//原始价格,单位元 |
| | | private String price;//售卖价格,折扣后价格 |
| | | private Integer stock;//库存 |
| | | private String title;//商品标题 |
| | | private ValidCitiesBean valid_cities;//可使用城市列表 |
| | | private String wx_app_id;//口碑微信小程序appId |
| | | private String wx_path;//点击商品后,微信小程序的承接页 |
| | | |
| | | public Integer getApply_shop_num() { |
| | | return apply_shop_num; |
| | | } |
| | | |
| | | public void setApply_shop_num(Integer apply_shop_num) { |
| | | this.apply_shop_num = apply_shop_num; |
| | | } |
| | | |
| | | public String getCommission() { |
| | | return commission; |
| | | } |
| | | |
| | | public void setCommission(String commission) { |
| | | this.commission = commission; |
| | | } |
| | | |
| | | public BigDecimal getDiscount() { |
| | | return discount; |
| | | } |
| | | |
| | | public void setDiscount(BigDecimal discount) { |
| | | this.discount = discount; |
| | | } |
| | | |
| | | public String getImage_url() { |
| | | return image_url; |
| | | } |
| | | |
| | | public void setImage_url(String image_url) { |
| | | this.image_url = image_url; |
| | | } |
| | | |
| | | public Long getItem_id() { |
| | | return item_id; |
| | | } |
| | | |
| | | public void setItem_id(Long item_id) { |
| | | this.item_id = item_id; |
| | | } |
| | | |
| | | public Long getItem_sale_end_time() { |
| | | return item_sale_end_time; |
| | | } |
| | | |
| | | public void setItem_sale_end_time(Long item_sale_end_time) { |
| | | this.item_sale_end_time = item_sale_end_time; |
| | | } |
| | | |
| | | public Long getItem_sale_start_time() { |
| | | return item_sale_start_time; |
| | | } |
| | | |
| | | public void setItem_sale_start_time(Long item_sale_start_time) { |
| | | this.item_sale_start_time = item_sale_start_time; |
| | | } |
| | | |
| | | public String getOriginal_price() { |
| | | return original_price; |
| | | } |
| | | |
| | | public void setOriginal_price(String original_price) { |
| | | this.original_price = original_price; |
| | | } |
| | | |
| | | public String getPrice() { |
| | | return price; |
| | | } |
| | | |
| | | public void setPrice(String price) { |
| | | this.price = price; |
| | | } |
| | | |
| | | public Integer getStock() { |
| | | return stock; |
| | | } |
| | | |
| | | public void setStock(Integer stock) { |
| | | this.stock = stock; |
| | | } |
| | | |
| | | public String getTitle() { |
| | | return title; |
| | | } |
| | | |
| | | public void setTitle(String title) { |
| | | this.title = title; |
| | | } |
| | | |
| | | public ValidCitiesBean getValid_cities() { |
| | | return valid_cities; |
| | | } |
| | | |
| | | public void setValid_cities(ValidCitiesBean valid_cities) { |
| | | this.valid_cities = valid_cities; |
| | | } |
| | | |
| | | public String getWx_app_id() { |
| | | return wx_app_id; |
| | | } |
| | | |
| | | public void setWx_app_id(String wx_app_id) { |
| | | this.wx_app_id = wx_app_id; |
| | | } |
| | | |
| | | public String getWx_path() { |
| | | return wx_path; |
| | | } |
| | | |
| | | public void setWx_path(String wx_path) { |
| | | this.wx_path = wx_path; |
| | | } |
| | | |
| | | public static class ValidCitiesBean { |
| | | private List<String> string; |
| | | |
| | | public List<String> getString() { |
| | | return string; |
| | | } |
| | | |
| | | public void setString(List<String> string) { |
| | | this.string = string; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.dto.taobao.koubei; |
| | | |
| | | import scala.Int; |
| | | |
| | | /** |
| | | * @author hxh |
| | | * @title: KouBeiOrderDTO |
| | | * @description: TODO |
| | | * @date 2021/11/25 17:20 |
| | | */ |
| | | public class KouBeiOrderDTO { |
| | | |
| | | |
| | | /** |
| | | * title : 商品标题 |
| | | * pic_url : https://xxx |
| | | * shop_name : xxx店 |
| | | * pay_amount : 30.00 |
| | | * settle_amount : 28.00 |
| | | * pay_time : 2021-09-01 10:00:00 |
| | | * receive_time : 2021-09-01 10:00:00 |
| | | * settle_time : 2021-09-01 11:00:00 |
| | | * order_state : 1 |
| | | * settle_state : 1 |
| | | * settle : 10.00 |
| | | * service : 8.00 |
| | | * biz_order_id : 123456789 |
| | | * parent_order_id : 123456789 |
| | | * trace_time : 2021-09-01 11:00:00 |
| | | * item_id : 123456789 |
| | | * product_num : 1 |
| | | * unit_price : 1 |
| | | * subsidy_fee : 2.00 |
| | | * award_fee : 2.00 |
| | | * platform_commission_rate : 0.2 |
| | | * platform_commission_fee : 2 |
| | | * media_id : 123456789 |
| | | * media_name : 媒体名称 |
| | | * ad_zone_id : 123 |
| | | * ad_zone_name : 微信渠道 |
| | | * category_name : xxxx |
| | | * tk_create_time : 2021-09-01 11:00:00 |
| | | * income : 2.0 |
| | | */ |
| | | |
| | | private String title; //商品标题 |
| | | private String pic_url;//商品图片url |
| | | private String shop_name;//店铺名称 |
| | | private String pay_amount;//付款金额 |
| | | private String settle_amount;//结算金额 |
| | | private String pay_time;//订单付款时间 |
| | | private String receive_time;//收货时间 |
| | | private String settle_time;//订单结算时间 |
| | | private Integer order_state;//订单状态,0-已失效 1-已下单 2-已付款 4-已收货 |
| | | private Integer settle_state;//结算状态,1.已结算 2.未结算 |
| | | private String settle;//结算预估收入 |
| | | private String service;//技术服务费 |
| | | private String biz_order_id;//淘宝子单号 |
| | | private String parent_order_id;//淘宝主单号 |
| | | private String trace_time;//点击时间 |
| | | private Long item_id;// 商品id |
| | | private Integer product_num;//商品数量 |
| | | private String unit_price;//商品单价 |
| | | private String subsidy_fee;//联盟补贴金额 |
| | | private String award_fee;//激励金额(第二阶段分佣金额) |
| | | private String platform_commission_rate;//技术服务费率 |
| | | private String platform_commission_fee;//技术服务费 |
| | | private Integer media_id;//媒体id |
| | | private String media_name;//媒体名称 |
| | | private Long ad_zone_id;//推广位id |
| | | private String ad_zone_name;//推广位名称 |
| | | private String category_name;//类目名称 |
| | | private String tk_create_time;//创建时间 |
| | | private String income;//预估收入 |
| | | |
| | | public String getTitle() { |
| | | return title; |
| | | } |
| | | |
| | | public void setTitle(String title) { |
| | | this.title = title; |
| | | } |
| | | |
| | | public String getPic_url() { |
| | | return pic_url; |
| | | } |
| | | |
| | | public void setPic_url(String pic_url) { |
| | | this.pic_url = pic_url; |
| | | } |
| | | |
| | | public String getShop_name() { |
| | | return shop_name; |
| | | } |
| | | |
| | | public void setShop_name(String shop_name) { |
| | | this.shop_name = shop_name; |
| | | } |
| | | |
| | | public String getPay_amount() { |
| | | return pay_amount; |
| | | } |
| | | |
| | | public void setPay_amount(String pay_amount) { |
| | | this.pay_amount = pay_amount; |
| | | } |
| | | |
| | | public String getSettle_amount() { |
| | | return settle_amount; |
| | | } |
| | | |
| | | public void setSettle_amount(String settle_amount) { |
| | | this.settle_amount = settle_amount; |
| | | } |
| | | |
| | | public String getPay_time() { |
| | | return pay_time; |
| | | } |
| | | |
| | | public void setPay_time(String pay_time) { |
| | | this.pay_time = pay_time; |
| | | } |
| | | |
| | | public String getReceive_time() { |
| | | return receive_time; |
| | | } |
| | | |
| | | public void setReceive_time(String receive_time) { |
| | | this.receive_time = receive_time; |
| | | } |
| | | |
| | | public String getSettle_time() { |
| | | return settle_time; |
| | | } |
| | | |
| | | public void setSettle_time(String settle_time) { |
| | | this.settle_time = settle_time; |
| | | } |
| | | |
| | | public Integer getOrder_state() { |
| | | return order_state; |
| | | } |
| | | |
| | | public void setOrder_state(Integer order_state) { |
| | | this.order_state = order_state; |
| | | } |
| | | |
| | | public Integer getSettle_state() { |
| | | return settle_state; |
| | | } |
| | | |
| | | public void setSettle_state(Integer settle_state) { |
| | | this.settle_state = settle_state; |
| | | } |
| | | |
| | | public String getSettle() { |
| | | return settle; |
| | | } |
| | | |
| | | public void setSettle(String settle) { |
| | | this.settle = settle; |
| | | } |
| | | |
| | | public String getService() { |
| | | return service; |
| | | } |
| | | |
| | | public void setService(String service) { |
| | | this.service = service; |
| | | } |
| | | |
| | | public String getBiz_order_id() { |
| | | return biz_order_id; |
| | | } |
| | | |
| | | public void setBiz_order_id(String biz_order_id) { |
| | | this.biz_order_id = biz_order_id; |
| | | } |
| | | |
| | | public String getParent_order_id() { |
| | | return parent_order_id; |
| | | } |
| | | |
| | | public void setParent_order_id(String parent_order_id) { |
| | | this.parent_order_id = parent_order_id; |
| | | } |
| | | |
| | | public String getTrace_time() { |
| | | return trace_time; |
| | | } |
| | | |
| | | public void setTrace_time(String trace_time) { |
| | | this.trace_time = trace_time; |
| | | } |
| | | |
| | | public Long getItem_id() { |
| | | return item_id; |
| | | } |
| | | |
| | | public void setItem_id(Long item_id) { |
| | | this.item_id = item_id; |
| | | } |
| | | |
| | | public Integer getProduct_num() { |
| | | return product_num; |
| | | } |
| | | |
| | | public void setProduct_num(Integer product_num) { |
| | | this.product_num = product_num; |
| | | } |
| | | |
| | | public String getUnit_price() { |
| | | return unit_price; |
| | | } |
| | | |
| | | public void setUnit_price(String unit_price) { |
| | | this.unit_price = unit_price; |
| | | } |
| | | |
| | | public String getSubsidy_fee() { |
| | | return subsidy_fee; |
| | | } |
| | | |
| | | public void setSubsidy_fee(String subsidy_fee) { |
| | | this.subsidy_fee = subsidy_fee; |
| | | } |
| | | |
| | | public String getAward_fee() { |
| | | return award_fee; |
| | | } |
| | | |
| | | public void setAward_fee(String award_fee) { |
| | | this.award_fee = award_fee; |
| | | } |
| | | |
| | | public String getPlatform_commission_rate() { |
| | | return platform_commission_rate; |
| | | } |
| | | |
| | | public void setPlatform_commission_rate(String platform_commission_rate) { |
| | | this.platform_commission_rate = platform_commission_rate; |
| | | } |
| | | |
| | | public String getPlatform_commission_fee() { |
| | | return platform_commission_fee; |
| | | } |
| | | |
| | | public void setPlatform_commission_fee(String platform_commission_fee) { |
| | | this.platform_commission_fee = platform_commission_fee; |
| | | } |
| | | |
| | | public Integer getMedia_id() { |
| | | return media_id; |
| | | } |
| | | |
| | | public void setMedia_id(Integer media_id) { |
| | | this.media_id = media_id; |
| | | } |
| | | |
| | | public String getMedia_name() { |
| | | return media_name; |
| | | } |
| | | |
| | | public void setMedia_name(String media_name) { |
| | | this.media_name = media_name; |
| | | } |
| | | |
| | | public Long getAd_zone_id() { |
| | | return ad_zone_id; |
| | | } |
| | | |
| | | public void setAd_zone_id(Long ad_zone_id) { |
| | | this.ad_zone_id = ad_zone_id; |
| | | } |
| | | |
| | | public String getAd_zone_name() { |
| | | return ad_zone_name; |
| | | } |
| | | |
| | | public void setAd_zone_name(String ad_zone_name) { |
| | | this.ad_zone_name = ad_zone_name; |
| | | } |
| | | |
| | | public String getCategory_name() { |
| | | return category_name; |
| | | } |
| | | |
| | | public void setCategory_name(String category_name) { |
| | | this.category_name = category_name; |
| | | } |
| | | |
| | | public String getTk_create_time() { |
| | | return tk_create_time; |
| | | } |
| | | |
| | | public void setTk_create_time(String tk_create_time) { |
| | | this.tk_create_time = tk_create_time; |
| | | } |
| | | |
| | | public String getIncome() { |
| | | return income; |
| | | } |
| | | |
| | | public void setIncome(String income) { |
| | | this.income = income; |
| | | } |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.dto.taobao.koubei; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author hxh |
| | | * @title: KouBeiOrderFilter |
| | | * @description: 口碑订单查询条件 |
| | | * @date 2021/11/25 17:36 |
| | | */ |
| | | public class KouBeiOrderFilter { |
| | | //付款时间 |
| | | public final static int DATE_TYPE_PAY_TIME=1; |
| | | //创建时间 |
| | | public final static int DATE_TYPE_CREATE_TIME=2; |
| | | //结算时间 |
| | | public final static int DATE_TYPE_SETTLE_TIME=3; |
| | | |
| | | //已结算 |
| | | public final static int SETTLE_STATE_SETTLED=1; |
| | | //未结算 |
| | | public final static int SETTLE_STATE_NOT_SETTLED=2; |
| | | |
| | | //失效 |
| | | public final static int ORDER_STATE_INVALID=0; |
| | | //已下单 |
| | | public final static int ORDER_STATE_CREATE=1; |
| | | //已付款 |
| | | public final static int ORDER_STATE_PAY=2; |
| | | //已收货 |
| | | public final static int ORDER_STATE_RECEIVED=4; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | private Integer dateType; |
| | | private Integer settleState; |
| | | private Integer orderState; |
| | | private Date startDate; |
| | | private Date endDate; |
| | | private Integer pageSize; |
| | | private String pid; |
| | | |
| | | |
| | | public Integer getDateType() { |
| | | return dateType; |
| | | } |
| | | |
| | | public void setDateType(Integer dateType) { |
| | | this.dateType = dateType; |
| | | } |
| | | |
| | | public Integer getSettleState() { |
| | | return settleState; |
| | | } |
| | | |
| | | public void setSettleState(Integer settleState) { |
| | | this.settleState = settleState; |
| | | } |
| | | |
| | | public Integer getOrderState() { |
| | | return orderState; |
| | | } |
| | | |
| | | public void setOrderState(Integer orderState) { |
| | | this.orderState = orderState; |
| | | } |
| | | |
| | | public Date getStartDate() { |
| | | return startDate; |
| | | } |
| | | |
| | | public void setStartDate(Date startDate) { |
| | | this.startDate = startDate; |
| | | } |
| | | |
| | | public Date getEndDate() { |
| | | return endDate; |
| | | } |
| | | |
| | | public void setEndDate(Date endDate) { |
| | | this.endDate = endDate; |
| | | } |
| | | |
| | | public Integer getPageSize() { |
| | | return pageSize; |
| | | } |
| | | |
| | | public void setPageSize(Integer pageSize) { |
| | | this.pageSize = pageSize; |
| | | } |
| | | |
| | | public String getPid() { |
| | | return pid; |
| | | } |
| | | |
| | | public void setPid(String pid) { |
| | | this.pid = pid; |
| | | } |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.filter; |
| | | |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | import org.springframework.web.multipart.MultipartResolver; |
| | | import org.springframework.web.multipart.commons.CommonsMultipartResolver; |
| | | |
| | | import javax.servlet.*; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.IOException; |
| | | |
| | | /** |
| | | * @author hxh |
| | | * @title: RequestFilter |
| | | * @description: TODO |
| | | * @date 2021/10/18 18:09 |
| | | */ |
| | | public class RequestFilter implements Filter { |
| | | @Override |
| | | public void init(FilterConfig filterConfig) throws ServletException { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { |
| | | HttpServletRequest httpRequest = (HttpServletRequest) servletRequest; |
| | | String contentType = httpRequest.getContentType(); |
| | | if (contentType != null && contentType.contains("multipart/form-data")) { |
| | | MultipartResolver resolver = new CommonsMultipartResolver(httpRequest.getSession().getServletContext()); |
| | | MultipartHttpServletRequest multipartRequest = resolver.resolveMultipart(httpRequest); |
| | | // 将转化后的 request 放入过滤链中 |
| | | servletRequest = multipartRequest; |
| | | } |
| | | filterChain.doFilter(servletRequest, servletResponse); |
| | | } |
| | | |
| | | @Override |
| | | public void destroy() { |
| | | |
| | | } |
| | | } |
| | |
| | | import com.yeshi.fanli.dto.jd.JDOrderForBackUpResult; |
| | | import com.yeshi.fanli.entity.jd.JDBackUpOrder; |
| | | import com.yeshi.fanli.util.Constant; |
| | | import com.yeshi.fanli.util.annotation.JobMonitor; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import com.xxl.job.core.biz.model.ReturnT; |
| | |
| | | } |
| | | |
| | | |
| | | @JobMonitor(key = "", maxSpaceTime = 60 * 60 * 25) |
| | | @XxlJob("order-jd-backup") |
| | | public ReturnT<String> backUpOrder(String param) throws Exception { |
| | | //更新90天以前的近3天的数据 |
| | |
| | | import com.yeshi.fanli.service.inter.order.CommonOrderService; |
| | | import com.yeshi.fanli.service.inter.order.tb.TaoBaoOrderService; |
| | | import com.yeshi.fanli.util.Constant; |
| | | import com.yeshi.fanli.util.StringUtil; |
| | | import com.yeshi.fanli.util.taobao.TaoKeOrderApiUtil; |
| | | import net.sf.json.JSONObject; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | @XxlJob("order-taobao-updatePayStateOrder") |
| | | public ReturnT<String> updatePayStateOrder(String param) throws Exception { |
| | | //更新30天之前的 |
| | | List<CommonOrder> commonOrders = commonOrderService.listPayStateOrder(Constant.SOURCE_TYPE_TAOBAO, new Date(TimeUtil.convertToTimeTemp("20200201", "yyyyMMdd")), new Date(System.currentTimeMillis() - 1000 * 60 * 60 * 24L * 30)); |
| | | String startTime = "20200201"; |
| | | if (!StringUtil.isNullOrEmpty(param)) { |
| | | startTime = param; |
| | | } |
| | | |
| | | List<CommonOrder> commonOrders = commonOrderService.listPayStateOrder(Constant.SOURCE_TYPE_TAOBAO, new Date(TimeUtil.convertToTimeTemp(startTime, "yyyyMMdd")), new Date(System.currentTimeMillis() - 1000 * 60 * 60 * 24L * 30)); |
| | | if (commonOrders == null || commonOrders.size() == 0) { |
| | | throw new Exception("没有订单需要更新"); |
| | | } |
| | |
| | | |
| | | public void updateTaoBaoOrder(String orderId) { |
| | | List<TaoBaoOrder> list = taoBaoOrderService.getTaoBaoOrderByOrderId(orderId); |
| | | //删除订单成功 |
| | | for (int i = 0; i < list.size(); i++) { |
| | | //TODO 需要处理订单成功 |
| | | if (list.get(i).getOrderState().equalsIgnoreCase("订单成功")) { |
| | | list.remove(i); |
| | | i--; |
| | | } |
| | | } |
| | | |
| | | |
| | | try { |
| | | //如果创建时间超过了90天的抛出异常 |
| | | if (list.size() == 0 || TimeUtil.convertToTimeTemp(list.get(0).getCreateTime(), "yyyy-MM-dd HH:mm:ss") < System.currentTimeMillis() - 1000 * 60 * 60L * 24 * 90) |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<AppVersionInfo> listByPlatformAndMaxVersionCode(String platform, int versionCode, SystemEnum system) { |
| | | return appVersionInfoMapper.listByPlatformAndMaxVersionCode(platform, versionCode,system); |
| | | } |
| | | |
| | | @Override |
| | | public AppVersionInfo selectByPrimaryKey(Long id) { |
| | | return appVersionInfoMapper.selectByPrimaryKey(id); |
| | | } |
| | |
| | | |
| | | import com.yeshi.fanli.entity.SystemEnum; |
| | | import com.yeshi.fanli.entity.bus.user.UserInfo; |
| | | import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanOrder; |
| | | import com.yeshi.fanli.service.inter.order.tb.TaoBaoWeiQuanOrderService; |
| | | import com.yeshi.fanli.service.inter.user.UserInfoService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | @Resource |
| | | private UserInfoService userInfoService; |
| | | |
| | | @Resource |
| | | private TaoBaoWeiQuanOrderService taoBaoWeiQuanOrderService; |
| | | |
| | | @Transactional |
| | | @Override |
| | | public int addLostOrder(LostOrder lostOrder) { |
| | |
| | | } |
| | | } |
| | | |
| | | //是否处于维权订单中 |
| | | List<TaoBaoWeiQuanOrder> wqList = taoBaoWeiQuanOrderService.listByOrderId(orderId); |
| | | if (wqList != null && wqList.size() > 0) { |
| | | return -1002; |
| | | } |
| | | |
| | | |
| | | // 订单是否已申诉 |
| | | List<LostOrder> orderList = lostOrderMapper.selectByOrderIdAndType(orderId, type); |
| | | if (orderList != null && orderList.size() > 0) { |
| | |
| | | import com.yeshi.fanli.exception.ParamsException; |
| | | import com.yeshi.fanli.service.inter.order.dividents.TeamDividentsSourceUserService; |
| | | import com.yeshi.fanli.util.StringUtil; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | @Service |
| | | public class TeamDividentsSourceUserServiceImpl implements TeamDividentsSourceUserService { |
| | |
| | | @Resource |
| | | private TeamDividentsSourceUserMapper teamDividentsSourceUserMapper; |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public void addTeamDividentsSourceUser(TeamDividentsSourceUser teamDividentsSourceUser) throws ParamsException { |
| | | if (teamDividentsSourceUser == null || StringUtil.isNullOrEmpty(teamDividentsSourceUser.getDay()) |
| | |
| | | throw new ParamsException(1, "参数不完整"); |
| | | if (teamDividentsSourceUser.getCreateTime() == null) |
| | | teamDividentsSourceUser.setCreateTime(new Date()); |
| | | //查询是否存在 |
| | | TeamDividentsSourceUser sourceUser = teamDividentsSourceUserMapper.selectBySourceUidAndDayAndUidAndTypeForUpdate(teamDividentsSourceUser.getSourceUid(), teamDividentsSourceUser.getTargetUid(), teamDividentsSourceUser.getDay(), teamDividentsSourceUser.getType()); |
| | | |
| | | if (sourceUser != null) { |
| | | TeamDividentsSourceUser record = new TeamDividentsSourceUser(); |
| | | record.setId(sourceUser.getId()); |
| | | record.setMoney(sourceUser.getMoney().add(teamDividentsSourceUser.getMoney())); |
| | | record.setUpdateTime(new Date()); |
| | | teamDividentsSourceUserMapper.updateByPrimaryKeySelective(record); |
| | | } else { |
| | | teamDividentsSourceUserMapper.insertSelective(teamDividentsSourceUser); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public BigDecimal sumMoneyByUidAndDay(Long uid, String day,Integer type) { |
| | |
| | | */ |
| | | public List<AppVersionInfo> listByPlatformAndMinVersionCode(String platform, int versionCode, SystemEnum system); |
| | | |
| | | |
| | | |
| | | public List<AppVersionInfo> listByPlatformAndMaxVersionCode(String platform, int versionCode, SystemEnum system) ; |
| | | |
| | | /** |
| | | * 根据版本号获取 |
| | | * |
New file |
| | |
| | | package com.yeshi.fanli.util.annotation; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @title: JobMonitor |
| | | * @projectName fanli-server |
| | | * @description: 任务监控 |
| | | * @date 2021/10/1418:49 |
| | | */ |
| | | public @interface JobMonitor { |
| | | String key(); |
| | | int maxSpaceTime(); |
| | | } |
| | |
| | | // mailInfo.setContent(buffer.toString()); |
| | | // return sendTextMail(mailInfo); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | String username = "kuaisheng110@163.com"; |
| | | String pwd = "CMZASWUPTJSFXCNP"; |
| | | MailSendInfo mailInfo = new MailSendInfo(); |
| | | mailInfo.setMailServerHost("smtp." + username.split("@")[1]); |
| | | mailInfo.setMailServerPort("25"); |
| | | mailInfo.setValidate(true); |
| | | |
| | | mailInfo.setUserName(username); |
| | | mailInfo.setPassword(pwd); |
| | | mailInfo.setFromAddress(username); |
| | | mailInfo.setToAddress("hexiaohui@banliapp.com"); |
| | | mailInfo.setSubject("测试发送标题"); |
| | | StringBuffer buffer = new StringBuffer(); |
| | | buffer.append("测试发送内容"); |
| | | mailInfo.setContent(buffer.toString()); |
| | | sendTextMail(mailInfo); |
| | | } |
| | | } |
| | |
| | | return null; |
| | | } |
| | | |
| | | // 淘礼金报告 |
| | | public static UserTaoLiJinReport getTaoLiJinEffective(String rightsId) { |
| | | /** |
| | | * @author hxh |
| | | * @description 淘礼金报告 接口文档:https://open.taobao.com/api.htm?source=search&docId=58736&docType=2 |
| | | * @date 10:57 2022/1/11 |
| | | * @param: rightsId |
| | | * @return com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinReport |
| | | **/ |
| | | public static UserTaoLiJinReport getTaoLiJinEffective(String rightsId,String pid) { |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("method", "taobao.tbk.dg.vegas.tlj.instance.report"); |
| | | map.put("method", "taobao.tbk.dg.vegas.tlj.report"); |
| | | map.put("rights_id", rightsId); |
| | | map.put("adzone_id", pid.split("_")[3]); |
| | | |
| | | TaoKeAppInfo app = new TaoKeAppInfo(); |
| | | app.setAppKey(TaoBaoConstant.TAOBAO_AUTH_APPKEY); |
| | |
| | | JSONObject json = JSONObject.fromObject(result); |
| | | System.out.println(json); |
| | | |
| | | JSONObject root = json.optJSONObject("tbk_dg_vegas_tlj_instance_report_response"); |
| | | JSONObject root = json.optJSONObject("tbk_dg_vegas_tlj_report_response"); |
| | | |
| | | if (root != null && root.optJSONObject("result") != null) { |
| | | if (root.optJSONObject("result").optBoolean("success")) { |
| | | JSONObject modelJson = root.optJSONObject("result").optJSONObject("model"); |
| | | |
| | | if (root != null && root.optBoolean("result_success")) { |
| | | JSONObject modelJson = root.optJSONObject("model").optJSONObject("extra"); |
| | | if (modelJson != null && modelJson.size() > 0) { |
| | | UserTaoLiJinReport report = new UserTaoLiJinReport(); |
| | | report.setId(rightsId); |
| | | report.setUnfreezeAmount(new BigDecimal(modelJson.optString("unfreeze_amount"))); |
| | | report.setUnfreezeNum(modelJson.optInt("unfreeze_num")); |
| | | report.setRefundAmount(new BigDecimal(modelJson.optString("refund_amount"))); |
| | | report.setWinAmount(new BigDecimal(modelJson.optString("win_sum_amt"))); |
| | | report.setWinNum(modelJson.optInt("win_pv")); |
| | | report.setRefundAmount(new BigDecimal(modelJson.optString("refund_sum_amt"))); |
| | | report.setRefundNum(modelJson.optInt("refund_num")); |
| | | report.setAlipayAmount(new BigDecimal(modelJson.optString("alipay_amount"))); |
| | | report.setUseAmount(new BigDecimal(modelJson.optString("use_amount"))); |
| | | report.setAlipayAmount(new BigDecimal(modelJson.optString("alipay_amt"))); |
| | | report.setUseAmount(new BigDecimal(modelJson.optString("use_sum_amt"))); |
| | | report.setUseNum(modelJson.optInt("use_num")); |
| | | report.setWinAmount(new BigDecimal(modelJson.optString("win_amount"))); |
| | | report.setWinNum(modelJson.optInt("win_num")); |
| | | report.setPreCommissionAmount(new BigDecimal(modelJson.optString("pre_commission_amount"))); |
| | | report.setUnfreezeAmount(new BigDecimal(modelJson.optString("remaining_amt"))); |
| | | report.setUnfreezeNum(modelJson.optInt("remaining_num")); |
| | | report.setPreCommissionAmount(new BigDecimal(modelJson.optString("pre_pub_share_fee_for_disp"))); |
| | | return report; |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | import java.util.Iterator; |
| | | import java.util.Map; |
| | | |
| | | import com.google.gson.Gson; |
| | | import com.taobao.api.internal.util.StringUtils; |
| | | import com.yeshi.common.entity.taobao.TaoKeAppInfo; |
| | | import com.yeshi.fanli.exception.taobao.TaoKeApiException; |
| | |
| | | if (!StringUtil.isNullOrEmpty(app.getAdzoneId())) |
| | | params.put("adzone_id", app.getAdzoneId()); |
| | | params.put("sign", getSign(params, "md5", app).toUpperCase()); |
| | | |
| | | System.out.println(new Gson().toJson(params)); |
| | | |
| | | String result = TaoBaoHttpUtil.taoKeGet(params); |
| | | JSONObject data = JSONObject.fromObject(result); |
| | | if (data != null) { |
New file |
| | |
| | | package com.yeshi.fanli.util.taobao; |
| | | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.yeshi.common.entity.taobao.TaoKeAppInfo; |
| | | import com.yeshi.fanli.dto.taobao.koubei.KouBeiOrderDTO; |
| | | import com.yeshi.fanli.dto.taobao.TaoKeListResult; |
| | | import com.yeshi.fanli.exception.taobao.TaoKeApiException; |
| | | import com.yeshi.goods.facade.entity.taobao.TaoBaoGoodsBrief; |
| | | import net.sf.json.JSONArray; |
| | | import net.sf.json.JSONObject; |
| | | |
| | | import java.lang.reflect.Type; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | //口碑本地生活API接口 |
| | | public class TaoKeKouBeiApiUtil { |
| | | |
| | | final static TaoKeAppInfo appInfo = new TaoKeAppInfo("33227121", "207014b8b57a42f82205619d508777ac", "alsc_12859804_145002_121004"); |
| | | |
| | | private static JSONObject getResult(String resultKey, JSONObject data) throws Exception { |
| | | data = data.optJSONObject(resultKey); |
| | | if (data.optBoolean("result_success")) { |
| | | |
| | | if (data.optJSONObject("result") == null) { |
| | | throw new Exception("请求结果为空"); |
| | | } |
| | | return data.optJSONObject("result"); |
| | | } else { |
| | | throw new Exception("请求返回未成功"); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @return com.yeshi.goods.facade.entity.taobao.TaoBaoGoodsBrief |
| | | * @author hxh |
| | | * @description https://open.taobao.com/api.htm?docId=58766&docType=2&scopeId=24408 |
| | | * @date 18:20 2021/11/25 |
| | | **/ |
| | | public static TaoBaoGoodsBrief getGoodsList() throws Exception { |
| | | Map<String, String> map = new HashMap<>(); |
| | | // map.put("session", "6101725762ec88b0993ed5a2fd0a459c41df4fff2b829313327215652"); |
| | | map.put("method", "alibaba.alsc.union.kb.item.promotion"); |
| | | map.put("pid", "alsc_12859804_145002_121004"); |
| | | map.put("settle_type", "1"); |
| | | map.put("page_size", "20"); |
| | | map.put("page_number", "1"); |
| | | |
| | | JSONObject data = TaoKeBaseUtil.baseRequest(map, appInfo); |
| | | System.out.println(data.toString()); |
| | | // // 商品下架 |
| | | // if (data.optJSONObject("error_response") != null && data.optJSONObject("error_response").optInt("code") == 15 |
| | | // && data.optJSONObject("error_response").optInt("sub_code") == 50001) { |
| | | // throw new TaobaoGoodsDownException(data.optJSONObject("error_response").optInt("code"), "商品下架"); |
| | | // } |
| | | // |
| | | // if (data.optJSONObject("tbk_item_info_get_response") == null) |
| | | // return null; |
| | | // JSONArray array = data.optJSONObject("tbk_item_info_get_response").optJSONObject("results") |
| | | // .optJSONArray("n_tbk_item"); |
| | | // if (array != null && array.size() > 0) { |
| | | // JSONObject item = array.optJSONObject(0); |
| | | // return parseSimpleGoodsInfo(item); |
| | | // } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | public static String createPid(String pidName) throws TaoKeApiException, Exception { |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("method", "alibaba.alsc.union.media.zone.add"); |
| | | map.put("zone_name", pidName); |
| | | JSONObject data = TaoKeBaseUtil.baseRequest(map, appInfo); |
| | | JSONObject result = getResult("alibaba_alsc_union_media_zone_add_response", data); |
| | | return result.optString("pid"); |
| | | } |
| | | |
| | | public static TaoKeListResult<KouBeiOrderDTO> listOrders() throws TaoKeApiException, Exception { |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("method", "alibaba.alsc.union.kbcpa.order.details.get"); |
| | | map.put("start_date", "2021-11-01 10:00:00"); |
| | | JSONObject data = TaoKeBaseUtil.baseRequest(map, appInfo); |
| | | JSONObject result = getResult("alibaba_alsc_union_kbcpa_order_details_get_response", data); |
| | | JSONArray array = result.optJSONArray("order_detail_report_dto"); |
| | | |
| | | List<KouBeiOrderDTO> orderList = new ArrayList<>(); |
| | | if (array != null) { |
| | | Type type = new TypeToken<List<KouBeiOrderDTO>>() { |
| | | }.getType(); |
| | | orderList = new Gson().fromJson(array.toString(), type); |
| | | } |
| | | int count = data.optJSONObject("alibaba_alsc_union_kbcpa_order_details_get_response").optInt("total_count"); |
| | | return new TaoKeListResult<KouBeiOrderDTO>(orderList, count); |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | // 淘礼金报告 |
| | | public static UserTaoLiJinReport getTaoLiJinEffective(String rightsId) { |
| | | public static UserTaoLiJinReport getTaoLiJinEffective(String rightsId, String pid) { |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("method", "taobao.tbk.dg.vegas.tlj.instance.report"); |
| | | map.put("method", "taobao.tbk.dg.vegas.tlj.report("); |
| | | map.put("rights_id", rightsId); |
| | | map.put("adzone_id", pid.split("_")[3]); |
| | | |
| | | TaoKeAppInfo app = new TaoKeAppInfo(); |
| | | app.setAppKey(TaoBaoConstant.TAOBAO_AUTH_APPKEY); |
| | |
| | | JSONObject json = JSONObject.fromObject(result); |
| | | System.out.println(json); |
| | | |
| | | JSONObject root = json.optJSONObject("tbk_dg_vegas_tlj_instance_report_response"); |
| | | JSONObject root = json.optJSONObject("tbk_dg_vegas_tlj_report_response"); |
| | | |
| | | if (root != null && root.optJSONObject("result") != null) { |
| | | if (root.optJSONObject("result").optBoolean("success")) { |
| | | JSONObject modelJson = root.optJSONObject("result").optJSONObject("model"); |
| | | |
| | | if (root != null && root.optBoolean("result_success")) { |
| | | JSONObject modelJson = root.optJSONObject("model").optJSONObject("extra"); |
| | | if (modelJson != null && modelJson.size() > 0) { |
| | | UserTaoLiJinReport report = new UserTaoLiJinReport(); |
| | | report.setId(rightsId); |
| | | report.setUnfreezeAmount(new BigDecimal(modelJson.optString("unfreeze_amount"))); |
| | | report.setUnfreezeNum(modelJson.optInt("unfreeze_num")); |
| | | report.setRefundAmount(new BigDecimal(modelJson.optString("refund_amount"))); |
| | | report.setWinAmount(new BigDecimal(modelJson.optString("win_sum_amt"))); |
| | | report.setWinNum(modelJson.optInt("win_pv")); |
| | | report.setRefundAmount(new BigDecimal(modelJson.optString("refund_sum_amt"))); |
| | | report.setRefundNum(modelJson.optInt("refund_num")); |
| | | report.setAlipayAmount(new BigDecimal(modelJson.optString("alipay_amount"))); |
| | | report.setUseAmount(new BigDecimal(modelJson.optString("use_amount"))); |
| | | report.setAlipayAmount(new BigDecimal(modelJson.optString("alipay_amt"))); |
| | | report.setUseAmount(new BigDecimal(modelJson.optString("use_sum_amt"))); |
| | | report.setUseNum(modelJson.optInt("use_num")); |
| | | report.setWinAmount(new BigDecimal(modelJson.optString("win_amount"))); |
| | | report.setWinNum(modelJson.optInt("win_num")); |
| | | report.setPreCommissionAmount(new BigDecimal(modelJson.optString("pre_commission_amount"))); |
| | | report.setUnfreezeAmount(new BigDecimal(modelJson.optString("remaining_amt"))); |
| | | report.setUnfreezeNum(modelJson.optInt("remaining_num")); |
| | | report.setPreCommissionAmount(new BigDecimal(modelJson.optString("pre_pub_share_fee_for_disp"))); |
| | | return report; |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | task =false |
| | | outnetwork =false |
| | | test=false |
| | | test=true |
| | |
| | | `tdsu_source_uid`=#{sourceUid} and tdsu_day=#{day} and |
| | | tdsu_target_uid=#{targetUid} |
| | | </select> |
| | | |
| | | <select id="selectBySourceUidAndDayAndUidAndTypeForUpdate" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | FROM yeshi_ec_team_dividents_source_user WHERE |
| | | `tdsu_source_uid`=#{sourceUid} and tdsu_day=#{day} and tdsu_type=#{type} |
| | | and tdsu_target_uid=#{targetUid} for update |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <listener> |
| | | <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> |
| | | </listener> |
| | | |
| | | <filter> |
| | | <filter-name>RequestFilter</filter-name> |
| | | <filter-class>com.yeshi.fanli.filter.RequestFilter</filter-class> |
| | | </filter> |
| | | <filter-mapping> |
| | | <filter-name>RequestFilter</filter-name> |
| | | <url-pattern>/api/v2/*</url-pattern> |
| | | </filter-mapping> |
| | | |
| | | <filter> |
| | | <filter-name>encodingFilter</filter-name> |
| | | <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> |