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

Commit 630123c5 authored by jiangxiulong's avatar jiangxiulong

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

parents 5b66b78a 57b3c1f5
......@@ -28,6 +28,8 @@ public class KylinPerformanceVo {
private String imgPoster;
@ApiModelProperty(value = "支付倒计时")
private Integer payCountdownMinute;
@ApiModelProperty(value = "演出批文地址")
private String approvalUrl;
@ApiModelProperty(value = "101音乐节 102小型演出(livehouse演出) 103巡演")
// @ApiModelProperty(value = "演出类型 1音乐节 2演唱会 3小型演出 4展览 6舞台剧 101音乐节 102小型演出(livehouse演出) 103巡演")
private int type;
......@@ -93,6 +95,8 @@ public class KylinPerformanceVo {
private Integer sysDamai;
@ApiModelProperty(value = "文案")
private String message;
@ApiModelProperty(value = "演出公告")
private String notice;
@ApiModelProperty(value = "场次")
private List<KylinTicketTimesVo> ticketTimeList;
......@@ -109,6 +113,7 @@ public class KylinPerformanceVo {
this.type = performance.getType();
this.details =performance.getDetails();
this.noticeImage = performance.getNoticeImage();
this.notice=performance.getNotice();
}
public void setTimePriceVipAndLack(int isLackRegister, int isMember, int isExclusive, BigDecimal price, LocalDateTime stopSellTime, LocalDateTime sellTime,int isAdvance,int isDiscount,int payCountdownMinute) {
......
......@@ -37,7 +37,7 @@ public class GlobalAuthorityInterceptor extends HandlerInterceptorAdapter {
private static final String TOKEN_KICK = "40002";
private static final String TOKEN_INVALID = "40003";
private static final String KYLIN_STATION_JWT_VALID = "/kylin/station/**";
private static final String KYLIN_STATION_JWT_VALID = "/station/**";
private final static AntPathMatcher antPathMatcher = new AntPathMatcher();
......@@ -88,8 +88,6 @@ public class GlobalAuthorityInterceptor extends HandlerInterceptorAdapter {
if (this.authorityHandler(response, uri, token, currentUid)) {
return true;
}
this.responseHandler(response, responseCode);
return false;
}
......
......@@ -135,3 +135,21 @@ spring:
# -----------------------------------------------------------
# -----------------------------------------------------------
global-auth:
exclude-url-pattern:
- /doc.html
- /webjars/**
- /swagger-resources/**
- /v2/api-docs*
# - /login/sms
# - /login/mobile
# - /login/tpa
- /login/*
- /send
- /member/info
# -----------------------------------------------------------
# -----------------------------------------------------------
# -----------------------------------------------------------
\ No newline at end of file
......@@ -98,14 +98,38 @@ spring:
testOnReturn: false
poolPreparedStatements: true
maxOpenPreparedStatements: 20
# mvc:
# static-path-pattern: /templates/**
# # 定位模板的目录
# view:
# prefix: classpath:/templates/
# suffix: .html
# resources:
# static-locations: classpath:/templates/,classpath:/static/page
# -----------------------------------------------------------
# -----------------------------------------------------------
global-auth:
exclude-url-pattern:
- /doc.html
- /webjars/**
- /swagger-resources/**
- /v2/api-docs*
- /station/login
- /station/login/sms
# -
- /partner/buyNotice/**
- /partner/checkUser/**
- /partner/checkUser/performance/**
- /partner/ticket/**
- /partner/times/**
- /partner/performance/**
- /banners/**
- /order/checkOrderTime
- /order/syncOrder
- /performance/localList
- /performance/noticeList
- /performance/recommendList
- /performance/exclusiveList
- /performance/search
- /performance/calendar
- /performance/calendarPerformances
- /performance/*
# -----------------------------------------------------------
# -----------------------------------------------------------
# -----------------------------------------------------------
......@@ -58,6 +58,7 @@ eureka:
instance-id: ${spring.application.name}:${spring.cloud.client.ip-address}:${spring.application.instance_id:${server.port}}
# -----------------------------------------------------------
zuul:
sensitive-headers:
prefix: /
host:
max-per-route-connections: 300 #默认 20
......@@ -74,27 +75,9 @@ zuul:
# 忽略的接口,屏蔽接口
# ignored-patterns: /**/div/**
# -----------------------------------------------------------
# 判断顺序: exclude.url > include.url > include.url-pattern > exclude.url-pattern
global-auth:
include-url:
- /kylin/performance/payDetail
- /kylin/order/pre
- /kylin/order/checkPayment
- /kylin/order/details
- /kylin/order/list
- /kylin/order/payAgain
include-url-pattern:
- /kylin/station/**
- /kylin/performance/partner/**
exclude-url:
- /adam/send
- /adam/member/info
- /kylin/station/login
- /kylin/station/login/sms
exclude-url-pattern:
- /**/login/**
- /*/v2/api-docs*
- /kylin/**
- /**
# -----------------------------------------------------------
#解决错误 com.netflix.client.ClientException: Load balancer does not have available server for client:panfeng-item-service
#这样就可以即指定path与URL,又不破坏Zuul的Hystrix与Ribbon特性了。
......
package com.liquidnet.service.kylin.config;
import com.liquidnet.common.web.config.CorsConfig;
import org.springframework.context.annotation.Configuration;
@Configuration
public class KylinCorsConfig extends CorsConfig {
}
package com.liquidnet.service.kylin.config;
import com.liquidnet.common.web.config.WebMvcConfig;
import com.liquidnet.common.web.filter.GlobalAuthorityInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
@Configuration
public class KylinWebMvcConfig extends WebMvcConfig {
@Autowired
GlobalAuthorityInterceptor globalAuthorityInterceptor;
@Override
protected void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(globalAuthorityInterceptor).addPathPatterns("/**");
super.addInterceptors(registry);
}
}
......@@ -365,7 +365,11 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
performances.setAuditTime(LocalDateTime.now());
performancesMapper.update(performances, new UpdateWrapper<KylinPerformances>().eq("performances_id", performanceId));
KylinPerformanceStatus performanceStatus = new KylinPerformanceStatus();
if(performanceVoTask.judgeIsAudit(performanceId)) {
performanceStatus.setAuditStatus(0);
}else{
performanceStatus.setAuditStatus(1);
}
performanceStatusMapper.update(performanceStatus, new UpdateWrapper<KylinPerformanceStatus>().eq("performance_id", performanceId));
//提示:票种价格、售票时间、购票限制 直接生效
......
......@@ -349,4 +349,47 @@ public class PerformanceVoTask {
e.printStackTrace();
}
}
public boolean judgeIsAudit(String performanceId){
KylinPerformanceMisVo misVo = getPerformanceMisVo(performanceId);
KylinPerformanceVo mongoVo = mongoVoUtils.combinePerformanceVoData(performanceId);
if(!misVo.getTitle().equals(mongoVo.getTitle())){
return true;
}else if(!misVo.getType().equals(mongoVo.getType())){
return true;
}else if(!misVo.getTimeStart().equals(mongoVo.getTimeStart())){
return true;
}else if(!misVo.getTimeEnd().equals(mongoVo.getTimeEnd())){
return true;
}else if(!misVo.getFieldId().equals(mongoVo.getFieldId())){
return true;
}else if(!misVo.getNotice().equals(mongoVo.getNotice())){
return true;
}else if(!misVo.getDetails().equals(mongoVo.getDetails())){
return true;
}else if(!misVo.getApprovalUrl().equals(mongoVo.getApprovalUrl())){
return true;
}else if(!misVo.getPayCountdownMinute().equals(mongoVo.getPayCountdownMinute())){
return true;
}else if(!misVo.getLimitCount().equals(mongoVo.getLimitCount())){
return true;
} else if(!misVo.getIsTrueName().equals(mongoVo.getIsTrueName())){
return true;
}
boolean exists = mongoTemplate.exists(Query.query(Criteria.where("status").is("-1").and("performancesId").is(performanceId)),KylinTicketTimesPartnerVo.class,KylinTicketTimesPartnerVo.class.getSimpleName());
if(exists){
return true;
}
for (int i = 0;i<misVo.getTicketTimes().size();i++){
TicketTimesTicketCreatePartnerVo times = misVo.getTicketTimes().get(i);
boolean exists2 = mongoTemplate.exists(Query.query(Criteria.where("status").is("-2").and("timesId").is(times.getTicketTimesId())),KylinTicketPartnerVo.class,KylinTicketPartnerVo.class.getSimpleName());
if(exists2){
return true;
}
}
return false;
}
}
40001=非法TOKEN
40002=被踢下线喽
40003=TOKEN失效
# ------------------------ 4开头错误码作系统保留
#APP ERROR
20001=验证码发送失败
20002=验证码无效
......
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