'修复已知问题'

dev-discount
= 4 years ago
parent 228c62c0fa
commit b51472315e
  1. 2
      hai-service/src/main/java/com/hai/common/utils/MD5Util.java
  2. 2
      hai-service/src/main/java/com/hai/dao/HighCouponAgentRelMapperExt.java
  3. 7
      hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java

@ -44,7 +44,7 @@ public class MD5Util {
}*/
public static void main(String[] args) throws Exception {
String str = "add123";
String str = "123456";
System.out.println(MD5Util.encode(str.getBytes("UTF-8")));
//String ee = "29AD0E3FD3DB681FB9F8091C756313F7";
}

@ -25,7 +25,7 @@ public interface HighCouponAgentRelMapperExt {
AgentSalesModel getAgentSales(@Param("agentId") Long agentId, @Param("consumeTimeS")String consumeTimeS, @Param("consumeTimeE")String consumeTimeE);
@Select(" select a.* from high_coupon_agent_code a,high_coupon_code b,high_coupon_agent_rel c " +
" where c.id = a.coupon_agent_id and c.agent_id = 8 and a.status = 3 and a.coupon_code_id = b.id " +
" where c.id = a.coupon_agent_id and c.agent_id = #{agentId} and a.status = 3 and a.coupon_code_id = b.id " +
" and b.consume_time >= #{consumeTimeS} and b.consume_time <= #{consumeTimeE} ORDER BY b.consume_time desc")
@Results({
@Result(column="id", property="id", jdbcType= JdbcType.BIGINT, id=true),

@ -161,13 +161,14 @@ public class HighCouponCodeServiceImpl implements HighCouponCodeService {
List<HighUserCoupon> list = highUserCouponService.getUserCouponList(map);
if (list.size() > 0) {
for (HighUserCoupon userCoupon : list) {
userCoupon.setConsumeTime(useTime);
userCoupon.setStatus(2); // 状态 0:已过期 1:未使用 2:已使用
highUserCouponService.updateUserCoupon(userCoupon);
HighChildOrderExample example = new HighChildOrderExample();
example.createCriteria().andMemIdEqualTo(userCoupon.getUserId()).andGoodsTypeEqualTo(1).andGoodsIdEqualTo(userCoupon.getCouponId()).andChildOrdeStatusEqualTo(2);
List<HighChildOrder> childOrderList = highChildOrderMapper.selectByExample(example);
if (childOrderList.size() > 0) {
userCoupon.setConsumeTime(useTime);
userCoupon.setStatus(2); // 状态 0:已过期 1:未使用 2:已使用
highUserCouponService.updateUserCoupon(userCoupon);
highOrderService.childOrderComplete(childOrderList.get(0).getId());
}
/*HighChildOrder order = highOrderService.getChildOrderByUserGoods(userCoupon.getUserId(), 1, userCoupon.getCouponId());

Loading…
Cancel
Save