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

Commit d4deeb64 authored by wyf's avatar wyf

1.开票提醒功能优化

parent 582f8bee
......@@ -3,6 +3,7 @@ package com.liquidnet.service.kylin.constant;
public class KylinRedisConst {
public static final String FIELDS = "kylin:fields:id";
public static final String PERFORMANCES = "kylin:performances:id:";
public static final String PERFORMANCES_INVOICE_REMINDER = "kylin:performances:invoice_reminder:id:";
public static final String PERFORMANCES_TRUE_NAME = "kylin:performances_true_name:id:";
public static final String PERFORMANCES_LIST_CITY = "kylin:performances:city:";
public static final String PERFORMANCES_LIST_SYSTEM_RECOMMEND = "kylin:performances:systemRecommend";
......
......@@ -124,9 +124,6 @@ public class PerformancePartnerVo implements Serializable, Cloneable {
@ApiModelProperty(value = "是否保存", example = "")
private Integer isCreateSave;
@ApiModelProperty(value = "开票提醒 0为不提醒", example = "0")
private Integer isInvoiceReminder;
public Integer getIdCount() {
return idCount==null?limitCount:idCount;
}
......
......@@ -236,7 +236,6 @@ public class KylinPerformanceVo implements Serializable, Cloneable {
this.statusSell = performanceStatus.getStatusSell();
this.isRecommend = performanceStatus.getIsRecommend();
this.isTrueName = performanceStatus.getIsTrueName();
this.isInvoiceReminder = performanceStatus.getIsInvoiceReminder();
this.limitCount = performanceStatus.getLimitCount();
this.idCount = performanceStatus.getIdCount();
this.limitCountMember = performanceStatus.getLimitCountMember();
......@@ -262,7 +261,6 @@ public class KylinPerformanceVo implements Serializable, Cloneable {
this.statusSell = performanceStatus.getStatusSell();
this.isRecommend = 0;
this.isTrueName = performanceStatus.getIsTrueName();
this.isInvoiceReminder = performanceStatus.getIsInvoiceReminder();
this.limitCount = performanceStatus.getLimitCount();
this.idCount = performanceStatus.getIdCount();
this.limitCountMember = 1;
......
......@@ -134,9 +134,6 @@ public class KylinPerformanceMisVo implements Cloneable{
@ApiModelProperty(value = "场次数据")
private List<TicketTimesTicketCreatePartnerVo> ticketTimes;
@ApiModelProperty(value = "开票提醒 0为不提醒", example = "0")
private Integer isInvoiceReminder;
private static final KylinPerformanceMisVo obj = new KylinPerformanceMisVo();
public static KylinPerformanceMisVo getNew() {
try {
......
......@@ -160,11 +160,6 @@ public class KylinPerformanceStatus implements Serializable ,Cloneable{
*/
private Integer fieldAuditStatus;
/**
* 开票提醒
*/
private Integer isInvoiceReminder;
/**
* 创建时间
*/
......@@ -189,7 +184,7 @@ public class KylinPerformanceStatus implements Serializable ,Cloneable{
vo.getPerformanceStatusId(),vo.getPerformanceId(),
vo.getIsShow(),vo.getStatus(),vo.getStatusSell(),
vo.getIsDistribution(),vo.getSyncAgent(),0,
vo.getAuditStatus(),vo.getIsTrueName(),vo.getLimitCount(),vo.getIdCount(),vo.getIsInvoiceReminder(),
vo.getAuditStatus(),vo.getIsTrueName(),vo.getLimitCount(),vo.getIdCount(),
vo.getLimitCountMember(),vo.getFieldAuditStatus(),vo.getCreatedAt(),vo.getUpdatedAt()
};
}
......
......@@ -314,6 +314,7 @@ public class KylinPerformancesServiceImpl implements IKylinPerformancesService {
//判断是否是vip用户
performancesInfo.setIsVip(dataUtils.isMemberByUser(uid));
}
performancesInfo.setIsInvoiceReminder(dataUtils.getPerformanceInvoiceReminder(performancesId));
return performancesInfo;
}
......
......@@ -1586,4 +1586,13 @@ public class DataUtils {
return vo;
}
public int getPerformanceInvoiceReminder(String performanceId) {
String redisKey = KylinRedisConst.PERFORMANCES_INVOICE_REMINDER + performanceId;
Object obj = redisUtil.get(redisKey);
if (obj == null) {
return 0;
}else {
return (int) obj;
}
}
}
......@@ -277,7 +277,4 @@ create table kylin_ticket_express_module
ALTER TABLE kylin_performance_status
ADD id_count int DEFAULT NULL COMMENT '实名限购数';
ALTER TABLE kylin_ticket_status
ADD id_count int DEFAULT NULL COMMENT '实名限购数';
ALTER TABLE kylin_performance_status
ADD column `is_invoice_reminder` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否开启开票提醒 0不开启 1开启'
\ No newline at end of file
ADD id_count int DEFAULT NULL COMMENT '实名限购数';
\ No newline at end of file
......@@ -107,7 +107,6 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
PerformancePartnerVo performancePartnerVo = PerformancePartnerVo.getNew();
BeanUtils.copyProperties(step1Param, performancePartnerVo);
performancePartnerVo.setIsTrueName(0);
performancePartnerVo.setIsInvoiceReminder(0);
performancePartnerVo.setLimitCount(0);
performancePartnerVo.setIdCount(0);
performancePartnerVo.setCreatedAt(createdAt.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
......@@ -159,7 +158,6 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
performancePartnerVo.setFieldName(redisSlimeUtils.getFieldVo(step1Param.getFieldId()).getName());
if (data != null) { // 有修改记录
performancePartnerVo.setIsTrueName(data.getIsTrueName());
performancePartnerVo.setIsInvoiceReminder(data.getIsInvoiceReminder());
performancePartnerVo.setLimitCount(data.getLimitCount());
performancePartnerVo.setIdCount(data.getIdCount());
performancePartnerVo.setStatusSell(data.getStatusSell());
......@@ -169,7 +167,6 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
} else { // 无修改记录
KylinPerformanceVo vo = redisSlimeUtils.getPerformanceVo(performanceId);
performancePartnerVo.setIsTrueName(vo.getIsTrueName());
performancePartnerVo.setIsInvoiceReminder(vo.getIsInvoiceReminder());
performancePartnerVo.setLimitCount(vo.getLimitCount());
performancePartnerVo.setIdCount(vo.getIdCount());
performancePartnerVo.setStatusSell(vo.getStatusSell());
......@@ -214,6 +211,7 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
step2Param.setMerchantId(CurrentUtil.getCurrentSlimeUid());
// 无 performancesId 则 创建
if (!step2Param.getPerformancesId().isEmpty()) { // 获取 create 数据 status = 0 或 无数据 创建
redisSlimeUtils.setPerformanceInvoiceReminder(step2Param.getPerformancesId(), step2Param.getIsInvoiceReminder());
KylinPerformanceVo vo = redisSlimeUtils.getPerformanceVo(step2Param.getPerformancesId());
if (vo == null || vo.getAppStatus() == 0 || vo.getAppStatus() == 1 || (vo.getAppStatus() == 4 && vo.getAuditStatus() == 2)) {
result = createStep2(step2Param);
......@@ -252,7 +250,6 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
PerformancePartnerVo performancePartnerVo = PerformancePartnerVo.getNew();
performancePartnerVo.setPerformancesId(performanceId);
performancePartnerVo.setIsTrueName(step2Param.getIsTrueName());
performancePartnerVo.setIsInvoiceReminder(step2Param.getIsInvoiceReminder());
performancePartnerVo.setLimitCount(step2Param.getLimitCount());
performancePartnerVo.setIdCount(step2Param.getIdCount());
performancePartnerVo.setCreatedAt(createdAt.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
......@@ -349,7 +346,6 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
PerformancePartnerVo performancePartnerVo = PerformancePartnerVo.getNew();
performancePartnerVo.setPerformancesId(performanceId);
performancePartnerVo.setIsTrueName(step2Param.getIsTrueName());
performancePartnerVo.setIsInvoiceReminder(step2Param.getIsInvoiceReminder());
performancePartnerVo.setLimitCount(step2Param.getLimitCount());
performancePartnerVo.setIdCount(step2Param.getIdCount());
performancePartnerVo.setCreatedAt(now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
......@@ -396,7 +392,7 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
now, kylinPerformanceMisVo.getNoticeImage(), performanceId, now, now
});
sqlsDataB.add(new Object[]{
performancePartnerVo.getFieldAuditStatus(), performancePartnerVo.getAuditStatus(), step2Param.getIsTrueName(), step2Param.getLimitCount(),step2Param.getIdCount(),step2Param.getIsInvoiceReminder(), performanceId, now, now
performancePartnerVo.getFieldAuditStatus(), performancePartnerVo.getAuditStatus(), step2Param.getIsTrueName(), step2Param.getLimitCount(),step2Param.getIdCount(), performanceId, now, now
});
redisSlimeUtils.setPerformanceIsTrueName(performanceId, step2Param.getIsTrueName());
......@@ -482,7 +478,6 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
vo.setFieldAuditStatus(performancePartnerVo.getFieldAuditStatus());
vo.setAuditStatus(performancePartnerVo.getAuditStatus());
vo.setIsTrueName(step2Param.getIsTrueName());
vo.setIsInvoiceReminder(step2Param.getIsInvoiceReminder());
vo.setLimitCount(step2Param.getLimitCount());
vo.setIdCount(step2Param.getIdCount());
mongoSlimeUtils.updateKylinPerformanceVoById(vo);
......@@ -554,6 +549,7 @@ public class KylinPerformancesPartnerServiceImpl implements IKylinPerformancesPa
}
performanceStep2Param.setTicketTimes(ticketTimesTicketCreatePartnerVoList);
performanceStep2Param.setIsInvoiceReminder(redisSlimeUtils.getPerformanceInvoiceReminder(performancesId));
log.info(UserPathDto.setPartnerData("0", "getStep2", "performancesId=" + performancesId, performanceStep2Param));
return ResponseDto.success(performanceStep2Param);
}
......
......@@ -296,4 +296,19 @@ public class RedisSlimeUtils {
return (List<HashMap<String, String>>) redisUtil.get(redisKey);
}
}
public int getPerformanceInvoiceReminder(String performanceId) {
String redisKey = KylinRedisConst.PERFORMANCES_INVOICE_REMINDER + performanceId;
Object obj = redisUtil.get(redisKey);
if (obj == null) {
return 0;
}else {
return (int) obj;
}
}
public void setPerformanceInvoiceReminder(String performanceId, int invoiceReminder) {
String redisKey = KylinRedisConst.PERFORMANCES_INVOICE_REMINDER + performanceId;
redisUtil.set(redisKey, invoiceReminder);
}
}
......@@ -42,7 +42,7 @@ kylin_performances_reject_txt.fieldsStatus = UPDATE kylin_performances SET rejec
# ---- \u6F14\u51FA\u7B2C\u4E8C\u6B65\u9AA4\u64CD\u4F5C ----
kylin_performance.updateStep2=UPDATE kylin_performances SET audit_time = ? , notice_image = ? WHERE performances_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
kylin_performance_status.updateStep2=UPDATE kylin_performance_status SET field_audit_status = ? ,audit_status = ? , is_true_name = ? , limit_count = ?,id_count =?, is_invoice_reminder =? WHERE performance_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
kylin_performance_status.updateStep2=UPDATE kylin_performance_status SET field_audit_status = ? ,audit_status = ? , is_true_name = ? , limit_count = ?,id_count =? WHERE performance_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
kylin_ticket.updateStep2=UPDATE kylin_tickets SET time_end = ? , time_start = ? ,time_end_express = ? ,pay_countdown_minute = ? ,price = ? WHERE tickets_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
kylin_ticket_status.updateStep2=UPDATE kylin_ticket_status SET total_exchange = ? , total_general = ? , is_true_name = ? , limit_count = ? ,id_count =? , is_lack_register = ? , is_express = ? , is_electronic = ? ,counts = ? , is_show_code = ? ,qr_code_show_time = ? WHERE ticket_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
# ---- VoStatus ----
......@@ -54,7 +54,7 @@ kylin_performance_status.del=DELETE FROM kylin_performance_status WHERE performa
kylin_performance_relations.del=DELETE FROM kylin_performance_relations WHERE performance_id = ?
#province_id,province_name,district_id,district_name
kylin_performances.insert=INSERT INTO kylin_performances (performances_id,title,type,img_poster,city_id,city_name,approval_url,notice,sponsor_id,sponsor_type,sponsor,contacts,mobile,describes,details,notice_image,time_start,time_end,sort,comment,created_at,updated_at) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
kylin_performance_status.insert=INSERT INTO kylin_performance_status (performance_status_id,performance_id,is_show,status,status_sell,is_distribution,sync_agent,sync_damai,audit_status,is_true_name,limit_count,id_count,is_invoice_reminder,limit_count_member,field_audit_status,created_at,updated_at) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
kylin_performance_status.insert=INSERT INTO kylin_performance_status (performance_status_id,performance_id,is_show,status,status_sell,is_distribution,sync_agent,sync_damai,audit_status,is_true_name,limit_count,id_count,limit_count_member,field_audit_status,created_at,updated_at) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
kylin_performance_relations.insert=INSERT INTO kylin_performance_relations (performance_relations_id,performance_id,copy_id,merchant_id,field_id,road_show_id,project_id,video_id,created_at,updated_at) VALUES (?,?,?,?,?,?,?,?,?,?)
kylin_ticket_times.del=DELETE FROM kylin_ticket_times WHERE ticket_times_id = ?
......
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