Merge branch 'div' of ssh://193.112.35.168:29418/fanli-server into div
| | |
| | | </attributes>
|
| | | </classpathentry>
|
| | | <classpathentry kind="lib" path="libs/opush-server-sdk-1.0.3.jar"/>
|
| | | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.8.0_131"/>
|
| | | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.8.0_181"/>
|
| | | <classpathentry kind="output" path="target/classes"/>
|
| | | </classpath>
|
| | |
| | | try {
|
| | | userShareGoodsRecordService.takeEffectShareRecord(acceptData, shareId);
|
| | | } catch (UserShareGoodsRecordException eu) {
|
| | | try {
|
| | | LogHelper.errorDetailInfo(eu);
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | |
| | | } catch (Exception e) {
|
| | | try {
|
| | | LogHelper.errorDetailInfo(e);
|
| | |
| | | da.setMac(mac);
|
| | | deviceActiveService.addDeviceActive(da);
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | // 用户等级更新
|
| | |
| | | } else {// 普通购买
|
| | | OtherInfo otherInfo = new OtherInfo();
|
| | | RewardCouponVO rewardCoupon = new RewardCouponVO();
|
| | | rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("integralExchange"));
|
| | | rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
|
| | | JSONObject params1=new JSONObject();
|
| | | params1.put("balanceMore", true);
|
| | | params1.put("url", configService.get("special_guide_reward_coupon_link"));
|
| | | rewardCoupon.setParams(params1.toString());
|
| | | rewardCoupon.setMaxMoney("¥" +TaoBaoUtil.getGoodsHongBaoMoney(goods, fanLiRate).add( MoneyBigDecimalUtil.mul(TaoBaoUtil.getGoodsHongBaoMoney(goods, fanLiRate),
|
| | | Constant.MAX_REWARD_RATE)));
|
| | |
| | | // 奖励券返利
|
| | | RewardCouponVO rewardCoupon = new RewardCouponVO();
|
| | | rewardCoupon.setMaxMoneyPlus(maxMoneyPlus);
|
| | | rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("integralExchange"));
|
| | | rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
|
| | | JSONObject params1=new JSONObject();
|
| | | params1.put("balanceMore", true);
|
| | | params1.put("url", configService.get("special_guide_reward_coupon_link"));
|
| | | rewardCoupon.setParams(params1.toString());
|
| | | rewardCoupon.setMaxMoney(
|
| | | "¥" +JDUtil.getGoodsFanLiMoney(jdGoods, fanLiRate).add( MoneyBigDecimalUtil.mul(JDUtil.getGoodsFanLiMoney(jdGoods, fanLiRate), Constant.MAX_REWARD_RATE)));
|
| | |
| | | // 附加信息
|
| | | OtherInfo otherInfo = new OtherInfo();
|
| | | RewardCouponVO rewardCoupon = new RewardCouponVO();
|
| | | rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("integralExchange"));
|
| | | rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
|
| | | JSONObject params1=new JSONObject();
|
| | | params1.put("balanceMore", true);
|
| | | params1.put("url", configService.get("special_guide_reward_coupon_link"));
|
| | | rewardCoupon.setParams(params1.toString());
|
| | | rewardCoupon.setMaxMoney("¥" +PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, fanLiRate).add(MoneyBigDecimalUtil.mul(PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, fanLiRate),
|
| | | Constant.MAX_REWARD_RATE)));
|
| | |
| | | package com.yeshi.fanli.dao.ad;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.springframework.data.mongodb.core.query.Criteria;
|
| | | import org.springframework.data.mongodb.core.query.Query;
|
| | | import org.springframework.stereotype.Repository;
|
| | |
| | | @Repository
|
| | | public class DouYinClickEventDao extends MongodbBaseDao<DouYinClickEvent> {
|
| | |
|
| | | public DouYinClickEvent selectByAid(String aid) {
|
| | | public DouYinClickEvent selectByCallBack(String callback) {
|
| | | Query query = new Query();
|
| | | query.addCriteria(Criteria.where("aid").is(aid));
|
| | | query.addCriteria(Criteria.where("callback").is(callback));
|
| | | return findOne(query);
|
| | | }
|
| | |
|
| | |
| | | return findOne(query);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 查询所有
|
| | | * |
| | | * @param start
|
| | | * @param count
|
| | | * @return
|
| | | */
|
| | | public List<DouYinClickEvent> listAll(int start, int count) {
|
| | | Query query = new Query();
|
| | | query.skip(start);
|
| | | query.limit(count);
|
| | | return findList(query);
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.dao.mybatis.elme; |
| | | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.entity.elme.ElmeHongBaoOrderMap; |
| | | |
| | | public interface ElmeHongBaoOrderMapMapper extends BaseMapper<ElmeHongBaoOrderMap> { |
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.dao.mybatis.elme; |
| | | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.entity.elme.ElmeOrder; |
| | | |
| | | public interface ElmeOrderMapper extends BaseMapper<ElmeOrder> { |
| | | |
| | | } |
| | |
| | | public final static int TYPE_DEVICE = 2;
|
| | |
|
| | | private int type;
|
| | | private String aid;
|
| | | private String callback;
|
| | | private String device;
|
| | | private int platform;
|
| | |
|
| | | public DouYinDeviceActiveQueueDTO() {
|
| | | }
|
| | |
|
| | | public DouYinDeviceActiveQueueDTO(int type, String aid) {
|
| | | public DouYinDeviceActiveQueueDTO(int type, String callback) {
|
| | | this.type = type;
|
| | | this.aid = aid;
|
| | | this.callback = callback;
|
| | | }
|
| | |
|
| | | public DouYinDeviceActiveQueueDTO(int type, String device, int platform) {
|
| | |
| | | this.type = type;
|
| | | }
|
| | |
|
| | | public String getAid() {
|
| | | return aid;
|
| | | }
|
| | |
|
| | | public void setAid(String aid) {
|
| | | this.aid = aid;
|
| | | }
|
| | |
|
| | | public String getDevice() {
|
| | | return device;
|
| | | }
|
| | |
| | | public void setDevice(String device) {
|
| | | this.device = device;
|
| | | }
|
| | |
|
| | | public String getCallback() {
|
| | | return callback;
|
| | | }
|
| | |
|
| | | public void setCallback(String callback) {
|
| | | this.callback = callback;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.dto.vip;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.dto.vip.goods.VIPGoodsInfo;
|
| | |
|
| | | public class VIPSearchResult {
|
| | | // 商品列表
|
| | | private List<VIPGoodsInfo> goodsList;
|
| | | // 商品数量
|
| | | private int total;
|
| | |
|
| | | public VIPSearchResult(List<VIPGoodsInfo> goodsList, int total) {
|
| | | this.goodsList = goodsList;
|
| | | this.total = total;
|
| | | }
|
| | |
|
| | | public VIPSearchResult() {
|
| | | }
|
| | |
|
| | | public List<VIPGoodsInfo> getGoodsList() {
|
| | | return goodsList;
|
| | | }
|
| | |
|
| | | public void setGoodsList(List<VIPGoodsInfo> goodsList) {
|
| | | this.goodsList = goodsList;
|
| | | }
|
| | |
|
| | | public int getTotal() {
|
| | | return total;
|
| | | }
|
| | |
|
| | | public void setTotal(int total) {
|
| | | this.total = total;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.dto.vip.goods;
|
| | |
|
| | | public class VIPGoodsCommentsInfo {
|
| | | private Integer comments; // 商品评论数
|
| | | private String goodCommentsShare; // 商品好评率:百分比,不带百分号
|
| | |
|
| | | public Integer getComments() {
|
| | | return comments;
|
| | | }
|
| | |
|
| | | public void setComments(Integer comments) {
|
| | | this.comments = comments;
|
| | | }
|
| | |
|
| | | public String getGoodCommentsShare() {
|
| | | return goodCommentsShare;
|
| | | }
|
| | |
|
| | | public void setGoodCommentsShare(String goodCommentsShare) {
|
| | | this.goodCommentsShare = goodCommentsShare;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.dto.vip.goods;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * 唯品会商品信息
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | public class VIPGoodsInfo {
|
| | | private String goodsId;// 商品id
|
| | | private String goodsName;// 商品名称
|
| | | private String goodsDesc;// 商品描述,字段暂不输出
|
| | | private String destUrl;// 商品落地页
|
| | | private String goodsThumbUrl;// 商品缩略图
|
| | | private List<String> goodsCarouselPictures;// 商品轮播图:根据商品id查询时返回,商品列表不返回
|
| | | private String goodsMainPicture;// 商品主图
|
| | | private Long categoryId;// 商品三级分类id
|
| | | private String categoryName;// 商品三级分类
|
| | | private Integer sourceType;// 商品类型:0-自营,1-MP
|
| | | private String marketPrice;// 市场价(元)
|
| | | private String vipPrice;// 唯品价(元)
|
| | | private String commissionRate;// 佣金比例(%)
|
| | | private String commission;// 佣金金额(元)
|
| | | private String discount;// 折扣
|
| | | private List<String> goodsDetailPictures;// 商品详情图片:根据商品id查询商品信息时返回,商品列表不返回
|
| | | private Long cat1stId;// 商品一级分类id
|
| | | private String cat1stName;// 商品一级分类名称
|
| | | private Long cat2ndId;// 商品二级分类id
|
| | | private String cat2ndName;// 商品二级分类名称
|
| | | private String brandStoreSn;// 商品品牌sn
|
| | | private String brandName;// 商品品牌名称
|
| | | private String brandLogoFull;// 商品品牌logo全路径地址
|
| | | private Long schemeEndTime;// 商品推广计划有效期预估截止时间:仅为预估时间,仅做参考;时间戳,单位:毫秒
|
| | | private Long sellTimeFrom;// 商品售卖开始时间,时间戳,单位毫秒
|
| | | private Long sellTimeTo;// 商品售卖结束时间,时间戳, 单位毫秒
|
| | | private Integer weight;// 推广权重,用于确定推广该商品的优先级,权重值越大,优先级越高
|
| | | private VIPStoreInfo storeInfo;// 店铺信息
|
| | | private VIPGoodsCommentsInfo commentsInfo;// 商品评价信息
|
| | | private VIPStoreServiceCapability storeServiceCapability;// 商品所属店铺服务能力评价:预留字段
|
| | | private Long brandId;// 商品所属档期(专场)id
|
| | | private Long schemeStartTime;// 商品所属推广方案开始时间:时间戳,单位:毫秒
|
| | |
|
| | | public String getGoodsId() {
|
| | | return goodsId;
|
| | | }
|
| | |
|
| | | public void setGoodsId(String goodsId) {
|
| | | this.goodsId = goodsId;
|
| | | }
|
| | |
|
| | | public String getGoodsName() {
|
| | | return goodsName;
|
| | | }
|
| | |
|
| | | public void setGoodsName(String goodsName) {
|
| | | this.goodsName = goodsName;
|
| | | }
|
| | |
|
| | | public String getGoodsDesc() {
|
| | | return goodsDesc;
|
| | | }
|
| | |
|
| | | public void setGoodsDesc(String goodsDesc) {
|
| | | this.goodsDesc = goodsDesc;
|
| | | }
|
| | |
|
| | | public String getDestUrl() {
|
| | | return destUrl;
|
| | | }
|
| | |
|
| | | public void setDestUrl(String destUrl) {
|
| | | this.destUrl = destUrl;
|
| | | }
|
| | |
|
| | | public String getGoodsThumbUrl() {
|
| | | return goodsThumbUrl;
|
| | | }
|
| | |
|
| | | public void setGoodsThumbUrl(String goodsThumbUrl) {
|
| | | this.goodsThumbUrl = goodsThumbUrl;
|
| | | }
|
| | |
|
| | | public List<String> getGoodsCarouselPictures() {
|
| | | return goodsCarouselPictures;
|
| | | }
|
| | |
|
| | | public void setGoodsCarouselPictures(List<String> goodsCarouselPictures) {
|
| | | this.goodsCarouselPictures = goodsCarouselPictures;
|
| | | }
|
| | |
|
| | | public String getGoodsMainPicture() {
|
| | | return goodsMainPicture;
|
| | | }
|
| | |
|
| | | public void setGoodsMainPicture(String goodsMainPicture) {
|
| | | this.goodsMainPicture = goodsMainPicture;
|
| | | }
|
| | |
|
| | | public Long getCategoryId() {
|
| | | return categoryId;
|
| | | }
|
| | |
|
| | | public void setCategoryId(Long categoryId) {
|
| | | this.categoryId = categoryId;
|
| | | }
|
| | |
|
| | | public String getCategoryName() {
|
| | | return categoryName;
|
| | | }
|
| | |
|
| | | public void setCategoryName(String categoryName) {
|
| | | this.categoryName = categoryName;
|
| | | }
|
| | |
|
| | | public Integer getSourceType() {
|
| | | return sourceType;
|
| | | }
|
| | |
|
| | | public void setSourceType(Integer sourceType) {
|
| | | this.sourceType = sourceType;
|
| | | }
|
| | |
|
| | | public String getMarketPrice() {
|
| | | return marketPrice;
|
| | | }
|
| | |
|
| | | public void setMarketPrice(String marketPrice) {
|
| | | this.marketPrice = marketPrice;
|
| | | }
|
| | |
|
| | | public String getVipPrice() {
|
| | | return vipPrice;
|
| | | }
|
| | |
|
| | | public void setVipPrice(String vipPrice) {
|
| | | this.vipPrice = vipPrice;
|
| | | }
|
| | |
|
| | | public String getCommissionRate() {
|
| | | return commissionRate;
|
| | | }
|
| | |
|
| | | public void setCommissionRate(String commissionRate) {
|
| | | this.commissionRate = commissionRate;
|
| | | }
|
| | |
|
| | | public String getCommission() {
|
| | | return commission;
|
| | | }
|
| | |
|
| | | public void setCommission(String commission) {
|
| | | this.commission = commission;
|
| | | }
|
| | |
|
| | | public String getDiscount() {
|
| | | return discount;
|
| | | }
|
| | |
|
| | | public void setDiscount(String discount) {
|
| | | this.discount = discount;
|
| | | }
|
| | |
|
| | | public List<String> getGoodsDetailPictures() {
|
| | | return goodsDetailPictures;
|
| | | }
|
| | |
|
| | | public void setGoodsDetailPictures(List<String> goodsDetailPictures) {
|
| | | this.goodsDetailPictures = goodsDetailPictures;
|
| | | }
|
| | |
|
| | | public Long getCat1stId() {
|
| | | return cat1stId;
|
| | | }
|
| | |
|
| | | public void setCat1stId(Long cat1stId) {
|
| | | this.cat1stId = cat1stId;
|
| | | }
|
| | |
|
| | | public String getCat1stName() {
|
| | | return cat1stName;
|
| | | }
|
| | |
|
| | | public void setCat1stName(String cat1stName) {
|
| | | this.cat1stName = cat1stName;
|
| | | }
|
| | |
|
| | | public Long getCat2ndId() {
|
| | | return cat2ndId;
|
| | | }
|
| | |
|
| | | public void setCat2ndId(Long cat2ndId) {
|
| | | this.cat2ndId = cat2ndId;
|
| | | }
|
| | |
|
| | | public String getCat2ndName() {
|
| | | return cat2ndName;
|
| | | }
|
| | |
|
| | | public void setCat2ndName(String cat2ndName) {
|
| | | this.cat2ndName = cat2ndName;
|
| | | }
|
| | |
|
| | | public String getBrandStoreSn() {
|
| | | return brandStoreSn;
|
| | | }
|
| | |
|
| | | public void setBrandStoreSn(String brandStoreSn) {
|
| | | this.brandStoreSn = brandStoreSn;
|
| | | }
|
| | |
|
| | | public String getBrandName() {
|
| | | return brandName;
|
| | | }
|
| | |
|
| | | public void setBrandName(String brandName) {
|
| | | this.brandName = brandName;
|
| | | }
|
| | |
|
| | | public String getBrandLogoFull() {
|
| | | return brandLogoFull;
|
| | | }
|
| | |
|
| | | public void setBrandLogoFull(String brandLogoFull) {
|
| | | this.brandLogoFull = brandLogoFull;
|
| | | }
|
| | |
|
| | | public Long getSchemeEndTime() {
|
| | | return schemeEndTime;
|
| | | }
|
| | |
|
| | | public void setSchemeEndTime(Long schemeEndTime) {
|
| | | this.schemeEndTime = schemeEndTime;
|
| | | }
|
| | |
|
| | | public Long getSellTimeFrom() {
|
| | | return sellTimeFrom;
|
| | | }
|
| | |
|
| | | public void setSellTimeFrom(Long sellTimeFrom) {
|
| | | this.sellTimeFrom = sellTimeFrom;
|
| | | }
|
| | |
|
| | | public Long getSellTimeTo() {
|
| | | return sellTimeTo;
|
| | | }
|
| | |
|
| | | public void setSellTimeTo(Long sellTimeTo) {
|
| | | this.sellTimeTo = sellTimeTo;
|
| | | }
|
| | |
|
| | | public Integer getWeight() {
|
| | | return weight;
|
| | | }
|
| | |
|
| | | public void setWeight(Integer weight) {
|
| | | this.weight = weight;
|
| | | }
|
| | |
|
| | | public VIPStoreInfo getStoreInfo() {
|
| | | return storeInfo;
|
| | | }
|
| | |
|
| | | public void setStoreInfo(VIPStoreInfo storeInfo) {
|
| | | this.storeInfo = storeInfo;
|
| | | }
|
| | |
|
| | | public VIPGoodsCommentsInfo getCommentsInfo() {
|
| | | return commentsInfo;
|
| | | }
|
| | |
|
| | | public void setCommentsInfo(VIPGoodsCommentsInfo commentsInfo) {
|
| | | this.commentsInfo = commentsInfo;
|
| | | }
|
| | |
|
| | | public VIPStoreServiceCapability getStoreServiceCapability() {
|
| | | return storeServiceCapability;
|
| | | }
|
| | |
|
| | | public void setStoreServiceCapability(VIPStoreServiceCapability storeServiceCapability) {
|
| | | this.storeServiceCapability = storeServiceCapability;
|
| | | }
|
| | |
|
| | | public Long getBrandId() {
|
| | | return brandId;
|
| | | }
|
| | |
|
| | | public void setBrandId(Long brandId) {
|
| | | this.brandId = brandId;
|
| | | }
|
| | |
|
| | | public Long getSchemeStartTime() {
|
| | | return schemeStartTime;
|
| | | }
|
| | |
|
| | | public void setSchemeStartTime(Long schemeStartTime) {
|
| | | this.schemeStartTime = schemeStartTime;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.dto.vip.goods;
|
| | |
|
| | | public class VIPStoreInfo {
|
| | | private String storeId;// 店铺id
|
| | | private String storeName;// 店铺名称
|
| | |
|
| | | public String getStoreId() {
|
| | | return storeId;
|
| | | }
|
| | |
|
| | | public void setStoreId(String storeId) {
|
| | | this.storeId = storeId;
|
| | | }
|
| | |
|
| | | public String getStoreName() {
|
| | | return storeName;
|
| | | }
|
| | |
|
| | | public void setStoreName(String storeName) {
|
| | | this.storeName = storeName;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.dto.vip.goods;
|
| | |
|
| | | public class VIPStoreServiceCapability {
|
| | | private String storeScore; // 店铺评分:保留两位小数
|
| | | private String storeRankRate; // 店铺同品类排名比例:例如10表示前10%
|
| | |
|
| | | public String getStoreScore() {
|
| | | return storeScore;
|
| | | }
|
| | |
|
| | | public void setStoreScore(String storeScore) {
|
| | | this.storeScore = storeScore;
|
| | | }
|
| | |
|
| | | public String getStoreRankRate() {
|
| | | return storeRankRate;
|
| | | }
|
| | |
|
| | | public void setStoreRankRate(String storeRankRate) {
|
| | | this.storeRankRate = storeRankRate;
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | public final static String MONITOR__LINK__PARAMS = "aid=__AID__&aidName=__AID__NAME__&campaignId=__CAMPAIGN__ID__&cid=__CID__&csite=__CSITE__&ctype=__CTYPE__&mac=__MAC__&mac1=__MAC1__&ua=__UA__&idfa=__IDFA__&imei=__IMEI__&uuid=__UUID__&androidId=__ANDROIDID__&openUDID=__OPENUDID__&os=__OS__&ip=__IP__&ts=__TS__&convertId=__CONVERT__ID __&callback=__CALLBACK__PARAM __";// 监测链接
|
| | |
|
| | | @Id
|
| | | @Field
|
| | | private String aid; // 广告计划id 原值
|
| | | @Field
|
| | |
| | | @Field
|
| | | private int ctype; // 创意样式 2=小图模式 3=大图模式 4=组图模式 5=视频
|
| | | @Field
|
| | | private String mac; // MAC地址 去除分隔符 ":",(采用获取原始值)取 md5sum // 摘要(备注:入网硬件地址)例:38978B891A08
|
| | | private String mac; // MAC地址 去除分隔符 ":",(采用获取原始值)取 md5sum //
|
| | | // 摘要(备注:入网硬件地址)例:38978B891A08
|
| | | @Field
|
| | | private String mac1; // 用户终端的eth0接口的MAC地址 保留分隔符 ":",(采用获取原始值)取 md5sum
|
| | | @Field // 摘要(备注:入网硬件地址) 例:38:97:8B:89:1A:08
|
| | |
| | | private long ts; // 客户端发生广告点击事件的时间 UNIX时间戳
|
| | | @Field
|
| | | private String convertId; // 转化id 原值
|
| | | @Id
|
| | | @Field
|
| | | private String callback;// 回调参数(方案二) 见后文
|
| | |
|
New file |
| | |
| | | package com.yeshi.fanli.entity.elme;
|
| | |
|
| | | import java.util.Date;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.HongBaoV2;
|
| | |
|
| | | /**
|
| | | * 饿了么红包订单映射
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Table("yeshi_ec_elme_order_hongbao")
|
| | | public class ElmeHongBaoOrderMap {
|
| | | @Column(name = "eoh_id")
|
| | | private Long id;
|
| | | @Column(name = "eoh_order_id")
|
| | | private ElmeOrder elmeOrder;
|
| | | @Column(name = "eoh_hongbao_id")
|
| | | private HongBaoV2 hongBao;
|
| | | @Column(name = "eoh_create_time")
|
| | | private Date createTime;
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public ElmeOrder getElmeOrder() {
|
| | | return elmeOrder;
|
| | | }
|
| | |
|
| | | public void setElmeOrder(ElmeOrder elmeOrder) {
|
| | | this.elmeOrder = elmeOrder;
|
| | | }
|
| | |
|
| | | public HongBaoV2 getHongBao() {
|
| | | return hongBao;
|
| | | }
|
| | |
|
| | | public void setHongBao(HongBaoV2 hongBao) {
|
| | | this.hongBao = hongBao;
|
| | | }
|
| | |
|
| | | public Date getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(Date createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.entity.elme;
|
| | |
|
| | | import java.io.Serializable;
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | /**
|
| | | * 饿了么订单
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Table("yeshi_ec_elme_order")
|
| | | public class ElmeOrder implements Serializable{
|
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | | @Column(name = "eo_id")
|
| | | private Long id;
|
| | | @Column(name = "eo_channel_id")
|
| | | private String channelId;// 渠道号
|
| | | @Column(name = "eo_channel_name")
|
| | | private String channelName;// 渠道名称
|
| | | @Column(name = "eo_track_pid")
|
| | | private String trackPid;// track_pid
|
| | | @Column(name = "eo_rid")
|
| | | private String rid;// rid
|
| | | @Column(name = "eo_order_date")
|
| | | private Date orderDate;// 订单日期
|
| | | @Column(name = "eo_order_id")
|
| | | private String orderId;// 订单号
|
| | | @Column(name = "eo_pay_money")
|
| | | private BigDecimal payMoney;// 支付金额
|
| | | @Column(name = "eo_city")
|
| | | private String city;// 下单城市
|
| | | @Column(name = "eo_coupon_money")
|
| | | private BigDecimal couponMoney;// 用券金额
|
| | | @Column(name = "eo_newer_first_order")
|
| | | private Integer newerFirstOrder;// 是否新客首单
|
| | | @Column(name = "eo_newer_repay_order")
|
| | | private Integer newerRepayOrder;// 是否新客复购单
|
| | | @Column(name = "eo_taoke_hongbao")
|
| | | private Integer taokeHongBao;// 是否使用淘客红包
|
| | | @Column(name = "eo_shop_click")
|
| | | private Integer shopClick;// 是否有在会场内该门店的点击记录
|
| | | @Column(name = "eo_recieve_coupon_7day_first_order")
|
| | | private Integer recieveCoupon7DayFirstOrder;// 是否领券后7天内首单
|
| | | @Column(name = "eo_settle")
|
| | | private Boolean isSettle;// 是否结佣
|
| | | @Column(name = "eo_create_time")
|
| | | private Date createTime;
|
| | | @Column(name = "eo_update_time")
|
| | | private Date updateTime;
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getChannelId() {
|
| | | return channelId;
|
| | | }
|
| | |
|
| | | public void setChannelId(String channelId) {
|
| | | this.channelId = channelId;
|
| | | }
|
| | |
|
| | | public String getChannelName() {
|
| | | return channelName;
|
| | | }
|
| | |
|
| | | public void setChannelName(String channelName) {
|
| | | this.channelName = channelName;
|
| | | }
|
| | |
|
| | | public String getTrackPid() {
|
| | | return trackPid;
|
| | | }
|
| | |
|
| | | public void setTrackPid(String trackPid) {
|
| | | this.trackPid = trackPid;
|
| | | }
|
| | |
|
| | | public String getRid() {
|
| | | return rid;
|
| | | }
|
| | |
|
| | | public void setRid(String rid) {
|
| | | this.rid = rid;
|
| | | }
|
| | |
|
| | | public Date getOrderDate() {
|
| | | return orderDate;
|
| | | }
|
| | |
|
| | | public void setOrderDate(Date orderDate) {
|
| | | this.orderDate = orderDate;
|
| | | }
|
| | |
|
| | | public String getOrderId() {
|
| | | return orderId;
|
| | | }
|
| | |
|
| | | public void setOrderId(String orderId) {
|
| | | this.orderId = orderId;
|
| | | }
|
| | |
|
| | | public BigDecimal getPayMoney() {
|
| | | return payMoney;
|
| | | }
|
| | |
|
| | | public void setPayMoney(BigDecimal payMoney) {
|
| | | this.payMoney = payMoney;
|
| | | }
|
| | |
|
| | | public String getCity() {
|
| | | return city;
|
| | | }
|
| | |
|
| | | public void setCity(String city) {
|
| | | this.city = city;
|
| | | }
|
| | |
|
| | | public BigDecimal getCouponMoney() {
|
| | | return couponMoney;
|
| | | }
|
| | |
|
| | | public void setCouponMoney(BigDecimal couponMoney) {
|
| | | this.couponMoney = couponMoney;
|
| | | }
|
| | |
|
| | | public Integer getNewerFirstOrder() {
|
| | | return newerFirstOrder;
|
| | | }
|
| | |
|
| | | public void setNewerFirstOrder(Integer newerFirstOrder) {
|
| | | this.newerFirstOrder = newerFirstOrder;
|
| | | }
|
| | |
|
| | | public Integer getNewerRepayOrder() {
|
| | | return newerRepayOrder;
|
| | | }
|
| | |
|
| | | public void setNewerRepayOrder(Integer newerRepayOrder) {
|
| | | this.newerRepayOrder = newerRepayOrder;
|
| | | }
|
| | |
|
| | | public Integer getTaokeHongBao() {
|
| | | return taokeHongBao;
|
| | | }
|
| | |
|
| | | public void setTaokeHongBao(Integer taokeHongBao) {
|
| | | this.taokeHongBao = taokeHongBao;
|
| | | }
|
| | |
|
| | | public Integer getShopClick() {
|
| | | return shopClick;
|
| | | }
|
| | |
|
| | | public void setShopClick(Integer shopClick) {
|
| | | this.shopClick = shopClick;
|
| | | }
|
| | |
|
| | | public Integer getRecieveCoupon7DayFirstOrder() {
|
| | | return recieveCoupon7DayFirstOrder;
|
| | | }
|
| | |
|
| | | public void setRecieveCoupon7DayFirstOrder(Integer recieveCoupon7DayFirstOrder) {
|
| | | this.recieveCoupon7DayFirstOrder = recieveCoupon7DayFirstOrder;
|
| | | }
|
| | |
|
| | | public Boolean getIsSettle() {
|
| | | return isSettle;
|
| | | }
|
| | |
|
| | | public void setIsSettle(Boolean isSettle) {
|
| | | this.isSettle = isSettle;
|
| | | }
|
| | |
|
| | | 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;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.elme.ElmeHongBaoOrderMapMapper"> |
| | | <resultMap id="BaseResultMap" |
| | | type="com.yeshi.fanli.entity.elme.ElmeHongBaoOrderMap"> |
| | | <id column="eoh_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="eoh_create_time" property="createTime" |
| | | jdbcType="TIMESTAMP" /> |
| | | <association property="elmeOrder" column="eoh_order_id"> |
| | | <id property="id" column="eoh_order_id" /> |
| | | </association> |
| | | <association property="hongBao" column="eoh_hongbao_id"> |
| | | <id property="id" column="eoh_hongbao_id" /> |
| | | </association> |
| | | |
| | | </resultMap> |
| | | <sql id="Base_Column_List">eoh_id,eoh_order_id,eoh_hongbao_id,eoh_create_time</sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_elme_order_hongbao where eoh_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_elme_order_hongbao where eoh_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.elme.ElmeHongBaoOrderMap" |
| | | useGeneratedKeys="true" keyProperty="id">insert into |
| | | yeshi_ec_elme_order_hongbao |
| | | (eoh_id,eoh_order_id,eoh_hongbao_id,eoh_create_time) values |
| | | (#{id,jdbcType=BIGINT},#{elmeOrder,jdbcType=VARCHAR},#{hongBao,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.elme.ElmeHongBaoOrderMap" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_elme_order_hongbao |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">eoh_id,</if> |
| | | <if test="elmeOrder != null">eoh_order_id,</if> |
| | | <if test="hongBao != null">eoh_hongbao_id,</if> |
| | | <if test="createTime != null">eoh_create_time,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="elmeOrder != null">#{elmeOrder,jdbcType=VARCHAR},</if> |
| | | <if test="hongBao != null">#{hongBao,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.elme.ElmeHongBaoOrderMap">update |
| | | yeshi_ec_elme_order_hongbao set eoh_order_id = |
| | | #{elmeOrder,jdbcType=VARCHAR},eoh_hongbao_id = |
| | | #{hongBao,jdbcType=VARCHAR},eoh_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP} where eoh_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.elme.ElmeHongBaoOrderMap"> |
| | | update yeshi_ec_elme_order_hongbao |
| | | <set> |
| | | <if test="elmeOrder != null">eoh_order_id=#{elmeOrder,jdbcType=VARCHAR},</if> |
| | | <if test="hongBao != null">eoh_hongbao_id=#{hongBao,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">eoh_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | </set> |
| | | where eoh_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.elme.ElmeOrderMapper"> |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.elme.ElmeOrder"> |
| | | <id column="eo_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="eo_channel_id" property="channelId" jdbcType="VARCHAR" /> |
| | | <result column="eo_channel_name" property="channelName" |
| | | jdbcType="VARCHAR" /> |
| | | <result column="eo_track_pid" property="trackPid" jdbcType="VARCHAR" /> |
| | | <result column="eo_rid" property="rid" jdbcType="VARCHAR" /> |
| | | <result column="eo_order_date" property="orderDate" jdbcType="TIMESTAMP" /> |
| | | <result column="eo_order_id" property="orderId" jdbcType="VARCHAR" /> |
| | | <result column="eo_pay_money" property="payMoney" jdbcType="DECIMAL" /> |
| | | <result column="eo_city" property="city" jdbcType="VARCHAR" /> |
| | | <result column="eo_coupon_money" property="couponMoney" |
| | | jdbcType="DECIMAL" /> |
| | | <result column="eo_newer_first_order" property="newerFirstOrder" |
| | | jdbcType="INTEGER" /> |
| | | <result column="eo_newer_repay_order" property="newerRepayOrder" |
| | | jdbcType="INTEGER" /> |
| | | <result column="eo_taoke_hongbao" property="taokeHongBao" |
| | | jdbcType="INTEGER" /> |
| | | <result column="eo_shop_click" property="shopClick" jdbcType="INTEGER" /> |
| | | <result column="eo_recieve_coupon_7day_first_order" property="recieveCoupon7DayFirstOrder" |
| | | jdbcType="INTEGER" /> |
| | | <result column="eo_settle" property="isSettle" jdbcType="BOOLEAN" /> |
| | | <result column="eo_create_time" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="eo_update_time" property="updateTime" jdbcType="TIMESTAMP" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">eo_id,eo_channel_id,eo_channel_name,eo_track_pid,eo_rid,eo_order_date,eo_order_id,eo_pay_money,eo_city,eo_coupon_money,eo_newer_first_order,eo_newer_repay_order,eo_taoke_hongbao,eo_shop_click,eo_recieve_coupon_7day_first_order,eo_settle,eo_create_time,eo_update_time |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_elme_order where eo_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_elme_order where eo_id = #{id,jdbcType=BIGINT}</delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.elme.ElmeOrder" |
| | | useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_elme_order |
| | | (eo_id,eo_channel_id,eo_channel_name,eo_track_pid,eo_rid,eo_order_date,eo_order_id,eo_pay_money,eo_city,eo_coupon_money,eo_newer_first_order,eo_newer_repay_order,eo_taoke_hongbao,eo_shop_click,eo_recieve_coupon_7day_first_order,eo_settle,eo_create_time,eo_update_time) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{channelId,jdbcType=VARCHAR},#{channelName,jdbcType=VARCHAR},#{trackPid,jdbcType=VARCHAR},#{rid,jdbcType=VARCHAR},#{orderDate,jdbcType=TIMESTAMP},#{orderId,jdbcType=VARCHAR},#{payMoney,jdbcType=DECIMAL},#{city,jdbcType=VARCHAR},#{couponMoney,jdbcType=DECIMAL},#{newerFirstOrder,jdbcType=INTEGER},#{newerRepayOrder,jdbcType=INTEGER},#{taokeHongBao,jdbcType=INTEGER},#{shopClick,jdbcType=INTEGER},#{recieveCoupon7DayFirstOrder,jdbcType=INTEGER},#{isSettle,jdbcType=BOOLEAN},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.elme.ElmeOrder" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_elme_order |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">eo_id,</if> |
| | | <if test="channelId != null">eo_channel_id,</if> |
| | | <if test="channelName != null">eo_channel_name,</if> |
| | | <if test="trackPid != null">eo_track_pid,</if> |
| | | <if test="rid != null">eo_rid,</if> |
| | | <if test="orderDate != null">eo_order_date,</if> |
| | | <if test="orderId != null">eo_order_id,</if> |
| | | <if test="payMoney != null">eo_pay_money,</if> |
| | | <if test="city != null">eo_city,</if> |
| | | <if test="couponMoney != null">eo_coupon_money,</if> |
| | | <if test="newerFirstOrder != null">eo_newer_first_order,</if> |
| | | <if test="newerRepayOrder != null">eo_newer_repay_order,</if> |
| | | <if test="taokeHongBao != null">eo_taoke_hongbao,</if> |
| | | <if test="shopClick != null">eo_shop_click,</if> |
| | | <if test="recieveCoupon7DayFirstOrder != null">eo_recieve_coupon_7day_first_order,</if> |
| | | <if test="isSettle != null">eo_settle,</if> |
| | | <if test="createTime != null">eo_create_time,</if> |
| | | <if test="updateTime != null">eo_update_time,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="channelId != null">#{channelId,jdbcType=VARCHAR},</if> |
| | | <if test="channelName != null">#{channelName,jdbcType=VARCHAR},</if> |
| | | <if test="trackPid != null">#{trackPid,jdbcType=VARCHAR},</if> |
| | | <if test="rid != null">#{rid,jdbcType=VARCHAR},</if> |
| | | <if test="orderDate != null">#{orderDate,jdbcType=TIMESTAMP},</if> |
| | | <if test="orderId != null">#{orderId,jdbcType=VARCHAR},</if> |
| | | <if test="payMoney != null">#{payMoney,jdbcType=DECIMAL},</if> |
| | | <if test="city != null">#{city,jdbcType=VARCHAR},</if> |
| | | <if test="couponMoney != null">#{couponMoney,jdbcType=DECIMAL},</if> |
| | | <if test="newerFirstOrder != null">#{newerFirstOrder,jdbcType=INTEGER},</if> |
| | | <if test="newerRepayOrder != null">#{newerRepayOrder,jdbcType=INTEGER},</if> |
| | | <if test="taokeHongBao != null">#{taokeHongBao,jdbcType=INTEGER},</if> |
| | | <if test="shopClick != null">#{shopClick,jdbcType=INTEGER},</if> |
| | | <if test="recieveCoupon7DayFirstOrder != null">#{recieveCoupon7DayFirstOrder,jdbcType=INTEGER},</if> |
| | | <if test="isSettle != null">#{isSettle,jdbcType=BOOLEAN},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.elme.ElmeOrder">update |
| | | yeshi_ec_elme_order set eo_channel_id = |
| | | #{channelId,jdbcType=VARCHAR},eo_channel_name = |
| | | #{channelName,jdbcType=VARCHAR},eo_track_pid = |
| | | #{trackPid,jdbcType=VARCHAR},eo_rid = |
| | | #{rid,jdbcType=VARCHAR},eo_order_date = |
| | | #{orderDate,jdbcType=TIMESTAMP},eo_order_id = |
| | | #{orderId,jdbcType=VARCHAR},eo_pay_money = |
| | | #{payMoney,jdbcType=DECIMAL},eo_city = |
| | | #{city,jdbcType=VARCHAR},eo_coupon_money = |
| | | #{couponMoney,jdbcType=DECIMAL},eo_newer_first_order = |
| | | #{newerFirstOrder,jdbcType=INTEGER},eo_newer_repay_order = |
| | | #{newerRepayOrder,jdbcType=INTEGER},eo_taoke_hongbao = |
| | | #{taokeHongBao,jdbcType=INTEGER},eo_shop_click = |
| | | #{shopClick,jdbcType=INTEGER},eo_recieve_coupon_7day_first_order = |
| | | #{recieveCoupon7DayFirstOrder,jdbcType=INTEGER},eo_settle = |
| | | #{isSettle,jdbcType=BOOLEAN},eo_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP},eo_update_time = |
| | | #{updateTime,jdbcType=TIMESTAMP} where eo_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.elme.ElmeOrder"> |
| | | update yeshi_ec_elme_order |
| | | <set> |
| | | <if test="channelId != null">eo_channel_id=#{channelId,jdbcType=VARCHAR},</if> |
| | | <if test="channelName != null">eo_channel_name=#{channelName,jdbcType=VARCHAR},</if> |
| | | <if test="trackPid != null">eo_track_pid=#{trackPid,jdbcType=VARCHAR},</if> |
| | | <if test="rid != null">eo_rid=#{rid,jdbcType=VARCHAR},</if> |
| | | <if test="orderDate != null">eo_order_date=#{orderDate,jdbcType=TIMESTAMP},</if> |
| | | <if test="orderId != null">eo_order_id=#{orderId,jdbcType=VARCHAR},</if> |
| | | <if test="payMoney != null">eo_pay_money=#{payMoney,jdbcType=DECIMAL},</if> |
| | | <if test="city != null">eo_city=#{city,jdbcType=VARCHAR},</if> |
| | | <if test="couponMoney != null">eo_coupon_money=#{couponMoney,jdbcType=DECIMAL},</if> |
| | | <if test="newerFirstOrder != null">eo_newer_first_order=#{newerFirstOrder,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="newerRepayOrder != null">eo_newer_repay_order=#{newerRepayOrder,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="taokeHongBao != null">eo_taoke_hongbao=#{taokeHongBao,jdbcType=INTEGER},</if> |
| | | <if test="shopClick != null">eo_shop_click=#{shopClick,jdbcType=INTEGER},</if> |
| | | <if test="recieveCoupon7DayFirstOrder != null">eo_recieve_coupon_7day_first_order=#{recieveCoupon7DayFirstOrder,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="isSettle != null">eo_settle=#{isSettle,jdbcType=BOOLEAN},</if> |
| | | <if test="createTime != null">eo_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">eo_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </set> |
| | | where eo_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| | |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="ipInfo != null">#{ipInfo,jdbcType=VARCHAR},</if> |
| | | <if test="channel != null">#{channel,jdbcType=VARCHAR}</if> |
| | | <if test="imei != null">#{imei,jdbcType=VARCHAR}</if> |
| | | <if test="idfa != null">#{idfa,jdbcType=VARCHAR}</if> |
| | | <if test="mac != null">#{mac,jdbcType=VARCHAR}</if> |
| | | <if test="channel != null">#{channel,jdbcType=VARCHAR},</if> |
| | | <if test="imei != null">#{imei,jdbcType=VARCHAR},</if> |
| | | <if test="idfa != null">#{idfa,jdbcType=VARCHAR},</if> |
| | | <if test="mac != null">#{mac,jdbcType=VARCHAR},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.push.DeviceActive">update |
| | |
| | | @Override
|
| | | public void save(DouYinClickEvent event) {
|
| | | // 查询
|
| | | DouYinClickEvent old = douYinClickEventDao.selectByAid(event.getAid());
|
| | | DouYinClickEvent old = douYinClickEventDao.selectByCallBack(event.getCallback());
|
| | | if (old == null) {
|
| | | douYinClickEventDao.save(event);
|
| | | DouYinDeviceActiveCMQManager.getInstance().addAdActive(event.getAid());
|
| | | DouYinDeviceActiveCMQManager.getInstance().addAdActive(event.getCallback());
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public DouYinClickEvent selectByAid(String aid) {
|
| | | return douYinClickEventDao.selectByAid(aid);
|
| | | public DouYinClickEvent selectByCallback(String callback) {
|
| | | return douYinClickEventDao.selectByCallBack(callback);
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | JDSearchFilter jdfilter = new JDSearchFilter();
|
| | | jdfilter.setPageNo(page);
|
| | | jdfilter.setPageSize(Constant.PAGE_SIZE);
|
| | | result = JDUtil.searchByKey(jdfilter);
|
| | | result =JDApiUtil.getJingFenGoods(page,15); //JDUtil.searchByKey(jdfilter);
|
| | | }
|
| | | if (result != null && result.getGoodsList() != null)
|
| | | Collections.shuffle(result.getGoodsList());
|
| | |
| | | hongBaoV2Service.updateByPrimaryKeySelective(update);
|
| | | }
|
| | | }
|
| | | } else if (hongBaoOder.getHongBaoV2() != null
|
| | | && hongBaoOder.getHongBaoV2().getState() == HongBaoV2.STATE_YILINGQU) {
|
| | | List<HongBaoV2> childList = hongBaoV2Service.listChildrenById(hongBaoOder.getHongBaoV2().getId());
|
| | | for (HongBaoV2 child : childList) {
|
| | | if ((child.getState() == HongBaoV2.STATE_BUKELINGQU
|
| | | || child.getState() == HongBaoV2.STATE_KELINGQU)) {
|
| | | //未到账的子红包也需要失效
|
| | | HongBaoV2 update = new HongBaoV2(child.getId());
|
| | | update.setUpdateTime(new Date());
|
| | | update.setState(HongBaoV2.STATE_SHIXIAO);
|
| | | update.setBeizhu("联盟违规");
|
| | | hongBaoV2Service.updateByPrimaryKeySelective(update);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | deviceActive.getPlatform());
|
| | | if (da == null) {
|
| | | deviceActive.setId(null);
|
| | | if (deviceActive.getUpdateTime() == null)
|
| | | deviceActive.setUpdateTime(new Date());
|
| | | if (deviceActive.getCreateTime() == null)
|
| | | deviceActive.setCreateTime(new Date());
|
| | | if (!StringUtil.isNullOrEmpty(deviceActive.getDeviceToken())) {
|
| | | deviceActive.setDeviceTokenMd5(StringUtil.Md5(deviceActive.getDeviceToken()));
|
| | |
| | | * @param aid
|
| | | * @return
|
| | | */
|
| | | public DouYinClickEvent selectByAid(String aid);
|
| | | public DouYinClickEvent selectByCallback(String callback);
|
| | |
|
| | | /**
|
| | | * 根据androidID查询
|
| | |
| | | doImportantTaoBaoGoodsUpdateJob();// 淘宝重要商品的信息更新
|
| | | // doHongBaoRecieveIntegralGetJob();// 返利到账,金币增加
|
| | | // doPlaceOrderIntegralJob();// 下单赠送金币任务
|
| | | doDouYinDeviceActiveJob();// 抖音设备激活广告监测
|
| | | // doDouYinDeviceActiveJob();// 抖音设备激活广告监测
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | String key = its.next();
|
| | | DouYinDeviceActiveQueueDTO active = map.get(key);
|
| | | if (active.getType() == DouYinDeviceActiveQueueDTO.TYPE_AD) {// 抖音
|
| | | DouYinClickEvent event = douYinClickEventService.selectByAid(active.getAid());
|
| | | DouYinClickEvent event = douYinClickEventService.selectByCallback(active.getCallback());
|
| | | if (event != null) {
|
| | | if (event.getOs() == 0) {
|
| | | if (event.getOs() == 0 && !StringUtil.isNullOrEmpty(event.getUuid())) {
|
| | | DeviceActive deviceActive = deviceActiveService
|
| | | .getFirstActiveInfoByImei(event.getUuid());
|
| | | if (deviceActive != null) {
|
| | |
| | | if (active.getPlatform() == 1) {
|
| | | DeviceActive deviceActive = deviceActiveService
|
| | | .getFirstActiveInfo(active.getDevice());
|
| | | if (deviceActive != null && deviceActive.getImei() != null) {
|
| | | if (deviceActive != null && !StringUtil.isNullOrEmpty(deviceActive.getImei())) {
|
| | | DouYinClickEvent event = douYinClickEventService
|
| | | .selectByUuid(deviceActive.getImei());
|
| | | if (event != null) {// 回调
|
New file |
| | |
| | | package com.yeshi.fanli.util.charge;
|
| | |
|
| | | import java.io.IOException;
|
| | | import java.util.Arrays;
|
| | | import java.util.HashMap;
|
| | | import java.util.Map;
|
| | |
|
| | | import org.apache.commons.httpclient.HttpClient;
|
| | | import org.apache.commons.httpclient.HttpException;
|
| | | import org.apache.commons.httpclient.methods.PostMethod;
|
| | |
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | /**
|
| | | * 福录开放平台API入口(open.fulu.com)
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | public class FuLuChargeApiUtil {
|
| | | //测试
|
| | | // private final static String APP_KEY = "i4esv1l+76l/7NQCL3QudG90Fq+YgVfFGJAWgT+7qO1Bm9o/adG/1iwO2qXsAXNB";
|
| | | // private final static String APP_SECRET = "0a091b3aa4324435aab703142518a8f7";
|
| | | //正式
|
| | | private final static String APP_KEY = "CrtDnTh1E5eYY5D42T8uArVrl4GWq9AWR9ZrNC2qvXYIBMwOTuiJQy7YYaJSYlb6";
|
| | | private final static String APP_SECRET = "a5f6c827903e4b1eac6eb2ba2cf715be";
|
| | |
|
| | | @SuppressWarnings("deprecation")
|
| | | private static String post(String url, String body) {
|
| | | HttpClient client = new HttpClient();
|
| | | client.getHostConfiguration().setProxy("192.168.1.122", 8888);
|
| | | PostMethod method = new PostMethod(url);
|
| | | method.addRequestHeader("Content-Type", "application/json;charset=UTF-8");
|
| | | method.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
|
| | | method.setRequestBody(body);
|
| | | try {
|
| | | client.executeMethod(method);
|
| | | return method.getResponseBodyAsString();
|
| | | } catch (HttpException e) {
|
| | | e.printStackTrace();
|
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | private static void baseRequest(String method, JSONObject bizContent) {
|
| | | // String url = "http://pre.openapi.fulu.com/api/getway";
|
| | | String url="http://openapi.fulu.com/api/getway";
|
| | | Map<String, String> params = new HashMap<>();
|
| | | params.put("app_key", APP_KEY);
|
| | | params.put("method", method);
|
| | | params.put("timestamp", TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss"));
|
| | | params.put("version", "2.0");
|
| | | params.put("format", "json");
|
| | | params.put("charset", "utf-8");
|
| | | params.put("sign_type", "md5");
|
| | | params.put("app_auth_token", "");
|
| | | params.put("biz_content", bizContent.toString());
|
| | | JSONObject resultJson = JSONObject.fromObject(params);
|
| | | char[] s = resultJson.toString().toCharArray();
|
| | | Arrays.sort(s);
|
| | | String outputSignOriginalStr = new String(s) + APP_SECRET;
|
| | | String sign = StringUtil.Md5(outputSignOriginalStr);
|
| | | params.put("sign", sign);
|
| | | String result = post(url, JSONObject.fromObject(params).toString());
|
| | | System.out.println(result);
|
| | | }
|
| | |
|
| | | public static void charge(String goodsNo, String orderId, String account) {
|
| | | JSONObject json = new JSONObject();
|
| | | json.put("charge_type", "爱奇艺会员");
|
| | | json.put("customer_order_no", orderId);
|
| | | json.put("product_id", goodsNo);
|
| | | json.put("charge_account", account);
|
| | | json.put("buy_num", "1");
|
| | | baseRequest("fulu.order.direct.add", json);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | cmqUtil.sendMsg(DOUYIN_DEVICE_ACTIVE, new Gson().toJson(dto));
|
| | | }
|
| | |
|
| | | public void addAdActive(String aid) {
|
| | | if (StringUtil.isNullOrEmpty(aid))
|
| | | public void addAdActive(String callback) {
|
| | | if (StringUtil.isNullOrEmpty(callback))
|
| | | return;
|
| | | DouYinDeviceActiveQueueDTO dto = new DouYinDeviceActiveQueueDTO(DouYinDeviceActiveQueueDTO.TYPE_AD, aid);
|
| | | DouYinDeviceActiveQueueDTO dto = new DouYinDeviceActiveQueueDTO(DouYinDeviceActiveQueueDTO.TYPE_AD, callback);
|
| | | cmqUtil.sendMsg(DOUYIN_DEVICE_ACTIVE, new Gson().toJson(dto));
|
| | | }
|
| | |
|
| | |
| | | package com.yeshi.fanli.util.vip;
|
| | |
|
| | | import java.io.IOException;
|
| | | import java.io.UnsupportedEncodingException;
|
| | | import java.net.URLEncoder;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Collections;
|
| | | import java.util.HashMap;
|
| | | import java.util.Iterator;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | | import java.util.UUID;
|
| | |
|
| | | import org.apache.commons.httpclient.HttpClient;
|
| | | import org.apache.commons.httpclient.HttpException;
|
| | | import org.apache.commons.httpclient.methods.PostMethod;
|
| | | import org.yeshi.utils.StringUtil;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.yeshi.fanli.dto.vip.VIPSearchResult;
|
| | | import com.yeshi.fanli.dto.vip.goods.VIPGoodsInfo;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | /**
|
| | | * TODO 未完成 唯品会接口
|
| | |
| | | private final static String appKey = "f9e7f22f";
|
| | | private final static String appSecret = "9B2291352497FAF42B2DF44BFCF62316";
|
| | |
|
| | | private static String getSign() {
|
| | |
|
| | | return null;
|
| | | /**
|
| | | * 获取签名
|
| | | * |
| | | * @param params
|
| | | * @return
|
| | | */
|
| | | private static String getSign(Map<String, String> systemParams, JSONObject taskParams) {
|
| | | List<String> list = new ArrayList<>();
|
| | | for (Iterator<String> its = systemParams.keySet().iterator(); its.hasNext();) {
|
| | | String key = its.next();
|
| | | String value = systemParams.get(key);
|
| | | list.add(key + value);
|
| | | }
|
| | | Collections.sort(list);
|
| | | String source = "";
|
| | | for (String st : list)
|
| | | source += st;
|
| | | source += taskParams.toString();
|
| | | return StringUtil.MD5Hmac(source, appSecret);
|
| | | }
|
| | |
|
| | | private static Map<String, String> getBaseParams(String service, String method) {
|
| | | private static Map<String, String> getSystemParams(String service, String method) {
|
| | | Map<String, String> params = new HashMap<String, String>();
|
| | | params.put("service", service);
|
| | | params.put("method", method);
|
| | |
| | | params.put("timestamp", System.currentTimeMillis() / 1000 + "");
|
| | | params.put("format", "json");
|
| | | params.put("appKey", appKey);
|
| | | params.put("sign", null);
|
| | | return params;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 基础请求
|
| | | * |
| | | * @param service
|
| | | * @param method
|
| | | * @param taskParams
|
| | | * @return
|
| | | */
|
| | | private static String baseRequest(String service, String method, JSONObject taskParams) {
|
| | | Map<String, String> systemParams = getSystemParams(service, method);
|
| | | String sign = getSign(systemParams, taskParams);
|
| | | systemParams.put("sign", sign);
|
| | | String baseUrl = "https://gw.vipapis.com";
|
| | | baseUrl += "?";
|
| | | for (Iterator<String> its = systemParams.keySet().iterator(); its.hasNext();) {
|
| | | String key = its.next();
|
| | | String value = "";
|
| | | try {
|
| | | value = URLEncoder.encode(systemParams.get(key), "UTF-8");
|
| | | } catch (UnsupportedEncodingException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | baseUrl += key + "=" + value + "&";
|
| | | }
|
| | | baseUrl = baseUrl.endsWith("&") ? baseUrl.substring(0, baseUrl.length() - 1) : baseUrl;
|
| | | String result = post(baseUrl, taskParams.toString());
|
| | | return result;
|
| | | }
|
| | |
|
| | | @SuppressWarnings("deprecation")
|
| | | private static String post(String url, String body) {
|
| | | HttpClient client = new HttpClient();
|
| | | PostMethod method = new PostMethod(url);
|
| | | method.addRequestHeader("Content-Type", "application/json;charset=UTF-8");
|
| | | method.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
|
| | | method.setRequestBody(body);
|
| | | try {
|
| | | client.executeMethod(method);
|
| | | return method.getResponseBodyAsString();
|
| | | } catch (HttpException e) {
|
| | | e.printStackTrace();
|
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | public static VIPSearchResult search() {
|
| | | Map<String, String> taskParams = new HashMap<>();
|
| | | taskParams.put("keyword", "夹克 男士 带帽");
|
| | | taskParams.put("page", "1");
|
| | | taskParams.put("pageSize", "20");
|
| | | taskParams.put("requestId", UUID.randomUUID() + "");
|
| | | // taskParams.put("priceStart", "");
|
| | | // taskParams.put("priceEnd", "");
|
| | | JSONObject root = new JSONObject();
|
| | | root.put("request", JSONObject.fromObject(taskParams));
|
| | | String result = baseRequest("com.vip.adp.api.open.service.UnionGoodsService", "query", root);
|
| | | System.out.println(result);
|
| | | List<VIPGoodsInfo> goodsList = new ArrayList<>();
|
| | | JSONObject resultJson = JSONObject.fromObject(result);
|
| | | Gson gson = new Gson();
|
| | | if (resultJson.optInt("returnCode") == 0) {
|
| | | resultJson = resultJson.optJSONObject("result");
|
| | | int count = resultJson.optInt("total");
|
| | | JSONArray array = resultJson.optJSONArray("goodsInfoList");
|
| | | for (int i = 0; i < array.size(); i++) {
|
| | | VIPGoodsInfo info = gson.fromJson(array.optJSONObject(i).toString(), VIPGoodsInfo.class);
|
| | | if (info != null)
|
| | | goodsList.add(info);
|
| | | }
|
| | | return new VIPSearchResult(goodsList, count);
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 商品ID转链
|
| | | * |
| | | * @param goodsId
|
| | | */
|
| | | public static void convertLink(String goodsId, String tag) {
|
| | | JSONObject taskParams = new JSONObject();
|
| | | JSONArray goodsIdArray = new JSONArray();
|
| | | goodsIdArray.add(goodsId);
|
| | | taskParams.put("goodsIdList", goodsIdArray);
|
| | | taskParams.put("chanTag", tag);
|
| | | taskParams.put("requestId", UUID.randomUUID() + "");
|
| | | String result = baseRequest("com.vip.adp.api.open.service.UnionUrlService", "genByGoodsId",
|
| | | JSONObject.fromObject(taskParams));
|
| | | System.out.println(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 根据商品ID获取商品详情
|
| | | * |
| | | * @param goodsIdList
|
| | | * @return
|
| | | */
|
| | | public static List<VIPGoodsInfo> getGoodsDetail(List<String> goodsIdList) {
|
| | | JSONObject params = new JSONObject();
|
| | | params.put("goodsIdList", goodsIdList);
|
| | | params.put("requestId", UUID.randomUUID());
|
| | | String result = baseRequest("com.vip.adp.api.open.service.UnionGoodsService", "getByGoodsIds",
|
| | | JSONObject.fromObject(params));
|
| | | System.out.println(result);
|
| | | JSONObject resultJson = JSONObject.fromObject(result);
|
| | | Gson gson = new Gson();
|
| | | List<VIPGoodsInfo> goodsList = new ArrayList<>();
|
| | | if (resultJson.optInt("returnCode") == 0) {
|
| | | JSONArray array = resultJson.optJSONArray("result");
|
| | | for (int i = 0; i < array.size(); i++) {
|
| | | VIPGoodsInfo info = gson.fromJson(array.optJSONObject(i).toString(), VIPGoodsInfo.class);
|
| | | if (info != null)
|
| | | goodsList.add(info);
|
| | | }
|
| | | return goodsList;
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取商品详情
|
| | | * |
| | | * @param goodsId
|
| | | * @return
|
| | | */
|
| | | public static VIPGoodsInfo getGoodsDetail(String goodsId) {
|
| | | List<String> goodsIdList = new ArrayList<>();
|
| | | goodsIdList.add(goodsId);
|
| | | List<VIPGoodsInfo> goodsList = getGoodsDetail(goodsIdList);
|
| | | if (goodsList == null || goodsList.size() == 0)
|
| | | return null;
|
| | | return goodsList.get(0);
|
| | | }
|
| | |
|
| | | public static void getOrderList() {
|
| | | JSONObject params = new JSONObject();
|
| | | // params.put("status", 1);
|
| | | params.put("orderTimeStart", System.currentTimeMillis() - 1000 * 60 * 60L);
|
| | | params.put("orderTimeEnd", System.currentTimeMillis());
|
| | | params.put("page", 1);
|
| | | // params.put("pageSize", );
|
| | | // params.put("updateTimeStart", );
|
| | | // params.put("updateTimeEnd", );
|
| | | params.put("requestId", UUID.randomUUID());
|
| | | JSONObject root = new JSONObject();
|
| | | root.put("queryModel", params);
|
| | | String result = baseRequest("com.vip.adp.api.open.service.UnionOrderService", "orderList", root);
|
| | | System.out.println(result);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | |
|
| | | import org.junit.Test;
|
| | | import org.yeshi.utils.mybatis.ColumnParseUtil;
|
| | | import org.yeshi.utils.mybatis.MyBatisMapperUtil;
|
| | |
|
| | | import com.yeshi.fanli.entity.elme.ElmeHongBaoOrderMap;
|
| | | import com.yeshi.fanli.entity.elme.ElmeOrder;
|
| | | import com.yeshi.fanli.entity.push.DeviceActive;
|
| | |
|
| | | //@Ignore
|
| | |
| | |
|
| | | @Test
|
| | | public void test3() {
|
| | | MyBatisMapperUtil.createMapper(ElmeOrder.class);
|
| | | MyBatisMapperUtil.createMapper(ElmeHongBaoOrderMap.class);
|
| | | }
|
| | |
|
| | | @Test
|
| | |
| | | import org.yeshi.utils.HttpUtil;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.taobao.TBPidMapper;
|
| | | import com.yeshi.fanli.dto.taobao.TaoLiJinDTO;
|
| | | import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.taobao.PidUser;
|
| | |
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoLink;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoOrder;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoSearchResult;
|
| | | import com.yeshi.fanli.entity.taobao.TaoKeAppInfo;
|
| | | import com.yeshi.fanli.exception.taobao.TaobaoGoodsDownException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | |
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TaoBaoConstant;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoOrderUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | |
| | |
|
| | | @Test
|
| | | public void test1() {
|
| | | TaoBaoSearchResult result = TaoKeApiUtil.getMaterialByMaterialId(16432, 1, 100);
|
| | | System.out.println(result);
|
| | | System.out.println(TaoBaoUtil.filterTaoToken("¥RuPdYM9Knxe¥"));
|
| | | }
|
| | |
|
| | | @Test
|
| | |
| | | @Test
|
| | | public void test3() {
|
| | | Long auctionId = 598165623087L;
|
| | | String appKey = "27821872";
|
| | | String appSecret = "9277b7c40b753e142303eeabc1936c80";
|
| | | String pid = "mm_491980152_690500060_109327900051";
|
| | | String appKey = "27965236";
|
| | | String appSecret = "2be7a216bee767dc3a6388aa24f11140";
|
| | | String pid = "mm_502940004_754900291_109486750166";
|
| | | TaoKeAppInfo app = new TaoKeAppInfo(appKey, appSecret, pid);
|
| | |
|
| | | try {
|
| | | TaoKeApiUtil.createTaoLiJin(auctionId, "淘礼金", new BigDecimal(1), 1, new Date(),
|
| | | TaoLiJinDTO dto = 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);
|
| | | System.out.println(dto);
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | |
|
| | | @Test
|
| | | public void test4() {
|
| | |
|
| | | TaoBaoOrderService taoBaoOrderService = BeanUtil.getBean(TaoBaoOrderService.class);
|
| | | try {
|
| | | List<TaoBaoOrder> list = TaoBaoOrderUtil.parseOrder(
|
| | |
| | | package org.yeshi.utils;
|
| | |
|
| | | import java.io.IOException;
|
| | | import java.io.UnsupportedEncodingException;
|
| | | import java.lang.reflect.Method;
|
| | | import java.security.InvalidKeyException;
|
| | | import java.security.MessageDigest;
|
| | | import java.security.NoSuchAlgorithmException;
|
| | | import java.util.regex.Matcher;
|
| | | import java.util.regex.Pattern;
|
| | |
|
| | | import org.apache.commons.codec.binary.Base64;
|
| | | import org.yeshi.utils.encrypt.HmacUtils;
|
| | |
|
| | | import sun.misc.BASE64Encoder;
|
| | |
|
| | |
| | | return null;
|
| | | }
|
| | |
|
| | | public static String MD5Hmac(String st, String key) {
|
| | | try {
|
| | | return HmacUtils.byte2hex(HmacUtils.encryptHMAC(st, key));
|
| | | } catch (InvalidKeyException e) {
|
| | | e.printStackTrace();
|
| | | } catch (NoSuchAlgorithmException e) {
|
| | | e.printStackTrace();
|
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 将null转为空字符串
|
| | | *
|
New file |
| | |
| | | package org.yeshi.utils.encrypt;
|
| | |
|
| | | import java.io.IOException;
|
| | | import java.security.InvalidKeyException;
|
| | | import java.security.NoSuchAlgorithmException;
|
| | | import javax.crypto.Mac;
|
| | | import javax.crypto.SecretKey;
|
| | | import javax.crypto.spec.SecretKeySpec;
|
| | |
|
| | | /**
|
| | | * hmac公用方法类
|
| | | * |
| | | * @author weihui.tang
|
| | | * |
| | | */
|
| | | public class HmacUtils {
|
| | | public static final String CHARSET_UTF8 = "UTF-8";
|
| | |
|
| | | public static final String KEY_MAC = "HmacMD5";
|
| | |
|
| | | private static final String HEXSTR = "0123456789ABCDEF";
|
| | |
|
| | | private static String[] binaryArray = { "0000", "0001", "0010", "0011",
|
| | | "0100", "0101", "0110", "0111", "1000", "1001", "1010", "1011",
|
| | | "1100", "1101", "1110", "1111" };
|
| | |
|
| | | |
| | |
|
| | | /**
|
| | | * hmac-md5签名
|
| | | * |
| | | * @param data
|
| | | * @param secret
|
| | | * @return
|
| | | * @throws IOException
|
| | | * @throws NoSuchAlgorithmException |
| | | * @throws InvalidKeyException |
| | | */
|
| | | public static byte[] encryptHMAC(String data, String secret)
|
| | | throws IOException, NoSuchAlgorithmException, InvalidKeyException {
|
| | | byte[] bytes = null;
|
| | | SecretKey secretKey = new SecretKeySpec(secret.getBytes(CHARSET_UTF8),
|
| | | KEY_MAC);
|
| | | Mac mac = Mac.getInstance(secretKey.getAlgorithm());
|
| | | mac.init(secretKey);
|
| | | bytes = mac.doFinal(data.getBytes(CHARSET_UTF8));
|
| | | return bytes;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 将byte转化为十六进制字符串
|
| | | * |
| | | * @param bytes
|
| | | * @return
|
| | | */
|
| | | public static String byte2hex(byte[] bytes) {
|
| | | StringBuilder sign = new StringBuilder();
|
| | | for (int i = 0; i < bytes.length; i++) {
|
| | | sign.append(String.valueOf(HEXSTR.charAt((bytes[i] & 0xF0) >> 4))); // 字节高4位
|
| | | sign.append(String.valueOf(HEXSTR.charAt(bytes[i] & 0x0F))); // 字节低4位
|
| | | }
|
| | | return sign.toString().toUpperCase();
|
| | | }
|
| | |
|
| | | /**
|
| | | * |
| | | * @param hexString
|
| | | * @return 将十六进制转换为字节数组
|
| | | */
|
| | | public static byte[] hexToBinary(String hexString) {
|
| | | // hexString的长度对2取整,作为bytes的长度
|
| | | int len = hexString.length() / 2;
|
| | | byte[] bytes = new byte[len];
|
| | | for (int i = 0; i < len; i++) {
|
| | | // 右移四位得到高位
|
| | | byte high = (byte) ((HEXSTR.indexOf(hexString.charAt(2 * i))) << 4);// 字节高四位
|
| | | byte low = (byte) HEXSTR.indexOf(hexString.charAt(2 * i + 1));// 字节低四位
|
| | | bytes[i] = (byte) (high | low);// 高地位做或运算
|
| | | }
|
| | | return bytes;
|
| | | }
|
| | |
|
| | | /**
|
| | | * |
| | | * @param str
|
| | | * @return 转换为二进制字符串
|
| | | */
|
| | | public static String bytes2BinaryStr(byte[] bArray) {
|
| | | String outStr = "";
|
| | | for (byte b : bArray) {
|
| | | // 高四位
|
| | | int pos = (b & 0xF0) >> 4;
|
| | | outStr += binaryArray[pos];
|
| | | // 低四位
|
| | | pos = b & 0x0F;
|
| | | outStr += binaryArray[pos];
|
| | | }
|
| | | return outStr;
|
| | |
|
| | | }
|
| | | }
|