Sfoglia il codice sorgente

优化订单查询openid

xubh 4 anni fa
parent
commit
b65e5ff1c8

+ 2 - 0
src/main/java/com/minpay/shouhuo/ShOrderManageAction.java

@@ -247,6 +247,7 @@ public class ShOrderManageAction implements IMINAction {
 			@MINParam(key = "gameRule") String gameRule,
 			@MINParam(key = "deliveryId") String deliveryId,
 			@MINParam(key = "pickupStt") String pickupStt,
+			@MINParam(key = "openId") String openId,
 			MINHttpServletRequestContext fapRequest
 	) throws MINBusinessException {
 		MINActionResult res = new MINActionResult();
@@ -267,6 +268,7 @@ public class ShOrderManageAction implements IMINAction {
 		p.put("gameRule", gameRule);
 		p.put("deliveryId", deliveryId);
 		p.put("pickupStt", pickupStt);
+		p.put("openId", openId);
 		User user = session.getUser();
 		if(!user.getBranchId().equals(Constant.ADMINISTRATION_SYSTEM_NUMBER)){
 			p.put("branchId", user.getBranchId());

+ 7 - 0
src/main/resources/com/minpay/db/table/own/mapper/ShOrderMapper.xml

@@ -158,6 +158,9 @@
 		<if test="branchId != null and branchId != ''">
 			and a.VOI_BRANCHID = #{branchId,jdbcType=VARCHAR}
 		</if>
+		<if test="openId != null and openId != ''">
+			and b.VCI_OPENID = #{openId,jdbcType=VARCHAR}
+		</if>
 		order by  d.VOD_CREATE_TIME desc
 	</select>
 
@@ -177,6 +180,7 @@
 		a.VOI_GAME_RULE			"gameRule",
 		d.VOD_IS_DELIVERY		"pickupStt",
 		b.VCI_NAME  			"personName",
+		b.VCI_OPENID  			"openId",
 		d.VOD_IS_WINNING		"isDraw"
 		FROM vm_order_details d LEFT JOIN   vm_order_inf a  ON d.VOD_ORDER_ID = a.VOI_ID
 		LEFT JOIN  vm_equipment_inf c ON a.VOI_EQUIPMENT_ID = c.VEQ_ID
@@ -229,6 +233,9 @@
 		<if test="branchId != null and branchId != ''">
 			and a.VOI_BRANCHID = #{branchId,jdbcType=VARCHAR}
 		</if>
+		<if test="openId != null and openId != ''">
+			and b.VCI_OPENID = #{openId,jdbcType=VARCHAR}
+		</if>
 		order by  d.VOD_CREATE_TIME desc
 	</select>
 

+ 34 - 13
src/main/webapp/admin/orderManage/orderManage.html

@@ -39,7 +39,7 @@
 			</div>
 
 			<div class="layui-inline">
-				<input onchange = "changeSelectCon(4,this,'inp')"   class="search-select" type="tel" name="playerName"  id ="playerName" lay-verify="playerName"  autocomplete="off" placeholder="请输入玩家名称" class="layui-input">
+				<input onchange = "changeSelectCon(4,this,'inp')"   class="search-select" type="tel" name="openId"  id ="openId" lay-verify="openId"  autocomplete="off" placeholder="请输入openId" class="layui-input">
 			</div>
 			<div class="layui-inline">
 				<input onchange = "changeSelectCon(5,this,'inp')"   class="search-select" type="tel" name="freightwayId"  id ="freightwayId" lay-verify="freightwayId"  autocomplete="off" placeholder="请输入货道号" class="layui-input">
@@ -92,9 +92,9 @@
 <script src="../../js/min-loader-next.js"></script>
 <script type="text/html" id="barDemo">
 	<!--<a class="layui-btn layui-btn-xs" lay-event="look">订单详情</a>-->
-	{{#  if(d.state == '00' && d.pickupStt == '00' ){ }}
+	<!--{{#  if(d.state == '00' && d.pickupStt == '00' ){ }}
 	<a class="layui-btn layui-btn-xs" lay-event="cancel">作废</a>
-	{{#  } }}
+	{{#  } }}-->
 </script>
 <script>
 	$("#toggle").click(function() {
@@ -102,13 +102,15 @@
 				"<i class='iconfont up iconSelect_drop-down'/></i>");
 		$("#content").slideToggle();
 	});
+	var ss = nowtime()+" - "+nowtime();
 	layui.use(['table','laydate','form'], function(){
 		var laydate = layui.laydate;
 		//日期范围
 		laydate.render({
 			elem: '#dates'
 			,range: true
-			,format:'yyyyMMdd'
+			,format:'yyyyMMdd',
+			value: ss
 			,done: function(value, date, endDate){
 				changeSelectCon(1,"dates",'date',value)
 			}
@@ -149,25 +151,26 @@
 			// ,height: 315
 			,url: 'ShOrderManageAction/queryOrderNew' //数据接口
 			,method: 'post'
-			,where:{MINView:"JSON","state":"00"}
+			,where:{MINView:"JSON","state":"00","dates":ss}
 			,page: true //开启分页
 			,cols: [[ //表头
 				{field:'num', title: '序号',width:'5%', type:'numbers', fixed: true, align: 'center'}
-				,{field: 'id', title: '订单号', width:'8%', sort: true, fixed: 'left'}
-				,{field: 'deliveryId', title: '提货编号', width:'10%'}
+				,{field: 'id', title: '订单号', width:'14%', sort: true, fixed: 'left'}
+				,{field: 'deliveryId', title: '提货编号', width:'8%'}
 				,{field: 'productName', title: '商品名称', width:'10%'}
-				,{field: 'orderAmt', title: '订单价格', width:'8%'}
+				,{field: 'orderAmt', title: '订单价格', width:'6%'}
 				,{field: 'costPrice', title: '成本', width:'5%'}
 				/*,{field: 'equipmentId', title: '机器编号', width:'8%'}*/
 				,{field: 'imeiAddr', title: '设备编号', width:'6%'}
 				,{field: 'aisle', title: '货道编号', width:'6%'}
+				,{field: 'openId', title: 'openId', width:'20%'}
 				,{field: 'personName', title: '消费者信息', width:'8%'}
 				,{field: 'statedesc', title: '支付状态', width:'6%'}
 				,{field: 'isDrawdesc', title: '是否中奖', width:'6%'}
 				,{field: 'pickupSttdesc', title: '取货状态', width:'6%'}
 				,{field: 'payModedesc', title: '支付类型', width:'6%'}
 				,{field: 'createTime', title: '创建时间', width: '12%'}
-				,{field: 'operate', title: '操作', width: '8%', toolbar: '#barDemo',fixed: 'right'}
+				/*,{field: 'operate', title: '操作', width: '8%', toolbar: '#barDemo',fixed: 'right'}*/
 			]]
 			,done: function(res, curr, count){
 				//如果是异步请求数据方式,res即为你接口返回的信息。
@@ -265,7 +268,7 @@
 		//订单号
 		var orderNo = $("#orderNo").val();
 		var equipmentId = $("#equipmentId").val();
-		var playerName = $("#playerName").val();
+		var openId = $("#openId").val();
 		var freightwayId = $("#freightwayId").val();
 		var productName = $("#productName").val();
 		var deliveryId = $("#deliveryId").val();
@@ -287,7 +290,7 @@
 				state : state,
 				dates : dates,
 				equipmentId : equipmentId,
-				playerName : playerName,
+				openId : openId,
 				freightwayId : freightwayId,
 				payMode : payMode,
 				isDraw:isDraw,
@@ -330,7 +333,7 @@
 			}
 		}
 	}
-	var array = new Array('订单编号','创建时间','支付状态','设备编号','玩家名称','货道号','支付方式','商品名称','购买方式','出货状态','是否中奖','提货编号');
+	var array = new Array('订单编号','创建时间','支付状态','设备编号','openId','货道号','支付方式','商品名称','购买方式','出货状态','是否中奖','提货编号');
 	function getSelectConHtml(index, t, type,dateValue){
 		var name;
 		var value;
@@ -338,7 +341,7 @@
 			value = t.value.substr(0,5)+"..";
 		}
 		if (type == "date") {
-			value = dateValue;
+			value =  ss;
 		}
 		if(type == "sel"){
 			if(index == '2'){
@@ -386,6 +389,24 @@
 			$(t).remove();
 		}
 	}
+	function nowtime(){//将当前时间转换成yyyymmdd格式
+		var mydate = new Date();
+		var str = "" + mydate.getFullYear();
+		var mm = mydate.getMonth()+1
+		if(mydate.getMonth()>9){
+			str += mm;
+		}
+		else{
+			str += "0" + mm;
+		}
+		if(mydate.getDate()>9){
+			str += mydate.getDate();
+		}
+		else{
+			str += "0" + mydate.getDate();
+		}
+		return str;
+	}
 </script>
 
 </html>