Merge branch 'div' of ssh://193.112.35.168:29418/fanli-server into div
| | |
| | | String relationId = null;
|
| | |
|
| | | try {
|
| | | TaoKeApiUtil.getRelationId(accessToken, TaoBaoConstant.TAOBAO_AUTH_APPKEY,
|
| | | relationId= TaoKeApiUtil.getRelationId(accessToken, TaoBaoConstant.TAOBAO_AUTH_APPKEY,
|
| | | TaoBaoConstant.TAOBAO_AUTH_APPSECRET);// 渠道ID
|
| | | } catch (TaoBaoAuthException e) {
|
| | | if (e.getCode() == TaoBaoAuthException.CODE_NOT_REAL_NAME)
|
| | |
| | | import java.util.UUID;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.script.Invocable;
|
| | | import javax.script.ScriptEngine;
|
| | | import javax.script.ScriptEngineManager;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import org.jsoup.Jsoup;
|
| | |
| | | @Resource
|
| | | private TaoBaoGoodsBriefService taoBaoGoodsBriefService;
|
| | |
|
| | |
|
| | | @Resource
|
| | | private EhCacheCacheManager ehCacheCacheManager;
|
| | |
|
| | |
| | | @Resource
|
| | | private HongBaoManageService hongBaoManageService;
|
| | |
|
| | | |
| | | @Resource
|
| | | private InviteMaterialService inviteMaterialService;
|
| | | |
| | | |
| | |
|
| | | @RequestMapping(value = "testimg")
|
| | | public void testImg(HttpServletRequest request, PrintWriter out) {
|
| | |
| | | long startDTime = System.currentTimeMillis();
|
| | |
|
| | | /*
|
| | | * try { //ImageUtil.drawGoodsShareImg(new FileInputStream(new File(destPath)),
|
| | | * portrait, goods, shareImgPath); } catch (FileNotFoundException e) {
|
| | | * e.printStackTrace(); }
|
| | | * try { //ImageUtil.drawGoodsShareImg(new FileInputStream(new
|
| | | * File(destPath)), portrait, goods, shareImgPath); } catch
|
| | | * (FileNotFoundException e) { e.printStackTrace(); }
|
| | | */
|
| | | System.out.println(System.currentTimeMillis() - startDTime);
|
| | |
|
| | |
| | | out.close();
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 清除缓存
|
| | | *
|
| | |
| | | ehCacheCacheManager.getCacheManager().clearAll();
|
| | | }
|
| | |
|
| | | |
| | | @RequestMapping(value = "removeRedisCache")
|
| | | public void removeRedisCache(String key, PrintWriter out) {
|
| | | redisManager.removeCommonString(key);
|
| | | }
|
| | | |
| | |
|
| | | @RequestMapping(value = "testConfig")
|
| | | public void getTestConfig(PrintWriter pw) {
|
| | |
| | |
|
| | | @RequestMapping(value = "testDaTaoKe")
|
| | | public void getTestDaTaoKe(PrintWriter pw) {
|
| | | Document doc = null;
|
| | | try {
|
| | | Document doc = Jsoup.connect("http://www.dataoke.com/brandFeature").get();
|
| | | doc = Jsoup.connect("http://www.dataoke.com/ddq").get();
|
| | | } catch (IOException e1) {
|
| | | e1.printStackTrace();
|
| | | }
|
| | | Elements els = doc.getElementsByTag("script");
|
| | | for (int i = 0; i < els.size(); i++) {
|
| | | if (els.get(i).html().contains("var brandData")) {
|
| | | pw.print(els.get(i).html().replace("var brandData =", "").trim().split("};")[0] + "}");
|
| | | String content = els.get(i).html();
|
| | | if (content.indexOf("var dataDef") > -1) {
|
| | | ScriptEngineManager manager = new ScriptEngineManager();
|
| | | ScriptEngine engine = manager.getEngineByName("javascript");
|
| | | try {
|
| | | String js = "function getData(){return JSON.stringify(dataDef);}" + content;
|
| | | engine.eval(js);
|
| | | if (engine instanceof Invocable) {
|
| | | Invocable in = (Invocable) engine;
|
| | | pw.print(in.invokeFunction("getData"));
|
| | | }
|
| | | }
|
| | | } catch (IOException e) {
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | }
|
| | | }
|
| | |
|
| | | @RequestMapping(value = "insertShop")
|
| | | public void insertShop(PrintWriter out) {
|
| | |
| | |
|
| | | /**
|
| | | * 插入邀请素材
|
| | | * |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "uploadInviteMaterial")
|
| | |
| | | String name = filePic.getName();
|
| | | String prefix = name.substring(name.lastIndexOf(".") + 1);
|
| | | // 上传文件相对位置
|
| | | String filePath = "/resource/invite/everyday/" + UUID.randomUUID().toString().replace("-", "") + "." + prefix;
|
| | | String filePath = "/resource/invite/everyday/" + UUID.randomUUID().toString().replace("-", "") + "."
|
| | | + prefix;
|
| | |
|
| | | String fileUrl = COSManager.getInstance().uploadFile(filePic, filePath).getUrl();
|
| | |
|
| | |
| | | inviteMaterial.setPicture(fileUrl);
|
| | | list.add(inviteMaterial);
|
| | | }
|
| | |
|
| | |
|
| | | List<String> listTxt = new ArrayList<String>();
|
| | | File textfile = new File("E:\\Invite\\content.txt");//Text文件
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 插入邀请素材
|
| | | * |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "uploadInviteMaterial2")
|
| | |
| | | }
|
| | | brp.close();
|
| | |
|
| | | |
| | | List<String> listTxt = new ArrayList<String>();
|
| | | File textfile = new File("E:\\Invite\\content.txt");//Text文件
|
| | | BufferedReader br = new BufferedReader(new FileReader(textfile));// 构造一个BufferedReader类来读取文件
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | |
| | | /**
|
| | | * 插入邀请素材
|
| | | * |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "saveInvite")
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 插入邀请素材
|
| | | * |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "insertTimeInvite")
|
| | |
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | | import org.springframework.web.multipart.MultipartHttpServletRequest;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | |
| | | import com.yeshi.fanli.service.inter.count.TaoBaoOrderCountService;
|
| | | import com.yeshi.fanli.service.inter.order.CommonOrderCountService;
|
| | | import com.yeshi.fanli.service.inter.order.CommonOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.OrderProcessService;
|
| | | import com.yeshi.fanli.service.inter.order.OrderService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoOrderService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoWeiQuanDrawBackService;
|
| | |
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoOrderUtil;
|
| | | import com.yeshi.fanli.vo.order.CommonOrderVO;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserMoneyDetailService userMoneyDetailService;
|
| | |
|
| | | @Resource
|
| | | private OrderProcessService orderProcessService;
|
| | |
|
| | | /**
|
| | | * 统计历史订单-淘宝订单
|
| | |
| | | return data;
|
| | | }
|
| | |
|
| | | @RequestMapping(value = "uploadTaoBaoWeiQuanOrder")
|
| | | public void uploadWeiQuanOrder(String callback, HttpServletRequest request, PrintWriter out) {
|
| | | try {
|
| | | // 1. 先判断httpRequest 是否含有文件类型
|
| | | if (request instanceof MultipartHttpServletRequest) {
|
| | | MultipartHttpServletRequest fileRequest = (MultipartHttpServletRequest) request;
|
| | | MultipartFile file = fileRequest.getFile("file");
|
| | | List<TaoBaoWeiQuanOrder> orderList = TaoBaoOrderUtil.getWeiQuanOrders(file.getInputStream());
|
| | | for (TaoBaoWeiQuanOrder order : orderList)
|
| | | taoBaoWeiQuanOrderService.addWeiQuanOrder(order);// 添加维权订单到数据库
|
| | | // 处理维权订单
|
| | | orderProcessService.weiQuanOrder(orderList);
|
| | | }
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("更新成功"));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("更新失败"));
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | String reason = "后台封禁,操作人:" + admin.getId() + "-" + admin.getName();
|
| | | userAccountService.forbiddenUserAll(uid, reason);
|
| | |
|
| | | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("用户封禁成功"));
|
| | |
|
| | | } catch (Exception e) {
|
| | |
| | | }
|
| | |
|
| | | try {
|
| | |
|
| | | List<UserMoneyDetail> userMoneyDetailsList = userMoneyDetailService.listByUidWithState(uid, pageIndex,
|
| | | pageSize);
|
| | | if (userMoneyDetailsList == null || userMoneyDetailsList.size() == 0) {
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | List<AccountDetails> detailList = new ArrayList<>();
|
| | | for (UserMoneyDetail detail : userMoneyDetailsList)
|
| | | detailList.add(AccountDetailsFactory.create(detail));
|
| | |
|
| | | long count = userMoneyDetailService.countByUidWithState(uid);
|
| | |
|
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
|
| | |
|
| | | Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss").create();
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("pe", pe);
|
| | | data.put("result_list", GsonUtil.toJsonExpose(detailList));
|
| | | data.put("result_list", gson.toJson(userMoneyDetailsList));
|
| | |
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | |
|
| | |
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBriefExtra;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoHongBaoInfo;
|
| | | import com.yeshi.fanli.entity.taobao.TaobaoMeterial;
|
| | | import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetail;
|
| | | import com.yeshi.fanli.exception.taobao.TaoKeApiException;
|
| | | import com.yeshi.fanli.exception.taobao.TaobaoGoodsDownException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | |
| | | import com.yeshi.fanli.service.inter.lable.TaoKeGoodsService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoGoodsActivityService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaobaoMeterialService;
|
| | | import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | |
| | |
|
| | | @Resource
|
| | | private TaoBaoGoodsActivityService taoBaoGoodsActivityService;
|
| | |
|
| | | @Resource
|
| | | private DaTaoKeGoodsDetailService daTaoKeGoodsDetailService;
|
| | |
|
| | | /**
|
| | | * 9.9商品
|
| | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | @RequestMapping("getFlashSaleNew")
|
| | | public void getFlashSaleNew(String callback, Integer page, Long auctionId, String time, PrintWriter out) {
|
| | | List<DaTaoKeDetail> detailList0 = daTaoKeGoodsDetailService.getDingDongQiangData(time);
|
| | | if (detailList0 == null)
|
| | | detailList0 = new ArrayList<>();
|
| | | List<DaTaoKeDetail> detailList = new ArrayList<>();
|
| | | detailList.addAll(detailList0);
|
| | | JSONArray array = new JSONArray();
|
| | | if (page == 1) {
|
| | | if (auctionId != null && detailList != null)
|
| | | for (int i = 0; i < detailList.size(); i++) {
|
| | | if (detailList.get(i).getGoodsId().longValue() == auctionId) {
|
| | | DaTaoKeDetail goods = detailList.get(i);
|
| | | detailList.remove(i);
|
| | | detailList.add(0, goods);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
|
| | | .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
|
| | | if (detailList != null)
|
| | | for (DaTaoKeDetail detail : detailList) {
|
| | | array.add(gson.toJson(TaoBaoUtil.getTaoBaoGoodsBriefExtra(TaoBaoUtil.convert(detail),
|
| | | hongBaoManageService.getFanLiRate() + "", null)));
|
| | | }
|
| | | }
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("count", detailList.size());
|
| | | data.put("result_list", array);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | /**
|
| | | * 大额券(券面值范围)
|
| | | *
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 提醒大图
|
| | | */
|
| | | MsgCommonDTO notify = msgConfigService.getNotifyMsg();
|
| | |
|
| | | if (notify != null && notify.getShow() == true) {
|
| | | boolean read = false;
|
| | | MsgDeviceReadState state = msgDeviceReadStateService.getByDeviceAndPlatformAndType(
|
| | | UserCommonMsgVO.TYPE_NOTIFY, acceptData.getDevice(),
|
| | | acceptData.getPlatform().equalsIgnoreCase("android") ? 1 : 2);
|
| | | if (state != null && state.getReadTime() != null
|
| | | && zhuShouMsg.getUpdateTime().getTime() < state.getReadTime().getTime())
|
| | | read = true;
|
| | | // 查询是否已读
|
| | | UserCommonMsgVO vo = new UserCommonMsgVO(notify.getIcon(), notify.getTitle(), notify.getUpdateTime(),
|
| | | UserCommonMsgVO.TYPE_NOTIFY, notify.getContent(), read, notify.getJumpDetail(), notify.getParams(),
|
| | | 0);
|
| | | vo.setPicture(notify.getPicture());
|
| | | root.put("notifyMsg", builder.create().toJson(vo));
|
| | | }
|
| | |
|
| | | root.put("list", builder.create().toJson(listCenter));
|
| | | root.put("commonList", builder.create().toJson(commonMsgList));
|
| | | root.put("count", listCenter.size());
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | // 过期
|
| | | userTaoLiJinOriginService.overdueHongBao(uid);
|
| | | // 过期 -取消收回
|
| | | // userTaoLiJinOriginService.overdueHongBao(uid);
|
| | |
|
| | | // 我的淘礼金
|
| | | BigDecimal tlj = null;
|
| | |
| | | array.add(gson.toJson(extra));
|
| | | }
|
| | |
|
| | | executor.execute(new Runnable() {
|
| | | @Override
|
| | | public void run() {
|
| | | // 过期
|
| | | userTaoLiJinOriginService.overdueHongBao(uid);
|
| | | }
|
| | | });
|
| | | /*// 过期 -取消收回
|
| | | * executor.execute(new Runnable() {
|
| | | * |
| | | * @Override public void run() {
|
| | | * userTaoLiJinOriginService.overdueHongBao(uid); } });
|
| | | */
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("count", array.size());
|
| | |
| | | List<Map<String, Object>> countWeiQaunOrderMoney(@Param("dateType") Integer dateType, @Param("year") String year, |
| | | @Param("startTime") String startTime, @Param("endTime") String endTime); |
| | | |
| | | /** |
| | | * 根据状态检索 |
| | | * |
| | | * @param state |
| | | * @param start |
| | | * @param count |
| | | * @return |
| | | */ |
| | | List<TaoBaoWeiQuanOrder> listByState(@Param("state") String state, @Param("start") long start, |
| | | @Param("count") int count); |
| | | |
| | | } |
| | |
| | |
|
| | | public enum CommonContentTypeEnum {
|
| | |
|
| | | _9k9("9块9包邮"), haoQuan("高额好券"), chaoSheng("超级省钱"), muYin("母婴精选"), reMai("潮品热卖"), meiShi("优选美食"), juJia(
|
| | | _9k9("9.9包邮"), haoQuan("高额好券"), chaoSheng("超级省钱"), muYin("母婴精选"), reMai("潮品热卖"), meiShi("优选美食"), juJia(
|
| | | "居家生活"), chuanYiDaPei("穿衣搭配"), meiZhuangGehu("美妆个护"), jingPinXieBao("精品鞋包"), chaoNanReMai(
|
| | | "潮男热卖"), shuMaShouJi("数码手机"), yunDongKuXie("运动酷鞋"), qiCheHuWai("汽车户外"), chaoPinReMai("新款潮品");
|
| | | private final String desc;
|
New file |
| | |
| | | package com.yeshi.fanli.dto.dataoke;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetail;
|
| | |
|
| | | /**
|
| | | * 大淘客叮咚抢
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | public class DingDongQiangDTO {
|
| | | private String time;
|
| | | private List<DaTaoKeDetail> goodsList;
|
| | |
|
| | | public DingDongQiangDTO(String time, List<DaTaoKeDetail> goodsList) {
|
| | | this.time = time;
|
| | | this.goodsList = goodsList;
|
| | | }
|
| | |
|
| | | public DingDongQiangDTO() {
|
| | | }
|
| | |
|
| | | public String getTime() {
|
| | | return time;
|
| | | }
|
| | |
|
| | | public void setTime(String time) {
|
| | | this.time = time;
|
| | | }
|
| | |
|
| | | public List<DaTaoKeDetail> getGoodsList() {
|
| | | return goodsList;
|
| | | }
|
| | |
|
| | | public void setGoodsList(List<DaTaoKeDetail> goodsList) {
|
| | | this.goodsList = goodsList;
|
| | | }
|
| | | }
|
| | |
| | | private Date endTime;// 结束时间
|
| | | private JumpDetailV2 jumpDetail;// 跳转方式
|
| | | private String params;// 跳转参数
|
| | | private String picture;//大图
|
| | | private Date updateTime;
|
| | |
|
| | | public String getPicture() {
|
| | | return picture;
|
| | | }
|
| | |
|
| | | public void setPicture(String picture) {
|
| | | this.picture = picture;
|
| | | }
|
| | |
|
| | | public String getContentMd5() {
|
| | | return contentMd5;
|
| | | }
|
| | |
| | | package com.yeshi.fanli.entity.taobao.dataoke;
|
| | |
|
| | | import java.io.Serializable;
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | |
|
| | |
| | | *
|
| | | */
|
| | | @Table("yeshi_ec_goods_dataoke")
|
| | | public class DaTaoKeDetail {
|
| | | public class DaTaoKeDetail implements Serializable{
|
| | | |
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | public DaTaoKeDetail(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | | |
| | | public DaTaoKeDetail() {
|
| | | }
|
| | | |
| | | @Column(name = "id")
|
| | | @SerializedName("ID")
|
| | | private Long id;// 大淘客ID
|
| | |
|
| | |
|
| | | @Column(name = "d_title")
|
| | | @SerializedName("D_title")
|
| | | private String dTitle;// 商品短标题
|
| | |
| | | package com.yeshi.fanli.job;
|
| | |
|
| | | import java.text.SimpleDateFormat;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.scheduling.annotation.Scheduled;
|
| | | import org.springframework.stereotype.Component;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.lable.BoutiqueAutoRule;
|
| | | import com.yeshi.fanli.entity.bus.lable.QualityFactory;
|
| | | import com.yeshi.fanli.entity.common.AdminUser;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetail;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.lable.QualityFactoryService;
|
| | | import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailService;
|
| | | import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailV2Service;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.taobao.DaTaoKeUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | |
|
| | | /**
|
| | | * 更新大淘客数据
|
| | |
| | | @Resource
|
| | | private DaTaoKeGoodsDetailV2Service daTaoKeGoodsDetailV2Service;
|
| | |
|
| | | /**
|
| | | * 限时秒杀 数据更新
|
| | | */
|
| | | @Scheduled(cron = "0 0 0/2 * * ?")
|
| | | public void doUpdateJob() {
|
| | |
|
| | | if (!Constant.IS_TASK)
|
| | | return;
|
| | |
|
| | | List<DaTaoKeDetail> listTaoKe = DaTaoKeUtil.getDingDongQiang();
|
| | | if (listTaoKe == null || listTaoKe.size() == 0) {
|
| | | return;
|
| | | }
|
| | |
|
| | | List<Long> listDaoKeId = new ArrayList<Long>();
|
| | | for (DaTaoKeDetail daTaoKeDetail : listTaoKe) {
|
| | | listDaoKeId.add(daTaoKeDetail.getId());
|
| | | }
|
| | |
|
| | | List<DaTaoKeDetail> listDetail = daTaoKeGoodsService.listByIds(listDaoKeId);
|
| | | if (listDetail == null || listDetail.size() == 0) {
|
| | | return;
|
| | | }
|
| | |
|
| | | List<TaoBaoGoodsBrief> listgoods = new ArrayList<TaoBaoGoodsBrief>();
|
| | | for (DaTaoKeDetail daTaoKeDetail : listDetail) {
|
| | | listgoods.add(TaoBaoUtil.convert(daTaoKeDetail));
|
| | | }
|
| | |
|
| | | String formatDate = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date());
|
| | | try {
|
| | | /* 操作人: 开发账号 */
|
| | | AdminUser admin = new AdminUser(2L);
|
| | | BoutiqueAutoRule autoRule = new BoutiqueAutoRule();
|
| | | autoRule.setAdminUser(admin);
|
| | | autoRule.setCalss9k9(false);
|
| | | autoRule.setFlashSale(true);
|
| | | autoRule.setStartWeight(1);
|
| | | autoRule.setEndWeight(3000);
|
| | | autoRule.setGoodsSource(QualityFactory.SOURCE_TAOBAO_DATAOKE);
|
| | | qualityFactoryService.autoInsertOrUpadateStorage(autoRule, listgoods, null);
|
| | |
|
| | | // 删除之前的
|
| | | qualityFactoryService.deleteNotUpdateGoods(null, formatDate, autoRule.getGoodsSource());
|
| | | } catch (Exception e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | // 1个小时更新一次
|
| | | @Scheduled(cron = "0 0 0/1 * * ? ")
|
| | |
| | | import org.springframework.scheduling.annotation.Scheduled;
|
| | | import org.springframework.stereotype.Component;
|
| | |
|
| | | import com.yeshi.fanli.dto.taobao.WeiQuanOrderResult;
|
| | | import com.yeshi.fanli.entity.bus.user.LostOrder;
|
| | | import com.yeshi.fanli.entity.bus.user.Order;
|
| | | import com.yeshi.fanli.entity.order.CommonOrder;
|
| | | import com.yeshi.fanli.entity.taobao.PidUser;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoOrder;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoUnionConfig;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanOrder;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.common.DataMonitorService;
|
| | |
| | | public void doTaoBaoWeiQuan() {
|
| | | if (!Constant.IS_TASK)
|
| | | return;
|
| | | List<TaoBaoUnionConfig> configList = taoBaoUnionConfigService.getConfigByTypeCache(PidUser.TYPE_FANLI_ANDROID);
|
| | | List<TaoBaoWeiQuanOrder> orderList = TaoBaoOrderUtil.getWeiQuanOrders(
|
| | | System.currentTimeMillis() - 1000 * 60 * 60 * 24 * 60L, System.currentTimeMillis(), configList.get(0));
|
| | | if (orderList != null)
|
| | | // 新版维权订单处理
|
| | | for (int i = 0; i < 60; i++) {
|
| | | List<TaoBaoWeiQuanOrder> orderList = new ArrayList<>();
|
| | | WeiQuanOrderResult result = TaoKeOrderApiUtil
|
| | | .getTaoBaoSpecialWeiQuanOrderList(new Date(TimeUtil.convertToTimeTemp(
|
| | | TimeUtil.getGernalTime(System.currentTimeMillis() - 1000 * 60 * 60 * 24L * i, "yyyy-MM-dd"),
|
| | | "yyyy-MM-dd")), 1, false);
|
| | | orderList.addAll(result.orderList);
|
| | |
|
| | | result = TaoKeOrderApiUtil.getTaoBaoSpecialWeiQuanOrderList(new Date(TimeUtil.convertToTimeTemp(
|
| | | TimeUtil.getGernalTime(System.currentTimeMillis() - 1000 * 60 * 60 * 24L * i, "yyyy-MM-dd"),
|
| | | "yyyy-MM-dd")), 1, true);
|
| | | orderList.addAll(result.orderList);
|
| | |
|
| | | result = TaoKeOrderApiUtil.getTaoBaoRelationWeiQuanOrderList(new Date(TimeUtil.convertToTimeTemp(
|
| | | TimeUtil.getGernalTime(System.currentTimeMillis() - 1000 * 60 * 60 * 24L * i, "yyyy-MM-dd"),
|
| | | "yyyy-MM-dd")), 1, false);
|
| | | orderList.addAll(result.orderList);
|
| | |
|
| | | result = TaoKeOrderApiUtil.getTaoBaoRelationWeiQuanOrderList(new Date(TimeUtil.convertToTimeTemp(
|
| | | TimeUtil.getGernalTime(System.currentTimeMillis() - 1000 * 60 * 60 * 24L * i, "yyyy-MM-dd"),
|
| | | "yyyy-MM-dd")), 1, true);
|
| | | orderList.addAll(result.orderList);
|
| | |
|
| | | for (TaoBaoWeiQuanOrder order : orderList)
|
| | | taoBaoWeiQuanOrderService.addWeiQuanOrder(order);// 添加维权订单到数据库
|
| | | // 处理维权订单
|
| | | orderProcessService.weiQuanOrder(orderList);
|
| | | }
|
| | | }
|
| | |
|
| | | // 每6个小时执行一次
|
| | | @Scheduled(cron = "0 0 0/6 * * ? ")
|
| | |
| | | </select> |
| | | |
| | | |
| | | <select id="listByState" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_taobao_weiqaun_order |
| | | <if test="state!=null"> |
| | | where tmo_state like '${state}%' |
| | | </if> |
| | | order by tmo_createtime desc limit #{start},#{count} |
| | | </select> |
| | | |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_taobao_weiqaun_order where tmo_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | |
| | | |
| | | <sql id="Column_DateType"> |
| | | <if test="dateType == 1"> |
| | | DATE_FORMAT(t.`tmo_createtime`,'%Y-%m-%d') AS 'showDate' |
| | | DATE_FORMAT(t.`tmo_weiquan_time`,'%Y-%m-%d') AS 'showDate' |
| | | </if> |
| | | <if test="dateType == 2"> |
| | | DATE_FORMAT(t.`tmo_createtime`,'%m') AS 'showDate' |
| | | DATE_FORMAT(t.`tmo_weiquan_time`,'%m') AS 'showDate' |
| | | </if> |
| | | <if test="dateType == 3"> |
| | | DATE_FORMAT(t.`tmo_createtime`,'%Y') AS 'showDate' |
| | | DATE_FORMAT(t.`tmo_weiquan_time`,'%Y') AS 'showDate' |
| | | </if> |
| | | </sql> |
| | | |
| | | <sql id="Count_Select_DateType"> |
| | | <if test="startTime != null and startTime != '' "> |
| | | AND DATE_FORMAT(t.`tmo_createtime`,'%Y-%m-%d')<![CDATA[ >= ]]>'${startTime}' |
| | | AND DATE_FORMAT(t.`tmo_weiquan_time`,'%Y-%m-%d')<![CDATA[ >= ]]>'${startTime}' |
| | | </if> |
| | | <if test="endTime != null and endTime != '' "> |
| | | AND DATE_FORMAT(t.`tmo_createtime`,'%Y-%m-%d') <![CDATA[ <= ]]>'${endTime}' |
| | | AND DATE_FORMAT(t.`tmo_weiquan_time`,'%Y-%m-%d') <![CDATA[ <= ]]>'${endTime}' |
| | | </if> |
| | | <if test="year != null and year != '' "> |
| | | AND DATE_FORMAT(t.`tmo_createtime`,'%Y') = '${year}' |
| | | AND DATE_FORMAT(t.`tmo_weiquan_time`,'%Y') = '${year}' |
| | | </if> |
| | | </sql> |
| | | |
| | | <sql id="Count_Group_DateType"> |
| | | <if test="dateType == 1"> |
| | | GROUP BY DATE_FORMAT(t.`tmo_createtime`,'%Y-%m-%d') |
| | | GROUP BY DATE_FORMAT(t.`tmo_weiquan_time`,'%Y-%m-%d') |
| | | </if> |
| | | <if test="dateType == 2"> |
| | | GROUP BY DATE_FORMAT(t.`tmo_createtime`,'%Y-%m') |
| | | GROUP BY DATE_FORMAT(t.`tmo_weiquan_time`,'%Y-%m') |
| | | </if> |
| | | <if test="dateType == 3"> |
| | | GROUP BY DATE_FORMAT(t.`tmo_createtime`,'%Y') |
| | | GROUP BY DATE_FORMAT(t.`tmo_weiquan_time`,'%Y') |
| | | </if> |
| | | </sql> |
| | | <select id="countWeiQaunOrderNumber" resultType="java.util.HashMap"> |
| | | SELECT IFNULL(COUNT(t.`tmo_id`),0) AS showValue,<include refid="Column_DateType"/> |
| | | SELECT IFNULL(COUNT(t.`tmo_id`),0) AS showValue, |
| | | <include refid="Column_DateType" /> |
| | | FROM yeshi_ec_taobao_weiqaun_order t |
| | | WHERE t.`tmo_createtime`IS NOT NULL <include refid="Count_Select_DateType"/> |
| | | WHERE t.`tmo_createtime`IS NOT |
| | | NULL |
| | | <include refid="Count_Select_DateType" /> |
| | | <include refid="Count_Group_DateType"/> |
| | | ORDER BY t.`tmo_createtime` |
| | | ORDER BY t.`tmo_weiquan_time` |
| | | </select> |
| | | |
| | | <select id="countWeiQaunOrderMoney" resultType="java.util.HashMap"> |
| | | SELECT CAST(SUM(t.`tmo_fan_money`)AS DECIMAL(19,2)) AS showValue,<include refid="Column_DateType"/> |
| | | SELECT CAST(SUM(t.`tmo_fan_money`)AS DECIMAL(19,2)) AS showValue, |
| | | <include refid="Column_DateType" /> |
| | | FROM yeshi_ec_taobao_weiqaun_order t |
| | | WHERE t.`tmo_createtime` IS NOT NULL <include refid="Count_Select_DateType"/> |
| | | WHERE t.`tmo_createtime` IS NOT |
| | | NULL |
| | | <include refid="Count_Select_DateType" /> |
| | | <include refid="Count_Group_DateType"/> |
| | | ORDER BY t.`tmo_createtime` |
| | | ORDER BY t.`tmo_weiquan_time` |
| | | </select> |
| | | </mapper> |
| | |
| | | public List<Map<String, Object>> countWeiQaunOrderNumber(Integer dateType, String year, String startTime,
|
| | | String endTime) throws Exception{
|
| | | return taoBaoWeiQuanOrderMapper.countWeiQaunOrderNumber(dateType, year, startTime, endTime);
|
| | | |
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | HongBaoV2 oldHongBao = hongBaoV2Mapper.selectByPrimaryKey(hongBaoOrder.getHongBaoV2().getId());
|
| | | if (oldHongBao == null)
|
| | | throw new HongBaoException(10, "红包对象不存在");
|
| | | // 已经失效或者已经领取的红包不做处理
|
| | | // 已经失效,已经领取,新老状态一致的红包不做处理
|
| | | if (oldHongBao.getState() == HongBaoV2.STATE_SHIXIAO || oldHongBao.getState() == HongBaoV2.STATE_YILINGQU)
|
| | | return;
|
| | |
|
| | |
| | | } else if (commonOrder.getState() == CommonOrder.STATE_SX) {
|
| | | hongBao.setState(HongBaoV2.STATE_SHIXIAO);
|
| | | hongBao.setMoney(new BigDecimal(0));
|
| | |
|
| | | }
|
| | |
|
| | | // 新老红包状态一致不处理
|
| | | if (oldHongBao.getState().intValue() == hongBao.getState())
|
| | | return;
|
| | |
|
| | | if (hongBao.getState() == HongBaoV2.STATE_SHIXIAO) {
|
| | | if (mianDan) {
|
| | | try {
|
| | | userSystemCouponService.updateStateByDrawback(commonOrder.getOrderNo());
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | hongBaoV2Mapper.updateByPrimaryKeySelective(hongBao);
|
| | |
|
| | | // 加入通知
|
| | |
| | | return new Gson().fromJson(value.getValue(), MsgCommonDTO.class);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void addNotifyMsg(MsgCommonDTO dto) throws ConfigException {
|
| | | Config value = configService.getConfig(KEY_NOTIFY);
|
| | | if (StringUtil.isNullOrEmpty(dto.getContent()) || StringUtil.isNullOrEmpty(dto.getParams())
|
| | | || dto.getShow() == null)
|
| | | throw new ConfigException(1, "参数不完整");
|
| | | if (value != null) {
|
| | | MsgCommonDTO old = new Gson().fromJson(value.getValue(), MsgCommonDTO.class);
|
| | | old.setStartTime(dto.getStartTime());
|
| | | old.setShow(dto.getShow());
|
| | | old.setParams(dto.getParams());
|
| | | old.setEndTime(dto.getEndTime());
|
| | | old.setContent(dto.getContent());
|
| | | if (!StringUtil.Md5(dto.getContent() + "#" + dto.getPicture() + "#" + dto.getParams())
|
| | | .equalsIgnoreCase(old.getContentMd5())) {
|
| | | old.setUpdateTime(new Date());
|
| | | }
|
| | | old.setPicture(dto.getPicture());
|
| | | Config cf = new Config();
|
| | | cf.setId(value.getId());
|
| | | cf.setValue(new Gson().toJson(old));
|
| | | configService.update(cf);
|
| | | } else {
|
| | | dto.setContentMd5(StringUtil.Md5(dto.getContent() + "#" + dto.getPicture() + "#" + dto.getParams()));
|
| | | dto.setUpdateTime(new Date());
|
| | | Config config = new Config();
|
| | | config.setCreatetime(System.currentTimeMillis() + "");
|
| | | config.setKey(KEY_NOTIFY);
|
| | | config.setName("消息-大图通知");
|
| | | config.setValue(new Gson().toJson(dto));
|
| | | configService.save(config);
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public MsgCommonDTO getNotifyMsg() {
|
| | | Config value = configService.getConfig(KEY_NOTIFY);
|
| | | if (value == null)
|
| | | return null;
|
| | | return new Gson().fromJson(value.getValue(), MsgCommonDTO.class);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | commonOrder.getTradeId(), new Date(), commonOrder.getSourceType()));
|
| | | return commonOrder;
|
| | | } else {// 修改
|
| | | // 已经结算或者已经失效的订单不处理
|
| | | if (oldCommonOrder.getState() == CommonOrder.STATE_JS
|
| | | || oldCommonOrder.getState() == CommonOrder.STATE_SX) {
|
| | | // 已经结算,已经失效,状态未改变的订单不处理
|
| | | if (oldCommonOrder.getState() == CommonOrder.STATE_JS || oldCommonOrder.getState() == CommonOrder.STATE_SX
|
| | | || (oldCommonOrder.getState().intValue() == commonOrder.getState())) {
|
| | | return oldCommonOrder;
|
| | | }
|
| | | // 交易ID一致才修改
|
| | |
| | | public void weiQuanOrder(List<TaoBaoWeiQuanOrder> orderList) {
|
| | | if (orderList != null)
|
| | | for (TaoBaoWeiQuanOrder order : orderList) {
|
| | | if (order.getState().equalsIgnoreCase("维权成功")) {
|
| | | if (order.getState().contains("维权成功")) {
|
| | | CMQManager.getInstance().addWeiQuanOrderMsg(order);
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | @Override
|
| | | public void deleteOutOfDate() {
|
| | | TaoBaoGoodsBriefMapper taoBaoGoodsBriefMapper = BeanUtil.getBean(TaoBaoGoodsBriefMapper.class);
|
| | | List<Long> list = taoBaoGoodsBriefMapper
|
| | | .queryCanDeleteGoods(new Date(System.currentTimeMillis() - 1000 * 60 * 60 * 24 * 2), 0, 2000);
|
| | | for (Long auctionId : list) {
|
| | |
| | | weiQuanDrawBack.setUser(child.getUserInfo());
|
| | | taoBaoWeiQuanDrawBackMapper.insertSelective(weiQuanDrawBack);// 加入返还记录
|
| | |
|
| | | // 如果资金大于0才扣除
|
| | |
|
| | | if (drawBackMoney != null && drawBackMoney.compareTo(new BigDecimal(0)) > 0) {
|
| | |
|
| | | // 判断资金是否足够扣款
|
| | | UserInfo user = userInfoMapper.selectByPKey(uid);
|
| | | if (user != null && user.getMyHongBao().compareTo(drawBackMoney) < 0)// 资金不足
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public TaoBaoWeiQuanDrawBack selectByOrderItemId(String orderItemId) {
|
| | |
| | | .selectByOrderIdAndOrderItemId(order.getOrderId(), order.getOrderItemId());
|
| | | if (taoBaoWeiQuanOrder != null) {
|
| | | // 已经是最新的状态了
|
| | | if (taoBaoWeiQuanOrder.getState().equalsIgnoreCase("维权成功")
|
| | | || taoBaoWeiQuanOrder.getState().equalsIgnoreCase("维权失败"))
|
| | | if (taoBaoWeiQuanOrder.getState().contains("维权成功") || taoBaoWeiQuanOrder.getState().contains("维权失败"))
|
| | | return;
|
| | | // 更新金额,状态与时间
|
| | | TaoBaoWeiQuanOrder update = new TaoBaoWeiQuanOrder();
|
| | |
| | | taoBaoWeiQuanOrderMapper.updateByPrimaryKeySelective(update);
|
| | |
|
| | | try {
|
| | | if (order.getState().equalsIgnoreCase("维权成功")) {
|
| | | if (order.getState().contains("维权成功")) {
|
| | | List<MsgOrderDetail> msgList = msgOrderDetailService.listMsgOrderByOrderId(order.getOrderId());
|
| | | for (MsgOrderDetail msg : msgList) {
|
| | | if (msg.getType() == MsgTypeOrderTypeEnum.fanli) {
|
| | |
| | | return taoBaoWeiQuanOrderMapper.selectByOrderItemId(tradeId);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<TaoBaoWeiQuanOrder> listByState(String state, int page, int pageSize) {
|
| | | return taoBaoWeiQuanOrderMapper.listByState(state, (page - 1) * pageSize, pageSize);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.cache.annotation.Cacheable;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.taobao.dataoke.DaTaoKeDetailMapper;
|
| | | import com.yeshi.fanli.dto.dataoke.DaTaoKeApiResult;
|
| | | import com.yeshi.fanli.dto.dataoke.DingDongQiangDTO;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetail;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | |
| | | return daTaoKeDetailMapper.countByCidAndMaxMinPrice(cid, maxPrice, null);
|
| | | }
|
| | |
|
| | | @Cacheable(value = "daTaoKeGoodsCache", key = "'getDingDongQiangData'")
|
| | | @Override
|
| | | public List<DingDongQiangDTO> getDingDongQiangData() {
|
| | | List<DingDongQiangDTO> list = null;
|
| | | int count = 0;
|
| | | while ((list == null || list.size() == 0) && count < 3) {
|
| | | count++;
|
| | | list = DaTaoKeUtil.getDingDongQiang();
|
| | | }
|
| | | if (list == null)
|
| | | return null;
|
| | | return list;
|
| | | }
|
| | |
|
| | | private void updateGoods(Long id) {
|
| | | DaTaoKeDetail detail = daTaoKeDetailMapper.selectByPrimaryKey(id);
|
| | | if (detail != null)
|
| | | return;
|
| | | detail = DaTaoKeApiUtil.getGoodsDetailV1(id);
|
| | | if (detail != null) {
|
| | | List<DaTaoKeDetail> list = new ArrayList<>();
|
| | | list.add(detail);
|
| | | addGoodsList(list);
|
| | | }
|
| | | }
|
| | |
|
| | | @Cacheable(value = "daTaoKeGoodsCache", key = "'getDingDongQiangData-'+#time")
|
| | | @Override
|
| | | public List<DaTaoKeDetail> getDingDongQiangData(String time) {
|
| | | List<DingDongQiangDTO> list = getDingDongQiangData();
|
| | | if (list == null)
|
| | | return null;
|
| | | Map<String, DingDongQiangDTO> map = new HashMap<>();
|
| | | for (DingDongQiangDTO dto : list)
|
| | | map.put(dto.getTime(), dto);
|
| | |
|
| | | DingDongQiangDTO dto = map.get(time);
|
| | | if (dto != null) {
|
| | | List<Long> idList = new ArrayList<>();
|
| | | for (DaTaoKeDetail td : dto.getGoodsList())
|
| | | idList.add(td.getId());
|
| | | List<DaTaoKeDetail> finalList = listByIds(idList);
|
| | | if (finalList.size() != idList.size()) {
|
| | | for (Long id : idList)
|
| | | updateGoods(id);
|
| | | finalList = listByIds(idList);
|
| | | }
|
| | |
|
| | | for (DaTaoKeDetail detail : finalList) {
|
| | | detail.setQuanReceive(
|
| | | detail.getQuanSurplus() + detail.getQuanReceive() - (int) (200 + Math.random() * 1000));
|
| | | }
|
| | | return finalList;
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | throw new UserTaoLiJinRecordException(101, "红包余额不足");
|
| | | }
|
| | |
|
| | | // 过期
|
| | | userTaoLiJinOriginService.overdueHongBao(uid);
|
| | | // 过期 -取消收回
|
| | | // userTaoLiJinOriginService.overdueHongBao(uid);
|
| | |
|
| | | // 总推广红包
|
| | | BigDecimal totalMoney = MoneyBigDecimalUtil.mul(perface, new BigDecimal(totalNum));
|
| | |
| | | */
|
| | | @Transactional
|
| | | private void extractByZhiFuBao(Extract extract, AdminUser adminUser) {
|
| | | LogHelper.userErrorInfo("提现:开始通过提现-"+extract.getId());
|
| | | String privateKey = Constant.alipayConfig.getPrivateKey();
|
| | | AlipayClient alipayClient = new DefaultAlipayClient("https://openapi.alipay.com/gateway.do",
|
| | | Constant.alipayConfig.getAppId(), privateKey, "json", "gbk", null, "RSA2");
|
| | |
| | | AlipayFundTransToaccountTransferResponse response = null;
|
| | | try {
|
| | | response = alipayClient.execute(request);
|
| | | LogHelper.userErrorInfo("提现:支付宝通过提现成功-"+extract.getId());
|
| | | } catch (AlipayApiException e) {
|
| | | e.printStackTrace();
|
| | | LogHelper.userErrorInfo("支付宝提现异常:" + response + ",提现信息" + GsonUtil.toJson(extract));
|
| | | LogHelper.userErrorInfo("提现:支付宝提现异常:" + response + ",提现信息" + GsonUtil.toJson(extract));
|
| | | }
|
| | |
|
| | | try {
|
| | | CMQManager.getInstance().addExtractResultMsg(extract, response, adminUser);
|
| | | LogHelper.userErrorInfo("提现:添加处理队列成功-"+extract.getId());
|
| | | } catch (Exception e) {
|
| | | LogHelper.userErrorInfo("支付宝提现CMQ异常:" + new Gson().toJson(response) + ",提现信息" + GsonUtil.toJson(extract));
|
| | | LogHelper.userErrorInfo("提现:支付宝提现CMQ异常:" + new Gson().toJson(response) + ",提现信息" + GsonUtil.toJson(extract));
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | public String KEY_ZHUSHOU = "msg-config-zhushou";
|
| | | public String KEY_GUANXUAN = "msg-config-guanxuan";
|
| | | public String KEY_NOTIFY = "msg-config-notify";
|
| | |
|
| | | /**
|
| | | * 添加小助手消息
|
| | |
| | | public void addGuanXuanMsg(MsgCommonDTO dto) throws ConfigException;
|
| | |
|
| | | /**
|
| | | * 添加通知大图消息
|
| | | * |
| | | * @param dto
|
| | | * @throws ConfigException
|
| | | */
|
| | | public void addNotifyMsg(MsgCommonDTO dto) throws ConfigException;
|
| | |
|
| | | /**
|
| | | * 获取助手消息
|
| | | *
|
| | | * @return
|
| | |
| | | * @return
|
| | | */
|
| | | public MsgCommonDTO getGuanXuanMsg();
|
| | |
|
| | | /**
|
| | | * 获取通知大图消息
|
| | | * |
| | | * @return
|
| | | */
|
| | | public MsgCommonDTO getNotifyMsg();
|
| | |
|
| | | }
|
| | |
| | | * @return
|
| | | */
|
| | | public TaoBaoWeiQuanOrder listByorderItemId(String tradeId);
|
| | | |
| | | |
| | | /**
|
| | | * 根据状态检索
|
| | | * @param state
|
| | | * @param page
|
| | | * @param pageSize
|
| | | * @return
|
| | | */
|
| | | public List<TaoBaoWeiQuanOrder> listByState(String state,int page,int pageSize);
|
| | |
|
| | | }
|
| | |
| | | import java.math.BigDecimal;
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.dto.dataoke.DingDongQiangDTO;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetail;
|
| | |
|
| | |
| | |
|
| | | /**
|
| | | * 根据分类ID与最大券后价检索数量
|
| | | * |
| | | * @param cid
|
| | | * @param maxPrice
|
| | | * @return
|
| | | */
|
| | | public Long countByCidAndMaxPrice(Integer cid, BigDecimal maxPrice);
|
| | |
|
| | | /**
|
| | | * 获取叮咚呛数据
|
| | | * |
| | | * @return
|
| | | */
|
| | | public List<DingDongQiangDTO> getDingDongQiangData();
|
| | | |
| | | /**
|
| | | * 根据时间查询
|
| | | * @param time 0712 表示7号12点
|
| | | * @return
|
| | | */
|
| | | public List<DaTaoKeDetail> getDingDongQiangData(String time);
|
| | | |
| | | |
| | | |
| | | }
|
| | |
| | | */
|
| | | public void doTaoBaoOrders() {
|
| | | // 同时开启3个线程处理
|
| | | for (int i = 0; i < 1; i++) {
|
| | | for (int i = 0; i < 3; i++) {
|
| | | executor.execute(new Runnable() {
|
| | | @Override
|
| | | public void run() {
|
| | |
| | |
|
| | | for (int i = 0; i < subscripts.length; i++) {
|
| | | String queueName = queues[i];
|
| | | try {
|
| | | cmqUtil.createQueue(queueName);
|
| | | } catch (Exception e) {
|
| | | }
|
| | | try {
|
| | | cmqUtil.subscribeTopic(TOPIC_NAME, subscripts[i], queueName);
|
| | | } catch (Exception e) {
|
| | |
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | if (dto == null)
|
| | | return;
|
| | | cmqUtil.publishTopicMessage(TOPIC_NAME, new Gson().toJson(dto));
|
| | | LogHelper.test("邀请消息投递成功");
|
| | | LogHelper.test("资金消息投递成功");
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | import com.yeshi.fanli.entity.taobao.TaoKeAppInfo;
|
| | | import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetail;
|
| | | import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetailV2;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | |
| | | resultJson.optJSONObject("data").optString("update_time"), list);
|
| | | }
|
| | |
|
| | | public static DaTaoKeDetail getGoodsDetailV1(Long id) {
|
| | | String url = String.format("http://api.dataoke.com/index.php?r=Port/index&type=total&appkey=%s&v=2&id=%s",
|
| | | Math.random() > 0.5 ? API_KEY : API_KEY_2, id + "");
|
| | | String result = request(url);
|
| | | JSONObject resultJson = JSONObject.fromObject(result);
|
| | | return gson.fromJson(resultJson.optJSONArray("result").optJSONObject(0).toString(), DaTaoKeDetail.class);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取大淘客品牌优选 品牌id
|
| | | *
|
| | |
| | | accountDetails.setType(AccountDetailsFactory.TUIKUAN);
|
| | | else
|
| | | accountDetails.setType(AccountDetailsFactory.QITA);
|
| | | accountDetails.setTitle(map.get(accountDetails.getType()));
|
| | | accountDetails.setTitle(accountDetails.getTitle());
|
| | | accountDetails.setUserInfo(userMoneyDetail.getUserInfo());
|
| | | return accountDetails;
|
| | | }
|
| | |
| | | import java.math.BigDecimal;
|
| | | import java.net.URLEncoder;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Iterator;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.script.Invocable;
|
| | | import javax.script.ScriptEngine;
|
| | | import javax.script.ScriptEngineManager;
|
| | |
|
| | | import org.jsoup.Jsoup;
|
| | | import org.jsoup.nodes.Document;
|
| | | import org.jsoup.nodes.Element;
|
| | | import org.jsoup.select.Elements;
|
| | |
|
| | | import com.yeshi.fanli.dto.dataoke.DingDongQiangDTO;
|
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsClass;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoCoupon;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | |
| | | *
|
| | | * @return
|
| | | */
|
| | | public static List<DaTaoKeDetail> getDingDongQiang() {
|
| | | List<DaTaoKeDetail> goodsList = new ArrayList<>();
|
| | | public static List<DingDongQiangDTO> getDingDongQiang() {
|
| | | List<DingDongQiangDTO> list = new ArrayList<>();
|
| | | Document doc = null;
|
| | | try {
|
| | | Document doc = Jsoup.connect("http://www.dataoke.com/ddq")
|
| | | .userAgent(
|
| | | "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.92 Mobile Safari/537.36")
|
| | | .get();
|
| | | Elements items = doc.getElementsByClass("main").get(0).getElementsByClass("clearfix").get(0)
|
| | | .getElementsByTag("li");
|
| | | for (int i = 0; i < items.size(); i++) {
|
| | | DaTaoKeDetail detail = new DaTaoKeDetail();
|
| | | String id = items.get(i).getElementsByTag("a").get(0).attr("href").split("\\?")[1].replace("id=", "");
|
| | | detail.setId(Long.parseLong(id));
|
| | | goodsList.add(detail);
|
| | | doc = Jsoup.connect("http://www.dataoke.com/ddq").get();
|
| | | } catch (IOException e1) {
|
| | | e1.printStackTrace();
|
| | | }
|
| | | Elements els = doc.getElementsByTag("script");
|
| | | for (int i = 0; i < els.size(); i++) {
|
| | | String content = els.get(i).html();
|
| | | if (content.indexOf("var dataDef") > -1) {
|
| | | ScriptEngineManager manager = new ScriptEngineManager();
|
| | | ScriptEngine engine = manager.getEngineByName("javascript");
|
| | | try {
|
| | | String js = "function getData(){return JSON.stringify(dataDef);}" + content;
|
| | | engine.eval(js);
|
| | | if (engine instanceof Invocable) {
|
| | | Invocable in = (Invocable) engine;
|
| | | String data = in.invokeFunction("getData").toString();
|
| | | System.out.println(data);
|
| | | JSONObject dataJson = JSONObject.fromObject(data);
|
| | | for (Iterator<String> its = dataJson.keys(); its.hasNext();) {
|
| | | String key = its.next();
|
| | | JSONArray array = dataJson.optJSONArray(key);
|
| | | List<DaTaoKeDetail> detailList = new ArrayList<>();
|
| | | for (int n = 0; n < array.size(); n++) {
|
| | | detailList.add(new DaTaoKeDetail(array.optJSONObject(n).optLong("id")));
|
| | | }
|
| | | list.add(new DingDongQiangDTO(key, detailList));
|
| | | }
|
| | | }
|
| | | } catch (Exception e) {
|
| | |
|
| | | e.printStackTrace();
|
| | | }
|
| | | return goodsList;
|
| | | }
|
| | |
|
| | | //
|
| | | }
|
| | | return list;
|
| | | }
|
| | |
|
| | | public static List<TaoBaoCoupon> getRecommendCouple() {
|
| | | List<TaoBaoCoupon> couponList = new ArrayList<>();
|
| | |
| | | package com.yeshi.fanli.util.taobao;
|
| | |
|
| | | import java.io.File;
|
| | | import java.io.FileInputStream;
|
| | | import java.io.FileNotFoundException;
|
| | | import java.io.IOException;
|
| | | import java.io.InputStream;
|
| | | import java.math.BigDecimal;
|
| | | import java.net.URLEncoder;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Comparator;
|
| | | import java.util.Date;
|
| | | import java.util.HashMap;
|
| | | import java.util.Iterator;
|
| | |
| | | return getOrderList(30, config);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取维权成功订单
|
| | | * |
| | | * @param startTime
|
| | | * @param endTime
|
| | | * @return
|
| | | */
|
| | | public static List<TaoBaoWeiQuanOrder> getWeiQuanOrders(long startTime, long endTime, TaoBaoUnionConfig config) {
|
| | | String cookie = getTaoBaoCookie(config.getAccount());
|
| | | return getWeiQuanOrders(cookie, startTime, endTime);
|
| | | public static List<TaoBaoWeiQuanOrder> getWeiQuanOrders(InputStream input) {
|
| | | return parseWeiQuanOrder(input);
|
| | | }
|
| | |
|
| | | private static List<TaoBaoWeiQuanOrder> getWeiQuanOrders(String cookies, long startTime, long endTime) {
|
| | |
| | | for (int c = 0; c < sheet.getColumns(); c++) {
|
| | | String content = sheet.getCell(c, r).getContents().trim();
|
| | | switch (c) {
|
| | | case 0://
|
| | | orderRecord.setOrderId(content);
|
| | | break;
|
| | | case 1://
|
| | | orderRecord.setOrderItemId(content);
|
| | | break;
|
| | | case 2://
|
| | | orderRecord.setGoodsName(content);
|
| | | break;
|
| | | case 3:
|
| | | orderRecord.setMoney(StringUtil.isNullOrEmpty(content) ? null : new BigDecimal(content));
|
| | | break;
|
| | | case 4:
|
| | | orderRecord.setFanMoney(StringUtil.isNullOrEmpty(content) ? null : new BigDecimal(content));
|
| | | break;
|
| | | case 5://
|
| | | orderRecord.setState(content);
|
| | | break;
|
| | | case 6://
|
| | | if (!StringUtil.isNullOrEmpty(content))
|
| | | orderRecord.setJieSuanTime(
|
| | | new Date(TimeUtil.convertToTimeTemp(content, "yyyy-MM-dd HH:mm:ss")));
|
| | | break;
|
| | | case 7://
|
| | | case 0:// 维权时间
|
| | | if (!StringUtil.isNullOrEmpty(content))
|
| | | orderRecord.setWeiQuanTime(
|
| | | new Date(TimeUtil.convertToTimeTemp(content, "yyyy-MM-dd HH:mm:ss")));
|
| | | break;
|
| | | case 8://
|
| | | case 1:// 维权完成时间
|
| | | if (!StringUtil.isNullOrEmpty(content))
|
| | | orderRecord.setWeiQuanFinishTime(
|
| | | new Date(TimeUtil.convertToTimeTemp(content, "yyyy-MM-dd HH:mm:ss")));
|
| | | break;
|
| | | case 2:// 结算时间
|
| | | if (!StringUtil.isNullOrEmpty(content))
|
| | | orderRecord.setJieSuanTime(
|
| | | new Date(TimeUtil.convertToTimeTemp(content, "yyyy-MM-dd HH:mm:ss")));
|
| | | break;
|
| | | case 3:// 商品名称
|
| | | orderRecord.setGoodsName(content);
|
| | | break;
|
| | | case 5:// 淘宝订单号
|
| | | orderRecord.setOrderId(content);
|
| | | break;
|
| | | case 6:// 淘宝子订单号
|
| | | orderRecord.setOrderItemId(content);
|
| | | break;
|
| | | case 7:// 维权状态
|
| | | orderRecord.setState(content);
|
| | | break;
|
| | | case 8:// 结算金额
|
| | |
|
| | | break;
|
| | | case 9:// 退款金额
|
| | | orderRecord.setMoney(StringUtil.isNullOrEmpty(content) ? null : new BigDecimal(content));
|
| | | break;
|
| | |
|
| | | case 10:// 返还商家金额
|
| | | orderRecord.setFanMoney(StringUtil.isNullOrEmpty(content) ? null : new BigDecimal(content));
|
| | | break;
|
| | | }
|
| | | }
|
| | | if (!StringUtil.isNullOrEmpty(orderRecord.getOrderId()))
|
| | |
| | | MoneyBigDecimalUtil.getWithNoZera(detail.getQuanPrice())));
|
| | | taoBaoGoods.setCouponLeftCount(detail.getQuanSurplus());
|
| | | taoBaoGoods.setCouponStartFee(new BigDecimal(detail.getQuanCondition()));
|
| | | taoBaoGoods.setCouponTotalCount(detail.getQuanSurplus());
|
| | | if (detail.getQuanReceive() != null)
|
| | | taoBaoGoods.setCouponTotalCount(detail.getQuanSurplus() + detail.getQuanReceive());
|
| | | taoBaoGoods.setPictUrl(detail.getPic());
|
| | | taoBaoGoods.setPictUrlWhite(detail.getPic());
|
| | | taoBaoGoods.setSellerId(detail.getSellerId());
|
| | |
| | | LogHelper.error("渠道ID申请出错:" + e.getMsg());
|
| | | throw new TaoBaoAuthException(TaoBaoAuthException.CODE_OTHER, errorJSON.optString("sub_msg"));
|
| | | }
|
| | | } catch (Exception e) {
|
| | | LogHelper.error("渠道ID申请出错:" + (resultJSON != null ? resultJSON.toString() : "未知错误"));
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | public static String getSpecialId(String accessToken, String appKey, String appSecret) throws TaoBaoAuthException {
|
| | |
| | | LogHelper.error("会员运营ID申请出错:" + e.getMsg());
|
| | | throw new TaoBaoAuthException(TaoBaoAuthException.CODE_OTHER, errorJSON.optString("sub_msg"));
|
| | | }
|
| | | } catch (Exception e) {
|
| | | LogHelper.error("会员运营ID申请出错:" + (resultJSON != null ? resultJSON.toString() : "未知错误"));
|
| | | }
|
| | |
|
| | | return null;
|
| | | }
|
| | |
|
| | | public static void specialConvertItem(Long auctionId, TaoKeAppInfo app) {
|
| | |
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | public static void getCouponByAuctionId(Long auctionId) {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.itemid.coupon.get");
|
| | | map.put("platform", 2 + "");
|
| | | map.put("pid", TaoBaoConstant.TAOBAO_RELATION_AS_SPECIAL_PID);
|
| | | map.put("num_iids", auctionId + "");
|
| | | TaoKeAppInfo app = new TaoKeAppInfo();
|
| | | app.setAppKey(TaoBaoConstant.TAOBAO_AUTH_APPKEY);
|
| | | app.setAppSecret(TaoBaoConstant.TAOBAO_AUTH_APPSECRET);
|
| | | try {
|
| | | JSONObject json = TaoKeBaseUtil.baseRequest(map, app);
|
| | | System.out.print(json);
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | class QuanInfo {
|
| | |
| | | map.put("af_order_option", data.toString());
|
| | | try {
|
| | | JSONObject json = TaoKeBaseUtil.baseRequest(map, app);
|
| | | JSONObject dataJson = json.optJSONObject("tbk_dg_punish_order_get_response").optJSONObject("result").optJSONObject("data");
|
| | | JSONObject dataJson = json.optJSONObject("tbk_dg_punish_order_get_response").optJSONObject("result")
|
| | | .optJSONObject("data");
|
| | | JSONArray array = dataJson.optJSONObject("results").optJSONArray("result");
|
| | | if (array != null)
|
| | | for (int n = 0; n < array.size(); n++) {
|
| | |
| | | map.put("method", "taobao.tbk.relation.refund");
|
| | |
|
| | | JSONObject option = new JSONObject();
|
| | | option.put("search_type", 1);
|
| | | option.put("search_type", 2);
|
| | | option.put("refund_type", third ? 2 : 1);
|
| | | option.put("start_time", TimeUtil.getGernalTime(startTime.getTime(), "yyyy-MM-dd HH:mm:ss"));
|
| | | option.put("page_no", page);
|
| | |
| | | int count = results.optInt("total_count");
|
| | | finalResult.totalCount = count;
|
| | | JSONArray array = results.optJSONArray("result");
|
| | | if (array != null)
|
| | | for (int i = 0; i < array.size(); i++) {
|
| | | JSONObject item = array.optJSONObject(i);
|
| | | TaoBaoWeiQuanOrder order = new TaoBaoWeiQuanOrder();
|
| | | order.setGoodsName(item.optString("tb_auction_title"));
|
| | | BigDecimal fanMoney = new BigDecimal(0);
|
| | | if (!StringUtil.isNullOrEmpty(item.optString("tk_subsidy_fee_refund3rd_pub"))) {
|
| | | fanMoney.add(new BigDecimal(item.optString("tk_subsidy_fee_refund3rd_pub")));
|
| | | fanMoney= fanMoney.add(new BigDecimal(item.optString("tk_subsidy_fee_refund3rd_pub")));
|
| | | }
|
| | | if (!StringUtil.isNullOrEmpty(item.optString("tk_commission_fee_refund3rd_pub"))) {
|
| | | fanMoney.add(new BigDecimal(item.optString("tk_commission_fee_refund3rd_pub")));
|
| | | fanMoney= fanMoney.add(new BigDecimal(item.optString("tk_commission_fee_refund3rd_pub")));
|
| | | }
|
| | | if (!StringUtil.isNullOrEmpty(item.optString("tk_subsidy_fee_refund_pub"))) {
|
| | | fanMoney.add(new BigDecimal(item.optString("tk_subsidy_fee_refund_pub")));
|
| | | fanMoney= fanMoney.add(new BigDecimal(item.optString("tk_subsidy_fee_refund_pub")));
|
| | | }
|
| | | if (!StringUtil.isNullOrEmpty(item.optString("tk_commission_fee_refund_pub"))) {
|
| | | fanMoney.add(new BigDecimal(item.optString("tk_commission_fee_refund_pub")));
|
| | | fanMoney= fanMoney.add(new BigDecimal(item.optString("tk_commission_fee_refund_pub")));
|
| | | }
|
| | |
|
| | | if (fanMoney.compareTo(new BigDecimal(0)) == 0)
|
| | | fanMoney = null;
|
| | |
|
| | | order.setFanMoney(fanMoney);
|
| | | order.setJieSuanTime(
|
| | | new Date(TimeUtil.convertToTimeTemp(item.optString("earning_time"), "yyyy-MM-dd HH:mm:ss")));
|
| | | order.setJieSuanTime(new Date(
|
| | | TimeUtil.convertToTimeTemp(item.optString("earning_time"), "yyyy-MM-dd HH:mm:ss")));
|
| | | if (!StringUtil.isNullOrEmpty(item.optString("refund_fee")))
|
| | | order.setMoney(new BigDecimal(item.optString("refund_fee")));
|
| | | order.setOrderId(item.optString("tb_trade_parent_id"));
|
| | |
| | | order.setState("维权失败");
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(item.optString("tk_refund_suit_time")))
|
| | | order.setWeiQuanFinishTime(new Date(
|
| | | TimeUtil.convertToTimeTemp(item.optString("tk_refund_suit_time"), "yyyy-MM-dd HH:mm:ss")));
|
| | | order.setWeiQuanTime(
|
| | | new Date(TimeUtil.convertToTimeTemp(item.optString("tk_refund_time"), "yyyy-MM-dd HH:mm:ss")));
|
| | | order.setWeiQuanFinishTime(new Date(TimeUtil
|
| | | .convertToTimeTemp(item.optString("tk_refund_suit_time"), "yyyy-MM-dd HH:mm:ss")));
|
| | | order.setWeiQuanTime(new Date(
|
| | | TimeUtil.convertToTimeTemp(item.optString("tk_refund_time"), "yyyy-MM-dd HH:mm:ss")));
|
| | | list.add(order);
|
| | | }
|
| | |
|
| | |
| | | public static String TYPE_ZHUSHOU = "zhushou";
|
| | | public static String TYPE_RECOMMEND = "recommend";
|
| | | public static String TYPE_SYSTEM = "system";// 系统消息
|
| | | public static String TYPE_NOTIFY = "notify";// 通知消息
|
| | |
|
| | | private String icon;
|
| | | private String title;
|
| | |
| | | private JumpDetailV2 jumpDetail;// 跳转详情
|
| | | private String params;// 跳转参数
|
| | | private Integer unReadCount;// 消息未读数
|
| | | private String picture;// 大图
|
| | |
|
| | | public UserCommonMsgVO(String icon, String title, Date time, String type, String latestMsg, Boolean read,
|
| | | JumpDetailV2 jumpDetail, String params, Integer unReadCount) {
|
| | |
| | | this.unReadCount = unReadCount;
|
| | | }
|
| | |
|
| | | public String getPicture() {
|
| | | return picture;
|
| | | }
|
| | |
|
| | | public void setPicture(String picture) {
|
| | | this.picture = picture;
|
| | | }
|
| | |
|
| | | public Integer getUnReadCount() {
|
| | | return unReadCount;
|
| | | }
|
| | |
| | | maxElementsOnDisk="5000" eternal="false" timeToIdleSeconds="3600"
|
| | | timeToLiveSeconds="3600" overflowToDisk="true"
|
| | | memoryStoreEvictionPolicy="LRU" />
|
| | | |
| | | <!-- 大淘客商品缓存(10分钟) -->
|
| | | <cache name="daTaoKeGoodsCache" maxElementsInMemory="1000"
|
| | | maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="600"
|
| | | timeToLiveSeconds="600" overflowToDisk="true"
|
| | | memoryStoreEvictionPolicy="LRU" />
|
| | |
|
| | | |
| | |
|
| | |
|
| | | </ehcache>
|
| | |
| | | task =false
|
| | | outnetwork =false
|
| | | test =true |
| | | test =false |
| | |
| | | import org.yeshi.utils.mybatis.MyBatisMapperUtil;
|
| | |
|
| | | import com.yeshi.fanli.entity.jd.JDOrderItem;
|
| | | import com.yeshi.fanli.entity.push.DeviceTokenHW;
|
| | | import com.yeshi.fanli.entity.money.UserMoneyDetail;
|
| | |
|
| | | //@Ignore
|
| | | public class MyBatisProduce {
|
| | |
| | |
|
| | | @Test
|
| | | public void test1() {
|
| | | ColumnParseUtil.parseColumn(DeviceTokenHW.class,
|
| | | "D:\\workspace\\fanli\\fanli-server\\fanli\\src\\main\\java\\com\\yeshi\\fanli\\mapping\\push\\DeviceTokenHWMapper.xml");
|
| | | ColumnParseUtil.parseColumn(UserMoneyDetail.class,
|
| | | "D:\\workspace\\fanli\\fanli-server\\fanli\\src\\main\\java\\com\\yeshi\\fanli\\mapping\\money\\UserMoneyDetailMapper.xml");
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | import java.io.File;
|
| | | import java.io.FileInputStream;
|
| | | import java.io.FileNotFoundException;
|
| | | import java.math.BigDecimal;
|
| | | import java.util.ArrayList;
|
| | | import java.util.HashMap;
|
| | | import java.util.List;
|
| | |
| | | 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.taobao.TaoBaoGoodsActivityService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoOrderService;
|
| | | import com.yeshi.fanli.service.inter.user.TBPidService;
|
| | | import com.yeshi.fanli.service.inter.user.UserExtraTaoBaoInfoService;
|
| | |
| | |
|
| | | @Test
|
| | | public void test1() {
|
| | | try {
|
| | | TaoBaoGoodsBrief goods = TaoKeApiUtil.getSimpleGoodsInfo(575733104503L);
|
| | | System.out.println(goods);
|
| | | } catch (TaobaoGoodsDownException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | TaoKeApiUtil.getQuanInfo(574147597194L, "69e82c923a044dcbae7f36c6608f57eb");
|
| | | }
|
| | |
|
| | | @Test
|