New file |
| | |
| | | package com.ks.lijin.pojo.DO; |
| | | |
| | | import org.springframework.data.annotation.Id; |
| | | import org.springframework.data.mongodb.core.mapping.Document; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Document(collection = "dangerGoods") |
| | | public class LiJinDangerGoods implements Serializable { |
| | | |
| | | @Id |
| | | private String id; |
| | | |
| | | //交易ID |
| | | private String tradeId; |
| | | //订单号 |
| | | private String orderNo; |
| | | //订单支付时间 |
| | | private Date orderPayTime; |
| | | //商品ID |
| | | private String goodsId; |
| | | //商品类型 |
| | | private Integer goodsType; |
| | | //礼金面额(分) |
| | | private Integer maxLijinMoney; |
| | | //平台佣金(分) |
| | | private Integer minCommission; |
| | | private Date createTime; |
| | | private Date updateTime; |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getGoodsId() { |
| | | return goodsId; |
| | | } |
| | | |
| | | public void setGoodsId(String goodsId) { |
| | | this.goodsId = goodsId; |
| | | } |
| | | |
| | | public Integer getGoodsType() { |
| | | return goodsType; |
| | | } |
| | | |
| | | public void setGoodsType(Integer goodsType) { |
| | | this.goodsType = goodsType; |
| | | } |
| | | |
| | | public Integer getMaxLijinMoney() { |
| | | return maxLijinMoney; |
| | | } |
| | | |
| | | public void setMaxLijinMoney(Integer maxLijinMoney) { |
| | | this.maxLijinMoney = maxLijinMoney; |
| | | } |
| | | |
| | | public Integer getMinCommission() { |
| | | return minCommission; |
| | | } |
| | | |
| | | public void setMinCommission(Integer minCommission) { |
| | | this.minCommission = minCommission; |
| | | } |
| | | |
| | | 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; |
| | | } |
| | | } |
| | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 礼金创建记录 |
| | | */ |
| | | @Table("tlj_expend_record") |
| | | public class LiJinExpendRecord implements Serializable { |
| | | @Column(name = "rd_id") |
New file |
| | |
| | | package com.ks.lijin.pojo.DO; |
| | | |
| | | import org.springframework.data.annotation.Id; |
| | | import org.springframework.data.mongodb.core.index.Indexed; |
| | | import org.springframework.data.mongodb.core.mapping.Document; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Document(collection = "taobaoOrder") |
| | | public class TaoBaoOrderRecord implements Serializable { |
| | | |
| | | |
| | | /** |
| | | * adzone_id : 推广位管理下的推广位名称对应的ID,同时也是pid=mm_1_2_3中的“3”这段数字 |
| | | * adzone_name : 淘礼金爆款 //推广位管理下的自定义推广位名称 |
| | | * alimama_rate : 10.00 //推广者赚取佣金后支付给阿里妈妈的技术服务费用的比率 |
| | | * alimama_share_fee : 2.66 //技术服务费=结算金额*收入比率*技术服务费率。推广者赚取佣金后支付给阿里妈妈的技术服务费用 |
| | | * alipay_total_price : 37.96 //买家拍下付款的金额(不包含运费金额) |
| | | * click_time : 2021-05-21 09:46:37 //通过推广链接达到商品、店铺详情页的点击时间 |
| | | * deposit_price : 0.00 |
| | | * flow_source : -- //产品类型 |
| | | * income_rate : 70.00 //订单结算的佣金比率+平台的补贴比率 |
| | | * is_lx : 0 //订单是否为激励池订单 1,表征是 0,表征否 |
| | | * item_category_name : 咖啡/麦片/冲饮 //商品所属的一级类目名称 |
| | | * item_id : 636841863414 //商品id |
| | | * item_img : //商品图片 |
| | | * item_link : http://item.taobao.com/item.htm?id=636841863414 //商品链接 |
| | | * item_num : 1 //商品数量 |
| | | * item_price : 88.00 //商品单价 |
| | | * item_title : 商品标题 |
| | | * marketing_type : 淘礼金(自助充值) //营销类型:该字段中视订单情况有单个或多个值。 例如:淘礼金(自助充值),特价版客户端染色,特价版客户端锁粉,特价版客户端推广。 |
| | | * modified_time : 2021-06-03 18:06:11 //订单更新时间 |
| | | * order_type : 天猫 //订单所属平台类型,包括天猫、淘宝、聚划算等 |
| | | * pay_price : 买家确认收货的付款金额(不包含运费金额) |
| | | * pub_id : 472720008 //推广者的会员id |
| | | * pub_share_fee : 结算预估收入=结算金额*提成。以买家确认收货的付款金额为基数,预估您可能获得的收入。因买家退款、您违规推广等原因,可能与您最终收入不一致。最终收入以月结后您实际收到的为准 |
| | | * pub_share_pre_fee : 26.57 // 付款预估收入=付款金额*提成。指买家付款金额为基数,预估您可能获得的收入。因买家退款等原因,可能与结算预估收入不一致 |
| | | * pub_share_rate : 从结算佣金中分得的收益比率 |
| | | * refund_tag : 维权标签,0 含义为非维权 1 含义为维权订单 |
| | | * seller_nick : bestinme旗舰店 //掌柜旺旺 |
| | | * seller_shop_title : bestinme旗舰店 //店铺名称 |
| | | * site_id : 2325150069 //媒体管理下的ID,同时也是pid=mm_1_2_3中的“2”这段数字 |
| | | * site_name : 媒体管理下的对应ID的自定义名称 |
| | | * subsidy_fee : 0.00 //补贴金额=结算金额*补贴比率 |
| | | * subsidy_rate : 0.00 //平台给与的补贴比率,如天猫、淘宝、聚划算等 |
| | | * subsidy_type : -- //平台出资方,如天猫、淘宝、或聚划算等 |
| | | * tb_deposit_time : -- |
| | | * tb_paid_time : 订单在淘宝拍下付款的时间 |
| | | * terminal_type : 无线 //成交平台 |
| | | * tk_commission_fee_for_media_platform : 0.00 //结算内容专项服务费:内容场景专项技术服务费,内容推广者在内容场景进行推广需要支付给阿里妈妈专项的技术服务费用。专项服务费=结算金额*专项服务费率。 |
| | | * tk_commission_pre_fee_for_media_platform : 0.00 //预估内容专项服务费:内容场景专项技术服务费,内容推广者在内容场景进行推广需要支付给阿里妈妈专项的技术服务费用。专项服务费=付款金额*专项服务费率。 |
| | | * tk_commission_rate_for_media_platform : 0.00 //内容专项服务费率:内容场景专项技术服务费率,内容推广者在内容场景进行推广需要按结算金额支付一定比例给阿里妈妈作为内容场景专项技术服务费,用于提供与内容平台实现产品技术对接等服务。 |
| | | * tk_create_time : 2021-05-21 09:47:36 //订单创建的时间,该时间同步淘宝,可能会略晚于买家在淘宝的订单创建时间 |
| | | * tk_deposit_time : -- //预售时期,用户对预售商品支付定金的付款时间,可能略晚于在淘宝付定金时间 |
| | | * tk_earning_time : 订单确认收货后且商家完成佣金支付的时间 |
| | | * tk_order_role : 二方:佣金收益的第一归属者; 三方:从其他淘宝客佣金中进行分成的推广者 |
| | | * tk_paid_time : 订单付款的时间,该时间同步淘宝,可能会略晚于买家在淘宝的订单创建时间 |
| | | * tk_status : 3 //已付款:指订单已付款,但还未确认收货 已收货:指订单已确认收货,但商家佣金未支付 已结算:指订单已确认收货,且商家佣金已支付成功 已失效:指订单关闭/订单佣金小于0.01元,订单关闭主要有:1)买家超时未付款; 2)买家付款前,买家/卖家取消了订单;3)订单付款后发起售中退款成功;3:订单结算,12:订单付款, 13:订单失效,14:订单成功 |
| | | * tk_total_rate : 70.00 //提成=收入比率*分成比率。指实际获得收益的比率 |
| | | * total_commission_fee : 26.57 // 佣金金额=结算金额*佣金比率 |
| | | * total_commission_rate : 70.00 //佣金比率 |
| | | * trade_id : 买家通过购物车购买的每个商品对应的订单编号,此订单编号并未在淘宝买家后台透出 |
| | | * trade_parent_id : //买家在淘宝后台显示的订单编号 |
| | | */ |
| | | |
| | | @Id |
| | | private String id; |
| | | private String trade_id; |
| | | private long adzone_id; |
| | | private String adzone_name; |
| | | private String alimama_rate; |
| | | private String alimama_share_fee; |
| | | private String alipay_total_price; |
| | | private String click_time; |
| | | private String deposit_price; |
| | | private String flow_source; |
| | | private String income_rate; |
| | | private String is_lx; |
| | | private String item_category_name; |
| | | @Indexed |
| | | private long item_id; |
| | | private String item_img; |
| | | private String item_link; |
| | | private int item_num; |
| | | private String item_price; |
| | | private String item_title; |
| | | private String marketing_type; |
| | | private String modified_time; |
| | | private String order_type; |
| | | private String pay_price; |
| | | private int pub_id; |
| | | private String pub_share_fee; |
| | | private String pub_share_pre_fee; |
| | | private String pub_share_rate; |
| | | private int refund_tag; |
| | | private String seller_nick; |
| | | private String seller_shop_title; |
| | | private long site_id; |
| | | private String site_name; |
| | | private String subsidy_fee; |
| | | private String subsidy_rate; |
| | | private String subsidy_type; |
| | | private String tb_deposit_time; |
| | | @Indexed |
| | | private Date tb_paid_time; |
| | | private String terminal_type; |
| | | private String tk_commission_fee_for_media_platform; |
| | | private String tk_commission_pre_fee_for_media_platform; |
| | | private String tk_commission_rate_for_media_platform; |
| | | private String tk_create_time; |
| | | private String tk_deposit_time; |
| | | private String tk_earning_time; |
| | | private int tk_order_role; |
| | | private String tk_paid_time; |
| | | private int tk_status; |
| | | private String tk_total_rate; |
| | | private String total_commission_fee; |
| | | private String total_commission_rate; |
| | | private String trade_parent_id; |
| | | private String relationId; |
| | | private String specialId; |
| | | private Date updateTime; |
| | | |
| | | public static String createId(String tradeId) { |
| | | return tradeId; |
| | | } |
| | | |
| | | |
| | | public String getTrade_id() { |
| | | return trade_id; |
| | | } |
| | | |
| | | public void setTrade_id(String trade_id) { |
| | | this.trade_id = trade_id; |
| | | } |
| | | |
| | | public long getAdzone_id() { |
| | | return adzone_id; |
| | | } |
| | | |
| | | public void setAdzone_id(long adzone_id) { |
| | | this.adzone_id = adzone_id; |
| | | } |
| | | |
| | | public String getAdzone_name() { |
| | | return adzone_name; |
| | | } |
| | | |
| | | public void setAdzone_name(String adzone_name) { |
| | | this.adzone_name = adzone_name; |
| | | } |
| | | |
| | | public String getAlimama_rate() { |
| | | return alimama_rate; |
| | | } |
| | | |
| | | public void setAlimama_rate(String alimama_rate) { |
| | | this.alimama_rate = alimama_rate; |
| | | } |
| | | |
| | | public String getAlimama_share_fee() { |
| | | return alimama_share_fee; |
| | | } |
| | | |
| | | public void setAlimama_share_fee(String alimama_share_fee) { |
| | | this.alimama_share_fee = alimama_share_fee; |
| | | } |
| | | |
| | | public String getAlipay_total_price() { |
| | | return alipay_total_price; |
| | | } |
| | | |
| | | public void setAlipay_total_price(String alipay_total_price) { |
| | | this.alipay_total_price = alipay_total_price; |
| | | } |
| | | |
| | | public String getClick_time() { |
| | | return click_time; |
| | | } |
| | | |
| | | public void setClick_time(String click_time) { |
| | | this.click_time = click_time; |
| | | } |
| | | |
| | | public String getDeposit_price() { |
| | | return deposit_price; |
| | | } |
| | | |
| | | public void setDeposit_price(String deposit_price) { |
| | | this.deposit_price = deposit_price; |
| | | } |
| | | |
| | | public String getFlow_source() { |
| | | return flow_source; |
| | | } |
| | | |
| | | public void setFlow_source(String flow_source) { |
| | | this.flow_source = flow_source; |
| | | } |
| | | |
| | | public String getIncome_rate() { |
| | | return income_rate; |
| | | } |
| | | |
| | | public void setIncome_rate(String income_rate) { |
| | | this.income_rate = income_rate; |
| | | } |
| | | |
| | | public String getIs_lx() { |
| | | return is_lx; |
| | | } |
| | | |
| | | public void setIs_lx(String is_lx) { |
| | | this.is_lx = is_lx; |
| | | } |
| | | |
| | | public String getItem_category_name() { |
| | | return item_category_name; |
| | | } |
| | | |
| | | public void setItem_category_name(String item_category_name) { |
| | | this.item_category_name = item_category_name; |
| | | } |
| | | |
| | | public long getItem_id() { |
| | | return item_id; |
| | | } |
| | | |
| | | public void setItem_id(long item_id) { |
| | | this.item_id = item_id; |
| | | } |
| | | |
| | | public String getItem_img() { |
| | | return item_img; |
| | | } |
| | | |
| | | public void setItem_img(String item_img) { |
| | | this.item_img = item_img; |
| | | } |
| | | |
| | | public String getItem_link() { |
| | | return item_link; |
| | | } |
| | | |
| | | public void setItem_link(String item_link) { |
| | | this.item_link = item_link; |
| | | } |
| | | |
| | | public int getItem_num() { |
| | | return item_num; |
| | | } |
| | | |
| | | public void setItem_num(int item_num) { |
| | | this.item_num = item_num; |
| | | } |
| | | |
| | | public String getItem_price() { |
| | | return item_price; |
| | | } |
| | | |
| | | public void setItem_price(String item_price) { |
| | | this.item_price = item_price; |
| | | } |
| | | |
| | | public String getItem_title() { |
| | | return item_title; |
| | | } |
| | | |
| | | public void setItem_title(String item_title) { |
| | | this.item_title = item_title; |
| | | } |
| | | |
| | | public String getMarketing_type() { |
| | | return marketing_type; |
| | | } |
| | | |
| | | public void setMarketing_type(String marketing_type) { |
| | | this.marketing_type = marketing_type; |
| | | } |
| | | |
| | | public String getModified_time() { |
| | | return modified_time; |
| | | } |
| | | |
| | | public void setModified_time(String modified_time) { |
| | | this.modified_time = modified_time; |
| | | } |
| | | |
| | | public String getOrder_type() { |
| | | return order_type; |
| | | } |
| | | |
| | | public void setOrder_type(String order_type) { |
| | | this.order_type = order_type; |
| | | } |
| | | |
| | | public String getPay_price() { |
| | | return pay_price; |
| | | } |
| | | |
| | | public void setPay_price(String pay_price) { |
| | | this.pay_price = pay_price; |
| | | } |
| | | |
| | | public int getPub_id() { |
| | | return pub_id; |
| | | } |
| | | |
| | | public void setPub_id(int pub_id) { |
| | | this.pub_id = pub_id; |
| | | } |
| | | |
| | | public String getPub_share_fee() { |
| | | return pub_share_fee; |
| | | } |
| | | |
| | | public void setPub_share_fee(String pub_share_fee) { |
| | | this.pub_share_fee = pub_share_fee; |
| | | } |
| | | |
| | | public String getPub_share_pre_fee() { |
| | | return pub_share_pre_fee; |
| | | } |
| | | |
| | | public void setPub_share_pre_fee(String pub_share_pre_fee) { |
| | | this.pub_share_pre_fee = pub_share_pre_fee; |
| | | } |
| | | |
| | | public String getPub_share_rate() { |
| | | return pub_share_rate; |
| | | } |
| | | |
| | | public void setPub_share_rate(String pub_share_rate) { |
| | | this.pub_share_rate = pub_share_rate; |
| | | } |
| | | |
| | | public int getRefund_tag() { |
| | | return refund_tag; |
| | | } |
| | | |
| | | public void setRefund_tag(int refund_tag) { |
| | | this.refund_tag = refund_tag; |
| | | } |
| | | |
| | | public String getSeller_nick() { |
| | | return seller_nick; |
| | | } |
| | | |
| | | public void setSeller_nick(String seller_nick) { |
| | | this.seller_nick = seller_nick; |
| | | } |
| | | |
| | | public String getSeller_shop_title() { |
| | | return seller_shop_title; |
| | | } |
| | | |
| | | public void setSeller_shop_title(String seller_shop_title) { |
| | | this.seller_shop_title = seller_shop_title; |
| | | } |
| | | |
| | | public long getSite_id() { |
| | | return site_id; |
| | | } |
| | | |
| | | public void setSite_id(long site_id) { |
| | | this.site_id = site_id; |
| | | } |
| | | |
| | | public String getSite_name() { |
| | | return site_name; |
| | | } |
| | | |
| | | public void setSite_name(String site_name) { |
| | | this.site_name = site_name; |
| | | } |
| | | |
| | | public String getSubsidy_fee() { |
| | | return subsidy_fee; |
| | | } |
| | | |
| | | public void setSubsidy_fee(String subsidy_fee) { |
| | | this.subsidy_fee = subsidy_fee; |
| | | } |
| | | |
| | | public String getSubsidy_rate() { |
| | | return subsidy_rate; |
| | | } |
| | | |
| | | public void setSubsidy_rate(String subsidy_rate) { |
| | | this.subsidy_rate = subsidy_rate; |
| | | } |
| | | |
| | | public String getSubsidy_type() { |
| | | return subsidy_type; |
| | | } |
| | | |
| | | public void setSubsidy_type(String subsidy_type) { |
| | | this.subsidy_type = subsidy_type; |
| | | } |
| | | |
| | | public String getTb_deposit_time() { |
| | | return tb_deposit_time; |
| | | } |
| | | |
| | | public void setTb_deposit_time(String tb_deposit_time) { |
| | | this.tb_deposit_time = tb_deposit_time; |
| | | } |
| | | |
| | | public Date getTb_paid_time() { |
| | | return tb_paid_time; |
| | | } |
| | | |
| | | public void setTb_paid_time(Date tb_paid_time) { |
| | | this.tb_paid_time = tb_paid_time; |
| | | } |
| | | |
| | | public String getTerminal_type() { |
| | | return terminal_type; |
| | | } |
| | | |
| | | public void setTerminal_type(String terminal_type) { |
| | | this.terminal_type = terminal_type; |
| | | } |
| | | |
| | | public String getTk_commission_fee_for_media_platform() { |
| | | return tk_commission_fee_for_media_platform; |
| | | } |
| | | |
| | | public void setTk_commission_fee_for_media_platform(String tk_commission_fee_for_media_platform) { |
| | | this.tk_commission_fee_for_media_platform = tk_commission_fee_for_media_platform; |
| | | } |
| | | |
| | | public String getTk_commission_pre_fee_for_media_platform() { |
| | | return tk_commission_pre_fee_for_media_platform; |
| | | } |
| | | |
| | | public void setTk_commission_pre_fee_for_media_platform(String tk_commission_pre_fee_for_media_platform) { |
| | | this.tk_commission_pre_fee_for_media_platform = tk_commission_pre_fee_for_media_platform; |
| | | } |
| | | |
| | | public String getTk_commission_rate_for_media_platform() { |
| | | return tk_commission_rate_for_media_platform; |
| | | } |
| | | |
| | | public void setTk_commission_rate_for_media_platform(String tk_commission_rate_for_media_platform) { |
| | | this.tk_commission_rate_for_media_platform = tk_commission_rate_for_media_platform; |
| | | } |
| | | |
| | | 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 getTk_deposit_time() { |
| | | return tk_deposit_time; |
| | | } |
| | | |
| | | public void setTk_deposit_time(String tk_deposit_time) { |
| | | this.tk_deposit_time = tk_deposit_time; |
| | | } |
| | | |
| | | public String getTk_earning_time() { |
| | | return tk_earning_time; |
| | | } |
| | | |
| | | public void setTk_earning_time(String tk_earning_time) { |
| | | this.tk_earning_time = tk_earning_time; |
| | | } |
| | | |
| | | public int getTk_order_role() { |
| | | return tk_order_role; |
| | | } |
| | | |
| | | public void setTk_order_role(int tk_order_role) { |
| | | this.tk_order_role = tk_order_role; |
| | | } |
| | | |
| | | public String getTk_paid_time() { |
| | | return tk_paid_time; |
| | | } |
| | | |
| | | public void setTk_paid_time(String tk_paid_time) { |
| | | this.tk_paid_time = tk_paid_time; |
| | | } |
| | | |
| | | public int getTk_status() { |
| | | return tk_status; |
| | | } |
| | | |
| | | public void setTk_status(int tk_status) { |
| | | this.tk_status = tk_status; |
| | | } |
| | | |
| | | public String getTk_total_rate() { |
| | | return tk_total_rate; |
| | | } |
| | | |
| | | public void setTk_total_rate(String tk_total_rate) { |
| | | this.tk_total_rate = tk_total_rate; |
| | | } |
| | | |
| | | public String getTotal_commission_fee() { |
| | | return total_commission_fee; |
| | | } |
| | | |
| | | public void setTotal_commission_fee(String total_commission_fee) { |
| | | this.total_commission_fee = total_commission_fee; |
| | | } |
| | | |
| | | public String getTotal_commission_rate() { |
| | | return total_commission_rate; |
| | | } |
| | | |
| | | public void setTotal_commission_rate(String total_commission_rate) { |
| | | this.total_commission_rate = total_commission_rate; |
| | | } |
| | | |
| | | public String getTrade_parent_id() { |
| | | return trade_parent_id; |
| | | } |
| | | |
| | | public void setTrade_parent_id(String trade_parent_id) { |
| | | this.trade_parent_id = trade_parent_id; |
| | | } |
| | | |
| | | public String getRelationId() { |
| | | return relationId; |
| | | } |
| | | |
| | | public void setRelationId(String relationId) { |
| | | this.relationId = relationId; |
| | | } |
| | | |
| | | public String getSpecialId() { |
| | | return specialId; |
| | | } |
| | | |
| | | public void setSpecialId(String specialId) { |
| | | this.specialId = specialId; |
| | | } |
| | | |
| | | public Date getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Date updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ks.lijin.pojo.DTO.taobao; |
| | | |
| | | /** |
| | | * 淘礼金报告 |
| | | */ |
| | | public class TaoLiJinReportDTO { |
| | | |
| | | |
| | | /** |
| | | * unfreeze_amount : 2.00 //解冻金额 |
| | | * unfreeze_num : 1 //解冻红包个数 |
| | | * refund_amount : 2.00 //失效回退金额 |
| | | * refund_num : 1 //失效回退红包个数 |
| | | * alipay_amount : 2.00 //引导成交金额 |
| | | * use_amount : 2.00 //红包核销金额 |
| | | * use_num : 1 //红包核销个数 |
| | | * win_amount : 2.00 //红包领取金额 |
| | | * win_num : 1 //红包领取个数 |
| | | * pre_commission_amount : 111 //引导预估佣金金额 |
| | | * fp_refund_amount : 2.00 //退款红包金额 |
| | | * fp_refund_num : 1 //退款红包个数 |
| | | */ |
| | | |
| | | private String unfreeze_amount; |
| | | private Integer unfreeze_num; |
| | | private String refund_amount; |
| | | private Integer refund_num; |
| | | private String alipay_amount; |
| | | private String use_amount; |
| | | private Integer use_num; |
| | | private String win_amount; |
| | | private Integer win_num; |
| | | private String pre_commission_amount; |
| | | private String fp_refund_amount; |
| | | private Integer fp_refund_num; |
| | | |
| | | public String getUnfreeze_amount() { |
| | | return unfreeze_amount; |
| | | } |
| | | |
| | | public void setUnfreeze_amount(String unfreeze_amount) { |
| | | this.unfreeze_amount = unfreeze_amount; |
| | | } |
| | | |
| | | public Integer getUnfreeze_num() { |
| | | return unfreeze_num; |
| | | } |
| | | |
| | | public void setUnfreeze_num(Integer unfreeze_num) { |
| | | this.unfreeze_num = unfreeze_num; |
| | | } |
| | | |
| | | public String getRefund_amount() { |
| | | return refund_amount; |
| | | } |
| | | |
| | | public void setRefund_amount(String refund_amount) { |
| | | this.refund_amount = refund_amount; |
| | | } |
| | | |
| | | public Integer getRefund_num() { |
| | | return refund_num; |
| | | } |
| | | |
| | | public void setRefund_num(Integer refund_num) { |
| | | this.refund_num = refund_num; |
| | | } |
| | | |
| | | public String getAlipay_amount() { |
| | | return alipay_amount; |
| | | } |
| | | |
| | | public void setAlipay_amount(String alipay_amount) { |
| | | this.alipay_amount = alipay_amount; |
| | | } |
| | | |
| | | public String getUse_amount() { |
| | | return use_amount; |
| | | } |
| | | |
| | | public void setUse_amount(String use_amount) { |
| | | this.use_amount = use_amount; |
| | | } |
| | | |
| | | public Integer getUse_num() { |
| | | return use_num; |
| | | } |
| | | |
| | | public void setUse_num(Integer use_num) { |
| | | this.use_num = use_num; |
| | | } |
| | | |
| | | public String getWin_amount() { |
| | | return win_amount; |
| | | } |
| | | |
| | | public void setWin_amount(String win_amount) { |
| | | this.win_amount = win_amount; |
| | | } |
| | | |
| | | public Integer getWin_num() { |
| | | return win_num; |
| | | } |
| | | |
| | | public void setWin_num(Integer win_num) { |
| | | this.win_num = win_num; |
| | | } |
| | | |
| | | public String getPre_commission_amount() { |
| | | return pre_commission_amount; |
| | | } |
| | | |
| | | public void setPre_commission_amount(String pre_commission_amount) { |
| | | this.pre_commission_amount = pre_commission_amount; |
| | | } |
| | | |
| | | public String getFp_refund_amount() { |
| | | return fp_refund_amount; |
| | | } |
| | | |
| | | public void setFp_refund_amount(String fp_refund_amount) { |
| | | this.fp_refund_amount = fp_refund_amount; |
| | | } |
| | | |
| | | public Integer getFp_refund_num() { |
| | | return fp_refund_num; |
| | | } |
| | | |
| | | public void setFp_refund_num(Integer fp_refund_num) { |
| | | this.fp_refund_num = fp_refund_num; |
| | | } |
| | | } |
| | |
| | | import com.yeshi.goods.facade.entity.taobao.TaoBaoGoodsBrief; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * 获取商品的资金信息 |
| | | * |
| | | * @param uid |
| | | * @param goodsBriefList |
| | | * @return |
| | |
| | | * 用户是否还可以创建礼金 |
| | | * |
| | | * @param uid |
| | | * @param registerDate -注册时间 |
| | | * @return |
| | | * @throws LiJinUserException |
| | | */ |
| | | public boolean userCanCreateTBLijin(String uid) throws LiJinUserException; |
| | | public boolean userCanCreateTBLijin(String uid, Date registerDate) throws LiJinUserException; |
| | | |
| | | /** |
| | | * 用户是否还可以创建礼金 |
| | |
| | | throws LiJinException, LiJinGoodsException, LiJinUserException, LiJinAmountException; |
| | | |
| | | |
| | | /** |
| | | * 淘礼金创建 |
| | | * |
| | | * @param uid |
| | | * @param registerDate 用户注册日期 |
| | | * @param auctionId |
| | | * @return |
| | | * @throws LiJinException |
| | | * @throws LiJinGoodsException |
| | | * @throws LiJinUserException |
| | | * @throws LiJinAmountException |
| | | */ |
| | | public LiJinExpendRecord createTBLijin(String uid, Date registerDate, Long auctionId) |
| | | throws LiJinException, LiJinGoodsException, LiJinUserException, LiJinAmountException; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ks.lijin.utils.taobao; |
| | | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.ks.lijin.pojo.DO.TaoBaoOrderRecord; |
| | | import net.sf.json.JSONObject; |
| | | import org.yeshi.utils.HttpUtil; |
| | | import org.yeshi.utils.StringUtil; |
| | | import org.yeshi.utils.TimeUtil; |
| | | |
| | | import java.lang.reflect.Type; |
| | | import java.math.BigDecimal; |
| | | import java.net.URLEncoder; |
| | | import java.util.*; |
| | | |
| | | public class TaoBaoOrderUtil { |
| | | |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | Date startTime = new Date(System.currentTimeMillis() - 1000 * 60 * 60 * 2); |
| | | Date endTime = new Date(); |
| | | List<TaoBaoOrderRecord> orderRecordList = getOrderByModifyTime("124933865", startTime, endTime); |
| | | System.out.println(orderRecordList); |
| | | } |
| | | |
| | | |
| | | private static Map<String, String> zheTaoKeSidMap = new HashMap<>(); |
| | | |
| | | static { |
| | | zheTaoKeSidMap.put("472720008", "59407"); |
| | | zheTaoKeSidMap.put("124933865", "34097"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据修改时间获取订单 |
| | | * |
| | | * @param pubId |
| | | * @param startModifyTime |
| | | * @param endModifyTime 最多相差3小时 |
| | | * @return |
| | | */ |
| | | public static List<TaoBaoOrderRecord> getOrderByModifyTime(String pubId, Date startModifyTime, Date endModifyTime) throws Exception { |
| | | List<TaoBaoOrderRecord> orderRecordList = new ArrayList<>(); |
| | | String sid = zheTaoKeSidMap.get(pubId); |
| | | String appKey = "fe65b15d74d84c75b99578543da75264"; |
| | | TaoBaoOrderFilter filter = new TaoBaoOrderFilter(); |
| | | filter.setStartTime(startModifyTime); |
| | | filter.setEndTime(endModifyTime); |
| | | filter.setQueryType(4); |
| | | TaoBaoOrderResult result = getOrderListByZheTaoKe(appKey, sid, filter); |
| | | orderRecordList.addAll(result.getOrderList()); |
| | | while (result.hasNext) { |
| | | filter.setPositionIndex(result.positionIndex); |
| | | result = getOrderListByZheTaoKe(appKey, sid, filter); |
| | | orderRecordList.addAll(result.getOrderList()); |
| | | } |
| | | return orderRecordList; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 折淘客订单查询 |
| | | * |
| | | * @param appKey |
| | | * @param sid |
| | | * @param filter |
| | | * @return |
| | | */ |
| | | private static TaoBaoOrderResult getOrderListByZheTaoKe(String appKey, String sid, TaoBaoOrderFilter filter) throws Exception { |
| | | Map<String, String> params = new HashMap<>(); |
| | | params.put("appkey", appKey); |
| | | params.put("sid", sid); |
| | | if (filter.getStartTime() != null) { |
| | | params.put("start_time", TimeUtil.getGernalTime(filter.getStartTime().getTime(), "yyyy-MM-dd HH:mm:ss")); |
| | | } |
| | | |
| | | if (filter.getEndTime() != null) { |
| | | params.put("end_time", TimeUtil.getGernalTime(filter.getEndTime().getTime(), "yyyy-MM-dd HH:mm:ss")); |
| | | } |
| | | |
| | | if (filter.getQueryType() != null) { |
| | | params.put("query_type", filter.getQueryType() + ""); |
| | | } |
| | | |
| | | if (filter.getTkStatus() != null) { |
| | | params.put("tk_status", filter.getTkStatus() + ""); |
| | | } |
| | | |
| | | if (filter.getOrderScene() != null) { |
| | | params.put("order_scene", filter.getOrderScene() + ""); |
| | | } |
| | | |
| | | if (filter.getPositionIndex() != null) { |
| | | params.put("position_index", filter.getPositionIndex()); |
| | | } |
| | | params.put("jump_type", 1 + ""); |
| | | params.put("page_size", 100 + ""); |
| | | String baseUrl = "https://api.zhetaoke.com:10001/api/open_dingdanchaxun2.ashx"; |
| | | List<String> paramsList = new ArrayList<>(); |
| | | for (Iterator<String> its = params.keySet().iterator(); its.hasNext(); ) { |
| | | String key = its.next(); |
| | | paramsList.add(key + "=" + URLEncoder.encode(params.get(key), "UTF-8")); |
| | | } |
| | | baseUrl += "?" + StringUtil.concat(paramsList, "&"); |
| | | String result = HttpUtil.get(baseUrl.replace("|", "%7C")); |
| | | JSONObject data = JSONObject.fromObject(result); |
| | | String url = data.optString("url"); |
| | | result = HttpUtil.get(url.trim().replace("|", "%7C")); |
| | | return parseTaoBaoOrder(result); |
| | | } |
| | | |
| | | private static TaoBaoOrderResult parseTaoBaoOrder(String result) throws Exception { |
| | | JSONObject root = JSONObject.fromObject(result); |
| | | if (root.optJSONObject("tbk_sc_order_details_get_response") == null) { |
| | | throw new Exception("接口请求出错:" + result); |
| | | } |
| | | JSONObject data = root.optJSONObject("tbk_sc_order_details_get_response").optJSONObject("data"); |
| | | if (data == null) { |
| | | throw new Exception("接口请求出错:" + result); |
| | | } |
| | | TaoBaoOrderResult taoBaoOrderResult = new TaoBaoOrderResult(new ArrayList<>(), data.optBoolean("has_pre"), data.optBoolean("has_next"), data.optString("position_index")); |
| | | Type type = new TypeToken<List<TaoBaoOrderRecord>>() { |
| | | }.getType(); |
| | | |
| | | if (data.optJSONObject("results") != null && data.optJSONObject("results").optJSONArray("publisher_order_dto") != null) { |
| | | List<TaoBaoOrderRecord> recordList = new Gson().fromJson(data.optJSONObject("results").optJSONArray("publisher_order_dto").toString(), type); |
| | | taoBaoOrderResult.setOrderList(recordList); |
| | | } |
| | | return taoBaoOrderResult; |
| | | } |
| | | |
| | | |
| | | public static class TaoBaoOrderFilter { |
| | | private Date startTime; |
| | | private Date endTime;//订单查询结束时间,2019-04-25 15:18:22,目前最大可查3个小时内的数据 |
| | | private Integer queryType;//1:按照订单淘客创建时间查询,2:按照订单淘客付款时间查询,3:按照订单淘客结算时间查询,4:按照订单更新时间; |
| | | private String positionIndex;// 位点,除第一页之外,都需要传递;前端原样返回。注意:从第二页开始,位点必须传递前一页返回的值,否则翻页无效。 |
| | | private Integer pageSize;//页大小,默认20,1~100 |
| | | private Integer memberType;//2:二方,3:三方,不传,表示所有角色 |
| | | private Integer tkStatus;//12-付款,13-关闭,14-确认收货(暂时无法结算佣金),3-结算成功;不传,表示所有状态 |
| | | private Integer orderScene;//1:常规订单,2:渠道订单,3:会员运营订单,默认为1 |
| | | |
| | | public Date getStartTime() { |
| | | return startTime; |
| | | } |
| | | |
| | | public void setStartTime(Date startTime) { |
| | | this.startTime = startTime; |
| | | } |
| | | |
| | | public Date getEndTime() { |
| | | return endTime; |
| | | } |
| | | |
| | | public void setEndTime(Date endTime) { |
| | | this.endTime = endTime; |
| | | } |
| | | |
| | | public Integer getQueryType() { |
| | | return queryType; |
| | | } |
| | | |
| | | public void setQueryType(Integer queryType) { |
| | | this.queryType = queryType; |
| | | } |
| | | |
| | | public String getPositionIndex() { |
| | | return positionIndex; |
| | | } |
| | | |
| | | public void setPositionIndex(String positionIndex) { |
| | | this.positionIndex = positionIndex; |
| | | } |
| | | |
| | | public Integer getPageSize() { |
| | | return pageSize; |
| | | } |
| | | |
| | | public void setPageSize(Integer pageSize) { |
| | | this.pageSize = pageSize; |
| | | } |
| | | |
| | | public Integer getMemberType() { |
| | | return memberType; |
| | | } |
| | | |
| | | public void setMemberType(Integer memberType) { |
| | | this.memberType = memberType; |
| | | } |
| | | |
| | | public Integer getTkStatus() { |
| | | return tkStatus; |
| | | } |
| | | |
| | | public void setTkStatus(Integer tkStatus) { |
| | | this.tkStatus = tkStatus; |
| | | } |
| | | |
| | | public Integer getOrderScene() { |
| | | return orderScene; |
| | | } |
| | | |
| | | public void setOrderScene(Integer orderScene) { |
| | | this.orderScene = orderScene; |
| | | } |
| | | } |
| | | |
| | | public static class TaoBaoOrderResult { |
| | | private List<TaoBaoOrderRecord> orderList; |
| | | boolean hasPre; |
| | | boolean hasNext; |
| | | String positionIndex; |
| | | |
| | | public TaoBaoOrderResult(List<TaoBaoOrderRecord> orderList, boolean hasPre, boolean hasNext, String positionIndex) { |
| | | this.orderList = orderList; |
| | | this.hasPre = hasPre; |
| | | this.hasNext = hasNext; |
| | | this.positionIndex = positionIndex; |
| | | } |
| | | |
| | | public List<TaoBaoOrderRecord> getOrderList() { |
| | | return orderList; |
| | | } |
| | | |
| | | public void setOrderList(List<TaoBaoOrderRecord> orderList) { |
| | | this.orderList = orderList; |
| | | } |
| | | |
| | | public boolean isHasPre() { |
| | | return hasPre; |
| | | } |
| | | |
| | | public void setHasPre(boolean hasPre) { |
| | | this.hasPre = hasPre; |
| | | } |
| | | |
| | | public boolean isHasNext() { |
| | | return hasNext; |
| | | } |
| | | |
| | | public void setHasNext(boolean hasNext) { |
| | | this.hasNext = hasNext; |
| | | } |
| | | |
| | | public String isPositionIndex() { |
| | | return positionIndex; |
| | | } |
| | | |
| | | public void setPositionIndex(String positionIndex) { |
| | | this.positionIndex = positionIndex; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取订单中的佣金 |
| | | * |
| | | * @param order |
| | | * @return |
| | | */ |
| | | public static BigDecimal getCommission(TaoBaoOrderRecord order) { |
| | | //获取预估佣金 |
| | | if (order.getTk_status() != 3 && order.getTk_status() != 12 && order.getTk_status() != 14) { |
| | | return null; |
| | | } |
| | | |
| | | //订单付款 |
| | | if (order.getTk_status() == 12) { |
| | | return new BigDecimal(order.getPub_share_pre_fee()).add(new BigDecimal(order.getSubsidy_fee())); |
| | | } |
| | | |
| | | //订单结算/订单成功 |
| | | return new BigDecimal(order.getPub_share_fee()).add(new BigDecimal(order.getSubsidy_fee())); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.ks.lijin.utils.taobao; |
| | | |
| | | |
| | | import com.google.gson.Gson; |
| | | import com.ks.lijin.exception.*; |
| | | import com.ks.lijin.pojo.DTO.taobao.*; |
| | | import com.ks.lijin.pojo.PageEntity; |
| | |
| | | } catch (LiJinException e) { |
| | | throw e; |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 淘礼金报告 |
| | | * |
| | | * @param rightsId |
| | | * @param app |
| | | * @return |
| | | * @throws LiJinAccountException |
| | | * @throws LiJinAmountException |
| | | * @throws LiJinException |
| | | * @throws LiJinGoodsException |
| | | */ |
| | | public static TaoLiJinReportDTO taolijinReport(String rightsId, TaoKeAppInfo app) { |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("method", "taobao.tbk.dg.vegas.tlj.instance.report"); |
| | | map.put("rights_id", rightsId); |
| | | |
| | | String result = baseRequestForThreeTimes(map, app); |
| | | JSONObject json = JSONObject.fromObject(result); |
| | | System.out.println(json); |
| | | JSONObject root = json.optJSONObject("tbk_dg_vegas_tlj_instance_report_response"); |
| | | if (root != null && root.optJSONObject("result") != null) { |
| | | if (root.optJSONObject("result").optBoolean("success")) { |
| | | JSONObject modelJson = root.optJSONObject("result").optJSONObject("model"); |
| | | TaoLiJinReportDTO dto = new Gson().fromJson(modelJson.toString(), TaoLiJinReportDTO.class); |
| | | return dto; |
| | | } else { |
| | | // 日志记录 TODO |
| | | } |
| | | } |
| | | |
| | | |
| | | return null; |
| | | } |
| | |
| | | String key = keys.next(); |
| | | url += String.format("%s=%s&", key, URLEncoder.encode(params.get(key), "UTF-8")); |
| | | } |
| | | System.out.println("淘客请求连接:"+url); |
| | | System.out.println("淘客请求连接:" + url); |
| | | GetMethod method = new GetMethod(url); |
| | | // 3S的响应超时 |
| | | HttpConnectionManagerParams hparams = new HttpConnectionManagerParams(); |
| | |
| | | return goods; |
| | | } |
| | | |
| | | public static Date getTaoBaoSystemTime() { |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("method", "taobao.time.get"); |
| | | try { |
| | | JSONObject json = TaoKeBaseUtil.baseRequest(map, false); |
| | | String time = json.optJSONObject("time_get_response").optString("time"); |
| | | return new Date(TimeUtil.convertToTimeTemp(time, "yyyy-MM-dd HH:mm:ss")); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | taolijinReport("eC2%2FoV8gigdzVO5CvuRDjDVC0SEP1L7d",new TaoKeAppInfo("27743325","527a23554f71557d7b786bc479fcd5fe")); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | //已经支付 |
| | | public final static int CODE_ALREADY_PAY = 10001; |
| | | |
| | | //支付方式不存在 |
| | | public final static int CODE_PAY_WAY_NOT_EXIST = 10002; |
| | | |
| | | //付款失败 |
| | | public final static int CODE_PAY_FAIL = 10003; |
| | | |
| | | //创建支付订单失败 |
| | | public final static int CODE_CREATE_PAY_ORDER_FAIL = 20001; |
| | | |
| | | //接口请求出错 |
| | | public final static int CODE_API_ERROR = 20002; |
| | | |
| | | public OrderPayException(int code, String msg) { |
| | | super(code, msg); |
| | | } |
| | |
| | | * @param t |
| | | * @throws VipOrderException |
| | | */ |
| | | public PayWayInfoDTO addOrderWithPay(VipOrderDTO t, String notifyUrl, String returnUrl,String ip) throws VipOrderException; |
| | | public PayWayInfoDTO addOrderWithPay(VipOrderDTO t, String notifyUrl, String returnUrl, String ip) throws VipOrderException; |
| | | |
| | | /** |
| | | * 创建支付订单 |
| | | * |
| | | * @param ip |
| | | * @param order |
| | | * @param notifyUrl |
| | |
| | | * @return |
| | | * @throws OrderPayException |
| | | */ |
| | | public PayWayInfoDTO payOrder( VipOrder order, String notifyUrl, String returnUrl,String ip) throws OrderPayException; |
| | | public PayWayInfoDTO payOrder(VipOrder order, String notifyUrl, String returnUrl, String ip) throws OrderPayException; |
| | | |
| | | |
| | | /** |
| | |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public VipOrder checkOrderPayState(Long id); |
| | | public VipOrder checkOrderPayState(Long id) throws OrderPayException, VipOrderException; |
| | | |
| | | |
| | | /** |
| | | * 获取微信支付成功的订单号 |
| | | * |
| | | * @param notifyContent |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 获取支付宝支付成功的订单号 |
| | | * |
| | | * @param params |
| | | * @return |
| | | */ |
| | |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | //@Configuration |
| | | @Configuration |
| | | public class XXLJobConfig { |
| | | |
| | | Logger log = LoggerFactory.getLogger(XXLJobConfig.class); |
New file |
| | |
| | | package com.ks.lijin.dao; |
| | | |
| | | import com.ks.lib.common.dao.MongodbBaseDao; |
| | | import com.ks.lijin.pojo.DO.LiJinDangerGoods; |
| | | import com.ks.lijin.pojo.DO.LijinConfig; |
| | | import com.ks.lijin.query.BaseDaoQuery; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Repository |
| | | public class LijinConfigDao extends MongodbBaseDao<LijinConfig> { |
| | | |
| | | |
| | | public LijinConfig getConfigByKey(String key) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("key").is(key)); |
| | | return findOne(query); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ks.lijin.dao; |
| | | |
| | | import com.ks.lib.common.dao.MongodbBaseDao; |
| | | import com.ks.lijin.pojo.DO.LiJinDangerGoods; |
| | | import com.ks.lijin.pojo.DO.TaoBaoOrderRecord; |
| | | import com.ks.lijin.query.BaseDaoQuery; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | @Repository |
| | | public class LijinDangerGoodsDao extends MongodbBaseDao<LiJinDangerGoods> { |
| | | |
| | | |
| | | public List<LiJinDangerGoods> list(DaoQuery daoQuery) { |
| | | List<Criteria> andList = new ArrayList<>(); |
| | | if (daoQuery.tradeId != null) { |
| | | andList.add(Criteria.where("tradeId").is(daoQuery.tradeId)); |
| | | } |
| | | Query query = new Query(); |
| | | Criteria[] ands = new Criteria[andList.size()]; |
| | | andList.toArray(ands); |
| | | query.addCriteria(new Criteria().andOperator(ands)); |
| | | return findList(query); |
| | | } |
| | | |
| | | |
| | | public static class DaoQuery extends BaseDaoQuery { |
| | | public String tradeId; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.ks.lijin.dao; |
| | | |
| | | import com.ks.lib.common.dao.MongodbBaseDao; |
| | | import com.ks.lijin.pojo.DO.TaoBaoOrderRecord; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Repository |
| | | public class TaoBaoOrderRecordDao extends MongodbBaseDao<TaoBaoOrderRecord> { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ks.lijin.job; |
| | | |
| | | import com.ks.lijin.pojo.DO.LiJinProviderTaoKeAccount; |
| | | import com.ks.lijin.pojo.DO.TaoBaoOrderRecord; |
| | | import com.ks.lijin.service.LiJinProviderAccountService; |
| | | import com.ks.lijin.service.manager.LiJinProviderTaoKeAccountManager; |
| | | import com.ks.lijin.service.manager.LijinOrderManager; |
| | | import com.ks.lijin.utils.taobao.TaoBaoOrderUtil; |
| | | import com.ks.lijin.utils.taobao.TaoKeApiUtil; |
| | | import com.taobao.api.internal.util.TaobaoUtils; |
| | | import com.xxl.job.core.biz.model.ReturnT; |
| | | import com.xxl.job.core.handler.annotation.XxlJob; |
| | | import org.springframework.stereotype.Component; |
| | | import org.yeshi.utils.DateUtil; |
| | | import org.yeshi.utils.NumberUtil; |
| | | import org.yeshi.utils.StringUtil; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Component |
| | | public class LijinOrderJob { |
| | | |
| | | @Resource |
| | | private LijinOrderManager lijinOrderManager; |
| | | |
| | | @Resource |
| | | private LiJinProviderAccountService liJinProviderAccountService; |
| | | |
| | | /** |
| | | * 保存最近2分钟的淘宝订单数据 |
| | | * |
| | | * @param param |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @XxlJob("lijin-order-saveLatestTaoBaoOrder") |
| | | public ReturnT<String> saveLatestTaoBaoOrder(String param) throws Exception { |
| | | //保存最近5分钟的淘宝订单 |
| | | List<String> pubIds = getPubIds(); |
| | | Date endTime = TaoKeApiUtil.getTaoBaoSystemTime(); |
| | | if (endTime == null) { |
| | | throw new Exception("淘宝系统时间获取出错"); |
| | | } |
| | | //查询最近2分钟的订单 |
| | | Date startTime = new Date(endTime.getTime() - 1000 * 60 * 2); |
| | | for (String pubId : pubIds) { |
| | | saveTaoBaoOrder(pubId, startTime, endTime); |
| | | } |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | |
| | | |
| | | @XxlJob("lijin-order-saveTaoBaoOrder") |
| | | public ReturnT<String> saveTaoBaoOrder(String param) throws Exception { |
| | | if (StringUtil.isNullOrEmpty(param) || !NumberUtil.isNumeric(param)) { |
| | | throw new Exception("请输入正确小时数"); |
| | | } |
| | | int hour = Integer.parseInt(param); |
| | | int page = hour % 2 == 0 ? hour / 2 : hour / 2 + 1; |
| | | //获取当前时间 |
| | | Date now = TaoKeApiUtil.getTaoBaoSystemTime(); |
| | | if (now == null) { |
| | | throw new Exception("淘宝系统时间获取出错"); |
| | | } |
| | | List<String> pubIds = getPubIds(); |
| | | for (int i = 0; i < page; i++) { |
| | | Date endTime = new Date(now.getTime() - 1000 * 60 * 60 * 2L * i); |
| | | Date startTime = new Date(endTime.getTime() - 1000 * 60 * 60 * 2L); |
| | | for (String pubId : pubIds) { |
| | | saveTaoBaoOrder(pubId, startTime, endTime); |
| | | } |
| | | } |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取淘宝会员ID |
| | | * |
| | | * @return |
| | | */ |
| | | private List<String> getPubIds() { |
| | | List<LiJinProviderTaoKeAccount> list = liJinProviderAccountService.listValidByProviderId(1L, null); |
| | | //获取淘客账号 |
| | | List<String> pubIds = new ArrayList<>(); |
| | | for (LiJinProviderTaoKeAccount account : list) { |
| | | pubIds.add(account.getPid().split("_")[1]); |
| | | } |
| | | return pubIds; |
| | | } |
| | | |
| | | private void saveTaoBaoOrder(String pubId, Date startTime, Date endTime) throws Exception { |
| | | List<TaoBaoOrderRecord> orderRecordList = TaoBaoOrderUtil.getOrderByModifyTime(pubId, startTime, endTime); |
| | | if (orderRecordList == null) { |
| | | return; |
| | | } |
| | | for (TaoBaoOrderRecord record : orderRecordList) { |
| | | //保存 |
| | | lijinOrderManager.saveTaoBaoOrder(record); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 同步礼金数据 |
| | | * |
| | | * @param param |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @XxlJob("lijin-order-syncLijinData") |
| | | public ReturnT<String> syncLijinData(String param) throws Exception { |
| | | |
| | | |
| | | |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | public interface LiJinExpendRecordMapper extends BaseMapper<LiJinExpendRecord> { |
| | | |
| | | List<LiJinExpendRecord> listByPage(@Param("query") ExpendRecordQuery query); |
| | | |
| | | long count(@Param("query")ExpendRecordQuery query); |
| | | long count(@Param("query") ExpendRecordQuery query); |
| | | |
| | | |
| | | /** |
| | | * 统计今日已使用次数 |
| | | * |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | int countTodayNumByExpend(@Param("uid")String uid); |
| | | int countTodayNumByExpend(@Param("uid") String uid); |
| | | |
| | | |
| | | /** |
| | | * 统计今日已使用金额 |
| | | * |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | BigDecimal countTodayMoneyByExpend(@Param("uid")String uid); |
| | | BigDecimal countTodayMoneyByExpend(@Param("uid") String uid); |
| | | |
| | | |
| | | /** |
| | | * 获取一段时间内的最大资金记录 |
| | | * |
| | | * @param goodsId |
| | | * @param minCreatetime |
| | | * @param maxCreateTime |
| | | * @return |
| | | */ |
| | | LiJinExpendRecord getMaxMoneyRecord(@Param("goodsId") String goodsId, @Param("minCreatetime") Date minCreatetime, @Param("maxCreateTime") Date maxCreateTime); |
| | | |
| | | |
| | | /** |
| | | * 获取正在进行中的礼金 |
| | | * @param minCreateTime |
| | | * @param maxCreateTime |
| | | * @param start |
| | | * @param count |
| | | * @return |
| | | */ |
| | | List<LiJinExpendRecord> listOnGoingLijin(@Param("minCreateTime") Date minCreateTime, @Param("maxCreateTime") Date maxCreateTime, @Param("start") int start, @Param("count") int count); |
| | | |
| | | } |
New file |
| | |
| | | package com.ks.lijin.pojo.DO; |
| | | |
| | | import org.springframework.data.mongodb.core.mapping.Document; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Document(collection = "config") |
| | | public class LijinConfig implements Serializable { |
| | | private String id; |
| | | private String key; |
| | | private String name; |
| | | private String value; |
| | | private Date createTime; |
| | | private Date updateTime; |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getKey() { |
| | | return key; |
| | | } |
| | | |
| | | public void setKey(String key) { |
| | | this.key = key; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getValue() { |
| | | return value; |
| | | } |
| | | |
| | | public void setValue(String value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | 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; |
| | | } |
| | | } |
| | |
| | | |
| | | public String rightsId; |
| | | |
| | | |
| | | } |
| | |
| | | public void deleteInfoInRedis(Date date) { |
| | | String day = TimeUtil.getGernalTime(date.getTime(), "yyyyMMdd"); |
| | | String goodsKey = String.format("lijingoodsnum-%s-*", day); |
| | | String accountMoneyKey = String.format("lijinaccountmoney-%s-%s", day); |
| | | String accountMoneyKey = String.format("lijinaccountmoney-%s-*", day); |
| | | redisTemplate.delete(goodsKey); |
| | | redisTemplate.delete(accountMoneyKey); |
| | | } |
New file |
| | |
| | | package com.ks.lijin.service.manager; |
| | | |
| | | import com.ks.lijin.dao.LijinConfigDao; |
| | | import com.ks.lijin.pojo.DO.LijinConfig; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Component |
| | | public class LijinConfigManager { |
| | | |
| | | @Resource |
| | | private LijinConfigDao lijinConfigDao; |
| | | |
| | | public String getConfigValue(String key) { |
| | | LijinConfig config = lijinConfigDao.getConfigByKey(key); |
| | | if (config == null) { |
| | | return null; |
| | | } |
| | | return config.getValue(); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ks.lijin.service.manager; |
| | | |
| | | import com.ks.lijin.dao.LijinDangerGoodsDao; |
| | | import com.ks.lijin.mapper.LiJinExpendRecordMapper; |
| | | import com.ks.lijin.pojo.DO.LiJinDangerGoods; |
| | | import com.ks.lijin.pojo.DO.LiJinExpendRecord; |
| | | import com.ks.lijin.pojo.DO.TaoBaoOrderRecord; |
| | | import com.ks.lijin.utils.taobao.TaoBaoOrderUtil; |
| | | import org.springframework.stereotype.Component; |
| | | import org.yeshi.utils.TimeUtil; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Component |
| | | public class LijinDangerGoodsManager { |
| | | |
| | | @Resource |
| | | private LijinDangerGoodsDao lijinDangerGoodsDao; |
| | | |
| | | @Resource |
| | | private LiJinExpendRecordMapper liJinExpendRecordMapper; |
| | | |
| | | /** |
| | | * 处理订单 |
| | | * |
| | | * @param record |
| | | * @throws Exception |
| | | */ |
| | | public void processOrder(TaoBaoOrderRecord record) throws Exception { |
| | | if (record == null) { |
| | | throw new Exception("订单为空"); |
| | | } |
| | | |
| | | if (record.getTb_paid_time() == null) { |
| | | throw new Exception("订单未付款"); |
| | | } |
| | | |
| | | //查询是否在危险订单中 |
| | | LijinDangerGoodsDao.DaoQuery daoQuery = new LijinDangerGoodsDao.DaoQuery(); |
| | | daoQuery.tradeId = record.getTrade_id(); |
| | | daoQuery.count = 1; |
| | | List<LiJinDangerGoods> list = lijinDangerGoodsDao.list(daoQuery); |
| | | if (list != null && list.size() > 0) { |
| | | throw new Exception("已加入危险订单记录"); |
| | | } |
| | | //判断是否 |
| | | Date maxCreateTime = record.getTb_paid_time(); |
| | | Date minCreateTime = new Date(TimeUtil.convertToTimeTemp(TimeUtil.getGernalTime(maxCreateTime.getTime(), "yyyyMMdd"), "yyyyMMdd")); |
| | | LiJinExpendRecord expendRecord = liJinExpendRecordMapper.getMaxMoneyRecord(record.getItem_id() + "", minCreateTime, maxCreateTime); |
| | | //判断是否触发机制 |
| | | if (expendRecord == null) { |
| | | throw new Exception("礼金创建记录不存在"); |
| | | } |
| | | BigDecimal money = expendRecord.getMoney(); |
| | | BigDecimal commission = TaoBaoOrderUtil.getCommission(record); |
| | | if (commission == null) { |
| | | throw new Exception("订单未处于付款/结算状态"); |
| | | } |
| | | |
| | | //礼金大于佣金的87%表示出错 |
| | | if (money.compareTo(commission.multiply(new BigDecimal("0.87"))) >= 0) { |
| | | //危险报警 |
| | | LiJinDangerGoods dangerGoods = new LiJinDangerGoods(); |
| | | dangerGoods.setCreateTime(new Date()); |
| | | dangerGoods.setGoodsId(record.getItem_id() + ""); |
| | | dangerGoods.setGoodsType(1); |
| | | dangerGoods.setMaxLijinMoney(money.multiply(new BigDecimal(100)).intValue()); |
| | | dangerGoods.setMinCommission(commission.multiply(new BigDecimal(100)).intValue()); |
| | | dangerGoods.setId(dangerGoods.getGoodsType() + "-" + dangerGoods.getGoodsId()); |
| | | lijinDangerGoodsDao.save(dangerGoods); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 是否是危险商品 |
| | | * @param goodsId |
| | | * @param goodsType |
| | | * @return |
| | | */ |
| | | public boolean isDangerous(String goodsId, int goodsType) { |
| | | String id = goodsType + "-" + goodsId; |
| | | return lijinDangerGoodsDao.get(id) != null; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.ks.lijin.service.manager; |
| | | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Component; |
| | | import org.yeshi.utils.TimeUtil; |
| | |
| | | |
| | | @Resource |
| | | private RedisTemplate redisTemplate; |
| | | |
| | | Logger logger = LoggerFactory.getLogger(LijinGoodsManager.class); |
| | | |
| | | |
| | | /** |
| | |
| | | public boolean todayCanCreate(Long auctionId) { |
| | | String day = TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyyMMdd"); |
| | | String key = String.format("lijingoodslimit-%s-%s", day, auctionId); |
| | | return !redisTemplate.hasKey(key); |
| | | logger.info("key值为:" + key); |
| | | Boolean hasKey = redisTemplate.hasKey(key); |
| | | logger.info("hasKey:" + hasKey); |
| | | if (hasKey == null || !hasKey) { |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
New file |
| | |
| | | package com.ks.lijin.service.manager; |
| | | |
| | | import com.ks.lijin.dao.TaoBaoOrderRecordDao; |
| | | import com.ks.lijin.pojo.DO.TaoBaoOrderRecord; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 礼金订单管理 |
| | | */ |
| | | @Component |
| | | public class LijinOrderManager { |
| | | |
| | | @Resource |
| | | private TaoBaoOrderRecordDao taoBaoOrderRecordDao; |
| | | |
| | | @Resource |
| | | private LijinDangerGoodsManager lijinDangerGoodsManager; |
| | | |
| | | /** |
| | | * 保存淘宝订单 |
| | | * |
| | | * @param taoBaoOrderRecord |
| | | */ |
| | | public void saveTaoBaoOrder(TaoBaoOrderRecord taoBaoOrderRecord) { |
| | | if (taoBaoOrderRecord == null) { |
| | | return; |
| | | } |
| | | //不保存非淘礼金的订单数据 |
| | | if (taoBaoOrderRecord.getMarketing_type() == null || !taoBaoOrderRecord.getMarketing_type().contains("淘礼金")) { |
| | | return; |
| | | } |
| | | taoBaoOrderRecord.setUpdateTime(new Date()); |
| | | taoBaoOrderRecord.setId(taoBaoOrderRecord.getTrade_id()); |
| | | taoBaoOrderRecordDao.save(taoBaoOrderRecord); |
| | | |
| | | try { |
| | | lijinDangerGoodsManager.processOrder(taoBaoOrderRecord); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.ks.lijin.service.LiJinProviderNoticeService; |
| | | import com.ks.lijin.service.LijinCreateService; |
| | | import com.ks.lijin.service.manager.LiJinProviderTaoKeAccountManager; |
| | | import com.ks.lijin.service.manager.LijinConfigManager; |
| | | import com.ks.lijin.service.manager.LijinDangerGoodsManager; |
| | | import com.ks.lijin.service.manager.LijinGoodsManager; |
| | | import com.ks.lijin.util.Constant; |
| | | import com.ks.lijin.utils.taobao.TaoBaoUtil; |
| | |
| | | @Resource |
| | | private LiJinProviderAccountService liJinProviderAccountService; |
| | | |
| | | @Reference(version = "1.0") |
| | | @Reference(version = "1.0", check = false) |
| | | private VipCenterService vipCenterService; |
| | | |
| | | @Reference(version = "1.0") |
| | | @Reference(version = "1.0", check = false) |
| | | private VipGradePotenceService vipGradePotenceService; |
| | | |
| | | @Reference(version = "1.0") |
| | | @Reference(version = "1.0", check = false) |
| | | private VipGradeService vipGradeService; |
| | | |
| | | @Resource |
| | |
| | | |
| | | @Resource |
| | | private LijinGoodsManager lijinGoodsManager; |
| | | |
| | | @Resource |
| | | private LijinDangerGoodsManager lijinDangerGoodsManager; |
| | | |
| | | @Resource |
| | | private LijinConfigManager lijinConfigManager; |
| | | |
| | | @Override |
| | | public List<MoneyInfo> getMoneyInfo(String uid, List<TaoBaoGoodsBrief> goodsBriefList) { |
| | |
| | | return money; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public boolean userCanCreateTBLijin(String uid) throws LiJinUserException { |
| | | public boolean userCanCreateTBLijin(String uid, Date registerDate) throws LiJinUserException { |
| | | VipGradePotence potence = vipCenterService.getVipPotence(uid); |
| | | if (potence == null) { |
| | | return false; |
| | |
| | | |
| | | // 使用次数已经超过最大次数 |
| | | int numExpend = liJinExpendRecordService.countTodayNumByExpend(uid); |
| | | if (registerDate != null) { |
| | | //判断新用户 |
| | | String newerHour = lijinConfigManager.getConfigValue("newer-hour"); |
| | | String dayPlusCount = lijinConfigManager.getConfigValue("newer-everyday-plus-lijin-count"); |
| | | if (!StringUtil.isNullOrEmpty(newerHour) && !StringUtil.isNullOrEmpty(dayPlusCount)) { |
| | | //新用户每日附加次数 |
| | | if (System.currentTimeMillis() - registerDate.getTime() < 1000 * 60 * 60L * Integer.parseInt(dayPlusCount)) { |
| | | numExpend += Integer.parseInt(dayPlusCount); |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (numMax.intValue() <= numExpend) { |
| | | throw new LiJinUserException(LiJinUserException.CODE_USER_CREATE_NUM_LIMIT, "用户创建淘礼金的次数超限"); |
| | | } |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public LiJinExpendRecord createTBLijin(String uid, Long goodsId) throws LiJinException, LiJinGoodsException, LiJinUserException, LiJinAmountException { |
| | | return createTBLijin(uid, null, goodsId); |
| | | } |
| | | |
| | | userCanCreateTBLijin(uid); |
| | | @Override |
| | | public LiJinExpendRecord createTBLijin(String uid, Date registerDate, Long auctionId) throws LiJinException, LiJinGoodsException, LiJinUserException, LiJinAmountException { |
| | | |
| | | //用户是否有创建权限 |
| | | userCanCreateTBLijin(uid, registerDate); |
| | | //商品是否在危险商品中 |
| | | boolean dangerous = lijinDangerGoodsManager.isDangerous(auctionId + "", 1); |
| | | if (dangerous) { |
| | | throw new LiJinGoodsException(LiJinGoodsException.CODE_GOODS_NOT_SUPPORT, "该商品暂无法创建礼金"); |
| | | } |
| | | |
| | | |
| | | // 获取用户等级 |
| | | VIPEnum vipRank = vipCenterService.getVIPEnumByUid(uid); |
| | |
| | | //淘礼金创建 |
| | | TaoBaoGoodsBrief goods = null; |
| | | try { |
| | | goods = TaoKeApiUtil.searchGoodsDetail(goodsId); |
| | | goods = TaoKeApiUtil.searchGoodsDetail(auctionId); |
| | | } catch (TaoBaoGoodsDownException e) { |
| | | throw new LiJinGoodsException(LiJinGoodsException.CODE_GOODS_OFFLINE, "商品下线"); |
| | | } |
| | |
| | | if (redisTemplate.opsForValue().setIfAbsent(key, "1", 120, TimeUnit.SECONDS)) { |
| | | Date now = new Date(); |
| | | try { |
| | | TaoLijinCreateResultDTO taoLiJinDTO = executeTaoLiJin(goodsId, lijinAmount, params); |
| | | TaoLijinCreateResultDTO taoLiJinDTO = executeTaoLiJin(auctionId, lijinAmount, params); |
| | | if (taoLiJinDTO == null) { |
| | | throw new LiJinException(1, "淘宝API推广红包创建失败"); |
| | | } |
| | | //添加账号的 |
| | | return addCreateSuccessRecord(uid, goodsId, lijinAmount, params.getTitle(), params.getNum(), taoLiJinDTO); |
| | | return addCreateSuccessRecord(uid, auctionId, lijinAmount, params.getTitle(), params.getNum(), taoLiJinDTO); |
| | | } catch (LiJinGoodsException e) { |
| | | if (e.getCode() == LiJinGoodsException.CODE_GOODS_CREATED_FULL) { |
| | | lijinGoodsManager.createdFullToday(goodsId, now); |
| | | lijinGoodsManager.createdFullToday(auctionId, now); |
| | | } |
| | | throw e; |
| | | } finally { |
| | |
| | | server: |
| | | port: 8087 |
| | | port: 80 |
| | | tomcat: |
| | | uri-encoding: UTF-8 |
| | | |
| | |
| | | max-idle: 200 |
| | | time-between-eviction-runs: 60000ms |
| | | min-idle: 8 |
| | | jedis: |
| | | jedis: |
| | | pool: |
| | | max-active: 1024 |
| | | max-wait: 10000ms |
| | |
| | | name: lijin-provider |
| | | registry: |
| | | protocol: zookeeper |
| | | address: zookeeper://172.16.16.26:2181 |
| | | address: zookeeper://172.16.16.46:2181 |
| | | # address: zookeeper://118.195.138.153:2181 |
| | | client: curator |
| | | protocol: |
| | | name: dubbo |
| | | port: 20902 |
| | | port: 20904 |
| | | scan: |
| | | base-packages: com.ks.lijin.service.remote |
| | | provider: |
| | |
| | | job: |
| | | accessToken: |
| | | executor: |
| | | appname: demo |
| | | appname: service-lijin |
| | | ip: |
| | | logpath: /data/applogs/xxl-job/jobhandler |
| | | logretentiondays: -1 |
| | | port: 9994 |
| | | admin: |
| | | addresses: http://111.231.250.166:9000/xxl-job-admin |
| | | addresses: http://1.14.235.17:9000/xxl-job-admin |
| | | logging: |
| | | level: |
| | | com: |
New file |
| | |
| | | server: |
| | | port: 8081 |
| | | tomcat: |
| | | uri-encoding: UTF-8 |
| | | |
| | | spring: |
| | | main: |
| | | allow-bean-definition-overriding: true |
| | | http: |
| | | encoding: |
| | | force: true |
| | | charset: UTF-8 |
| | | enabled: true |
| | | data: |
| | | mongodb: |
| | | username: yeshi |
| | | password: Yeshi2016@ |
| | | #172.16.16.44 |
| | | #193.112.35.168 |
| | | host: 193.112.35.168 |
| | | port: 27016 |
| | | database: lijin |
| | | authentication-database: admin |
| | | datasource: |
| | | #gz-cdb-r13d0yi9.sql.tencentcdb.com:62929 |
| | | #172.16.16.17:3306 |
| | | url: jdbc:mysql://gz-cdb-r13d0yi9.sql.tencentcdb.com:62929/ec_lijin?&useTimezone=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: Yeshi2016@ |
| | | driver-class-name: com.mysql.jdbc.Driver |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | druid: |
| | | initial-size: 8 |
| | | min-idle: 1 |
| | | max-active: 20 |
| | | max-wait: 60000 |
| | | time-between-eviction-runsMillis: 60000 |
| | | min-evictable-idle-timeMillis: 300000 |
| | | validation-query: select 'x' FROM DUAL |
| | | test-while-idle: true |
| | | test-on-borrow: false |
| | | test-on-return: false |
| | | pool-prepared-statements: true |
| | | max-open-prepared-statements: 20 |
| | | max-pool-prepared-statement-per-connection-size: 20 |
| | | filters: stat |
| | | connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 |
| | | use-global-data-source-stat: true |
| | | mybatis: |
| | | mapper-locations : classpath:mapper/*.xml |
| | | type-aliases-package: com.ks.goldcorn.pojo.DO |
| | | configuration: |
| | | log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl |
| | | |
| | | redis: |
| | | #172.16.16.3 |
| | | #193.112.34.40 |
| | | host: 118.195.138.153 |
| | | port: 6379 |
| | | password: 123456 |
| | | timeout: 5000 |
| | | lettuce: |
| | | pool: |
| | | max-active: 1024 |
| | | max-wait: 10000ms |
| | | max-idle: 200 |
| | | time-between-eviction-runs: 60000ms |
| | | min-idle: 8 |
| | | jedis: |
| | | pool: |
| | | max-wait: 10000 |
| | | max-idle: 200 |
| | | max-total: 1024 |
| | | database: 4 |
| | | |
| | | dubbo: |
| | | application: |
| | | name: lijin-provider |
| | | registry: |
| | | protocol: zookeeper |
| | | address: zookeeper://193.112.35.168:2181 |
| | | # address: zookeeper://118.195.138.153:2181 |
| | | client: curator |
| | | protocol: |
| | | name: dubbo |
| | | port: 20902 |
| | | scan: |
| | | base-packages: com.ks.lijin.service.remote |
| | | provider: |
| | | timeout: 10000 |
| | | host: 127.0.0.1 |
| | | xxl: |
| | | job: |
| | | accessToken: |
| | | executor: |
| | | appname: demo |
| | | ip: |
| | | logpath: /data/applogs/xxl-job/jobhandler |
| | | logretentiondays: -1 |
| | | port: 9999 |
| | | admin: |
| | | addresses: http://1.14.235.17:9000/xxl-job-admin |
| | | logging: |
| | | level: |
| | | com: |
| | | ks: |
| | | lijin: |
| | | mapper: debug |
| | | org.springframework.data.mongodb.core: DEBUG |
| | |
| | | <!--日志存储的根路径 ${catalina.base}指向每个Tomcat目录私有信息的位置, |
| | | 就是conf、logs、temp、webapps和work的父目录--> |
| | | |
| | | <!-- E:/logback --> |
| | | <property name="log.filePath" value="/tmp/logs/lucky"/> |
| | | <property name="log.filePath" value="/tmp/logs"/> |
| | | <!--<property name="log.filePath" value="D:/logs"/>--> |
| | | <!--日志展示的格式--> |
| | | <property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n"/> |
| | | |
| | |
| | | <!--encoder作用是既把日志信息转换为字符串,也输出到指定的位置 --> |
| | | <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> |
| | | <!--pattern为配置输出的格式--> |
| | | <pattern>${log.pattern}</pattern> |
| | | </encoder> |
| | | </appender> |
| | | |
| | | <!-- INFO --> |
| | | <appender name="infoAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <file>${log.filePath}/info.log</file> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <fileNamePattern>${log.filePath}/info/info.log.gz.%d{yyyy-MM-dd}</fileNamePattern> |
| | | <maxHistory>${log.maxHistory}</maxHistory> |
| | | </rollingPolicy> |
| | | <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> |
| | | <pattern>${log.pattern}</pattern> |
| | | </encoder> |
| | | </appender> |
| | |
| | | </filter> |
| | | </appender> |
| | | |
| | | |
| | | <!-- 活动日志 --> |
| | | <appender name="activityAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <file>${log.filePath}/activity/activity.log</file> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <fileNamePattern>${log.filePath}/activity/activity.log.zip.%d{yyyy-MM-dd}</fileNamePattern> |
| | | <maxHistory>${log.maxHistory}</maxHistory> |
| | | </rollingPolicy> |
| | | <encoder> |
| | | <pattern>${log.pattern}</pattern> |
| | | </encoder> |
| | | </appender> |
| | | |
| | | <!-- 活动参与日志 --> |
| | | <appender name="activityJoinAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <file>${log.filePath}/activity/activity-join.log</file> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <fileNamePattern>${log.filePath}/activity/activity-join.log.zip.%d{yyyy-MM-dd}</fileNamePattern> |
| | | <maxHistory>${log.maxHistory}</maxHistory> |
| | | </rollingPolicy> |
| | | <encoder> |
| | | <pattern>${log.pattern}</pattern> |
| | | </encoder> |
| | | </appender> |
| | | |
| | | <!--name表示为哪一个logger指定层级和输出的方式 |
| | | additivity表示叠加祖先的输出方式(默认为true,会叠加),所以com.lxc.o2o以及其子类都会输出在控制台中,因为这个logger继承了root中的appender |
| | | level表示级别大于等于${log.level}的信息才会输出,输出方式为配置的appender, |
| | |
| | | |
| | | <!-- 一切logger都会继承自root,root默认的层级level为debug --> |
| | | |
| | | <logger name="activityLogger" level="INFO" additivity="true"> |
| | | <appender-ref ref="activityAppender"></appender-ref> |
| | | </logger> |
| | | |
| | | <logger name="activityJoinLogger" level="INFO" additivity="true"> |
| | | <appender-ref ref="activityJoinAppender"></appender-ref> |
| | | </logger> |
| | | <!--<logger name="activityJoinLogger" level="INFO" additivity="true">--> |
| | | <!--<appender-ref ref="activityJoinAppender"></appender-ref>--> |
| | | <!--</logger>--> |
| | | |
| | | <root level="INFO"> |
| | | <!--在控制台中输出所在层级对应level(以及大于level)的日志信息,因为这里并没有设置LevelFilter--> |
| | | <appender-ref ref="STDOUT"></appender-ref> |
| | | <appender-ref ref="infoAppender"></appender-ref> |
| | | <appender-ref ref="errorAppender"></appender-ref> |
| | | </root> |
| | | </configuration> |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.ks.lijin.mapper.LiJinExpendRecordMapper"> |
| | | <resultMap id="BaseResultMap" type="com.ks.lijin.pojo.DO.LiJinExpendRecord"> |
| | | <id column="rd_id" property="id" jdbcType="BIGINT"/> |
| | | <result column="rd_uid" property="uid" jdbcType="VARCHAR"/> |
| | | <result column="rd_account_id" property="accountId" jdbcType="BIGINT"/> |
| | | <result column="rd_goods_id" property="goodsId" jdbcType="VARCHAR"/> |
| | | <result column="rd_money" property="money" jdbcType="DECIMAL"/> |
| | | <result column="rd_num" property="num" jdbcType="INTEGER"/> |
| | | <result column="rd_title" property="title" jdbcType="VARCHAR"/> |
| | | <result column="rd_rights_id" property="rightsId" jdbcType="VARCHAR"/> |
| | | <result column="rd_send_url" property="sendUrl" jdbcType="VARCHAR"/> |
| | | <result column="rd_unfreeze_amount" property="unfreezeAmount" jdbcType="DECIMAL"/> |
| | | <result column="rd_unfreeze_num" property="unfreezeNum" jdbcType="INTEGER"/> |
| | | <result column="rd_refund_amount" property="refundAmount" jdbcType="DECIMAL"/> |
| | | <result column="rd_refund_num" property="refundNum" jdbcType="INTEGER"/> |
| | | <result column="rd_alipay_amount" property="alipayAmount" jdbcType="DECIMAL"/> |
| | | <result column="rd_use_amount" property="useAmount" jdbcType="DECIMAL"/> |
| | | <result column="rd_use_num" property="useNum" jdbcType="INTEGER"/> |
| | | <result column="rd_win_amount" property="winAmount" jdbcType="DECIMAL"/> |
| | | <result column="rd_win_num" property="winNum" jdbcType="INTEGER"/> |
| | | <result column="rd_pre_commission_amount" property="preCommissionAmount" jdbcType="DECIMAL"/> |
| | | <result column="rd_create_time" property="createTime" jdbcType="TIMESTAMP"/> |
| | | <result column="rd_update_time" property="updateTime" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">rd_id,rd_uid,rd_account_id,rd_goods_id,rd_money,rd_num,rd_title,rd_rights_id,rd_send_url,rd_unfreeze_amount,rd_unfreeze_num,rd_refund_amount,rd_refund_num,rd_alipay_amount,rd_use_amount,rd_use_num,rd_win_amount,rd_win_num,rd_pre_commission_amount,rd_create_time,rd_update_time</sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select |
| | | <include refid="Base_Column_List"/>from tlj_expend_record where rd_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from tlj_expend_record where rd_id = #{id,jdbcType=BIGINT}</delete> |
| | | <insert id="insert" parameterType="com.ks.lijin.pojo.DO.LiJinExpendRecord" useGeneratedKeys="true" keyProperty="id">insert into tlj_expend_record (rd_id, rd_uid, rd_account_id, rd_goods_id, rd_money, rd_num, rd_title, rd_rights_id, rd_send_url, rd_unfreeze_amount, rd_unfreeze_num, rd_refund_amount, rd_refund_num, rd_alipay_amount, rd_use_amount, rd_use_num, rd_win_amount, rd_win_num, rd_pre_commission_amount, rd_create_time, rd_update_time)values (#{id,jdbcType=BIGINT}, #{uid,jdbcType=VARCHAR}, #{accountId,jdbcType=BIGINT}, #{goodsId,jdbcType=VARCHAR}, #{money,jdbcType=DECIMAL}, #{num,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{rightsId,jdbcType=VARCHAR}, #{sendUrl,jdbcType=VARCHAR}, #{unfreezeAmount,jdbcType=DECIMAL}, #{unfreezeNum,jdbcType=INTEGER}, #{refundAmount,jdbcType=DECIMAL}, #{refundNum,jdbcType=INTEGER}, #{alipayAmount,jdbcType=DECIMAL}, #{useAmount,jdbcType=DECIMAL}, #{useNum,jdbcType=INTEGER}, #{winAmount,jdbcType=DECIMAL}, #{winNum,jdbcType=INTEGER}, #{preCommissionAmount,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})</insert> |
| | | <insert id="insertSelective" parameterType="com.ks.lijin.pojo.DO.LiJinExpendRecord" useGeneratedKeys="true" keyProperty="id">insert into tlj_expend_record |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">rd_id,</if> |
| | | <if test="uid != null">rd_uid,</if> |
| | | <if test="accountId != null">rd_account_id,</if> |
| | | <if test="goodsId != null">rd_goods_id,</if> |
| | | <if test="money != null">rd_money,</if> |
| | | <if test="num != null">rd_num,</if> |
| | | <if test="title != null">rd_title,</if> |
| | | <if test="rightsId != null">rd_rights_id,</if> |
| | | <if test="sendUrl != null">rd_send_url,</if> |
| | | <if test="unfreezeAmount != null">rd_unfreeze_amount,</if> |
| | | <if test="unfreezeNum != null">rd_unfreeze_num,</if> |
| | | <if test="refundAmount != null">rd_refund_amount,</if> |
| | | <if test="refundNum != null">rd_refund_num,</if> |
| | | <if test="alipayAmount != null">rd_alipay_amount,</if> |
| | | <if test="useAmount != null">rd_use_amount,</if> |
| | | <if test="useNum != null">rd_use_num,</if> |
| | | <if test="winAmount != null">rd_win_amount,</if> |
| | | <if test="winNum != null">rd_win_num,</if> |
| | | <if test="preCommissionAmount != null">rd_pre_commission_amount,</if> |
| | | <if test="createTime != null">rd_create_time,</if> |
| | | <if test="updateTime != null">rd_update_time,</if> |
| | | </trim>values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="uid != null">#{uid,jdbcType=VARCHAR},</if> |
| | | <if test="accountId != null">#{accountId,jdbcType=BIGINT},</if> |
| | | <if test="goodsId != null">#{goodsId,jdbcType=VARCHAR},</if> |
| | | <if test="money != null">#{money,jdbcType=DECIMAL},</if> |
| | | <if test="num != null">#{num,jdbcType=INTEGER},</if> |
| | | <if test="title != null">#{title,jdbcType=VARCHAR},</if> |
| | | <if test="rightsId != null">#{rightsId,jdbcType=VARCHAR},</if> |
| | | <if test="sendUrl != null">#{sendUrl,jdbcType=VARCHAR},</if> |
| | | <if test="unfreezeAmount != null">#{unfreezeAmount,jdbcType=DECIMAL},</if> |
| | | <if test="unfreezeNum != null">#{unfreezeNum,jdbcType=INTEGER},</if> |
| | | <if test="refundAmount != null">#{refundAmount,jdbcType=DECIMAL},</if> |
| | | <if test="refundNum != null">#{refundNum,jdbcType=INTEGER},</if> |
| | | <if test="alipayAmount != null">#{alipayAmount,jdbcType=DECIMAL},</if> |
| | | <if test="useAmount != null">#{useAmount,jdbcType=DECIMAL},</if> |
| | | <if test="useNum != null">#{useNum,jdbcType=INTEGER},</if> |
| | | <if test="winAmount != null">#{winAmount,jdbcType=DECIMAL},</if> |
| | | <if test="winNum != null">#{winNum,jdbcType=INTEGER},</if> |
| | | <if test="preCommissionAmount != null">#{preCommissionAmount,jdbcType=DECIMAL},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.ks.lijin.pojo.DO.LiJinExpendRecord">update tlj_expend_record set rd_uid = #{uid,jdbcType=VARCHAR},rd_account_id = #{accountId,jdbcType=BIGINT},rd_goods_id = #{goodsId,jdbcType=VARCHAR},rd_money = #{money,jdbcType=DECIMAL},rd_num = #{num,jdbcType=INTEGER},rd_title = #{title,jdbcType=VARCHAR},rd_rights_id = #{rightsId,jdbcType=VARCHAR},rd_send_url = #{sendUrl,jdbcType=VARCHAR},rd_unfreeze_amount = #{unfreezeAmount,jdbcType=DECIMAL},rd_unfreeze_num = #{unfreezeNum,jdbcType=INTEGER},rd_refund_amount = #{refundAmount,jdbcType=DECIMAL},rd_refund_num = #{refundNum,jdbcType=INTEGER},rd_alipay_amount = #{alipayAmount,jdbcType=DECIMAL},rd_use_amount = #{useAmount,jdbcType=DECIMAL},rd_use_num = #{useNum,jdbcType=INTEGER},rd_win_amount = #{winAmount,jdbcType=DECIMAL},rd_win_num = #{winNum,jdbcType=INTEGER},rd_pre_commission_amount = #{preCommissionAmount,jdbcType=DECIMAL},rd_create_time = #{createTime,jdbcType=TIMESTAMP},rd_update_time = #{updateTime,jdbcType=TIMESTAMP}where rd_id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.ks.lijin.pojo.DO.LiJinExpendRecord">update tlj_expend_record |
| | | <set> |
| | | <if test="uid != null">rd_uid=#{uid,jdbcType=VARCHAR},</if> |
| | | <if test="accountId != null">rd_account_id=#{accountId,jdbcType=BIGINT},</if> |
| | | <if test="goodsId != null">rd_goods_id=#{goodsId,jdbcType=VARCHAR},</if> |
| | | <if test="money != null">rd_money=#{money,jdbcType=DECIMAL},</if> |
| | | <if test="num != null">rd_num=#{num,jdbcType=INTEGER},</if> |
| | | <if test="title != null">rd_title=#{title,jdbcType=VARCHAR},</if> |
| | | <if test="rightsId != null">rd_rights_id=#{rightsId,jdbcType=VARCHAR},</if> |
| | | <if test="sendUrl != null">rd_send_url=#{sendUrl,jdbcType=VARCHAR},</if> |
| | | <if test="unfreezeAmount != null">rd_unfreeze_amount=#{unfreezeAmount,jdbcType=DECIMAL},</if> |
| | | <if test="unfreezeNum != null">rd_unfreeze_num=#{unfreezeNum,jdbcType=INTEGER},</if> |
| | | <if test="refundAmount != null">rd_refund_amount=#{refundAmount,jdbcType=DECIMAL},</if> |
| | | <if test="refundNum != null">rd_refund_num=#{refundNum,jdbcType=INTEGER},</if> |
| | | <if test="alipayAmount != null">rd_alipay_amount=#{alipayAmount,jdbcType=DECIMAL},</if> |
| | | <if test="useAmount != null">rd_use_amount=#{useAmount,jdbcType=DECIMAL},</if> |
| | | <if test="useNum != null">rd_use_num=#{useNum,jdbcType=INTEGER},</if> |
| | | <if test="winAmount != null">rd_win_amount=#{winAmount,jdbcType=DECIMAL},</if> |
| | | <if test="winNum != null">rd_win_num=#{winNum,jdbcType=INTEGER},</if> |
| | | <if test="preCommissionAmount != null">rd_pre_commission_amount=#{preCommissionAmount,jdbcType=DECIMAL},</if> |
| | | <if test="createTime != null">rd_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">rd_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </set> where rd_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <resultMap id="BaseResultMap" type="com.ks.lijin.pojo.DO.LiJinExpendRecord"> |
| | | <id column="rd_id" property="id" jdbcType="BIGINT"/> |
| | | <result column="rd_uid" property="uid" jdbcType="VARCHAR"/> |
| | | <result column="rd_account_id" property="accountId" jdbcType="BIGINT"/> |
| | | <result column="rd_goods_id" property="goodsId" jdbcType="VARCHAR"/> |
| | | <result column="rd_money" property="money" jdbcType="DECIMAL"/> |
| | | <result column="rd_num" property="num" jdbcType="INTEGER"/> |
| | | <result column="rd_title" property="title" jdbcType="VARCHAR"/> |
| | | <result column="rd_rights_id" property="rightsId" jdbcType="VARCHAR"/> |
| | | <result column="rd_send_url" property="sendUrl" jdbcType="VARCHAR"/> |
| | | <result column="rd_unfreeze_amount" property="unfreezeAmount" jdbcType="DECIMAL"/> |
| | | <result column="rd_unfreeze_num" property="unfreezeNum" jdbcType="INTEGER"/> |
| | | <result column="rd_refund_amount" property="refundAmount" jdbcType="DECIMAL"/> |
| | | <result column="rd_refund_num" property="refundNum" jdbcType="INTEGER"/> |
| | | <result column="rd_alipay_amount" property="alipayAmount" jdbcType="DECIMAL"/> |
| | | <result column="rd_use_amount" property="useAmount" jdbcType="DECIMAL"/> |
| | | <result column="rd_use_num" property="useNum" jdbcType="INTEGER"/> |
| | | <result column="rd_win_amount" property="winAmount" jdbcType="DECIMAL"/> |
| | | <result column="rd_win_num" property="winNum" jdbcType="INTEGER"/> |
| | | <result column="rd_pre_commission_amount" property="preCommissionAmount" jdbcType="DECIMAL"/> |
| | | <result column="rd_create_time" property="createTime" jdbcType="TIMESTAMP"/> |
| | | <result column="rd_update_time" property="updateTime" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">rd_id,rd_uid,rd_account_id,rd_goods_id,rd_money,rd_num,rd_title,rd_rights_id,rd_send_url,rd_unfreeze_amount,rd_unfreeze_num,rd_refund_amount,rd_refund_num,rd_alipay_amount,rd_use_amount,rd_use_num,rd_win_amount,rd_win_num,rd_pre_commission_amount,rd_create_time,rd_update_time</sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select |
| | | <include refid="Base_Column_List"/>from tlj_expend_record where rd_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" |
| | | parameterType="java.lang.Long">delete from tlj_expend_record where rd_id = #{id,jdbcType=BIGINT}</delete> |
| | | <insert id="insert" parameterType="com.ks.lijin.pojo.DO.LiJinExpendRecord" useGeneratedKeys="true" |
| | | keyProperty="id">insert into tlj_expend_record (rd_id, rd_uid, rd_account_id, rd_goods_id, rd_money, rd_num, rd_title, rd_rights_id, rd_send_url, rd_unfreeze_amount, rd_unfreeze_num, rd_refund_amount, rd_refund_num, rd_alipay_amount, rd_use_amount, rd_use_num, rd_win_amount, rd_win_num, rd_pre_commission_amount, rd_create_time, rd_update_time)values (#{id,jdbcType=BIGINT}, #{uid,jdbcType=VARCHAR}, #{accountId,jdbcType=BIGINT}, #{goodsId,jdbcType=VARCHAR}, #{money,jdbcType=DECIMAL}, #{num,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{rightsId,jdbcType=VARCHAR}, #{sendUrl,jdbcType=VARCHAR}, #{unfreezeAmount,jdbcType=DECIMAL}, #{unfreezeNum,jdbcType=INTEGER}, #{refundAmount,jdbcType=DECIMAL}, #{refundNum,jdbcType=INTEGER}, #{alipayAmount,jdbcType=DECIMAL}, #{useAmount,jdbcType=DECIMAL}, #{useNum,jdbcType=INTEGER}, #{winAmount,jdbcType=DECIMAL}, #{winNum,jdbcType=INTEGER}, #{preCommissionAmount,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})</insert> |
| | | <insert id="insertSelective" parameterType="com.ks.lijin.pojo.DO.LiJinExpendRecord" useGeneratedKeys="true" |
| | | keyProperty="id">insert into tlj_expend_record |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">rd_id,</if> |
| | | <if test="uid != null">rd_uid,</if> |
| | | <if test="accountId != null">rd_account_id,</if> |
| | | <if test="goodsId != null">rd_goods_id,</if> |
| | | <if test="money != null">rd_money,</if> |
| | | <if test="num != null">rd_num,</if> |
| | | <if test="title != null">rd_title,</if> |
| | | <if test="rightsId != null">rd_rights_id,</if> |
| | | <if test="sendUrl != null">rd_send_url,</if> |
| | | <if test="unfreezeAmount != null">rd_unfreeze_amount,</if> |
| | | <if test="unfreezeNum != null">rd_unfreeze_num,</if> |
| | | <if test="refundAmount != null">rd_refund_amount,</if> |
| | | <if test="refundNum != null">rd_refund_num,</if> |
| | | <if test="alipayAmount != null">rd_alipay_amount,</if> |
| | | <if test="useAmount != null">rd_use_amount,</if> |
| | | <if test="useNum != null">rd_use_num,</if> |
| | | <if test="winAmount != null">rd_win_amount,</if> |
| | | <if test="winNum != null">rd_win_num,</if> |
| | | <if test="preCommissionAmount != null">rd_pre_commission_amount,</if> |
| | | <if test="createTime != null">rd_create_time,</if> |
| | | <if test="updateTime != null">rd_update_time,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="uid != null">#{uid,jdbcType=VARCHAR},</if> |
| | | <if test="accountId != null">#{accountId,jdbcType=BIGINT},</if> |
| | | <if test="goodsId != null">#{goodsId,jdbcType=VARCHAR},</if> |
| | | <if test="money != null">#{money,jdbcType=DECIMAL},</if> |
| | | <if test="num != null">#{num,jdbcType=INTEGER},</if> |
| | | <if test="title != null">#{title,jdbcType=VARCHAR},</if> |
| | | <if test="rightsId != null">#{rightsId,jdbcType=VARCHAR},</if> |
| | | <if test="sendUrl != null">#{sendUrl,jdbcType=VARCHAR},</if> |
| | | <if test="unfreezeAmount != null">#{unfreezeAmount,jdbcType=DECIMAL},</if> |
| | | <if test="unfreezeNum != null">#{unfreezeNum,jdbcType=INTEGER},</if> |
| | | <if test="refundAmount != null">#{refundAmount,jdbcType=DECIMAL},</if> |
| | | <if test="refundNum != null">#{refundNum,jdbcType=INTEGER},</if> |
| | | <if test="alipayAmount != null">#{alipayAmount,jdbcType=DECIMAL},</if> |
| | | <if test="useAmount != null">#{useAmount,jdbcType=DECIMAL},</if> |
| | | <if test="useNum != null">#{useNum,jdbcType=INTEGER},</if> |
| | | <if test="winAmount != null">#{winAmount,jdbcType=DECIMAL},</if> |
| | | <if test="winNum != null">#{winNum,jdbcType=INTEGER},</if> |
| | | <if test="preCommissionAmount != null">#{preCommissionAmount,jdbcType=DECIMAL},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" |
| | | parameterType="com.ks.lijin.pojo.DO.LiJinExpendRecord">update tlj_expend_record set rd_uid = #{uid,jdbcType=VARCHAR},rd_account_id = #{accountId,jdbcType=BIGINT},rd_goods_id = #{goodsId,jdbcType=VARCHAR},rd_money = #{money,jdbcType=DECIMAL},rd_num = #{num,jdbcType=INTEGER},rd_title = #{title,jdbcType=VARCHAR},rd_rights_id = #{rightsId,jdbcType=VARCHAR},rd_send_url = #{sendUrl,jdbcType=VARCHAR},rd_unfreeze_amount = #{unfreezeAmount,jdbcType=DECIMAL},rd_unfreeze_num = #{unfreezeNum,jdbcType=INTEGER},rd_refund_amount = #{refundAmount,jdbcType=DECIMAL},rd_refund_num = #{refundNum,jdbcType=INTEGER},rd_alipay_amount = #{alipayAmount,jdbcType=DECIMAL},rd_use_amount = #{useAmount,jdbcType=DECIMAL},rd_use_num = #{useNum,jdbcType=INTEGER},rd_win_amount = #{winAmount,jdbcType=DECIMAL},rd_win_num = #{winNum,jdbcType=INTEGER},rd_pre_commission_amount = #{preCommissionAmount,jdbcType=DECIMAL},rd_create_time = #{createTime,jdbcType=TIMESTAMP},rd_update_time = #{updateTime,jdbcType=TIMESTAMP}where rd_id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.ks.lijin.pojo.DO.LiJinExpendRecord">update |
| | | tlj_expend_record |
| | | <set> |
| | | <if test="uid != null">rd_uid=#{uid,jdbcType=VARCHAR},</if> |
| | | <if test="accountId != null">rd_account_id=#{accountId,jdbcType=BIGINT},</if> |
| | | <if test="goodsId != null">rd_goods_id=#{goodsId,jdbcType=VARCHAR},</if> |
| | | <if test="money != null">rd_money=#{money,jdbcType=DECIMAL},</if> |
| | | <if test="num != null">rd_num=#{num,jdbcType=INTEGER},</if> |
| | | <if test="title != null">rd_title=#{title,jdbcType=VARCHAR},</if> |
| | | <if test="rightsId != null">rd_rights_id=#{rightsId,jdbcType=VARCHAR},</if> |
| | | <if test="sendUrl != null">rd_send_url=#{sendUrl,jdbcType=VARCHAR},</if> |
| | | <if test="unfreezeAmount != null">rd_unfreeze_amount=#{unfreezeAmount,jdbcType=DECIMAL},</if> |
| | | <if test="unfreezeNum != null">rd_unfreeze_num=#{unfreezeNum,jdbcType=INTEGER},</if> |
| | | <if test="refundAmount != null">rd_refund_amount=#{refundAmount,jdbcType=DECIMAL},</if> |
| | | <if test="refundNum != null">rd_refund_num=#{refundNum,jdbcType=INTEGER},</if> |
| | | <if test="alipayAmount != null">rd_alipay_amount=#{alipayAmount,jdbcType=DECIMAL},</if> |
| | | <if test="useAmount != null">rd_use_amount=#{useAmount,jdbcType=DECIMAL},</if> |
| | | <if test="useNum != null">rd_use_num=#{useNum,jdbcType=INTEGER},</if> |
| | | <if test="winAmount != null">rd_win_amount=#{winAmount,jdbcType=DECIMAL},</if> |
| | | <if test="winNum != null">rd_win_num=#{winNum,jdbcType=INTEGER},</if> |
| | | <if test="preCommissionAmount != null">rd_pre_commission_amount=#{preCommissionAmount,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="createTime != null">rd_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">rd_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </set> |
| | | where rd_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <!-- 非模板 --> |
| | | <sql id="listWhere"> |
| | | <if test="query.uid!=null">and rd_uid=#{query.uid}</if> |
| | | <if test="query.accountId!=null">and rd_account_id=#{query.accountId}</if> |
| | | <if test="query.goodsId!=null">and rd_goods_id=#{query.goodsId}</if> |
| | | <if test="query.money!=null">and rd_money=#{query.money}</if> |
| | | <if test="query.num!=null">and rd_num=#{query.num}</if> |
| | | <if test="query.title!=null">and rd_title=#{query.title}</if> |
| | | <if test="query.rightsId!=null">and rd_rights_id=#{query.rightsId}</if> |
| | | </sql> |
| | | <!-- 非模板 --> |
| | | <sql id="listWhere"> |
| | | <if test="query.uid!=null">and rd_uid=#{query.uid}</if> |
| | | <if test="query.accountId!=null">and rd_account_id=#{query.accountId}</if> |
| | | <if test="query.goodsId!=null">and rd_goods_id=#{query.goodsId}</if> |
| | | <if test="query.money!=null">and rd_money=#{query.money}</if> |
| | | <if test="query.num!=null">and rd_num=#{query.num}</if> |
| | | <if test="query.title!=null">and rd_title=#{query.title}</if> |
| | | <if test="query.rightsId!=null">and rd_rights_id=#{query.rightsId}</if> |
| | | </sql> |
| | | |
| | | |
| | | <select id="listByPage" resultMap="BaseResultMap"> |
| | | select <include refid="Base_Column_List"/> from tlj_expend_record |
| | | where 1=1 |
| | | <include refid="listWhere"/> |
| | | limit #{query.start},#{query.count} |
| | | </select> |
| | | <select id="listByPage" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from tlj_expend_record |
| | | where 1=1 |
| | | <include refid="listWhere"/> |
| | | limit #{query.start},#{query.count} |
| | | </select> |
| | | |
| | | <select id="count" resultType="java.lang.Long"> |
| | | select IFNULL(count(*),0) from tlj_expend_record |
| | | where 1=1 |
| | | <include refid="listWhere"/> |
| | | </select> |
| | | <select id="count" resultType="java.lang.Long"> |
| | | select IFNULL(count(*),0) from tlj_expend_record |
| | | where 1=1 |
| | | <include refid="listWhere"/> |
| | | </select> |
| | | |
| | | <select id="countTodayNumByExpend" resultType="Integer"> |
| | | <select id="countTodayNumByExpend" resultType="Integer"> |
| | | select IFNULL(count(*),0) from tlj_expend_record |
| | | where rd_uid=#{uid} and date(rd_create_time) = curdate(); |
| | | </select> |
| | | |
| | | <select id="countTodayMoneyByExpend" resultType="BigDecimal"> |
| | | <select id="countTodayMoneyByExpend" resultType="BigDecimal"> |
| | | select IFNULL(SUM(rd_money),0) from tlj_expend_record |
| | | where rd_uid=#{uid} and date(rd_create_time) = curdate(); |
| | | </select> |
| | | |
| | | |
| | | <select id="getMaxMoneyRecord" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from tlj_expend_record |
| | | where rd_goods_id=#{goodsId} AND rd_create_time>=#{minCreatetime} and #{maxCreatetime}>rd_create_time order by |
| | | rd_money desc limit 1 |
| | | </select> |
| | | |
| | | <select id="listOnGoingLijin" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from tlj_expend_record |
| | | where (rd_win_num=0 || rd_win_num IS NULL || rd_use_num=0 || rd_use_num IS NULL) AND (rd_refund_num=0 || |
| | | rd_refund_num IS NULL) AND (rd_fp_refund_num=0||rd_fp_refund_num IS NULL) |
| | | <if test="minCreateTime!=null"> |
| | | AND rd_create_time>=#{minCreateTime} |
| | | </if> |
| | | <if test="maxCreateTime!=null"> |
| | | AND #{maxCreateTime}>rd_create_time |
| | | </if> |
| | | limit #{start},#{count} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | package com.ks; |
| | | |
| | | import com.ks.lijin.LiJinApplication; |
| | | import com.ks.lijin.dao.LijinConfigDao; |
| | | import com.ks.lijin.job.LijinOrderJob; |
| | | import com.ks.lijin.pojo.DO.LijinConfig; |
| | | import org.junit.jupiter.api.Test; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.test.context.ContextConfiguration; |
| | | import org.yeshi.utils.TimeUtil; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | |
| | | |
| | | @Resource |
| | | private RedisTemplate redisTemplate; |
| | | @Resource |
| | | private LijinOrderJob lijinOrderJob; |
| | | |
| | | @Resource |
| | | private LijinConfigDao lijinConfigDao; |
| | | |
| | | @Test |
| | | public void test() { |
| | | String key="lijinaccountmoney-20210526-1"; |
| | | redisTemplate.opsForValue().increment(key,123); |
| | | |
| | | String key = "lijinaccountmoney-20210526-1"; |
| | | redisTemplate.opsForValue().increment(key, 123); |
| | | Object obj = redisTemplate.opsForValue().get("lijinaccountmoney-20210526-1"); |
| | | System.out.println(obj); |
| | | } |
| | | |
| | | @Test |
| | | public void job() throws Exception { |
| | | lijinOrderJob.saveTaoBaoOrder("6"); |
| | | } |
| | | |
| | | @Test |
| | | public void config() throws Exception { |
| | | LijinConfig config = new LijinConfig(); |
| | | config.setCreateTime(new Date()); |
| | | config.setId("newer-hour"); |
| | | config.setKey("newer-hour"); |
| | | config.setName("新手的判断时间(小时)"); |
| | | config.setValue("48"); |
| | | lijinConfigDao.save(config); |
| | | |
| | | config = new LijinConfig(); |
| | | config.setCreateTime(new Date()); |
| | | config.setId("newer-everyday-plus-lijin-count"); |
| | | config.setKey("newer-everyday-plus-lijin-count"); |
| | | config.setName("新手每天额外的礼金创建次数"); |
| | | config.setValue("2"); |
| | | lijinConfigDao.save(config); |
| | | } |
| | | |
| | | @Test |
| | | public void redis() { |
| | | Long auctionId = 600889742753L; |
| | | String day = TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyyMMdd"); |
| | | String key = String.format("lijingoodslimit-%s-%s", day, auctionId); |
| | | Boolean hasKey = redisTemplate.hasKey(key); |
| | | System.out.println(hasKey); |
| | | } |
| | | |
| | | |
| | |
| | | import com.ks.vip.util.Constant; |
| | | import com.ks.vip.util.PayUtil; |
| | | import org.apache.dubbo.config.annotation.Service; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.yeshi.utils.StringUtil; |
| | | import org.yeshi.utils.alipay.AlipayH5PayUtil; |
| | |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | import java.util.UUID; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | @Service(version = "1.0") |
| | | public class VipOrderPayServiceImpl implements VipOrederPayService { |
| | | |
| | | Logger logger = LoggerFactory.getLogger(VipOrederPayService.class); |
| | | |
| | | @Resource |
| | | private VipOrderMapper vipOrderMapper; |
| | |
| | | String payUrl = PayUtil.createWXOrder(ip, orderId, order.getPayMoney(), goodsTitle, notifyUrl, returnUrl); |
| | | return new PayWayInfoDTO(PayWayEnum.weChat, payUrl, null); |
| | | } catch (Exception e) { |
| | | logger.error("创建微信支付出错", e); |
| | | throw new OrderPayException(OrderPayException.CODE_CREATE_PAY_ORDER_FAIL, e.getMessage()); |
| | | } |
| | | } |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public VipOrder checkOrderPayState(Long id) { |
| | | public VipOrder checkOrderPayState(Long id) throws VipOrderException, OrderPayException { |
| | | VipOrder order = vipOrderMapper.selectByPrimaryKey(id); |
| | | if (order == null || order.getState() == VipOrder.STATE_PAY) { |
| | | if (order == null) { |
| | | throw new VipOrderException(VipOrderException.CODE_NOT_EXIST, "订单不存在"); |
| | | } |
| | | if (order.getState() == VipOrder.STATE_PAY) { |
| | | return order; |
| | | } |
| | | switch (order.getPayWay()) { |
| | |
| | | case "alipay": |
| | | AlipayTradeQueryResponse res = null; |
| | | try { |
| | | res = AlipayH5PayUtil.queryOrder(PayUtil.getAlipayApp(), id + "", null); |
| | | res = AlipayH5PayUtil.queryOrder(PayUtil.getAlipayApp(), order.getThreeOrderId(), null); |
| | | //支付成功 |
| | | if (res.isSuccess() && "TRADE_SUCCESS".equalsIgnoreCase(res.getTradeStatus())) { |
| | | try { |
| | | return paySuccess(order); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return paySuccess(order); |
| | | } else { |
| | | throw new OrderPayException(OrderPayException.CODE_PAY_FAIL, "支付宝付款未成功"); |
| | | } |
| | | } catch (AlipayApiException e) { |
| | | e.printStackTrace(); |
| | | throw new OrderPayException(OrderPayException.CODE_API_ERROR, "支付宝接口请求出错:" + e.getErrMsg()); |
| | | } |
| | | //微信 |
| | | case "weChat": |
| | | WXPayOrderInfoV3 info = null; |
| | | try { |
| | | WXPayOrderInfoV3 info = WXPayV3Util.getPayOrderInfo(id + "", PayUtil.getWXAPP()); |
| | | if (info != null && info.getTrade_state().equalsIgnoreCase("SUCCESS")) { |
| | | paySuccess(order); |
| | | return order; |
| | | } |
| | | info = WXPayV3Util.getPayOrderInfo(order.getThreeOrderId(), PayUtil.getWXAPP()); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new OrderPayException(OrderPayException.CODE_API_ERROR, "微信支付接口请求出错:" + e.getMessage()); |
| | | } |
| | | if (info != null && info.getTrade_state().equalsIgnoreCase("SUCCESS")) { |
| | | paySuccess(order); |
| | | return order; |
| | | } else { |
| | | throw new OrderPayException(OrderPayException.CODE_PAY_FAIL, "微信付款未成功"); |
| | | } |
| | | default: |
| | | throw new OrderPayException(OrderPayException.CODE_PAY_WAY_NOT_EXIST, "付款方式不存在"); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | |
| | | package com.ks.vip.util; |
| | | |
| | | import com.alipay.api.AlipayApiException; |
| | | import com.google.gson.Gson; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.yeshi.utils.alipay.AlipayH5PayUtil; |
| | | import org.yeshi.utils.entity.alipay.AlipayAppInfo; |
| | | import org.yeshi.utils.entity.wx.WXAPPInfo; |
| | |
| | | import java.util.Properties; |
| | | |
| | | public class PayUtil { |
| | | |
| | | final static Logger logger = LoggerFactory.getLogger(PayUtil.class); |
| | | |
| | | |
| | | public static AlipayAppInfo getAlipayApp() { |
| | |
| | | String mchSerialNo = properties.getProperty("mch_serial_no"); |
| | | String apiV3Key = properties.getProperty("api_v3_key"); |
| | | |
| | | |
| | | WXAPPInfo app = new WXAPPInfo(appId, mchId, mchSerialNo, privateKey, apiV3Key); |
| | | |
| | | return app; |
| | |
| | | * @param money |
| | | * @return |
| | | */ |
| | | public static String getVipChargeAlipayForm(String goodsTitle, String orderNo, BigDecimal money,String notifyUrl,String returnUrl) { |
| | | public static String getVipChargeAlipayForm(String goodsTitle, String orderNo, BigDecimal money, String notifyUrl, String returnUrl) { |
| | | try { |
| | | AlipayAppInfo appInfo = getAlipayApp(); |
| | | String form = AlipayH5PayUtil.createOrderForm(appInfo, orderNo, money, goodsTitle, returnUrl, notifyUrl); |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | public static String createWXOrder(String ip, String orderNo, BigDecimal money, String title,String notifyUrl,String returnUrl) throws Exception { |
| | | public static String createWXOrder(String ip, String orderNo, BigDecimal money, String title, String notifyUrl, String returnUrl) throws Exception { |
| | | WXPlaceOrderParams params = new WXPlaceOrderParams(); |
| | | params.setIp(ip); |
| | | params.setOrderNo(orderNo); |
| | |
| | | params.setFee(money); |
| | | params.setBody(title); |
| | | params.setApp(getWXAPP()); |
| | | |
| | | logger.info("微信支付表单数据:{}", new Gson().toJson(params)); |
| | | String payUrl = WXPayV3Util.createH5Order(params, returnUrl); |
| | | return payUrl; |
| | | } |
| | |
| | | name: tejia-vip-provider |
| | | registry: |
| | | protocol: zookeeper |
| | | address: zookeeper://172.16.16.26:2181 |
| | | address: zookeeper://172.16.16.46:2181 |
| | | client: curator |
| | | protocol: |
| | | name: dubbo |
| | |
| | | package com.ks; |
| | | |
| | | import com.ks.vip.VIPApplication; |
| | | import com.ks.vip.exception.OrderPayException; |
| | | import com.ks.vip.exception.VipOrderException; |
| | | import com.ks.vip.pojo.DTO.VipOrderDTO; |
| | | import com.ks.vip.pojo.Enums.PayWayEnum; |
| | |
| | | dto.setPayWay(PayWayEnum.weChat); |
| | | dto.setThreeOrderId("tejia-vip-" + System.currentTimeMillis()); |
| | | try { |
| | | vipOrederPayService.addOrderWithPay(dto, notifuUrl, resturnUrl,"192.168.3.122"); |
| | | vipOrederPayService.addOrderWithPay(dto, notifuUrl, resturnUrl, "192.168.3.122"); |
| | | } catch (VipOrderException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | @Test |
| | | public void checkOrder() { |
| | | try { |
| | | vipOrederPayService.checkOrderPayState(1000068L); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | try { |
| | | vipOrederPayService.checkOrderPayState(1000059L); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | try { |
| | | vipOrederPayService.checkOrderPayState(1000067L); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | try { |
| | | vipOrederPayService.checkOrderPayState(1000070L); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |