| | |
| | |
|
| | | package org.fanli;
|
| | |
|
| | | import java.io.File;
|
| | |
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | import org.junit.Ignore;
|
| | | import org.junit.Test;
|
| | | import org.yeshi.utils.HttpUtil;
|
| | |
|
| | |
| | | import com.yeshi.fanli.entity.taobao.TaoBaoLink;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoOrder;
|
| | | import com.yeshi.fanli.entity.taobao.TaoKeAppInfo;
|
| | | import com.yeshi.fanli.exception.taobao.TaoKeApiException;
|
| | | import com.yeshi.fanli.exception.taobao.TaobaoGoodsDownException;
|
| | | import com.yeshi.fanli.job.UpdateRelationAndSpecialOrderJob;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.goods.ShareGoodsService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoBuyRelationMapService;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.UserExtraTaoBaoInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.util.BeanUtil;
|
| | | import com.yeshi.fanli.util.SpringContext;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TaoBaoConstant;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoOrderUtil;
|
| | |
| | |
|
| | | @Test
|
| | | public void test1() {
|
| | | UpdateRelationAndSpecialOrderJob updateRelationAndSpecialOrderJob= BeanUtil.getBean(UpdateRelationAndSpecialOrderJob.class);
|
| | | SpringContext.initCOS();
|
| | | updateRelationAndSpecialOrderJob.doJob2();
|
| | | |
| | | }
|
| | |
|
| | | @Test
|
| | | public void test2() {
|
| | | TaoKeAppInfo app = new TaoKeAppInfo();
|
| | | app.setAdzoneId("44841750025");
|
| | | app.setAppKey("25070111");
|
| | | app.setAppSecret("c7809ad9cd926fc45199d1d3ab7fe2eb");
|
| | | app.setPid("mm_124933865_113050446_44841750025");
|
| | | try {
|
| | | TaoBaoGoodsBrief goods = TaoKeApiUtil.searchGoodsDetail(527893773636L, app);
|
| | | System.out.println(goods.getId());
|
| | | } catch (TaobaoGoodsDownException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | System.out.println(HttpUtil.getShortLink("http://h5.flq001.com"));
|
| | | System.out.println(HttpUtil.getShortLink("http://h5.flq002.com"));
|
| | | System.out.println(HttpUtil.getShortLink("http://h5.flq003.com"));
|
| | | System.out.println(HttpUtil.getShortLink("http://h5.flq004.com"));
|
| | | System.out.println(HttpUtil.getShortLink("http://h5.flq005.com"));
|
| | | }
|
| | |
|
| | | @Test
|
| | | public void test3() {
|
| | | // try {
|
| | | // EmergencyUtil.baoJin("monitor-error-tb-app-limit-24980167",
|
| | | // "淘宝APPKey请求限制【24980167】", new String[] { "18581318252" });
|
| | | // } catch (Exception e1) {
|
| | | //
|
| | | // }
|
| | | // 0K6TBHS%2F84vpYy%2FzKPWwH6J7%2BkHL3AEW
|
| | | // 2PlyMHAEtzjJX3K6R73L5KJ7%2BkHL3AEW
|
| | | Long[] auctionIds = new Long[] { 528561708277L, 563689377074L, 570752677800L, 569281626446L, 567165767332L,
|
| | | 555437572417L, 534857332052L, 565233575889L, 565536124572L };
|
| | | Long auctionId = 598165623087L;
|
| | | String appKey = "27821872";
|
| | | String appSecret = "9277b7c40b753e142303eeabc1936c80";
|
| | | String pid = "mm_491980152_690500060_109327900051";
|
| | | TaoKeAppInfo app=new TaoKeAppInfo(appKey, appSecret, pid);
|
| | |
|
| | | for (Long auctionId : auctionIds)
|
| | | TaoKeApiUtil.createTaoLiJin(auctionId, "返利券新人淘礼金红包", new BigDecimal("1.00"), 1, 1, new Date(),
|
| | | new Date(System.currentTimeMillis() + 1000 * 60 * 60 * 24L), new Date());
|
| | | // TaoKeApiUtil.getLiJinXG();
|
| | | // String
|
| | | // url="https://uland.taobao.com/taolijin/edetail?eh=aIrBfHZGd4iZuQF0XRz0iAXoB+DaBK5LQS0Flu/fbSp4QsdWMikAalrisGmre1Id0BFAqRODu114yl7QZ1qFyc7LbOC0oAuo+MUwzxYlSKECGml30RY8PBx5jSVkulpmRQIlrKaDNziGVmobyGguP+jgTFwOoHsRe9593cvcC9QGQASttHIRqdGO5qxVOPQ2buEoHk5wx6hxhsv5QYr1rbcOQrCzclRfPTIk7Z0myMWxZvcNeMU+E+L71lQF+6uZp7DLcYmoygrjfjYOW9fVleIg09jheaZgonv6QcvcARY=&union_lens=lensId:0b0b4505_0c2a_16af789993f_0880;traffic_flag=lm";
|
| | | // String token=
|
| | | // TaoKeApiUtil.getTKToken("https://img.alicdn.com/imgextra/i4/2256112408/O1CN01EKNifJ1TeuF9x4it9_!!2256112408.jpg_400x400.jpg",
|
| | | // "旗睿电风扇台式家用12寸16寸静音学生宿舍摇头定时节能台扇落地扇", url);
|
| | | // System.out.println(token);
|
| | | try {
|
| | | TaoKeApiUtil.createTaoLiJin(auctionId, "淘礼金", new BigDecimal(1), 1, new Date(),
|
| | | new Date(System.currentTimeMillis() + 1000 * 60 * 60 * 12L), new Date(),
|
| | | new Date(System.currentTimeMillis() + 1000 * 60 * 60 * 12L), app);
|
| | | } catch (TaoKeApiException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Test
|