Merge branch 'div' of ssh://193.112.35.168:29418/fanli-server into div
| | |
| | | * 年份
|
| | | * @param month
|
| | | * 月份
|
| | | * @param type
|
| | | * 1-收入 2-支出 0-全部
|
| | | * |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getUserMoneyDetailList")
|
| | | public void getUserMoneyDetailList(AcceptData acceptData, Long uid, Long index, Integer year, Integer month,
|
| | | PrintWriter out) {
|
| | | Integer type, PrintWriter out) {
|
| | | if (uid == null || uid == 0) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "用户未登录"));
|
| | | return;
|
| | |
| | | date = new Date(ca.getTimeInMillis() - 1);
|
| | | }
|
| | |
|
| | | List<UserMoneyDetailHistoryVO> list = userMoneyDetailService.listUserMoneyDetailForClient(uid, index, date);
|
| | | long count = userMoneyDetailService.countUserMoneyDetailForClient(uid, index, date);
|
| | | List<UserMoneyDetailHistoryVO> list = userMoneyDetailService.listUserMoneyDetailForClient(uid, index, 0, date);
|
| | | long count = userMoneyDetailService.countUserMoneyDetailForClient(uid, index, 0, date);
|
| | | GsonBuilder gsonBuilder = new GsonBuilder().excludeFieldsWithoutExposeAnnotation();
|
| | | gsonBuilder.registerTypeAdapter(UserMoneyDetailTypeEnum.class, new TypeAdapter<UserMoneyDetailTypeEnum>() {
|
| | | @Override
|
| | |
| | | {
|
| | | vo.getMoneyInfo().setFanliMoney("¥" + TaoBaoUtil.getAfterUseCouplePrice(taoBaoGoodsBrief));
|
| | | vo.getMoneyInfo().setShareMoney("¥" + TaoBaoUtil.getAfterUseCouplePrice(taoBaoGoodsBrief));
|
| | | vo.getMoneyInfo().setMaxMoney(null);
|
| | | }
|
| | | array.add(gson.toJson(vo));
|
| | | }
|
| | |
| | | integralGetService.addCouponRebate(uid);
|
| | | }
|
| | |
|
| | | @RequestMapping(value = "getJDCouponLink")
|
| | | public void getJDCouponLink(AcceptData acceptData, Long id, String couponUrl, PrintWriter out) {
|
| | | if (StringUtil.isNullOrEmpty(couponUrl)) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "券链接不能为空"));
|
| | | return;
|
| | | }
|
| | | if (id == null || id <= 0) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "商品ID不能为空"));
|
| | | return;
|
| | | }
|
| | |
|
| | | String jumpLink = null;
|
| | | String materialId = "https://item.jd.com/" + id + ".html";
|
| | |
|
| | | jumpLink = JDApiUtil.convertLink(materialId, couponUrl, JDApiUtil.POSITION_FANLI + "", null + "");
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("native", true);
|
| | | data.put("jumpLink", jumpLink);
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | /**
|
| | | * 拼多多购买链接
|
| | | *
|
| | |
| | |
|
| | | import org.springframework.cache.annotation.Cacheable;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | | import com.yeshi.fanli.dto.common.CommonContentNav;
|
| | | import com.yeshi.fanli.dto.common.CommonContentResult;
|
| | | import com.yeshi.fanli.dto.common.CommonContentTypeEnum;
|
| | |
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsClass;
|
| | | import com.yeshi.fanli.entity.bus.lable.QualityFactory;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | 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.DaTaoKeDetailV2;
|
| | | 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.goods.CommonTemplateContentService;
|
| | | import com.yeshi.fanli.service.inter.lable.QualityGoodsService;
|
| | | import com.yeshi.fanli.service.inter.lable.TaoKeGoodsService;
|
| | |
| | | import com.yeshi.fanli.util.taobao.DaTaoKeUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | @Service
|
| | | public class CommonTemplateContentServiceImpl implements CommonTemplateContentService {
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public List<UserMoneyDetailHistoryVO> listUserMoneyDetailForClient(Long uid, Long userMoneyDetailId, Date maxTime) {
|
| | | public List<UserMoneyDetailHistoryVO> listUserMoneyDetailForClient(Long uid, Long userMoneyDetailId,int type, Date maxTime) {
|
| | | //TODO 增加type筛选
|
| | | List<UserMoneyDetailHistoryVO> finalList = new ArrayList<>();
|
| | | List<UserMoneyDetail> list = null;
|
| | | if (userMoneyDetailId == null) {// 首次请求
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public long countUserMoneyDetailForClient(Long uid, Long userMoneyDetailId, Date maxTime) {
|
| | | public long countUserMoneyDetailForClient(Long uid, Long userMoneyDetailId,int type, Date maxTime) {
|
| | | //TODO 增加type筛选
|
| | | long monthCount = 0L;
|
| | | long detailCount = 0L;
|
| | | // 未通过时间筛选,查询所有
|
| | |
| | | order.setVipOrder(false);
|
| | | } else
|
| | | order.setVipOrder(false);
|
| | | |
| | | if(order.isVipOrder())
|
| | | order.setVipOrderDesc("订单来源:由超级会员的粉丝产生");
|
| | | }
|
| | |
|
| | | for (CommonOrderVO order : listOrder) {
|
| | |
| | | * @param maxTime
|
| | | * @return
|
| | | */
|
| | | public List<UserMoneyDetailHistoryVO> listUserMoneyDetailForClient(Long uid, Long userMoneyDetailId, Date maxTime);
|
| | | public List<UserMoneyDetailHistoryVO> listUserMoneyDetailForClient(Long uid, Long userMoneyDetailId, int type, Date maxTime);
|
| | |
|
| | | /**
|
| | | * 客户端查询用户的资金记录的条数(计算月统计)
|
| | |
| | | * @param maxTime
|
| | | * @return
|
| | | */
|
| | | public long countUserMoneyDetailForClient(Long uid, Long userMoneyDetailId, Date maxTime);
|
| | | public long countUserMoneyDetailForClient(Long uid, Long userMoneyDetailId,int type, Date maxTime);
|
| | |
|
| | | /**
|
| | | * 资金明细详情列表(老版本)
|
| | |
| | | import java.util.ArrayList;
|
| | | import java.util.Arrays;
|
| | | import java.util.Date;
|
| | | import java.util.HashSet;
|
| | | import java.util.List;
|
| | | import java.util.Set;
|
| | |
|
| | | import org.yeshi.utils.taobao.TbImgUtil;
|
| | |
|
| | |
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.jd.JDUtil;
|
| | | import com.yeshi.fanli.util.pinduoduo.PinDuoDuoUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoCouponUtil;
|
| | |
| | | return goodsInfo;
|
| | | }
|
| | |
|
| | | private static CouponInfoVO convertJDCouponInfo(JDCouponInfo couponInfo) {
|
| | | CouponInfoVO coupon = new CouponInfoVO();
|
| | | coupon.setAmount(couponInfo.getDiscount());
|
| | | coupon.setLink(couponInfo.getLink());
|
| | | coupon.setStartFee(couponInfo.getQuota());
|
| | |
|
| | | if (couponInfo.getGetStartTime() != null) {
|
| | | coupon.setStartTime(TimeUtil.getGernalTime(couponInfo.getGetStartTime(), "yyyy.MM.dd"));
|
| | | }
|
| | |
|
| | | if (couponInfo.getGetEndTime() != null) {
|
| | | coupon.setEndTime(TimeUtil.getGernalTime(couponInfo.getGetEndTime(), "yyyy.MM.dd"));
|
| | | }
|
| | |
|
| | | return coupon;
|
| | | }
|
| | |
|
| | | private static List<CouponInfoVO> filterCouponInfo(List<CouponInfoVO> couponList) {
|
| | | if (couponList == null)
|
| | | return null;
|
| | | long currentTime = System.currentTimeMillis();
|
| | | Set<String> sets = new HashSet<>();
|
| | | // 过滤掉过期券
|
| | | for (int i = 0; i < couponList.size(); i++) {
|
| | | if (couponList.get(i).getStartTime() != null && couponList.get(i).getEndTime() != null) {
|
| | | long startTime = TimeUtil.convertToTimeTemp(couponList.get(i).getStartTime(), "yyyy.MM.dd");
|
| | | long endTime = TimeUtil.convertToTimeTemp(couponList.get(i).getEndTime(), "yyyy.MM.dd")
|
| | | + 1000 * 60 * 60 * 24L;
|
| | | if (currentTime < startTime || currentTime >= endTime) {
|
| | | couponList.remove(i--);
|
| | | continue;
|
| | | }
|
| | | }
|
| | | // 过滤掉面值相同与起始金额相同的
|
| | | String key = couponList.get(i).getStartFee() + "-" + couponList.get(i).getAmount();
|
| | | if (!sets.contains(key))
|
| | | sets.add(key);
|
| | | else {
|
| | | couponList.remove(i--);
|
| | | continue;
|
| | | }
|
| | | }
|
| | | return couponList;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 淘宝商品组织
|
| | | *
|
| | |
| | | goodsInfo.setCouponInfo(coupon);
|
| | | }
|
| | |
|
| | | if (goods.getCouponInfoList() != null && goods.getCouponInfoList().size() > 0) {
|
| | | List<CouponInfoVO> couponList = new ArrayList<>();
|
| | | for (JDCouponInfo jdCoupon : goods.getCouponInfoList()) {
|
| | | couponList.add(convertJDCouponInfo(jdCoupon));
|
| | | }
|
| | | goodsInfo.setCouponInfoList(filterCouponInfo(couponList));
|
| | | }
|
| | |
|
| | | List<ClientTextStyleVO> labels = goodsInfo.getLabels();
|
| | | // 京东自营标签
|
| | | String owner = goods.getOwner();
|
| | |
| | | import com.google.gson.annotations.Expose;
|
| | | import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
|
| | |
|
| | |
|
| | | /**
|
| | | * 商品详细信息
|
| | | *
|
| | |
| | | *
|
| | | */
|
| | | public class GoodsDetailVO implements Serializable {
|
| | | |
| | |
|
| | | /**
|
| | | *
|
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | | |
| | |
|
| | | @Expose
|
| | | private Long id;// 系统ID
|
| | | @Expose
|
| | |
| | | @Expose
|
| | | private CouponInfoVO couponInfo;// 券信息
|
| | | @Expose
|
| | | private List<CouponInfoVO> couponInfoList;// 所有券信息
|
| | |
|
| | | @Expose
|
| | | private ShopInfoVO shopInfo; // 店铺信息
|
| | | @Expose
|
| | | private MoneyInfoVO moneyInfo;// 资金信息
|
| | | @Expose
|
| | | private boolean recommend;// 是否推荐 :是否展示右上角叉)true-展示 false-不展示
|
| | | private boolean recommend;// 是否推荐 :是否展示右上角叉)true-展示 false-不展示
|
| | | @Expose
|
| | | private ClientTextStyleVO pictureTag;// 图标
|
| | | @Expose
|
| | | private List<ClientTextStyleVO> labels;// 标签
|
| | | @Expose
|
| | | private int salesType; // 销量类型:1-月销量 2-2小时销量 3-今日销量 4、总销量
|
| | | private int salesType; // 销量类型:1-月销量 2-2小时销量 3-今日销量 4、总销量
|
| | | @Expose
|
| | | private Date createtime; // 创建时间
|
| | | @Expose
|
| | |
| | | private boolean baoyou; // 是否包邮
|
| | | @Expose
|
| | | private String provcity; // 商品所在地
|
| | | |
| | |
|
| | | public Long getGoodsId() {
|
| | | return goodsId;
|
| | |
| | | public void setProvcity(String provcity) {
|
| | | this.provcity = provcity;
|
| | | }
|
| | | |
| | |
|
| | | public List<CouponInfoVO> getCouponInfoList() {
|
| | | return couponInfoList;
|
| | | }
|
| | |
|
| | | public void setCouponInfoList(List<CouponInfoVO> couponInfoList) {
|
| | | this.couponInfoList = couponInfoList;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | |
|
| | | @Expose
|
| | | private boolean vipOrder;// 是否为超级用户订单
|
| | | |
| | | @Expose
|
| | | private String vipOrderDesc;// 超级订单描述
|
| | |
|
| | |
|
| | | public String getVipOrderDesc() {
|
| | | return vipOrderDesc;
|
| | | }
|
| | |
|
| | | public void setVipOrderDesc(String vipOrderDesc) {
|
| | | this.vipOrderDesc = vipOrderDesc;
|
| | | }
|
| | |
|
| | | public boolean isVipOrder() {
|
| | | return vipOrder;
|