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

Commit 7f4b1097 authored by jiangxiulong's avatar jiangxiulong

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

parents 32ab5294 7e95f3ea
...@@ -20,6 +20,7 @@ public class OrderListReq { ...@@ -20,6 +20,7 @@ public class OrderListReq {
private String timePayEnd; private String timePayEnd;
private String sponsorId; private String sponsorId;
private String sponsor; private String sponsor;
private String payType;
private String paymentType; private String paymentType;
private String orderStatus; private String orderStatus;
private String orderSource; private String orderSource;
......
...@@ -42,24 +42,10 @@ ...@@ -42,24 +42,10 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <div class="input-group">-->
<!-- <input type="text" class="form-control" id="sponsorSelectDiv">-->
<!-- <div class="input-group-btn">-->
<!-- <button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown">-->
<!-- <span class="caret"></span>-->
<!-- </button>-->
<!-- <ul class="dropdown-menu dropdown-menu-right" role="menu">-->
<!-- </ul>-->
<!-- </div>-->
<!-- </div>-->
<!-- <select name="sponsorId">-->
<!-- <option value="">所有</option>-->
<!-- <option value="-1">代码生成请选择字典属性</option>-->
<!-- </select>-->
</li> </li>
<li> <li>
<label>支付方式:</label> <label>支付方式:</label>
<select name="paymentType" th:with="type=${@dict.getType('zhengzai_pay_type')}"> <select name="payType" th:with="type=${@dict.getType('zhengzai_pay_type')}">
<option value="">所有</option> <option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select> </select>
...@@ -171,11 +157,11 @@ ...@@ -171,11 +157,11 @@
} }
}, },
{ {
field: 'paymentType', field: 'payType',
title: '支付方式' title: '支付方式',
// formatter: function(value, row, index) { formatter: function(value, row, index) {
// return $.table.selectDictLabel(payTypeDic, value); return $.table.selectDictLabel(payTypeDic, value);
// } }
}, },
{ {
field: 'tied', field: 'tied',
......
...@@ -6,7 +6,7 @@ liquidnet: ...@@ -6,7 +6,7 @@ liquidnet:
username: user username: user
password: user123 password: user123
eureka: eureka:
host: 172.18.0.2:7001 host: 172.17.207.177:7001
# end-dev-这里是配置信息基本值 # end-dev-这里是配置信息基本值
spring: spring:
......
...@@ -15,7 +15,7 @@ liquidnet: ...@@ -15,7 +15,7 @@ liquidnet:
pattern-file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n' pattern-file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
pattern-console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n' pattern-console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
pattern-rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log pattern-rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level-root: info level-root: debug
rabbitmq: rabbitmq:
connection-timeout: 3000 connection-timeout: 3000
mysql: mysql:
......
...@@ -145,7 +145,7 @@ global-auth: ...@@ -145,7 +145,7 @@ global-auth:
- ${liquidnet.info.context}/v2/api-docs* - ${liquidnet.info.context}/v2/api-docs*
- ${liquidnet.info.context}/station/login - ${liquidnet.info.context}/station/login
- ${liquidnet.info.context}/station/login/sms - ${liquidnet.info.context}/station/login/sms
# - # -
- ${liquidnet.info.context}/partner/buyNotice/** - ${liquidnet.info.context}/partner/buyNotice/**
- ${liquidnet.info.context}/partner/checkUser/** - ${liquidnet.info.context}/partner/checkUser/**
- ${liquidnet.info.context}/partner/checkUser/performance/** - ${liquidnet.info.context}/partner/checkUser/performance/**
......
...@@ -31,9 +31,12 @@ public class PerformanceRecommendAdminDao { ...@@ -31,9 +31,12 @@ public class PerformanceRecommendAdminDao {
this.statusName="已下架"; this.statusName="已下架";
break; break;
case 8: case 8:
this.statusName="演出结束"; this.statusName="售罄";
break; break;
case 9: case 9:
this.statusName="演出结束";
break;
case 10:
this.statusName="演出未开始"; this.statusName="演出未开始";
break; break;
default: default:
......
...@@ -125,17 +125,13 @@ ...@@ -125,17 +125,13 @@
inner join kylin_order_ticket_relations kotr on kot.order_tickets_id = kotr.order_id inner join kylin_order_ticket_relations kotr on kot.order_tickets_id = kotr.order_id
inner join kylin_performances kp on kotr.performance_id = kp.performances_id inner join kylin_performances kp on kotr.performance_id = kp.performances_id
<where> <where>
<if test="orderTicketsId != null and orderTicketsId != ''">and kot.order_tickets_id = #{orderTicketsId}
</if>
<if test="userId != null and userId != ''">and kot.user_id = #{userId}</if> <if test="userId != null and userId != ''">and kot.user_id = #{userId}</if>
<if test="userName != null and userName != ''">and kot.user_name like concat('%', #{userName}, '%')</if> <if test="userName != null and userName != ''">and kot.user_name like concat('%', #{userName}, '%')</if>
<if test="userMobile != null and userMobile != ''">and kot.user_mobile = #{userMobile}</if> <if test="userMobile != null and userMobile != ''">and kot.user_mobile = #{userMobile}</if>
<if test="performanceTitle != null and performanceTitle != ''">and kot.performance_title = <if test="performanceTitle != null and performanceTitle != ''">
#{performanceTitle} and kot.performance_title like concat('%', #{performanceTitle}, '%')
</if> </if>
<if test="orderCode != null and orderCode != ''">and kot.order_code = #{orderCode}</if> <if test="orderCode != null and orderCode != ''">and kot.order_code = #{orderCode}</if>
<if test="payCode != null and payCode != ''">and kot.pay_code = #{payCode}</if>
<if test="qrCode != null and qrCode != ''">and kot.qr_code = #{qrCode}</if>
<if test="orderType != null and orderType != ''">and kot.order_type = #{orderType}</if> <if test="orderType != null and orderType != ''">and kot.order_type = #{orderType}</if>
<if test="orderVersion != null and orderVersion != ''">and kot.order_version = #{orderVersion}</if> <if test="orderVersion != null and orderVersion != ''">and kot.order_version = #{orderVersion}</if>
<if test="number != null ">and kot.number = #{number}</if> <if test="number != null ">and kot.number = #{number}</if>
...@@ -168,6 +164,12 @@ ...@@ -168,6 +164,12 @@
<if test="sponsor!=null and sponsor!=''"> <if test="sponsor!=null and sponsor!=''">
AND kp.sponsor = #{sponsor} AND kp.sponsor = #{sponsor}
</if> </if>
<if test="orderStatus!=null and orderStatus!=''">
AND kots.status = #{orderStatus}
</if>
<if test="sponsor!=null and sponsor!=''">
AND kp.sponsor = #{sponsor}
</if>
</where> </where>
<!-- <if test="orderItem!=''">--> <!-- <if test="orderItem!=''">-->
<!-- ORDER BY ${orderItem} ${orderSc}--> <!-- ORDER BY ${orderItem} ${orderSc}-->
......
...@@ -108,7 +108,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -108,7 +108,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
@Autowired @Autowired
private KylinOrderTicketEntitiesMapper entitiesMapper; private KylinOrderTicketEntitiesMapper entitiesMapper;
ArrayList<Integer> canBuyStatus = new ArrayList(){{ ArrayList<Integer> canBuyStatus = new ArrayList() {{
add(6); add(6);
add(8); add(8);
add(9); add(9);
...@@ -200,11 +200,11 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -200,11 +200,11 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
int performanceMemberLimit = performanceData.getLimitCountMember();//会员演出限购 int performanceMemberLimit = performanceData.getLimitCountMember();//会员演出限购
int isTrueName = ticketData.getIsTrueName();//是否演出实名 int isTrueName = ticketData.getIsTrueName();//是否演出实名
if(!canBuyStatus.contains(performanceData.getAppStatus())){ if (!canBuyStatus.contains(performanceData.getAppStatus())) {
return ResponseDto.failure("当前不可购买");//没有会员权限 return ResponseDto.failure("当前不可购买");//没有会员权限
} }
if(!canBuyStatus.contains(performanceData.getAppStatus())){ if (!canBuyStatus.contains(performanceData.getAppStatus())) {
return ResponseDto.failure("当前不可购买");//没有会员权限 return ResponseDto.failure("当前不可购买");//没有会员权限
} }
...@@ -624,7 +624,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -624,7 +624,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
log.debug("mongo 添加 订单 -> time:" + (currentTime) + "毫秒"); log.debug("mongo 添加 订单 -> time:" + (currentTime) + "毫秒");
currentTime = System.currentTimeMillis(); currentTime = System.currentTimeMillis();
mongoVoUtils.resetOrderListVo(uid, 1, orderTicketVo.getOrderTicketsId(),orderTicketVo); mongoVoUtils.resetOrderListVo(uid, 1, orderTicketVo.getOrderTicketsId(), orderTicketVo);
currentTime = System.currentTimeMillis() - currentTime; currentTime = System.currentTimeMillis() - currentTime;
log.debug("redis 修改订单列表 -> time:" + (currentTime) + "毫秒"); log.debug("redis 修改订单列表 -> time:" + (currentTime) + "毫秒");
...@@ -846,7 +846,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -846,7 +846,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
//生成vo redis //生成vo redis
dataUtils.delOrderTicketRedis(orderTickets.getOrderTicketsId()); dataUtils.delOrderTicketRedis(orderTickets.getOrderTicketsId());
mongoVoUtils.resetOrderListVo(orderTicketData.getUserId(), 2, orderTicketData.getOrderTicketsId(),null); mongoVoUtils.resetOrderListVo(orderTicketData.getUserId(), 2, orderTicketData.getOrderTicketsId(), null);
// 发短信 // 发短信
KylinPerformanceVo performanceData = dataUtils.getPerformanceVo(orderTicketData.getPerformanceId()); KylinPerformanceVo performanceData = dataUtils.getPerformanceVo(orderTicketData.getPerformanceId());
...@@ -1015,22 +1015,25 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -1015,22 +1015,25 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
@Override @Override
public boolean checkOrderTime(String userId) { public boolean checkOrderTime(String userId) {
String lock = "order_lock:checkOrderTime:" + userId;
if (redisLockUtil.tryLock(lock, 1, 3600)) {
try {
List<OrderScriptDto> dtoData = orderTicketsMapper.orderScriptDto(userId); List<OrderScriptDto> dtoData = orderTicketsMapper.orderScriptDto(userId);
HashMap<String, Integer> map2 = new HashMap<>(); HashMap<String, Integer> map2 = new HashMap<>();
Integer count = 0;
Integer mqCount = 0;
Integer Acount = 0;
Integer Ecount = 0;
for (OrderScriptDto item : dtoData) { for (OrderScriptDto item : dtoData) {
count += 1;
LinkedList<String> sqls = new LinkedList<>(); LinkedList<String> sqls = new LinkedList<>();
String lock = "order_lock:" + item.getOrderCode(); if (item.getStatus().equals(KylinTableStatusConst.ORDER_STATUS0)) {
// if (!redisLockUtil.tryLock(lock, 30, 240)) {
// continue;
// }
if (item.getStatus() == KylinTableStatusConst.ORDER_STATUS0) {
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
try { try {
KylinOrderTicketVo vo = dataUtils.getOrderTicketVo(item.getOrderTicketsId()); KylinOrderTicketVo vo = dataUtils.getOrderTicketVo(item.getOrderTicketsId());
// if (vo.getStatus() != 0) { if (vo.getStatus() != 0) {
// continue; continue;
// } }
//mysql //mysql
KylinOrderTickets orderTickets = new KylinOrderTickets(); KylinOrderTickets orderTickets = new KylinOrderTickets();
...@@ -1057,14 +1060,13 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -1057,14 +1060,13 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
vo.setChangeDate(now); vo.setChangeDate(now);
vo.setStatus(KylinTableStatusConst.ORDER_STATUS2); vo.setStatus(KylinTableStatusConst.ORDER_STATUS2);
vo.setUpdatedAt(DateUtil.Formatter.yyyyMMddHHmmssSSS.format(now)); vo.setUpdatedAt(DateUtil.Formatter.yyyyMMddHHmmssSSS.format(now));
redisUtil.set(KylinRedisConst.ORDER+vo.getOrderTicketsId(),vo); redisUtil.set(KylinRedisConst.ORDER + vo.getOrderTicketsId(), vo);
map2.put(vo.getTicketId(), map2.get(vo.getTicketId()) == null ? vo.getNumber() : map2.get(vo.getTicketId()) + vo.getNumber()); map2.put(vo.getTicketId(), map2.get(vo.getTicketId()) == null ? vo.getNumber() : map2.get(vo.getTicketId()) + vo.getNumber());
mongoVoUtils.resetOrderListVo(item.getUserId(), 2, item.getOrderTicketsId(),vo); mongoVoUtils.resetOrderListVo(item.getUserId(), 2, item.getOrderTicketsId(), vo);
Acount += 1;
// List<KylinOrderTicketEntities> entities = entitiesMapper.selectList(new UpdateWrapper<KylinOrderTicketEntities>().eq("order_id", item.getOrderTicketsId()));
List<KylinOrderTicketEntitiesVo> entities = vo.getEntitiesVoList(); List<KylinOrderTicketEntitiesVo> entities = vo.getEntitiesVoList();
// entitiesMapper.selectList(new UpdateWrapper<KylinOrderTicketEntities>().eq("order_id", item.getOrderTicketsId()));
for (int i = 0; i < entities.size(); i++) { for (int i = 0; i < entities.size(); i++) {
KylinOrderTicketEntitiesVo items = entities.get(i); KylinOrderTicketEntitiesVo items = entities.get(i);
dataUtils.changeBuyInfo(items.getUserId(), items.getEnterIdCode(), items.getPerformanceId(), items.getTicketId(), -1); dataUtils.changeBuyInfo(items.getUserId(), items.getEnterIdCode(), items.getPerformanceId(), items.getTicketId(), -1);
...@@ -1083,23 +1085,31 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -1083,23 +1085,31 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
sqlsDataC.add(new Object[]{orderTickets.getUpdatedAt(), orderTickets.getOrderTicketsId(), strTime, strTime}); sqlsDataC.add(new Object[]{orderTickets.getUpdatedAt(), orderTickets.getOrderTicketsId(), strTime, strTime});
rabbitTemplate.convertAndSend(MQConst.EXCHANGES_LIQUIDNET_SQL_ORDER_CLOSE, MQConst.ROUTING_KEY_SQL_ORDER_CLOSE, SqlMapping.gets(sqls, sqlsDataA, sqlsDataB, sqlsDataC)); rabbitTemplate.convertAndSend(MQConst.EXCHANGES_LIQUIDNET_SQL_ORDER_CLOSE, MQConst.ROUTING_KEY_SQL_ORDER_CLOSE, SqlMapping.gets(sqls, sqlsDataA, sqlsDataB, sqlsDataC));
mqCount += 1;
} catch (Exception e) { } catch (Exception e) {
//redisLockUtil.unlock(lock); log.debug("CHECK TIME SYNC = " + e.getMessage());
log.debug("CHECK TIME SYNC = "+e.getMessage());
e.printStackTrace(); e.printStackTrace();
return false; return false;
} }
} else { }else{
//redisLockUtil.unlock(lock); Ecount+=1;
} }
} }
log.debug("COUNT 1 = " + count);
log.debug("COUNT 2 = " + mqCount);
log.debug("COUNT 3 = " + Acount);
log.debug("COUNT 4 = " + Ecount);
for (Map.Entry<String, Integer> entry : map2.entrySet()) { for (Map.Entry<String, Integer> entry : map2.entrySet()) {
dataUtils.changeSurplusGeneral(entry.getKey(), entry.getValue()); dataUtils.changeSurplusGeneral(entry.getKey(), entry.getValue());
} }
} catch (Exception e) {
e.printStackTrace();
} finally {
redisLockUtil.unlock(lock);
}
} else {
log.debug("WARNING LOCKING");
}
return true; return true;
} }
......
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