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

Commit ece830f2 authored by jiangxiulong's avatar jiangxiulong

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

parents 54e51b76 a9560fe9
;(function ($) { ;(function ($) {
//这里放入插件代码 //这里放入插件代码
var RemoteSearch = function (element, options) { var RemoteSearchPerformance = function (element, options) {
this.$element = $(element); this.$element = $(element);
this.options = $.extend(true, {}, $.fn.remoteSearch.defaults, options); this.options = $.extend(true, {}, $.fn.remoteSearchPerformance.defaults, options);
this.id = $(element).attr('id'); this.id = $(element).attr('id');
this.ulID = '#' + this.id + '_ul'; this.ulID = '#' + this.id + '_ul';
this.ulFoucus = false; this.ulFoucus = false;
...@@ -11,12 +11,12 @@ ...@@ -11,12 +11,12 @@
this.render = this.options.render || this.render; this.render = this.options.render || this.render;
this.select = this.options.select || this.select; this.select = this.options.select || this.select;
this.ajax = $.extend({}, $.fn.remoteSearch.defaults.ajax, this.options.ajax); this.ajax = $.extend({}, $.fn.remoteSearchPerformance.defaults.ajax, this.options.ajax);
this.listen(); this.listen();
} }
RemoteSearch.prototype = { RemoteSearchPerformance.prototype = {
listen: function () { listen: function () {
this.$element.on('blur', $.proxy(this.blur, this)) this.$element.on('blur', $.proxy(this.blur, this))
.on('keyup', $.proxy(this.keyup, this)); .on('keyup', $.proxy(this.keyup, this));
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
// tab // tab
case 13: case 13:
// enter // enter
break; this.ajaxer();
case 27: case 27:
// escape // escape
break; break;
...@@ -61,10 +61,10 @@ ...@@ -61,10 +61,10 @@
}, },
ajaxer: function () { ajaxer: function () {
var that = this, var that = this,
query = that.$element.val(); title = that.$element.val();
// Query changed // Query changed
that.query = query; that.title = title;
// Cancel last timer if set // Cancel last timer if set
if (that.ajax.timerId) { if (that.ajax.timerId) {
clearTimeout(that.ajax.timerId); clearTimeout(that.ajax.timerId);
...@@ -73,10 +73,9 @@ ...@@ -73,10 +73,9 @@
// Query is good to send, set a timer // Query is good to send, set a timer
that.ajax.timerId = setTimeout(function() { that.ajax.timerId = setTimeout(function() {
var params = { query : query }; var params = { title : title };
var jAjax = (that.ajax.method === "post") ? $.post : $.get; var jAjax = (that.ajax.method === "post") ? $.post : $.get;
jAjax(that.ajax.url, params, function(data){ jAjax(that.ajax.url, params, function(data){
console.log(data);
return that.render(data.value); return that.render(data.value);
}); });
that.ajax.timerId = null; that.ajax.timerId = null;
...@@ -85,7 +84,6 @@ ...@@ -85,7 +84,6 @@
return that; return that;
}, },
render: function (data) { render: function (data) {
console.log(data);
this.ulFoucus = false; this.ulFoucus = false;
var liList = data || []; var liList = data || [];
var num = this._getNum(); var num = this._getNum();
...@@ -136,14 +134,14 @@ ...@@ -136,14 +134,14 @@
} }
$.fn.remoteSearch = function (option) { $.fn.remoteSearchPerformance = function (option) {
return this.each(function () { return this.each(function () {
var $this = $(this), var $this = $(this),
data = $this.data('remoteSearch'), data = $this.data('remoteSearchPerformance'),
options = typeof option === 'object' && option; options = typeof option === 'object' && option;
if (!data) { if (!data) {
$this.data('remoteSearch', (data = new RemoteSearch(this, options))); $this.data('remoteSearchPerformance', (data = new RemoteSearchPerformance(this, options)));
} }
if (typeof option === 'string') { if (typeof option === 'string') {
...@@ -152,9 +150,10 @@ ...@@ -152,9 +150,10 @@
}); });
} }
$.fn.remoteSearch.defaults = { $.fn.remoteSearchPerformance.defaults = {
hiddenVal: '', hiddenVal: '',
chose: function () { }, chose: function () { },
ajax: { ajax: {
url: null, url: null,
timeout: 300, timeout: 300,
...@@ -162,11 +161,9 @@ ...@@ -162,11 +161,9 @@
timerId: null timerId: null
}, },
success: function(res){ success: function(res){
console.log('==parent==success==');
console.log(res);
} }
} }
$.fn.remoteSearch.Constructor = RemoteSearch; $.fn.remoteSearchPerformance.Constructor = RemoteSearchPerformance;
})(jQuery); })(jQuery);
\ No newline at end of file
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<script th:src="@{/ruoyi/js/common.js?v=4.6.1}"></script> <script th:src="@{/ruoyi/js/common.js?v=4.6.1}"></script>
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.6.1}"></script> <script th:src="@{/ruoyi/js/ry-ui.js?v=4.6.1}"></script>
<!--远程搜索下拉框--> <!--远程搜索下拉框-->
<script th:src="@{/js/remote-search.js}"></script> <script th:src="@{/js/remote-search-performance.js}"></script>
</div> </div>
<!-- ztree树插件 --> <!-- ztree树插件 -->
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
--> -->
<div class="remote_wrapper" style="position: relative;"> <div class="remote_wrapper" style="position: relative;">
<input name="ids" type="hidden"> <input name="ids" type="hidden">
<input type="text" id="remoteSearch11"> <input type="text" id="remoteSearch">
</div> </div>
</br> </br>
<p>推荐排序:</p> <p>推荐排序:</p>
...@@ -65,19 +65,15 @@ ...@@ -65,19 +65,15 @@
// }); // });
// } // }
$('#remoteSearch11').remoteSearch({ $('#remoteSearch').remoteSearchPerformance({
ajax:{ ajax:{
url: prefix + "/performance/status?status=(3,6,7,9,10)&title=" + document.getElementById("remoteSearch11").value, url: prefix + "/performance/status?status=(3,6,7,9,10)&",
type: "get" type: "get"
}, },
chose: function(text,val){ chose: function(text,val){
document.getElementsByName("ids")[0].value = val; document.getElementsByName("ids")[0].value = val;
console.log('remoteSearch===========chose=');
console.log(text)
console.log(val)
}, },
success: function(){ success: function(){
console.log('==success====');
} }
}) })
</script> </script>
......
...@@ -9,19 +9,26 @@ ...@@ -9,19 +9,26 @@
<div class="form-group"> <div class="form-group">
<p>演出名称</p> <p>演出名称</p>
<div class="row"> <div class="row">
<!--
<input name="roadShowId" th:value="*{roadShowId}" type="hidden"> <input name="roadShowId" th:value="*{roadShowId}" type="hidden">
<input name="ids" type="hidden"> <input name="ids" type="hidden">
<div class="col-lg-6"> <div class="col-lg-6">
<div class="input-group"> <div class="input-group">
<input type="text" class="form-control" id="suggest-demo-2" onkeyup="getPerformanceTitle()"> <input type="text" class="form-control" id="suggest-demo-2" onkeyup="getPerformanceTitle()">
<div class="input-group-btn"> <div class="input-group-btn">
<button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown"> <button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span> <span class="caret"></span>
</button> </button>
<ul class="dropdown-menu dropdown-menu-right" role="menu"> <ul class="dropdown-menu dropdown-menu-right" role="menu">
</ul> </ul>
</div> </div>
</div> </div>
</div>
-->
<input name="roadShowId" th:value="*{roadShowId}" type="hidden">
<div class="remote_wrapper" style="position: relative;">
<input name="ids" type="hidden">
<input type="text" id="remoteSearch">
</div> </div>
</div> </div>
</div> </div>
...@@ -43,18 +50,29 @@ ...@@ -43,18 +50,29 @@
} }
} }
function getPerformanceTitle() { // function getPerformanceTitle() {
var testBsSuggest = $("#suggest-demo-2").bsSuggest({ // var testBsSuggest = $("#suggest-demo-2").bsSuggest({
url: prefix + "/performance/status?status=(3,6,7,9,10)&title=" + document.getElementById("suggest-demo-2").value, // url: prefix + "/performance/status?status=(3,6,7,9,10)&title=" + document.getElementById("suggest-demo-2").value,
showBtn: false, // showBtn: false,
idField: "performancesId", // idField: "performancesId",
keyField: "title" // keyField: "title"
}).on('onDataRequestSuccess', function (e, result) { // }).on('onDataRequestSuccess', function (e, result) {
}).on('onSetSelectValue', function (e, keyword) { // }).on('onSetSelectValue', function (e, keyword) {
document.getElementsByName("ids")[0].value = keyword.id; // document.getElementsByName("ids")[0].value = keyword.id;
}).on('onUnsetSelectValue', function (e) { // }).on('onUnsetSelectValue', function (e) {
}); // });
} // }
$('#remoteSearch').remoteSearchPerformance({
ajax:{
url: prefix + "/performance/status?status=(3,6,7,9,10)&",
type: "get"
},
chose: function(text,val){
document.getElementsByName("ids")[0].value = val;
},
success: function(){
}
})
</script> </script>
</body> </body>
</html> </html>
...@@ -148,6 +148,7 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma ...@@ -148,6 +148,7 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma
ticketStatus.setStatus(status); ticketStatus.setStatus(status);
ticketStatusMapper.update(ticketStatus, new UpdateWrapper<KylinTicketStatus>().eq("ticket_id", ticketItem.getTicketsId())); ticketStatusMapper.update(ticketStatus, new UpdateWrapper<KylinTicketStatus>().eq("ticket_id", ticketItem.getTicketsId()));
} }
} }
} else { //只修改演出相关 场次 票 (不包括 库存 售卖时间 限购) } else { //只修改演出相关 场次 票 (不包括 库存 售卖时间 限购)
log.info(" PERFORMANCE 演出审核 修改"); log.info(" PERFORMANCE 演出审核 修改");
......
...@@ -277,7 +277,7 @@ ...@@ -277,7 +277,7 @@
FROM kylin_performances AS p FROM kylin_performances AS p
LEFT JOIN kylin_performance_status AS ps ON ps.performance_id = p.performances_id LEFT JOIN kylin_performance_status AS ps ON ps.performance_id = p.performances_id
LEFT JOIN kylin_performance_relations AS pr ON pr.performance_id = p.performances_id LEFT JOIN kylin_performance_relations AS pr ON pr.performance_id = p.performances_id
WHERE (ps.status = 3 or ps.status = 6 or ps.status = 7) WHERE (ps.status = 3 or ps.status = 6 or ps.status = 7 or ps.status = 8 or ps.status = 9 or ps.status = 10)
AND pr.road_show_id = ${roadShowId} AND pr.road_show_id = ${roadShowId}
LIMIT 100 LIMIT 100
</select> </select>
......
...@@ -8,6 +8,7 @@ import com.liquidnet.common.mq.constant.MQConst; ...@@ -8,6 +8,7 @@ import com.liquidnet.common.mq.constant.MQConst;
import com.liquidnet.commons.lang.util.*; import com.liquidnet.commons.lang.util.*;
import com.liquidnet.service.adam.dto.vo.AdamAddressesVo; import com.liquidnet.service.adam.dto.vo.AdamAddressesVo;
import com.liquidnet.service.adam.dto.vo.AdamEntersVo; import com.liquidnet.service.adam.dto.vo.AdamEntersVo;
import com.liquidnet.service.base.ErrorMapping;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.base.SqlMapping; import com.liquidnet.service.base.SqlMapping;
import com.liquidnet.service.feign.adam.api.FeignAdamBaseClient; import com.liquidnet.service.feign.adam.api.FeignAdamBaseClient;
...@@ -149,16 +150,20 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -149,16 +150,20 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
if (performanceData == null || ticketTimesData == null || ticketData == null) { if (performanceData == null || ticketTimesData == null || ticketData == null) {
//redisLockUtil.unlock(lock); //redisLockUtil.unlock(lock);
return ResponseDto.failure("参数错误");//参数错误 return ResponseDto.failure(ErrorMapping.get("20004"));//参数错误
} }
if (!ticketData.getTimeId().equals(payOrderParam.getTimeId()) || !ticketTimesData.getPerformanceId().equals(payOrderParam.getPerformanceId())) { if (!ticketData.getTimeId().equals(payOrderParam.getTimeId()) || !ticketTimesData.getPerformanceId().equals(payOrderParam.getPerformanceId())) {
//redisLockUtil.unlock(lock); //redisLockUtil.unlock(lock);
return ResponseDto.failure("参数错误");//参数错误List<AdamEntersVo> entersVoList return ResponseDto.failure(ErrorMapping.get("20004"));//参数错误
}
if (payOrderParam.getNumber()%ticketData.getCounts()!=0) {
//redisLockUtil.unlock(lock);
return ResponseDto.failure(ErrorMapping.get("20007"));//数量错误
} }
//判断代理 //判断代理
if (!checkAgent(payOrderParam.getAgentId(), ticketData)) { if (!checkAgent(payOrderParam.getAgentId(), ticketData)) {
//redisLockUtil.unlock(lock); //redisLockUtil.unlock(lock);
return ResponseDto.failure("无权购买"); return ResponseDto.failure(ErrorMapping.get("20008"));//无权购买
} }
Integer isStudent = ticketData.getIsStudent(); Integer isStudent = ticketData.getIsStudent();
...@@ -177,7 +182,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -177,7 +182,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
memberType = 2; memberType = 2;
if (!isMember) { if (!isMember) {
//redisLockUtil.unlock(lock); //redisLockUtil.unlock(lock);
return ResponseDto.failure("非会员用户暂不可购买");//没有会员权限 return ResponseDto.failure(ErrorMapping.get("20009"));//没有会员权限
} }
} else { } else {
if (DateUtil.compareStrDay(DateUtil.getNowTime(), memberTimeStart) == 1 && DateUtil.compareStrDay(DateUtil.getNowTime(), timeStart) == -1 && ticketData.getIsMember() == 1) { if (DateUtil.compareStrDay(DateUtil.getNowTime(), memberTimeStart) == 1 && DateUtil.compareStrDay(DateUtil.getNowTime(), timeStart) == -1 && ticketData.getIsMember() == 1) {
...@@ -185,7 +190,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -185,7 +190,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
memberType = 1; memberType = 1;
if (!isMember) { if (!isMember) {
//redisLockUtil.unlock(lock); //redisLockUtil.unlock(lock);
return ResponseDto.failure("非会员用户暂不可购买");//没有会员权限 return ResponseDto.failure(ErrorMapping.get("20009"));//没有会员权限
} }
} else { } else {
// 普通用户购买逻辑 // 普通用户购买逻辑
...@@ -201,49 +206,49 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -201,49 +206,49 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
int isTrueName = ticketData.getIsTrueName();//是否演出实名 int isTrueName = ticketData.getIsTrueName();//是否演出实名
if (!canBuyStatus.contains(performanceData.getAppStatus())) { if (!canBuyStatus.contains(performanceData.getAppStatus())) {
return ResponseDto.failure("当前不可购买");//没有会员权限 return ResponseDto.failure(ErrorMapping.get("20010"));//当前不可购买
} }
if (!canBuyStatus.contains(performanceData.getAppStatus())) { if (!canBuyStatus.contains(performanceData.getAppStatus())) {
return ResponseDto.failure("当前不可购买");//没有会员权限 return ResponseDto.failure(ErrorMapping.get("20010"));//当前不可购买
} }
//通用判断时间 //通用判断时间
if (isMember) { if (isMember) {
if (DateUtil.compareStrDay(DateUtil.getNowTime(), memberTimeStart) == -1) { if (DateUtil.compareStrDay(DateUtil.getNowTime(), memberTimeStart) == -1) {
//redisLockUtil.unlock(lock); //redisLockUtil.unlock(lock);
return ResponseDto.failure("未开始售卖");//未开始 return ResponseDto.failure(ErrorMapping.get("20011"));//未开始
} }
} else { } else {
if (DateUtil.compareStrDay(DateUtil.getNowTime(), timeStart) == -1) { if (DateUtil.compareStrDay(DateUtil.getNowTime(), timeStart) == -1) {
//redisLockUtil.unlock(lock); //redisLockUtil.unlock(lock);
return ResponseDto.failure("未开始售卖");//未开始 return ResponseDto.failure(ErrorMapping.get("20011"));//未开始
} }
} }
if (DateUtil.compareStrDay(DateUtil.getNowTime(), timeEnd) == 1) { if (DateUtil.compareStrDay(DateUtil.getNowTime(), timeEnd) == 1) {
//redisLockUtil.unlock(lock); //redisLockUtil.unlock(lock);
return ResponseDto.failure("售卖已结束");//已结束 return ResponseDto.failure(ErrorMapping.get("20012"));//已结束
} }
//快递票判断 //快递票判断
if (payOrderParam.getIsExpress() != null) { if (payOrderParam.getIsExpress() != null) {
if (payOrderParam.getIsExpress() == 1 && DateUtil.compareStrDay(DateUtil.getNowTime(), timeExpressEnd) == 1) { if (payOrderParam.getIsExpress() == 1 && DateUtil.compareStrDay(DateUtil.getNowTime(), timeExpressEnd) == 1) {
//redisLockUtil.unlock(lock); //redisLockUtil.unlock(lock);
return ResponseDto.failure("已超过快递票截止时间");//快递票不卖 return ResponseDto.failure(ErrorMapping.get("20013"));//快递票不卖
} }
if (payOrderParam.getIsExpress() == 1 && payOrderParam.getAddressId().isEmpty()) { if (payOrderParam.getIsExpress() == 1 && payOrderParam.getAddressId().isEmpty()) {
//redisLockUtil.unlock(lock); //redisLockUtil.unlock(lock);
return ResponseDto.failure("快递票未填写收货地址");//快递票未填写收货地址 return ResponseDto.failure(ErrorMapping.get("20014"));//快递票未填写收货地址
} }
} }
//实名判断 //实名判断
if (isTrueName == 1 && payOrderParam.getEnterIdList().size() <= 0) { if (isTrueName == 1 && payOrderParam.getEnterIdList().size() <= 0) {
//redisLockUtil.unlock(lock); //redisLockUtil.unlock(lock);
return ResponseDto.failure("入场人数量错误");//需要实名 未实名 return ResponseDto.failure(ErrorMapping.get("20015"));//需要实名 未实名
} }
if (isTrueName == 1 && payOrderParam.getEnterIdList().size() != payOrderParam.getNumber()) { if (isTrueName == 1 && payOrderParam.getEnterIdList().size() != payOrderParam.getNumber()) {
//redisLockUtil.unlock(lock); //redisLockUtil.unlock(lock);
return ResponseDto.failure("入场人数量错误");//入场人数量错误 return ResponseDto.failure(ErrorMapping.get("20015"));//入场人数量错误
} }
// 判断库存 // 判断库存
...@@ -266,7 +271,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -266,7 +271,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
currentTime = System.currentTimeMillis() - currentTime; currentTime = System.currentTimeMillis() - currentTime;
log.debug("redis 修改库存 售罄 -> time:" + (currentTime) + "毫秒"); log.debug("redis 修改库存 售罄 -> time:" + (currentTime) + "毫秒");
//redisLockUtil.unlock(lock); //redisLockUtil.unlock(lock);
return ResponseDto.failure("该票种已售罄");//没抢到 return ResponseDto.failure(ErrorMapping.get("20016"));//没抢到
} else { } else {
isDownGeneral = true; isDownGeneral = true;
...@@ -281,7 +286,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -281,7 +286,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
int age = IDCard.getAgeByIdCard(adamEnters.getIdCard()); int age = IDCard.getAgeByIdCard(adamEnters.getIdCard());
if (age > 25) { if (age > 25) {
//redisLockUtil.unlock(lock); //redisLockUtil.unlock(lock);
return ResponseDto.failure("年龄不符合");//年龄超了 return ResponseDto.failure(ErrorMapping.get("20017"));//年龄超了
} }
} }
} }
...@@ -334,7 +339,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -334,7 +339,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
e.printStackTrace(); e.printStackTrace();
log.error("Kylin Order Pay Error = " + e.getMessage()); log.error("Kylin Order Pay Error = " + e.getMessage());
//redisLockUtil.unlock(lock); //redisLockUtil.unlock(lock);
return ResponseDto.failure("下单失败");//乱七八糟异常 return ResponseDto.failure(ErrorMapping.get("20018"));//乱七八糟异常
} }
} }
...@@ -549,7 +554,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -549,7 +554,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
httpData.add("client_ip", CurrentUtil.getCliIpAddr()); httpData.add("client_ip", CurrentUtil.getCliIpAddr());
httpData.add("notify_url", synUrl); httpData.add("notify_url", synUrl);
httpData.add("create_date", orderTickets.getCreatedAt().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); httpData.add("create_date", orderTickets.getCreatedAt().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
httpData.add("expire_time", (orderTickets.getPayCountdownMinute() + 1) + ""); httpData.add("expire_time", (orderTickets.getPayCountdownMinute()) + "");
if (payOrderParam.getDeviceFrom().equals("js") || payOrderParam.getDeviceFrom().equals("applet")) { if (payOrderParam.getDeviceFrom().equals("js") || payOrderParam.getDeviceFrom().equals("applet")) {
httpData.add("open_id", payOrderParam.getOpenId()); httpData.add("open_id", payOrderParam.getOpenId());
......
...@@ -239,11 +239,11 @@ public class KylinTicketTimesPartnerServiceImpl extends ServiceImpl<KylinTicketT ...@@ -239,11 +239,11 @@ public class KylinTicketTimesPartnerServiceImpl extends ServiceImpl<KylinTicketT
@Override @Override
public List<KylinTicketTimesPartnerVo> getTimesMongoList(String performancesId) { public List<KylinTicketTimesPartnerVo> getTimesMongoList(String performancesId) {
return mongoTemplate.find(Query.query(Criteria.where("performancesId").is(performancesId)), KylinTicketTimesPartnerVo.class, KylinTicketTimesPartnerVo.class.getSimpleName()); return mongoTemplate.find(Query.query(Criteria.where("performancesId").is(performancesId).and("status").ne(0)), KylinTicketTimesPartnerVo.class, KylinTicketTimesPartnerVo.class.getSimpleName());
} }
@Override @Override
public KylinTicketTimesPartnerVo getTimesMongo(String timesId) { public KylinTicketTimesPartnerVo getTimesMongo(String timesId) {
return mongoTemplate.findOne(Query.query(Criteria.where("ticketTimesId").is(timesId)), KylinTicketTimesPartnerVo.class, KylinTicketTimesPartnerVo.class.getSimpleName()); return mongoTemplate.findOne(Query.query(Criteria.where("ticketTimesId").is(timesId).and("status").ne(-1)), KylinTicketTimesPartnerVo.class, KylinTicketTimesPartnerVo.class.getSimpleName());
} }
} }
...@@ -327,7 +327,7 @@ public class KylinTicketsPartnerServiceImpl extends ServiceImpl<KylinTicketsMapp ...@@ -327,7 +327,7 @@ public class KylinTicketsPartnerServiceImpl extends ServiceImpl<KylinTicketsMapp
map.put("updatedAt", updatedAt.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); map.put("updatedAt", updatedAt.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
BasicDBObject object = new BasicDBObject("$set", mongoConverter.convertToMongoType(map)); BasicDBObject object = new BasicDBObject("$set", mongoConverter.convertToMongoType(map));
UpdateResult updateResult = mongoTemplate.getCollection(KylinTicketPartnerVo.class.getSimpleName()).updateMany( UpdateResult updateResult = mongoTemplate.getCollection(KylinTicketPartnerVo.class.getSimpleName()).updateMany(
Query.query(Criteria.where("timesId").is(timesId)).getQueryObject(), Query.query(Criteria.where("timesId").is(timesId).and("status").ne(-2)).getQueryObject(),
object object
); );
return updateResult.getModifiedCount() <= 0; return updateResult.getModifiedCount() <= 0;
......
...@@ -399,14 +399,15 @@ public class PerformanceVoTask { ...@@ -399,14 +399,15 @@ public class PerformanceVoTask {
return true; return true;
} }
boolean exists = mongoTemplate.exists(Query.query(Criteria.where("status").is("-1").and("performancesId").is(performanceId)), KylinTicketTimesPartnerVo.class, KylinTicketTimesPartnerVo.class.getSimpleName()); boolean exists = mongoTemplate.exists(Query.query(Criteria.where("status").is(-1).and("performancesId").is(performanceId)),
KylinTicketTimesPartnerVo.class, KylinTicketTimesPartnerVo.class.getSimpleName());
if (exists) { if (exists) {
return true; return true;
} }
for (int i = 0; i < misVo.getTicketTimes().size(); i++) { for (int i = 0; i < misVo.getTicketTimes().size(); i++) {
TicketTimesTicketCreatePartnerVo times = misVo.getTicketTimes().get(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()); boolean exists2 = mongoTemplate.exists(Query.query(Criteria.where("status").is(-2).and("timesId").is(times.getTicketTimesId())), KylinTicketPartnerVo.class, KylinTicketPartnerVo.class.getSimpleName());
if (exists2) { if (exists2) {
return true; return true;
} }
......
...@@ -7,10 +7,21 @@ ...@@ -7,10 +7,21 @@
20001=验证码发送失败 20001=验证码发送失败
20002=验证码无效 20002=验证码无效
20003=无权查看 20003=无权查看
20004= 20004=参数错误
20005=手机号获取失败,请更换登录方式 20005=手机号获取失败,请更换登录方式
20006=第三方账号未注册 20006=第三方账号未注册
20007= 20007=数量错误
20008=无权购买
20009=非会员用户暂不可购买
20010=当前不可购买
20011=未开始售卖
20012=售卖已结束
20013=已超过快递票截止时间
20014=快递票未填写收货地址
20015=入场人数量错误
20016=该票种已售罄
20017=年龄不符合
20018=下单失败
#APP PARTNER #APP PARTNER
20101=添加失败 20101=添加失败
......
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