fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java
@@ -45,6 +45,7 @@ import com.yeshi.fanli.service.inter.user.HistorySearchService; import com.yeshi.fanli.tag.PageEntity; import com.yeshi.fanli.util.Constant; import com.yeshi.fanli.util.GsonUtil; import com.yeshi.fanli.util.StringUtil; import com.yeshi.fanli.util.ThreadUtil; import com.yeshi.fanli.util.Utils; @@ -688,12 +689,11 @@ if (goodsList != null && goodsList.size() > 0) { BigDecimal fanLiRate = hongBaoManageService.getFanLiRate(); BigDecimal shareRate = hongBaoManageService.getShareRate(); Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()) .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create(); for (PDDGoodsDetail goods : goodsList) { GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertPDDGoods(goods, null, fanLiRate, shareRate); array.add(gson.toJson(goodsDetailVO)); array.add(GsonUtil.toJsonExpose(goodsDetailVO)); } } } fanli/src/main/java/com/yeshi/fanli/mapping/user/UserSystemCouponRecordMapper.xml
@@ -79,7 +79,10 @@ <select id="getRecordByOrderNoList" resultMap="BaseResultMap"> SELECT * FROM `yeshi_ec_user_system_coupon_record` cd LEFT JOIN `yeshi_ec_user_system_coupon` uc ON uc.`usc_id` = cd.`ucr_user_coupon_id` WHERE cd.ucr_good_source = #{source} AND cd.`ucr_order_no` in WHERE <if test="source == 1">(cd.ucr_good_source = 0 or cd.ucr_good_source = 1)</if> <if test="source == 2">cd.ucr_good_source = 2</if> <if test="source == 3">cd.ucr_good_source = 3</if> AND cd.`ucr_order_no` in <foreach collection="list" item="item" open="(" close=")" separator=",">#{item}</foreach> </select> fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java
@@ -684,7 +684,7 @@ @Transactional @Override public void useOrderCoupon(Long uid, Long id, String orderNo) throws UserSystemCouponException, Exception { public void useOrderCoupon(Long uid, Long id, String orderNo, Integer goodsType) throws UserSystemCouponException, Exception { if (id == null) { throw new UserSystemCouponException(1, "券id不存在"); @@ -738,7 +738,7 @@ // 条件: A:必须是返利订单 、B:必须已经处于已到账状态 if (HongBaoV2.TYPE_ZIGOU == hongBaoType && HongBaoV2.STATE_YILINGQU == hongBaoState || hongBao != null) { Order order = orderService.findOrderByOrderIdAndType(orderNo, Order.ORDER_TYPE_TAOBAO); Order order = orderService.findOrderByOrderIdAndType(orderNo, goodsType); if (order == null) return; @@ -760,12 +760,13 @@ hongBaoV2.setUserInfo(new UserInfo(uid)); hongBaoV2.setPreGetTime(new Date()); hongBaoV2.setGetTime(new Date()); hongBaoV2Service.insertSelective(hongBaoV2); // 2.插入关联 orderHongBaoMapService.addOrderHongBaoMap(hongBaoV2, order); // 3.插入资金明细,用户余额 // 3.插入资金明细,用户余额 // TODO UserMoneyDetail userMoneyDetail = UserMoneyDetailFactory.createOrderReward(orderNo, money, new UserInfo(uid)); userMoneyDetailService.addUserMoneyDetail(userMoneyDetail); @@ -787,6 +788,7 @@ // 插入使用券记录 UserSystemCouponRecord couponRecord = new UserSystemCouponRecord(); couponRecord.setState(UserSystemCouponRecord.STATE_SUCCESS); couponRecord.setGoodSource(goodsType); couponRecord.setOrderNo(orderNo); couponRecord.setUserSystemCoupon(userSystemCoupon); couponRecord.setCouponType(systemCoupon.getType().name()); fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserSystemCouponService.java
@@ -90,7 +90,7 @@ * @throws UserSystemCouponException * @throws Exception */ public void useOrderCoupon(Long uid, Long id, String orderNo) throws UserSystemCouponException, Exception; public void useOrderCoupon(Long uid, Long id, String orderNo, Integer goodsType) throws UserSystemCouponException, Exception; /** * 根据订单号获取奖励券使用进度 fanli/src/main/java/com/yeshi/fanli/util/pinduoduo/PinDuoDuoApiUtil.java
@@ -10,6 +10,8 @@ import java.util.List; import java.util.Map; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.methods.PostMethod; import org.yeshi.utils.HttpUtil; import com.google.gson.Gson; @@ -63,9 +65,7 @@ } if (url.endsWith("&")) url = url.substring(0, url.length() - 1); String result = HttpUtil.post(url); return result; return HttpUtil.postSimple(url); } public static PDDGoodsResult searchGoods(PDDSearchFilter sf) {