记得上下班打卡 | git大法好,push需谨慎

Commit 1f665fee authored by jiangxiulong's avatar jiangxiulong

Merge remote-tracking branch 'origin/dev-sweet' into dev-sweet

parents 43c6ac0b d4ffef40
......@@ -125,6 +125,16 @@ public abstract class DateUtil {
return new Date(c.getTimeInMillis());
}
/**
* 计算日期,增加分支
*/
public static Date addMin(Date date, int months) {
Calendar c = Calendar.getInstance();
c.setTime(date);
c.set(Calendar.MINUTE, c.get(Calendar.MINUTE) + months);
return new Date(c.getTimeInMillis());
}
/**
* 计算日期,增加天数
*
......
......@@ -28,6 +28,10 @@ public class SweetManualAppletDto implements Serializable ,Cloneable{
private String timeEnd;
@ApiModelProperty("演出开售时间")
private String timeSell;
@ApiModelProperty("是否会员")
private Integer isMember;
@ApiModelProperty("提前时间")
private Integer payCountdownMinute;
@ApiModelProperty("经度")
private String longitude;
......
......@@ -27,6 +27,11 @@ public class SweetManualAppletMDSKDto implements Serializable ,Cloneable{
private String timeEnd;
@ApiModelProperty("演出开售时间")
private String timeSell;
@ApiModelProperty("是否会员")
private Integer isMember;
@ApiModelProperty("提前时间")
private Integer payCountdownMinute;
@ApiModelProperty("经度")
private String longitude;
......
......@@ -50,6 +50,9 @@ public class RedisDataUtils {
String redisKey = SweetConstant.REDIS_KEY_SWEET_MANUAL_PUSH_LIST;
List<SweetManualAppletDto> data = sweetManualMapper.getManualAppletDto();
for (SweetManualAppletDto item : data) {
if(!item.getIsMember().equals(1)){
item.setTimeSell(DateUtil.format(DateUtil.addMin(DateUtil.parse(item.getTimeSell(),"yyyy-MM-dd HH:mm:ss"),-item.getPayCountdownMinute()),DateUtil.Formatter.yyyyMMddHHmmss));
}
item.setFieldName((String) redisUtil.hget("kylin:fields:id" + ":" + item.getFieldId(), "name"));
item.setCityName((String) redisUtil.hget("kylin:fields:id" + ":" + item.getFieldId(), "city_name"));
item.setLatitude((String) redisUtil.hget("kylin:fields:id" + ":" + item.getFieldId(), "latitude"));
......
......@@ -45,6 +45,9 @@ public class RedisMDSKDataUtils {
String redisKey = SweetConstant.REDIS_KEY_SWEET_MDSK_MANUAL_PUSH_LIST;
List<SweetManualAppletMDSKDto> data = sweetManualMdskMapper.getManualAppletDto();
for (SweetManualAppletMDSKDto item : data) {
if(!item.getIsMember().equals(1)){
item.setTimeSell(DateUtil.format(DateUtil.addMin(DateUtil.parse(item.getTimeSell(),"yyyy-MM-dd HH:mm:ss"),-item.getPayCountdownMinute()),DateUtil.Formatter.yyyyMMddHHmmss));
}
item.setFieldName((String) redisUtil.hget("kylin:fields:id" + ":" + item.getFieldId(), "name"));
item.setCityName((String) redisUtil.hget("kylin:fields:id" + ":" + item.getFieldId(), "city_name"));
item.setLatitude((String) redisUtil.hget("kylin:fields:id" + ":" + item.getFieldId(), "latitude"));
......
......@@ -33,6 +33,8 @@
<result column="time_start" property="timeStart"/>
<result column="time_end" property="timeEnd"/>
<result column="time_sell" property="timeSell"/>
<result column="pay_countdown_minute" property="payCountdownMinute"/>
<result column="is_member" property="isMember"/>
</resultMap>
<!-- 电子手册列表 -->
......@@ -132,7 +134,8 @@
pr.field_id ,
p.time_start ,
p.time_end,
t1.time_sell
t1.time_sell,
t1.pay_countdown_minute
FROM
kylin_performances AS p
LEFT JOIN kylin_performance_status AS ps ON p.performances_id = ps.performance_id
......@@ -159,6 +162,8 @@
LEFT JOIN(
SELECT
ttr.performance_id ,
ts.is_member
pay_countdown_minute,
sum(ts.total_general) AS 'total_general' ,
MIN(
DATE_SUB(
......
......@@ -33,6 +33,8 @@
<result column="time_start" property="timeStart"/>
<result column="time_end" property="timeEnd"/>
<result column="time_sell" property="timeSell"/>
<result column="pay_countdown_minute" property="payCountdownMinute"/>
<result column="is_member" property="isMember"/>
</resultMap>
<!-- 电子手册列表 -->
......@@ -132,7 +134,8 @@
pr.field_id ,
p.time_start ,
p.time_end,
t1.time_sell
t1.time_sell,
t1.pay_countdown_minute
FROM
kylin_performances AS p
LEFT JOIN kylin_performance_status AS ps ON p.performances_id = ps.performance_id
......@@ -159,6 +162,8 @@
LEFT JOIN(
SELECT
ttr.performance_id ,
pay_countdown_minute,
ts.is_member,
sum(ts.total_general) AS 'total_general' ,
MIN(
DATE_SUB(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment