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

Commit 245e4668 authored by 胡佳晨's avatar 胡佳晨

提交 根据端订单 查询大麦单号

parent 249188d7
...@@ -264,7 +264,7 @@ public class KylinOrderRefundAdminController extends BaseController { ...@@ -264,7 +264,7 @@ public class KylinOrderRefundAdminController extends BaseController {
@ResponseBody @ResponseBody
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "code", value = "订单号", example = ""), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "code", value = "订单号", example = ""),
@ApiImplicitParam(type = "form", required = true, dataType = "int", name = "type", value = "1退款单号 2订单号", example = ""), @ApiImplicitParam(type = "form", required = true, dataType = "int", name = "type", value = "1退款单号 2订单号 3大麦单号", example = ""),
}) })
public AjaxResult loginSmsSwitch(@NotNull(message = "订单号不能为空") @RequestParam String code, public AjaxResult loginSmsSwitch(@NotNull(message = "订单号不能为空") @RequestParam String code,
@NotNull(message = "类型不能为空") @RequestParam int type) { @NotNull(message = "类型不能为空") @RequestParam int type) {
......
...@@ -30,7 +30,7 @@ public class OrderSwitchAdminController { ...@@ -30,7 +30,7 @@ public class OrderSwitchAdminController {
@ApiOperation(value = "根据截取订单号获取全量订单号") @ApiOperation(value = "根据截取订单号获取全量订单号")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "code", value = "订单号", example = ""), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "code", value = "订单号", example = ""),
@ApiImplicitParam(type = "form", required = true, dataType = "int", name = "type", value = "1退款单号 2订单号", example = ""), @ApiImplicitParam(type = "form", required = true, dataType = "int", name = "type", value = "1退款单号 2订单号 3大麦单号", example = ""),
}) })
@PostMapping("search/code") @PostMapping("search/code")
public ResponseDto<Object> loginSmsSwitch(@NotNull(message = "订单号不能为空") @RequestParam String code, public ResponseDto<Object> loginSmsSwitch(@NotNull(message = "订单号不能为空") @RequestParam String code,
......
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head> <head>
<th:block th:include="include :: header('订单列表')" /> <th:block th:include="include :: header('订单列表')"/>
</head> </head>
<body class="gray-bg"> <body class="gray-bg">
<div class="container-div"> <div class="container-div">
<div class="row"> <div class="row">
<div class="col-sm-12 search-collapse"> <div class="col-sm-12 search-collapse">
<form id="formId" > <form id="formId">
<div class="select-list"> <div class="select-list">
<ul> <ul>
<li> <li>
<label>订单号:</label> <label>订单号:</label>
<input type="text" name="orderCode"/> <input type="text" name="orderCode"/>
</li> </li>
<li> <li>
<label>演出名称:</label> <label>演出名称:</label>
<input type="text" name="performanceTitle"/> <input type="text" name="performanceTitle"/>
</li> </li>
<li> <li>
<label>电话:</label> <label>电话:</label>
<input type="text" name="userMobile"/> <input type="text" name="userMobile"/>
</li> </li>
<li class="select-time"> <li class="select-time">
<label>支付时间: </label> <label>支付时间: </label>
<input type="text" class="time-input" id="timePayStart" placeholder="开始日期" name="params[beginTime]"/> <input type="text" class="time-input" id="timePayStart" placeholder="开始日期"
<span>-</span> name="params[beginTime]"/>
<input type="text" class="time-input" id="timePayEnd" placeholder="结束日期" name="params[endTime]"/> <span>-</span>
</li> <input type="text" class="time-input" id="timePayEnd" placeholder="结束日期"
<li> name="params[endTime]"/>
<label>第三方:</label> </li>
<div class="col-lg-3"> <li>
<div class="input-group"> <label>第三方:</label>
<input type="text" class="form-control" id="sponsorSelectDiv" name="sponsor"> <div class="col-lg-3">
<div class="input-group-btn"> <div class="input-group">
<button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown"> <input type="text" class="form-control" id="sponsorSelectDiv" name="sponsor">
<span class="caret"></span> <div class="input-group-btn">
</button> <button type="button" class="btn btn-white dropdown-toggle"
<ul class="dropdown-menu dropdown-menu-right" role="menu"> data-toggle="dropdown">
</ul> <span class="caret"></span>
</div> </button>
<ul class="dropdown-menu dropdown-menu-right" role="menu">
</ul>
</div> </div>
</div> </div>
</li> </div>
<li> </li>
<label>支付方式:</label> <li>
<select name="payType" th:with="type=${@dict.getType('zhengzai_pay_type')}"> <label>支付方式:</label>
<option value="">所有</option> <select name="payType" th:with="type=${@dict.getType('zhengzai_pay_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option value="">所有</option>
</select> <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
</li> th:value="${dict.dictValue}"></option>
<li> </select>
<label>订单状态:</label> </li>
<select name="orderStatus" th:with="type=${@dict.getType('zhengzai_order_status')}"> <li>
<option value="">所有</option> <label>订单状态:</label>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <select name="orderStatus" th:with="type=${@dict.getType('zhengzai_order_status')}">
</select> <option value="">所有</option>
</li> <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
<li> th:value="${dict.dictValue}"></option>
<label>客户端:</label> </select>
<select name="orderType" th:with="type=${@dict.getType('zhengzai_order_source')}"> </li>
<option value="">所有</option> <li>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <label>客户端:</label>
</select> <select name="orderType" th:with="type=${@dict.getType('zhengzai_order_source')}">
</li> <option value="">所有</option>
<li> <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
<label>取票方式:</label> th:value="${dict.dictValue}"></option>
<select name="getTicketType" th:with="type=${@dict.getType('zhengzai_get_ticket_type')}"> </select>
<option value="">所有</option> </li>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <li>
</select> <label>取票方式:</label>
</li> <select name="getTicketType" th:with="type=${@dict.getType('zhengzai_get_ticket_type')}">
<li> <option value="">所有</option>
<label>快递状态:</label> <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
<select name="expressStatus" th:with="type=${@dict.getType('zhengzai_express_status')}"> th:value="${dict.dictValue}"></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> </select>
</select> </li>
</li> <li>
<!-- <li>--> <label>快递状态:</label>
<!-- <label>搭售商品:</label>--> <select name="expressStatus" th:with="type=${@dict.getType('zhengzai_express_status')}">
<!-- <select name="tiedType" th:with="type=${@dict.getType('zhengzai_tied_type')}">--> <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>--> th:value="${dict.dictValue}"></option>
<!-- </select>--> </select>
<!-- </li>--> </li>
<li> <!-- <li>-->
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> <!-- <label>搭售商品:</label>-->
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a> <!-- <select name="tiedType" th:with="type=${@dict.getType('zhengzai_tied_type')}">-->
</li> <!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
</ul> <!-- </select>-->
</div> <!-- </li>-->
</form> <li>
</div> <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<!-- <div class="btn-group-sm" id="toolbar" role="group">-->
<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="kylin:tickets:add">-->
<!-- <i class="fa fa-plus"></i> 添加-->
<!-- </a>-->
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="kylin:tickets:edit">-->
<!-- <i class="fa fa-edit"></i> 修改-->
<!-- </a>-->
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="kylin:tickets:remove">-->
<!-- <i class="fa fa-remove"></i> 删除-->
<!-- </a>-->
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="kylin:tickets:export">-->
<!-- <i class="fa fa-download"></i> 导出-->
<!-- </a>-->
<!-- </div>-->
<!-- <div class="btn-group-sm" id="toolbar" role="group">--> <div class="col-sm-12 search-collapse">
<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="kylin:tickets:add">--> <form id="formId2">
<!-- <i class="fa fa-plus"></i> 添加--> <div class="select-list">
<!-- </a>--> <ul>
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="kylin:tickets:edit">--> <li>
<!-- <i class="fa fa-edit"></i> 修改--> <label>短订单号:</label>
<!-- </a>--> <input type="text" name="findCode"/>
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="kylin:tickets:remove">--> </li>
<!-- <i class="fa fa-remove"></i> 删除--> <li>
<!-- </a>--> <a class="btn btn-primary btn-rounded btn-sm" onclick="findCode()"><i
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="kylin:tickets:export">--> class="fa fa-search"></i>&nbsp;查询</a>
<!-- <i class="fa fa-download"></i> 导出--> </li>
<!-- </a>--> <li>
<!-- </div>--> <label>长订单号:</label>
<input type="text" name="allCode" readonly/>
</li>
</ul>
</div>
</form>
</div>
<div class="col-sm-12 search-collapse"> <div class="col-sm-12 search-collapse">
<form id="formId2"> <form id="formId2">
<div class="select-list"> <div class="select-list">
<ul> <ul>
<li> <li>
<label>短订单号:</label> <label>短订单号:</label>
<input type="text" name="findCode"/> <input type="text" name="damaiFindCode"/>
</li> </li>
<li> <li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="findCode()"><i <a class="btn btn-primary btn-rounded btn-sm" onclick="findDamaiCode()"><i
class="fa fa-search"></i>&nbsp;查询</a> class="fa fa-search"></i>&nbsp;查询</a>
</li> </li>
<li> <li>
<label>长订单号:</label> <label>大麦单号:</label>
<input type="text" name="allCode" readonly/> <input type="text" name="damaiAllCode" readonly/>
</li> </li>
</ul> </ul>
</div> </div>
</form> </form>
</div> </div>
<div class="col-sm-12 select-table table-bordered"> <div class="col-sm-12 select-table table-bordered">
<table id="bootstrap-table"></table> <table id="bootstrap-table"></table>
</div>
</div> </div>
</div> </div>
<th:block th:include="include :: footer" /> </div>
<th:block th:include="include :: bootstrap-suggest-js" /> <th:block th:include="include :: footer"/>
<th:block th:include="include :: bootstrap-typeahead-js" /> <th:block th:include="include :: bootstrap-suggest-js"/>
<script th:inline="javascript"> <th:block th:include="include :: bootstrap-typeahead-js"/>
var detailFlag = [[${@permission.hasPermi('kylin:order:orderlist:detail')}]]; <script th:inline="javascript">
var transferFlag = [[${@permission.hasPermi('kylin:order:orderlist:transferInit')}]]; var detailFlag = [[${@permission.hasPermi('kylin:order:orderlist:detail')}]];
var prefix = ctx + "kylin/order/orderList"; var transferFlag = [[${@permission.hasPermi('kylin:order:orderlist:transferInit')}]];
var orderStatusDic = [[${@dict.getType('zhengzai_order_status')}]]; var prefix = ctx + "kylin/order/orderList";
var getTicketTypeDic = [[${@dict.getType('zhengzai_get_ticket_type')}]]; var orderStatusDic = [[${@dict.getType('zhengzai_order_status')}]];
var payTypeDic = [[${@dict.getType('zhengzai_pay_type')}]]; var getTicketTypeDic = [[${@dict.getType('zhengzai_get_ticket_type')}]];
var payTypeDic = [[${@dict.getType('zhengzai_pay_type')}]];
var prefix2 = ctx + "kylin/refund"; var prefix2 = ctx + "kylin/refund";
function findCode() { function findCode() {
var shortCode = document.getElementsByName("findCode")[0].value; var shortCode = document.getElementsByName("findCode")[0].value;
var allCode = document.getElementsByName("allCode")[0]; var allCode = document.getElementsByName("allCode")[0];
$.operate.get(prefix2 + "/search/code?code=" + shortCode + "&type=2", function (res) { $.operate.get(prefix2 + "/search/code?code=" + shortCode + "&type=2", function (res) {
allCode.value = res.msg; allCode.value = res.msg;
}); });
} }
$(function() { function findDamaiCode() {
var options = { var shortCode = document.getElementsByName("damaiFindCode")[0].value;
url: prefix + "/list", var allCode = document.getElementsByName("damaiAllCode")[0];
detailUrl: prefix + "/detail/{id}", $.operate.get(prefix2 + "/search/code?code=" + shortCode + "&type=3", function (res) {
exportUrl: prefix + "/export", allCode.value = res.msg;
modalName: "订单", });
columns: [{ }
checkbox: true
}, $(function () {
var options = {
url: prefix + "/list",
detailUrl: prefix + "/detail/{id}",
exportUrl: prefix + "/export",
modalName: "订单",
columns: [{
checkbox: true
},
{ {
field: 'sponsor', field: 'sponsor',
title: '第三方' title: '第三方'
...@@ -178,21 +217,21 @@ ...@@ -178,21 +217,21 @@
{ {
field: 'status', field: 'status',
title: '订单状态', title: '订单状态',
formatter: function(value, row, index) { formatter: function (value, row, index) {
return $.table.selectDictLabel(orderStatusDic, value); return $.table.selectDictLabel(orderStatusDic, value);
} }
}, },
{ {
field: 'getTicketType', field: 'getTicketType',
title: '取票方式', title: '取票方式',
formatter: function(value, row, index) { formatter: function (value, row, index) {
return $.table.selectDictLabel(getTicketTypeDic, value); return $.table.selectDictLabel(getTicketTypeDic, value);
} }
}, },
{ {
field: 'payType', field: 'payType',
title: '支付方式', title: '支付方式',
formatter: function(value, row, index) { formatter: function (value, row, index) {
return $.table.selectDictLabel(payTypeDic, value); return $.table.selectDictLabel(payTypeDic, value);
} }
}, },
...@@ -231,34 +270,34 @@ ...@@ -231,34 +270,34 @@
{ {
title: '操作', title: '操作',
align: 'center', align: 'center',
formatter: function(value, row, index) { formatter: function (value, row, index) {
var actions = []; var actions = [];
actions.push('<a class="btn btn-warning btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.orderTicketsId + '\')"><i class="fa fa-search"></i>详细</a>'); actions.push('<a class="btn btn-warning btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.orderTicketsId + '\')"><i class="fa fa-search"></i>详细</a>');
// actions.push('<a class="btn btn-warning btn-xs ' + transferFlag + '" href="javascript:void(0)" onclick="f(\'' + row.orderTicketsId + '\')"><i class="fa fa-search"></i>初始化</a>'); // actions.push('<a class="btn btn-warning btn-xs ' + transferFlag + '" href="javascript:void(0)" onclick="f(\'' + row.orderTicketsId + '\')"><i class="fa fa-search"></i>初始化</a>');
return actions.join(''); return actions.join('');
} }
}] }]
}; };
$.table.init(options); $.table.init(options);
}); });
var sponsorSelectDiv = $("#sponsorSelectDiv").bsSuggest({ var sponsorSelectDiv = $("#sponsorSelectDiv").bsSuggest({
url: prefix + "/getSponsorList", url: prefix + "/getSponsorList",
idField: "sponsorId", idField: "sponsorId",
keyField: "sponsorName" keyField: "sponsorName"
}).on('onDataRequestSuccess', function (e, result) { }).on('onDataRequestSuccess', function (e, result) {
console.log('onDataRequestSuccess: ', result); console.log('onDataRequestSuccess: ', result);
}).on('onSetSelectValue', function (e, keyword) { }).on('onSetSelectValue', function (e, keyword) {
console.log('onSetSelectValue: ', keyword); console.log('onSetSelectValue: ', keyword);
}).on('onUnsetSelectValue', function (e) { }).on('onUnsetSelectValue', function (e) {
console.log("onUnsetSelectValue"); console.log("onUnsetSelectValue");
}); });
function f(id) { function f(id) {
$.post(prefix + "/initTransfer",{orderId:id},function (res) { $.post(prefix + "/initTransfer", {orderId: id}, function (res) {
alert(res.msg) alert(res.msg)
}); });
} }
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -13,6 +13,7 @@ import com.liquidnet.client.admin.common.utils.DateUtils; ...@@ -13,6 +13,7 @@ import com.liquidnet.client.admin.common.utils.DateUtils;
import com.liquidnet.client.admin.common.utils.ShiroUtils; import com.liquidnet.client.admin.common.utils.ShiroUtils;
import com.liquidnet.commons.lang.util.BeanUtil; import com.liquidnet.commons.lang.util.BeanUtil;
import com.liquidnet.commons.lang.util.JsonUtils; import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.commons.lang.util.StringUtil;
import com.liquidnet.service.base.ErrorMapping; import com.liquidnet.service.base.ErrorMapping;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.kylin.constant.KylinTableStatusConst; import com.liquidnet.service.kylin.constant.KylinTableStatusConst;
...@@ -33,6 +34,7 @@ import com.liquidnet.service.kylin.service.IKylinOrderRefundsService; ...@@ -33,6 +34,7 @@ import com.liquidnet.service.kylin.service.IKylinOrderRefundsService;
import com.mongodb.BasicDBObject; import com.mongodb.BasicDBObject;
import com.mongodb.client.result.UpdateResult; import com.mongodb.client.result.UpdateResult;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
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;
...@@ -558,6 +560,14 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM ...@@ -558,6 +560,14 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
} else { } else {
orderCode = data.getOrderCode(); orderCode = data.getOrderCode();
} }
} else if (type == 3) {
KylinOrderTickets data = kylinOrderTicketsMapper.selectOne(new UpdateWrapper<KylinOrderTickets>().like("order_code", code));
if (data == null) {
return null;
} else {
String orderId = data.getOrderTicketsId();
orderCode = StringUtils.left(orderId, 5).concat(StringUtils.right(orderId, 8));
}
} }
} catch (Exception e) { } catch (Exception e) {
......
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