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

Commit d9f080de authored by 胡佳晨's avatar 胡佳晨

redis 批量删除 修改 获取场地相关方法

parent 15a05d19
...@@ -53,12 +53,12 @@ public class MongoVoUtils { ...@@ -53,12 +53,12 @@ public class MongoVoUtils {
KylinPerformanceRelations p3 = performanceRelationsMapper.selectOne(new UpdateWrapper<KylinPerformanceRelations>().eq("performance_id", performancesId)); KylinPerformanceRelations p3 = performanceRelationsMapper.selectOne(new UpdateWrapper<KylinPerformanceRelations>().eq("performance_id", performancesId));
//场地相关数据 //场地相关数据
KylinFields fields = new KylinFields(); KylinFields fields = new KylinFields();
String cityName = (String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + p3.getFieldId(), "city_name"); String cityName = (String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + p3.getFieldId(), "city_name");
fields.setCityId(null); fields.setCityId(null);
fields.setLatitude((String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + p3.getFieldId(), "latitude")); fields.setLatitude((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + p3.getFieldId(), "latitude"));
fields.setLongitude((String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + p3.getFieldId(), "longitude")); fields.setLongitude((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + p3.getFieldId(), "longitude"));
fields.setCityName((String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + p3.getFieldId(), "city_name")); fields.setCityName((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + p3.getFieldId(), "city_name"));
fields.setName((String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + p3.getFieldId(), "name")); fields.setName((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + p3.getFieldId(), "name"));
//相关状态时间初始变量 //相关状态时间初始变量
LocalDateTime stopSellTime = null; LocalDateTime stopSellTime = null;
......
...@@ -33,7 +33,6 @@ import org.springframework.stereotype.Component; ...@@ -33,7 +33,6 @@ import org.springframework.stereotype.Component;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Comparator; import java.util.Comparator;
import java.util.HashMap; import java.util.HashMap;
...@@ -250,8 +249,8 @@ public class PerformanceVoUtils { ...@@ -250,8 +249,8 @@ public class PerformanceVoUtils {
KylinPerformanceRelations performanceRelations = new KylinPerformanceRelations(); KylinPerformanceRelations performanceRelations = new KylinPerformanceRelations();
BeanUtils.copyProperties(performanceUpdateMisVo, performanceRelations); BeanUtils.copyProperties(performanceUpdateMisVo, performanceRelations);
performances.setCityName((String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + performanceRelations.getFieldId(), "city_name")); performances.setCityName((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + performanceRelations.getFieldId(), "city_name"));
performances.setCityId(Integer.parseInt((String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + performanceRelations.getFieldId(), "city_id"))); performances.setCityId(Integer.parseInt((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + performanceRelations.getFieldId(), "city_id")));
performances.setCreatedAt(DateUtil.asLocalDateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(performanceUpdateMisVo.getCreatedAt()))); performances.setCreatedAt(DateUtil.asLocalDateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(performanceUpdateMisVo.getCreatedAt())));
performances.setTimeStart(DateUtil.asLocalDateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(performanceUpdateMisVo.getTimeStart()))); performances.setTimeStart(DateUtil.asLocalDateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(performanceUpdateMisVo.getTimeStart())));
performances.setTimeEnd(DateUtil.asLocalDateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(performanceUpdateMisVo.getTimeEnd()))); performances.setTimeEnd(DateUtil.asLocalDateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(performanceUpdateMisVo.getTimeEnd())));
......
...@@ -57,7 +57,7 @@ public class FieldsServiceImpl implements KylinFieldsService { ...@@ -57,7 +57,7 @@ public class FieldsServiceImpl implements KylinFieldsService {
public KylinFieldsVo fieldDetails(String fieldId) { public KylinFieldsVo fieldDetails(String fieldId) {
KylinFieldsVo info = null; KylinFieldsVo info = null;
// 获取 redis数据 // 获取 redis数据
info = (KylinFieldsVo) redisUtil.hget(KylinRedisConst.FIELDS, fieldId + ""); info = (KylinFieldsVo) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS, fieldId + "");
//不存在 获取 mongo数据 //不存在 获取 mongo数据
if (null == info) { if (null == info) {
info = mongoTemplate.findOne(Query.query(Criteria.where("fieldsId").is(fieldId)), KylinFieldsVo.class, KylinFieldsVo.class.getSimpleName()); info = mongoTemplate.findOne(Query.query(Criteria.where("fieldsId").is(fieldId)), KylinFieldsVo.class, KylinFieldsVo.class.getSimpleName());
......
...@@ -208,7 +208,7 @@ public class DataUtils { ...@@ -208,7 +208,7 @@ public class DataUtils {
*/ */
public String getAgentInfoName(String agentId) { public String getAgentInfoName(String agentId) {
String redisKey = KylinRedisConst.PERFORMANCES_AGENT_INFO.concat(agentId); String redisKey = KylinRedisConst.PERFORMANCES_AGENT_INFO.concat(agentId);
String name = (String) redisUtil.hget(redisKey, "name"); String name = (String) redisUtil.getDB15RedisHGet(redisKey, "name");
// String name = ""; // String name = "";
return name; return name;
} }
......
...@@ -16,12 +16,10 @@ import com.liquidnet.service.kylin.dto.vo.partner.KylinTicketPartnerVo; ...@@ -16,12 +16,10 @@ import com.liquidnet.service.kylin.dto.vo.partner.KylinTicketPartnerVo;
import com.liquidnet.service.kylin.dto.vo.partner.KylinTicketTimesPartnerVo; import com.liquidnet.service.kylin.dto.vo.partner.KylinTicketTimesPartnerVo;
import com.liquidnet.service.kylin.entity.*; import com.liquidnet.service.kylin.entity.*;
import com.liquidnet.service.kylin.mapper.*; import com.liquidnet.service.kylin.mapper.*;
import com.liquidnet.service.kylin.service.*;
import com.liquidnet.service.platform.utils.DataUtils; import com.liquidnet.service.platform.utils.DataUtils;
import com.liquidnet.service.platform.utils.PerformanceVoTask; import com.liquidnet.service.platform.utils.PerformanceVoTask;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.DigestUtils; import org.springframework.util.DigestUtils;
...@@ -150,7 +148,7 @@ public class DataImpl { ...@@ -150,7 +148,7 @@ public class DataImpl {
performances.setDescribes(resultData.getString("describe")); performances.setDescribes(resultData.getString("describe"));
performances.setDetails(resultData.getString("detail")); performances.setDetails(resultData.getString("detail"));
performances.setCityId(Integer.parseInt(resultData.getString("city_id"))); performances.setCityId(Integer.parseInt(resultData.getString("city_id")));
performances.setCityName((String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + resultData.getInt("field_id"), "city_name")); performances.setCityName((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + resultData.getInt("field_id"), "city_name"));
performances.setNoticeImage("[{\"id\":1,\"sort\":1,\"message\":\"因演出票品非普通商品,其背后承载的文化服务具有时效性、稀缺性等特征,故不适用7天无理由退货政策。因“不可抗力”导致的演出取消或延期除外。\",\"title\":\"门票退换\",\"type\":\"image\",\"imgUrl\":\"http://img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com/partner/2019/01/21/5c45722882a13.png\"},{\"id\":7,\"sort\":2,\"message\":\"凭订单二维码或手机号兑票入场,二维码或手机号请勿泄露,以免影响入场。个人原因导致的信息泄露,主办方/平台方不承担任何责任。\",\"title\":\"电子票\",\"type\":\"image\",\"imgUrl\":\"http://img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com/partner/2019/01/21/5c456d9482fb9.png\"},{\"id\":3,\"sort\":3,\"message\":\"本场演出不设座位,均为站席观演。\",\"title\":\"仅设站席\",\"type\":\"image\",\"imgUrl\":\"http://img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com/partner/2019/01/21/5c456e93db0b9.png\"},{\"id\":12,\"sort\":4,\"message\":\"每场现场票数量由场地方决定,具体请到现场询问。\",\"title\":\"现场票\",\"type\":\"image\",\"imgUrl\":\"http://img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com/partner/2019/06/17/5d07647eaa55f.png\"}]"); performances.setNoticeImage("[{\"id\":1,\"sort\":1,\"message\":\"因演出票品非普通商品,其背后承载的文化服务具有时效性、稀缺性等特征,故不适用7天无理由退货政策。因“不可抗力”导致的演出取消或延期除外。\",\"title\":\"门票退换\",\"type\":\"image\",\"imgUrl\":\"http://img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com/partner/2019/01/21/5c45722882a13.png\"},{\"id\":7,\"sort\":2,\"message\":\"凭订单二维码或手机号兑票入场,二维码或手机号请勿泄露,以免影响入场。个人原因导致的信息泄露,主办方/平台方不承担任何责任。\",\"title\":\"电子票\",\"type\":\"image\",\"imgUrl\":\"http://img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com/partner/2019/01/21/5c456d9482fb9.png\"},{\"id\":3,\"sort\":3,\"message\":\"本场演出不设座位,均为站席观演。\",\"title\":\"仅设站席\",\"type\":\"image\",\"imgUrl\":\"http://img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com/partner/2019/01/21/5c456e93db0b9.png\"},{\"id\":12,\"sort\":4,\"message\":\"每场现场票数量由场地方决定,具体请到现场询问。\",\"title\":\"现场票\",\"type\":\"image\",\"imgUrl\":\"http://img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com/partner/2019/06/17/5d07647eaa55f.png\"}]");
performances.setTimeStart(DateUtil.Formatter.yyyyMMddHHmmssS.parse(resultData.getTimestamp("time_start").toString())); performances.setTimeStart(DateUtil.Formatter.yyyyMMddHHmmssS.parse(resultData.getTimestamp("time_start").toString()));
performances.setTimeEnd(DateUtil.Formatter.yyyyMMddHHmmssS.parse(resultData.getTimestamp("time_end").toString())); performances.setTimeEnd(DateUtil.Formatter.yyyyMMddHHmmssS.parse(resultData.getTimestamp("time_end").toString()));
...@@ -203,7 +201,7 @@ public class DataImpl { ...@@ -203,7 +201,7 @@ public class DataImpl {
performancePartnerVo.setTimeStart(DateUtil.Formatter.yyyyMMddHHmmss.format(performances.getTimeStart())); performancePartnerVo.setTimeStart(DateUtil.Formatter.yyyyMMddHHmmss.format(performances.getTimeStart()));
performancePartnerVo.setTimeEnd(DateUtil.Formatter.yyyyMMddHHmmss.format(performances.getTimeEnd())); performancePartnerVo.setTimeEnd(DateUtil.Formatter.yyyyMMddHHmmss.format(performances.getTimeEnd()));
performancePartnerVo.setFieldId(performanceRelations.getFieldId()); performancePartnerVo.setFieldId(performanceRelations.getFieldId());
performancePartnerVo.setFieldName((String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + performanceRelations.getFieldId(), "name")); performancePartnerVo.setFieldName((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + performanceRelations.getFieldId(), "name"));
performancePartnerVo.setNotice(performances.getNotice()); performancePartnerVo.setNotice(performances.getNotice());
performancePartnerVo.setSponsorId(performances.getSponsorId()); performancePartnerVo.setSponsorId(performances.getSponsorId());
performancePartnerVo.setSponsorType(performances.getSponsorType()); performancePartnerVo.setSponsorType(performances.getSponsorType());
...@@ -672,7 +670,7 @@ public class DataImpl { ...@@ -672,7 +670,7 @@ public class DataImpl {
orderTicketVo.setNoticeImage("[{\"id\":1,\"sort\":1,\"message\":\"因演出票品非普通商品,其背后承载的文化服务具有时效性、稀缺性等特征,故不适用7天无理由退货政策。因“不可抗力”导致的演出取消或延期除外。\",\"title\":\"门票退换\",\"type\":\"image\",\"imgUrl\":\"http://img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com/partner/2019/01/21/5c45722882a13.png\"},{\"id\":7,\"sort\":2,\"message\":\"凭订单二维码或手机号兑票入场,二维码或手机号请勿泄露,以免影响入场。个人原因导致的信息泄露,主办方/平台方不承担任何责任。\",\"title\":\"电子票\",\"type\":\"image\",\"imgUrl\":\"http://img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com/partner/2019/01/21/5c456d9482fb9.png\"},{\"id\":3,\"sort\":3,\"message\":\"本场演出不设座位,均为站席观演。\",\"title\":\"仅设站席\",\"type\":\"image\",\"imgUrl\":\"http://img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com/partner/2019/01/21/5c456e93db0b9.png\"},{\"id\":12,\"sort\":4,\"message\":\"每场现场票数量由场地方决定,具体请到现场询问。\",\"title\":\"现场票\",\"type\":\"image\",\"imgUrl\":\"http://img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com/partner/2019/06/17/5d07647eaa55f.png\"}]"); orderTicketVo.setNoticeImage("[{\"id\":1,\"sort\":1,\"message\":\"因演出票品非普通商品,其背后承载的文化服务具有时效性、稀缺性等特征,故不适用7天无理由退货政策。因“不可抗力”导致的演出取消或延期除外。\",\"title\":\"门票退换\",\"type\":\"image\",\"imgUrl\":\"http://img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com/partner/2019/01/21/5c45722882a13.png\"},{\"id\":7,\"sort\":2,\"message\":\"凭订单二维码或手机号兑票入场,二维码或手机号请勿泄露,以免影响入场。个人原因导致的信息泄露,主办方/平台方不承担任何责任。\",\"title\":\"电子票\",\"type\":\"image\",\"imgUrl\":\"http://img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com/partner/2019/01/21/5c456d9482fb9.png\"},{\"id\":3,\"sort\":3,\"message\":\"本场演出不设座位,均为站席观演。\",\"title\":\"仅设站席\",\"type\":\"image\",\"imgUrl\":\"http://img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com/partner/2019/01/21/5c456e93db0b9.png\"},{\"id\":12,\"sort\":4,\"message\":\"每场现场票数量由场地方决定,具体请到现场询问。\",\"title\":\"现场票\",\"type\":\"image\",\"imgUrl\":\"http://img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com/partner/2019/06/17/5d07647eaa55f.png\"}]");
orderTicketVo.setNotice(notice); orderTicketVo.setNotice(notice);
orderTicketVo.setTicketType(ticketType); orderTicketVo.setTicketType(ticketType);
orderTicketVo.setFieldName((String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + orderTicketRelations.getPerformanceId(), "name")); orderTicketVo.setFieldName((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + orderTicketRelations.getPerformanceId(), "name"));
//入场人 //入场人
String enterSql = "select * from order_ticket_entities where order_id = " + orderTickets.getOrderTicketsId(); //设置的预编译语句格式 String enterSql = "select * from order_ticket_entities where order_id = " + orderTickets.getOrderTicketsId(); //设置的预编译语句格式
...@@ -932,13 +930,12 @@ public class DataImpl { ...@@ -932,13 +930,12 @@ public class DataImpl {
// redis 库存迁移 // redis 库存迁移
@Autowired @Autowired
// private RedisTemplate<String, Object> redisTemplate;
public boolean SurplusRedis(){ public boolean SurplusRedis(){
List<KylinTicketStatus> ticketStatus = ticketStatusMapper.selectList(Wrappers.lambdaQuery(KylinTicketStatus.class)); List<KylinTicketStatus> ticketStatus = ticketStatusMapper.selectList(Wrappers.lambdaQuery(KylinTicketStatus.class));
for (KylinTicketStatus item : ticketStatus){ for (KylinTicketStatus item : ticketStatus){
String ticketId = item.getTicketId(); String ticketId = item.getTicketId();
// dataUtils.setSurplusGeneral(ticketId, (Integer) redisTemplate.opsForValue().get(KylinRedisConst.PERFORMANCES_INVENTORY + ticketId + ":" + KylinRedisConst.SURPLUS_GENERAL)); dataUtils.setSurplusGeneral(ticketId, (Integer) redisUtil.getDB15RedisGet(KylinRedisConst.PERFORMANCES_INVENTORY + ticketId + ":" + KylinRedisConst.SURPLUS_GENERAL));
// dataUtils.setSurplusExchange(ticketId, (Integer) redisTemplate.opsForValue().get(KylinRedisConst.PERFORMANCES_INVENTORY + ticketId + ":" + KylinRedisConst.SURPLUS_EXCHANGE)); dataUtils.setSurplusExchange(ticketId, (Integer) redisUtil.getDB15RedisGet(KylinRedisConst.PERFORMANCES_INVENTORY + ticketId + ":" + KylinRedisConst.SURPLUS_EXCHANGE));
} }
return true; return true;
} }
......
package com.liquidnet.service.platform.service.impl.partner; package com.liquidnet.service.platform.service.impl.partner;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
...@@ -143,7 +142,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor ...@@ -143,7 +142,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
performancePartnerVo.setRoadShowId("0"); performancePartnerVo.setRoadShowId("0");
performancePartnerVo.setProjectId("0"); performancePartnerVo.setProjectId("0");
performancePartnerVo.setIsShow(1); performancePartnerVo.setIsShow(1);
performancePartnerVo.setFieldName((String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + performancePartnerVo.getFieldId(), "name")); performancePartnerVo.setFieldName((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + performancePartnerVo.getFieldId(), "name"));
performancePartnerVo.setNoticeImage(dataUtils.getBuyNoticeJsonString(step1Param.getNoticeIds())); performancePartnerVo.setNoticeImage(dataUtils.getBuyNoticeJsonString(step1Param.getNoticeIds()));
mongoTemplate.insert( mongoTemplate.insert(
...@@ -176,7 +175,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor ...@@ -176,7 +175,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
performancePartnerVo.setIsSubmit(0); performancePartnerVo.setIsSubmit(0);
performancePartnerVo.setStatus(0); performancePartnerVo.setStatus(0);
performancePartnerVo.setNoticeImage(dataUtils.getBuyNoticeJsonString(step1Param.getNoticeIds())); performancePartnerVo.setNoticeImage(dataUtils.getBuyNoticeJsonString(step1Param.getNoticeIds()));
performancePartnerVo.setFieldName((String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + performancePartnerVo.getFieldId(), "name")); performancePartnerVo.setFieldName((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + performancePartnerVo.getFieldId(), "name"));
performancePartnerVo.setNoticeImage(dataUtils.getBuyNoticeJsonString(step1Param.getNoticeIds())); performancePartnerVo.setNoticeImage(dataUtils.getBuyNoticeJsonString(step1Param.getNoticeIds()));
if (data != null) { // 有修改记录 if (data != null) { // 有修改记录
performancePartnerVo.setIsTrueName(data.getIsTrueName()); performancePartnerVo.setIsTrueName(data.getIsTrueName());
......
...@@ -53,12 +53,12 @@ public class MongoVoUtils { ...@@ -53,12 +53,12 @@ public class MongoVoUtils {
KylinPerformanceRelations p3 = performanceRelationsMapper.selectOne(new UpdateWrapper<KylinPerformanceRelations>().eq("performance_id", performancesId)); KylinPerformanceRelations p3 = performanceRelationsMapper.selectOne(new UpdateWrapper<KylinPerformanceRelations>().eq("performance_id", performancesId));
//场地相关数据 //场地相关数据
KylinFields fields = new KylinFields(); KylinFields fields = new KylinFields();
String cityName = (String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + p3.getFieldId(), "city_name"); String cityName = (String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + p3.getFieldId(), "city_name");
fields.setCityId(Integer.parseInt((String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + p3.getFieldId(), "city_id"))); fields.setCityId(Integer.parseInt((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + p3.getFieldId(), "city_id")));
fields.setLatitude((String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + p3.getFieldId(), "latitude")); fields.setLatitude((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + p3.getFieldId(), "latitude"));
fields.setLongitude((String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + p3.getFieldId(), "longitude")); fields.setLongitude((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + p3.getFieldId(), "longitude"));
fields.setCityName((String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + p3.getFieldId(), "city_name")); fields.setCityName((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + p3.getFieldId(), "city_name"));
fields.setName((String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + p3.getFieldId(), "name")); fields.setName((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + p3.getFieldId(), "name"));
//相关状态时间初始变量 //相关状态时间初始变量
LocalDateTime stopSellTime = null; LocalDateTime stopSellTime = null;
......
...@@ -257,8 +257,8 @@ public class PerformanceVoTask { ...@@ -257,8 +257,8 @@ public class PerformanceVoTask {
performances.setCreatedAt(DateUtil.asLocalDateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(kylinPerformanceMisVo.getCreatedAt()))); performances.setCreatedAt(DateUtil.asLocalDateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(kylinPerformanceMisVo.getCreatedAt())));
performances.setTimeStart(DateUtil.asLocalDateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(kylinPerformanceMisVo.getTimeStart()))); performances.setTimeStart(DateUtil.asLocalDateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(kylinPerformanceMisVo.getTimeStart())));
performances.setTimeEnd(DateUtil.asLocalDateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(kylinPerformanceMisVo.getTimeEnd()))); performances.setTimeEnd(DateUtil.asLocalDateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(kylinPerformanceMisVo.getTimeEnd())));
performances.setCityName((String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + performanceRelations.getFieldId(), "city_name")); performances.setCityName((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + performanceRelations.getFieldId(), "city_name"));
performances.setCityId(Integer.parseInt((String) redisUtil.hget(KylinRedisConst.FIELDS + ":" + performanceRelations.getFieldId(), "city_id"))); performances.setCityId(Integer.parseInt((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + performanceRelations.getFieldId(), "city_id")));
performances.setUpdatedAt(updatedAt); performances.setUpdatedAt(updatedAt);
performanceStatus.setPerformanceId(performances.getPerformancesId()); performanceStatus.setPerformanceId(performances.getPerformancesId());
......
...@@ -7,7 +7,7 @@ import com.liquidnet.commons.lang.util.DateUtil; ...@@ -7,7 +7,7 @@ import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.commons.lang.util.IDGenerator; import com.liquidnet.commons.lang.util.IDGenerator;
import com.liquidnet.service.base.SqlMapping; import com.liquidnet.service.base.SqlMapping;
import com.liquidnet.service.base.constant.MQConst; import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.kylin.dto.vo.mongo.KylinPerformanceVo; import com.liquidnet.service.kylin.constant.KylinRedisConst;
import com.liquidnet.service.sweet.constant.SweetConstant; import com.liquidnet.service.sweet.constant.SweetConstant;
import com.liquidnet.service.sweet.dto.SweetManualAppletDto; import com.liquidnet.service.sweet.dto.SweetManualAppletDto;
import com.liquidnet.service.sweet.dto.SweetManualArtistList2Dto; import com.liquidnet.service.sweet.dto.SweetManualArtistList2Dto;
...@@ -55,10 +55,10 @@ public class RedisDataUtils { ...@@ -55,10 +55,10 @@ public class RedisDataUtils {
if(!item.getIsMember().equals(1)){ 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.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.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + item.getFieldId(), "name"));
item.setCityName((String) redisUtil.hget("kylin:fields:id" + ":" + item.getFieldId(), "city_name")); item.setCityName((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + item.getFieldId(), "city_name"));
item.setLatitude((String) redisUtil.hget("kylin:fields:id" + ":" + item.getFieldId(), "latitude")); item.setLatitude((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + item.getFieldId(), "latitude"));
item.setLongitude((String) redisUtil.hget("kylin:fields:id" + ":" + item.getFieldId(), "longitude")); item.setLongitude((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + item.getFieldId(), "longitude"));
} }
redisUtil.set(redisKey, data); redisUtil.set(redisKey, data);
return data; return data;
......
...@@ -6,6 +6,7 @@ import com.liquidnet.commons.lang.util.CollectionUtil; ...@@ -6,6 +6,7 @@ import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.commons.lang.util.DateUtil; import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.service.base.SqlMapping; import com.liquidnet.service.base.SqlMapping;
import com.liquidnet.service.base.constant.MQConst; import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.kylin.constant.KylinRedisConst;
import com.liquidnet.service.sweet.constant.SweetConstant; import com.liquidnet.service.sweet.constant.SweetConstant;
import com.liquidnet.service.sweet.dto.*; import com.liquidnet.service.sweet.dto.*;
import com.liquidnet.service.sweet.entity.*; import com.liquidnet.service.sweet.entity.*;
...@@ -48,10 +49,10 @@ public class RedisMDSKDataUtils { ...@@ -48,10 +49,10 @@ public class RedisMDSKDataUtils {
if(!item.getIsMember().equals(1)){ 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.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.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + item.getFieldId(), "name"));
item.setCityName((String) redisUtil.hget("kylin:fields:id" + ":" + item.getFieldId(), "city_name")); item.setCityName((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + item.getFieldId(), "city_name"));
item.setLatitude((String) redisUtil.hget("kylin:fields:id" + ":" + item.getFieldId(), "latitude")); item.setLatitude((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + item.getFieldId(), "latitude"));
item.setLongitude((String) redisUtil.hget("kylin:fields:id" + ":" + item.getFieldId(), "longitude")); item.setLongitude((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + item.getFieldId(), "longitude"));
} }
redisUtil.set(redisKey, data); redisUtil.set(redisKey, data);
return data; return data;
......
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