记得上下班打卡 | 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 { ...@@ -125,6 +125,16 @@ public abstract class DateUtil {
return new Date(c.getTimeInMillis()); 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{ ...@@ -28,6 +28,10 @@ public class SweetManualAppletDto implements Serializable ,Cloneable{
private String timeEnd; private String timeEnd;
@ApiModelProperty("演出开售时间") @ApiModelProperty("演出开售时间")
private String timeSell; private String timeSell;
@ApiModelProperty("是否会员")
private Integer isMember;
@ApiModelProperty("提前时间")
private Integer payCountdownMinute;
@ApiModelProperty("经度") @ApiModelProperty("经度")
private String longitude; private String longitude;
......
...@@ -27,6 +27,11 @@ public class SweetManualAppletMDSKDto implements Serializable ,Cloneable{ ...@@ -27,6 +27,11 @@ public class SweetManualAppletMDSKDto implements Serializable ,Cloneable{
private String timeEnd; private String timeEnd;
@ApiModelProperty("演出开售时间") @ApiModelProperty("演出开售时间")
private String timeSell; private String timeSell;
@ApiModelProperty("是否会员")
private Integer isMember;
@ApiModelProperty("提前时间")
private Integer payCountdownMinute;
@ApiModelProperty("经度") @ApiModelProperty("经度")
private String longitude; private String longitude;
......
...@@ -50,6 +50,9 @@ public class RedisDataUtils { ...@@ -50,6 +50,9 @@ public class RedisDataUtils {
String redisKey = SweetConstant.REDIS_KEY_SWEET_MANUAL_PUSH_LIST; String redisKey = SweetConstant.REDIS_KEY_SWEET_MANUAL_PUSH_LIST;
List<SweetManualAppletDto> data = sweetManualMapper.getManualAppletDto(); List<SweetManualAppletDto> data = sweetManualMapper.getManualAppletDto();
for (SweetManualAppletDto item : data) { 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.setFieldName((String) redisUtil.hget("kylin:fields:id" + ":" + item.getFieldId(), "name"));
item.setCityName((String) redisUtil.hget("kylin:fields:id" + ":" + item.getFieldId(), "city_name")); item.setCityName((String) redisUtil.hget("kylin:fields:id" + ":" + item.getFieldId(), "city_name"));
item.setLatitude((String) redisUtil.hget("kylin:fields:id" + ":" + item.getFieldId(), "latitude")); item.setLatitude((String) redisUtil.hget("kylin:fields:id" + ":" + item.getFieldId(), "latitude"));
......
...@@ -45,6 +45,9 @@ public class RedisMDSKDataUtils { ...@@ -45,6 +45,9 @@ public class RedisMDSKDataUtils {
String redisKey = SweetConstant.REDIS_KEY_SWEET_MDSK_MANUAL_PUSH_LIST; String redisKey = SweetConstant.REDIS_KEY_SWEET_MDSK_MANUAL_PUSH_LIST;
List<SweetManualAppletMDSKDto> data = sweetManualMdskMapper.getManualAppletDto(); List<SweetManualAppletMDSKDto> data = sweetManualMdskMapper.getManualAppletDto();
for (SweetManualAppletMDSKDto item : data) { 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.setFieldName((String) redisUtil.hget("kylin:fields:id" + ":" + item.getFieldId(), "name"));
item.setCityName((String) redisUtil.hget("kylin:fields:id" + ":" + item.getFieldId(), "city_name")); item.setCityName((String) redisUtil.hget("kylin:fields:id" + ":" + item.getFieldId(), "city_name"));
item.setLatitude((String) redisUtil.hget("kylin:fields:id" + ":" + item.getFieldId(), "latitude")); item.setLatitude((String) redisUtil.hget("kylin:fields:id" + ":" + item.getFieldId(), "latitude"));
......
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
<result column="time_start" property="timeStart"/> <result column="time_start" property="timeStart"/>
<result column="time_end" property="timeEnd"/> <result column="time_end" property="timeEnd"/>
<result column="time_sell" property="timeSell"/> <result column="time_sell" property="timeSell"/>
<result column="pay_countdown_minute" property="payCountdownMinute"/>
<result column="is_member" property="isMember"/>
</resultMap> </resultMap>
<!-- 电子手册列表 --> <!-- 电子手册列表 -->
...@@ -132,7 +134,8 @@ ...@@ -132,7 +134,8 @@
pr.field_id , pr.field_id ,
p.time_start , p.time_start ,
p.time_end, p.time_end,
t1.time_sell t1.time_sell,
t1.pay_countdown_minute
FROM FROM
kylin_performances AS p kylin_performances AS p
LEFT JOIN kylin_performance_status AS ps ON p.performances_id = ps.performance_id LEFT JOIN kylin_performance_status AS ps ON p.performances_id = ps.performance_id
...@@ -159,6 +162,8 @@ ...@@ -159,6 +162,8 @@
LEFT JOIN( LEFT JOIN(
SELECT SELECT
ttr.performance_id , ttr.performance_id ,
ts.is_member
pay_countdown_minute,
sum(ts.total_general) AS 'total_general' , sum(ts.total_general) AS 'total_general' ,
MIN( MIN(
DATE_SUB( DATE_SUB(
......
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
<result column="time_start" property="timeStart"/> <result column="time_start" property="timeStart"/>
<result column="time_end" property="timeEnd"/> <result column="time_end" property="timeEnd"/>
<result column="time_sell" property="timeSell"/> <result column="time_sell" property="timeSell"/>
<result column="pay_countdown_minute" property="payCountdownMinute"/>
<result column="is_member" property="isMember"/>
</resultMap> </resultMap>
<!-- 电子手册列表 --> <!-- 电子手册列表 -->
...@@ -132,7 +134,8 @@ ...@@ -132,7 +134,8 @@
pr.field_id , pr.field_id ,
p.time_start , p.time_start ,
p.time_end, p.time_end,
t1.time_sell t1.time_sell,
t1.pay_countdown_minute
FROM FROM
kylin_performances AS p kylin_performances AS p
LEFT JOIN kylin_performance_status AS ps ON p.performances_id = ps.performance_id LEFT JOIN kylin_performance_status AS ps ON p.performances_id = ps.performance_id
...@@ -159,6 +162,8 @@ ...@@ -159,6 +162,8 @@
LEFT JOIN( LEFT JOIN(
SELECT SELECT
ttr.performance_id , ttr.performance_id ,
pay_countdown_minute,
ts.is_member,
sum(ts.total_general) AS 'total_general' , sum(ts.total_general) AS 'total_general' ,
MIN( MIN(
DATE_SUB( 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