瀏覽代碼

修改了优惠券和提现页面信息

liuzhiwei 7 年之前
父節點
當前提交
08bb987ae8

+ 2 - 2
tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/agentInfoMapper.xml

@@ -263,10 +263,10 @@
         tb_iamberry_agent_agentinfo
         <where>
             <if test="agentName != null">
-                and agent_name = #{agentName}
+                and agent_name LIKE CONCAT('%',#{agentName},'%')
             </if>
             <if test="agentTel!=null and agentTel!=''">
-                and agent_tel = #{agentTel}
+                and agent_tel LIKE CONCAT('%',#{agentTel},'%')
             </if>
             <if test="agentRoleId!=null and agentRoleId!=''">
                 and agent_role_id = #{agentRoleId}

+ 7 - 1
tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/agentPurchaseOrderMapper.xml

@@ -163,6 +163,9 @@
           <if test="agentOrderid != null and agentOrderid != ''">
               o.agent_orderid = #{agentOrderid}
           </if>
+          <if test="agentId != null and agentId != ''">
+              and a.agent_id = #{agentId}
+          </if>
           <if test="agentName != null and agentName != ''">
               and a.agent_name like CONCAT('%',#{agentName},'%')
           </if>
@@ -246,6 +249,9 @@
             <if test="agentOrderid != null and agentOrderid != ''">
                 o.agent_orderid = #{agentOrderid}
             </if>
+            <if test="agentId != null and agentId != ''">
+                and a.agent_id = #{agentId}
+            </if>
             <if test="agentName != null and agentName != ''">
                 and a.agent_name like CONCAT('%',#{agentName},'%')
             </if>
@@ -278,7 +284,7 @@
         tb_iamberry_order_hint
       <where>
           <if test="hintTime != null and hintTime != ''">
-              date_format(hint_time, '%Y-%m-%d') = date_format(#{hintTime}, '%Y-%m-%d')
+              date_format(hint_time, '%Y-%m-%d') <![CDATA[ <= ]]> date_format(#{hintTime}, '%Y-%m-%d')
           </if>
           <if test="hintStatus != null and hintStatus != ''">
               and hint_status = #{hintStatus}

+ 1 - 1
tooth-wechat-web/src/main/java/com/iamberry/wechat/handles/admin/AdminAgentToothHandler.java

@@ -545,7 +545,7 @@ public class AdminAgentToothHandler {
                     .replaceFirst("orderIdValueOrder", orderId)
                     .replaceFirst("orderValuePackageId", SendMessageUtil.hashmap.get(map.get("postFirm")) + ":" + map.get("postNum"))
                     .replaceFirst("orderRemarkValue", ResultInfo.INTOSHOP);
-            sendMessageUtil.sendTemplateMessageToOpenid(data, agentOrder.getAgentOpenId(), ResultInfo.PAGE_SHIPMENT + orderId, 2);
+            sendMessageUtil.sendTemplateMessageToOpenid(data, agentOrder.getAgentOpenId(), "", 2);
         }
 
         msg.setMessage(NameUtils.getConfig("SUCCESSINFO"));

+ 4 - 2
tooth-wechat-web/src/main/java/com/iamberry/wechat/handles/agentInfo/AgentToothHandler.java

@@ -177,9 +177,11 @@ public class AgentToothHandler {
         //查询代理商信息
         List<AgentTooth> toothList = agentInfoService.selectAllAgentinfo(tooth);
         if (toothList == null || toothList.size() == 0) {
-            req.getRequestDispatcher(NameUtils.getConfig("WECHAT_AGENT_TOOT_ACTIVATE")).forward(req, res);
+            res.sendRedirect(NameUtils.getConfig("WECHAT_AGENT_TOOT_ACTIVATE"));
+            //req.getRequestDispatcher(NameUtils.getConfig("WECHAT_AGENT_TOOT_ACTIVATE")).forward(req, res);
         } else {
-            req.getRequestDispatcher(NameUtils.getConfig("WECHAT_AGENT_TOOT_CENTER")).forward(req, res);
+            res.sendRedirect(NameUtils.getConfig("WECHAT_AGENT_TOOT_CENTER"));
+            //req.getRequestDispatcher(NameUtils.getConfig("WECHAT_AGENT_TOOT_CENTER")).forward(req, res);
         }
     }
 }

+ 11 - 0
tooth-wechat-web/src/main/java/com/iamberry/wechat/handles/coupon/CouponTypeHandler.java

@@ -128,6 +128,17 @@ public class CouponTypeHandler {
 				it.remove();
 				continue;
 			}
+			//如果有来源限制,则不在该来源范围内的不能领取优惠券
+			if (cType.getCouponIsSource() == 1 && StringUtils.isNotEmpty(cType.getCouponSourceName())) {
+				// 当前路径,相对于应用路径,不包括参数
+				String referer = req.getHeader("referer");
+				if (referer.indexOf(cType.getCouponSourceName()) < 0) {
+					it.remove();
+					continue;
+				}
+			}
+
+
 			// 当前用户已领取且时间为一个月以内
 			for (CouponItemDto cItem : itemList) {
 				if (cType.getCouponId() != null

+ 13 - 0
tooth-wechat-web/src/main/java/com/iamberry/wechat/handles/drp/DrpWeChatHandler.java

@@ -7,12 +7,14 @@ import com.iamberry.wechat.core.entity.WechatUtils;
 import com.iamberry.wechat.core.entity.admin.ShopSystemRule;
 import com.iamberry.wechat.core.entity.drp.ApplyPlaceLogs;
 import com.iamberry.wechat.core.entity.drp.PlaceInfo;
+import com.iamberry.wechat.core.entity.drp.PlaceWithDrawalsLogs;
 import com.iamberry.wechat.core.entity.member.Member;
 import com.iamberry.wechat.core.entity.reback.RebackInfo;
 import com.iamberry.wechat.core.entity.statictics.MarketInfo;
 import com.iamberry.wechat.core.entity.statictics.SalesmanInfo;
 import com.iamberry.wechat.face.admin.SystemService;
 import com.iamberry.wechat.face.drp.PlaceInfoService;
+import com.iamberry.wechat.face.drp.PlaceWithDrawalsLogsService;
 import com.iamberry.wechat.face.member.MemberService;
 import com.iamberry.wechat.face.order.AdminOrderService;
 import com.iamberry.wechat.face.reback.RebackServices;
@@ -60,6 +62,8 @@ public class DrpWeChatHandler {
 	private SystemService systemService;
 	@Autowired
 	private RebackServices rebackServices;
+	@Autowired
+	private PlaceWithDrawalsLogsService placeWithDrawalsLogsService;
 
 
 	/**
@@ -468,6 +472,15 @@ public class DrpWeChatHandler {
 		//根据placeinfoID查询是否存在二维码
 		Integer isqrcode = placeInfoService.getIsQrCode(String.valueOf(placeInfo.getId()));
 
+		//查询代理商提现记录
+		Map<String,Object> logMap = placeWithDrawalsLogsService.HistoryRecords(member.getUserOpenid());
+		List<PlaceWithDrawalsLogs> logList = (List<PlaceWithDrawalsLogs>)logMap.get("list");
+		if (logList == null || logList.size() == 0) {
+			map.put("isFlag",false);
+		} else {
+			map.put("isFlag",true);
+		}
+
 		map.put("money",placeInfo.getAmount());					//可用金额
 		map.put("activateNum",placeMap.get("activateNum"));		//商户:激活数量,用户:未购买数量
 		map.put("rebackMoney",placeMap.get("rebackMoney"));		//待返金额

+ 2 - 2
tooth-wechat-web/src/main/resources/platform.properties

@@ -90,9 +90,9 @@ WECHAT_SHOP_PRODUCT_LIST=/WEB-INF/views/wechat/chanpin_list.html
 # wechat_cash_log_list
 WECHAT_CASH_LOG_LIST=/WEB-INF/views/wechat/cash_log.html
 
-WECHAT_AGENT_TOOT_ACTIVATE=/view/agent_tooth/activate_agent_id.html
+WECHAT_AGENT_TOOT_ACTIVATE=/tooth/view/agent_tooth/activate_agent_id.html
 
-WECHAT_AGENT_TOOT_CENTER=/view/agent_tooth/agent_center.html
+WECHAT_AGENT_TOOT_CENTER=/tooth/view/agent_tooth/agent_center.html
 
 WECHAT_UPDATE_TOOTH_HINT=http://test.iamberry.com/tooth/view/agent_tooth/replace_point.html?hintId=
 

+ 2 - 2
tooth-wechat-web/src/main/webapp/WEB-INF/views/admin/agentInfo/addAgentConfig.jsp

@@ -105,7 +105,7 @@
                     $.each(color_list, function(i,item){
                         var li = document.createElement('li');
                         li.innerHTML = '<input disabled="disabled" class="input-text" placeholder="请输入产品优惠价" style="width: 150px;" type="text" id="price' + i + '" index="' + i + '" />&nbsp;&nbsp;&nbsp;&nbsp;'
-                            + '<input id="che_product'+ i +'" type="checkbox" index="' + i + '" name="che_product" value="'+item.colorId+'" onclick="write_price('+ i +')"/>' + item.colorProductName;
+                            + '<input id="che_product'+ i +'" type="checkbox" index="' + i + '" name="che_product" value="'+item.colorId+'" onclick="write_price('+ i +')"/>' + item.colorProductName + "(" + item.colorName + ")";
                         table.appendChild(li);
                     });
                 }else{
@@ -127,6 +127,7 @@
 
     function checkValue () {
         var flag = true;
+        product_color = '';
         var che_product = document.getElementsByName('che_product');
         for(var i=0; i<che_product.length; i++){
             if(che_product[i].checked){
@@ -149,7 +150,6 @@
                 product_color+=che_product[i].value+':'+price+',';
             }
         }
-        console.log(product_color);
         return flag;
     }
 

+ 2 - 2
tooth-wechat-web/src/main/webapp/WEB-INF/views/admin/agentInfo/updateAgentConfig.jsp

@@ -120,10 +120,10 @@
                         var li = document.createElement('li');
                         if (config.colorId == item.colorId) {
                             li.innerHTML = '<input class="input-text" style="width: 150px;" placeholder="请输入产品优惠价" type="text" id="price' + i + '" index="' + i + '" value="' + config.configAmount/100 + '" />&nbsp;&nbsp;&nbsp;&nbsp;'
-                                + '<input id="che_product'+ i +'" type="radio" index="' + i + '" name="che_product" value="'+item.colorId+'" onclick="write_price('+ i +')" checked="checked"/>' + item.colorProductName;
+                                + '<input id="che_product'+ i +'" type="radio" index="' + i + '" name="che_product" value="'+item.colorId+'" onclick="write_price('+ i +')" checked="checked"/>' + item.colorProductName  + "(" + item.colorName + ")";
                         } else {
                             li.innerHTML = '<input disabled="disabled" class="input-text" style="width: 150px;" placeholder="请输入产品优惠价" type="text" id="price' + i + '" index="' + i + '" />&nbsp;&nbsp;&nbsp;&nbsp;'
-                                + '<input id="che_product'+ i +'" type="radio" index="' + i + '" name="che_product" value="'+item.colorId+'" onclick="write_price('+ i +')"/>' + item.colorProductName;
+                                + '<input id="che_product'+ i +'" type="radio" index="' + i + '" name="che_product" value="'+item.colorId+'" onclick="write_price('+ i +')"/>' + item.colorProductName  + "(" + item.colorName + ")";
                         }
                         table.appendChild(li);
                     });

+ 5 - 5
tooth-wechat-web/src/main/webapp/WEB-INF/views/admin/main/index.jsp

@@ -36,13 +36,13 @@
 <script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
 <script>DD_belatedPNG.fix('*');</script>
 <![endif]-->
-<title>后台登录 - 上海WaterO微商场管理系统</title>
-<meta name="keywords" content="上海WaterO微商场管理系统">
+<title>后台登录 - 上微商场管理系统</title>
+<meta name="keywords" content="上微商场管理系统">
 </head>
 <body>
 	<header class="Hui-header cl">
-		<a class="Hui-logo l" title="上海WaterO微商场管理系统" href="#">上海WaterO微商场管理系统</a>
-		<a class="Hui-logo-m l" href="#" title="上海WaterO微商场管理系统">上海WaterO微商场管理系统</a>
+		<a class="Hui-logo l" title="上朵微商场管理系统" href="#">上朵微商场管理系统</a>
+		<a class="Hui-logo-m l" href="#" title="上朵微商场管理系统">上朵微商场管理系统</a>
 		<span class="Hui-subtitle l">V1.0</span>
 		<%-- 快捷操作 --%>
 		<nav class="mainnav cl" id="Hui-nav">
@@ -51,7 +51,7 @@
 		</nav>
 		<%-- 管理员个人信息 --%>
 		<ul class="Hui-userbar">
-			<li>上海WaterO管理员</li>
+			<li>上管理员</li>
 			<li class="dropDown dropDown_hover"><a href="#"
 				class="dropDown_A">${login_admin_userinfo.adminLoginName } <i class="Hui-iconfont">&#xe6d5;</i></a>
 				<ul class="dropDown-menu radius box-shadow">

+ 2 - 2
tooth-wechat-web/src/main/webapp/WEB-INF/views/admin/main/login.jsp

@@ -25,8 +25,8 @@
 <script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
 <script>DD_belatedPNG.fix('*');</script>
 <![endif]-->
-<title>后台登录 - 上海WaterO微商场管理系统</title>
-<meta name="keywords" content="上海WaterO微商场管理系统">
+<title>后台登录 - 上微商场管理系统</title>
+<meta name="keywords" content="上微商场管理系统">
 </head>
 <body onkeydown="keyLogin(event);">
 

+ 2 - 2
tooth-wechat-web/src/main/webapp/common/other/kingedit/jsp/upload_json.jsp

@@ -12,9 +12,9 @@ String saveServerPath = "/common/images/uploadimages/";
 // hostname
 String hostName = "";
 if (request.getRequestURL().indexOf("localhost") == -1) {
-	hostName = "http://test.iamberry.com";
+	hostName = "https://w.iamberry.com";
 } else {
-	hostName = "http://localhost:" + request.getLocalPort();
+	hostName = "https://localhost:" + request.getLocalPort();
 }
 //文件保存目录路径
 String savePath = pageContext.getServletContext().getRealPath(saveServerPath);

+ 3 - 2
tooth-wechat-web/src/main/webapp/common/shop/js/page/fenxiao_center3.js

@@ -1,4 +1,4 @@
-var pageNumber = 0,pageSize=10;
+var pageNumber = 0,pageSize=10,isFlag=false;
 
 //初始化mui
 mui.init({
@@ -17,7 +17,7 @@ mui.init({
 $(function(){
     //添加鼠标点击事件
     $(document).on('tap', '#tixian', function() {
-        if($("#money").html() == 0){
+        if($("#money").html() == 0 && !isFlag){
             mui.alert("您的余额不能提现哦!");
         }else{
             tixian();
@@ -64,6 +64,7 @@ mui.ready(function() {
                             $("#userType").val(2);  //用于判断 - 查询用户页面
                             break;
                     }
+                    isFlag = data.isFlag;
                     $('#money').html(accDiv(data.money, 100));
                     $('#rebackMoney').html(accDiv(data.rebackMoney, 100));
                     $('#userNum').html(data.userNum);

+ 3 - 5
tooth-wechat-web/src/main/webapp/view/agent_tooth/agent_center.html

@@ -324,11 +324,9 @@ mui.each(document.querySelectorAll('#tabbar-chart-bar .mui-control-item'), funct
                                                     .alert("对不起,支付失败!请稍后重试!"
                                                         + dt.data.orderId
                                                         + "支付失败!");
-                                                window.location.href = "/tooth/pay/goOrderInfo?orderId="
-                                                    + dt.data.orderId
-                                                    + "&dates="
-                                                    + new Date()
-                                                        .getTime();
+                                                mui.openWindow({
+                                                    url: '/tooth/view/agent_tooth/agent_center.html'
+                                                })
                                                 ;
                                             }
                                         })