Sfoglia il codice sorgente

商户注券->查询排序

release_toaliyun_real
Burce 6 anni fa
parent
commit
89e96739bd
4 ha cambiato i file con 23 aggiunte e 5 eliminazioni
  1. +3
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxCouponSend.java
  2. +5
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java
  3. +15
    -4
      mallinkService/src/main/java/com/iformall/utils/DateUtils.java
  4. +0
    -1
      mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml

+ 3
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxCouponSend.java Vedi File

@@ -66,6 +66,9 @@ public class WxCouponSend extends BaseEntity {
@JsonIgnore @JsonIgnore
public static final String SORT_REMAIN = "merchantRemain" ; public static final String SORT_REMAIN = "merchantRemain" ;


@JsonIgnore
public static final String SORT_CREATE_DATE = "create_date" ;

@Id @Id
protected Long id; protected Long id;




+ 5
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java Vedi File

@@ -85,6 +85,11 @@ public class WxCouponSendServiceImpl implements WxCouponSendService {
JSONObject jo = JSONObject.parseObject(cs.getConditions()); JSONObject jo = JSONObject.parseObject(cs.getConditions());
int inventory = jo.getIntValue(WxCouponSend.KEY_MERCHANT_LNVENTORY); int inventory = jo.getIntValue(WxCouponSend.KEY_MERCHANT_LNVENTORY);
cs.setInventory(inventory); cs.setInventory(inventory);
int expired = 1;
if (DateUtils.isDateBefore(cs.getValidEndDate())) {
expired = 0;
}
cs.setExpired(expired);
} }
} else { } else {
pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponSendMapper.findListVo(record)); pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponSendMapper.findListVo(record));


+ 15
- 4
mallinkService/src/main/java/com/iformall/utils/DateUtils.java Vedi File

@@ -7,10 +7,7 @@ import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.*; import java.time.*;
import java.time.temporal.ChronoUnit; import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.*;


/** /**
* 日期处理 * 日期处理
@@ -137,6 +134,20 @@ public class DateUtils {
} }
} }


/**
* 时间比较 系统时间早于输入时间
*
* @param date2
* @return
*/
public static boolean isDateBefore(Date date2) {
if(Objects.isNull(date2)) return false ;
// 获得系统时间
Date date1 = new Date();
DateFormat df = DateFormat.getDateTimeInstance();
return date1.before(date2);
}

/** /**
* 系统时间晚于输入时间 * 系统时间晚于输入时间
* *


+ 0
- 1
mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml Vedi File

@@ -97,7 +97,6 @@
</if> </if>
<if test=" null != sendSms "> <if test=" null != sendSms ">
and cs.send_sms = #{sendSms} and cs.send_sms = #{sendSms}
</if> </if>
<if test=" null != sortColumns"> <if test=" null != sortColumns">
order by ${sortColumns} order by ${sortColumns}


Caricamento…
Annulla
Salva