Bläddra i källkod

特殊供应商bugfix

zhijiezhao 3 år sedan
förälder
incheckning
eb7021f342

+ 5 - 5
src/main/java/com/caimei/modules/user/entity/NewCmShop.java

@@ -82,7 +82,7 @@ public class NewCmShop extends DataEntity<NewCmShop> {
     private String socialCreditCode; //统一社会信用代码
     private Integer shopType;//供应商类别,普通1,新品供应商2,二手供应商3
     private String cardNumber; //收款卡号
-    private Integer commIssion;
+    private Integer chargeSupport;//线上支付手续费:默认1采美承担,2供应商承担
     /**
      * 非持久化字段
      **/
@@ -1056,11 +1056,11 @@ public class NewCmShop extends DataEntity<NewCmShop> {
         this.wxApplets = wxApplets;
     }
 
-    public Integer getCommIssion() {
-        return commIssion;
+    public Integer getChargeSupport() {
+        return chargeSupport;
     }
 
-    public void setCommIssion(Integer commIssion) {
-        this.commIssion = commIssion;
+    public void setChargeSupport(Integer chargeSupport) {
+        this.chargeSupport = chargeSupport;
     }
 }

+ 0 - 2
src/main/java/com/caimei/modules/user/web/NewCmShopController.java

@@ -573,8 +573,6 @@ public class NewCmShopController extends BaseController {
     @RequestMapping(value = "save")
     public String save(NewCmShop newCmShop, Model model, RedirectAttributes redirectAttributes) {
         NewCmShop newCmShops = cmOperationalLogService.shoplist(newCmShop.getShopID());
-        System.out.println("修改前》》》》》"+newCmShop);
-        System.out.println("修改后》》》》》"+newCmShops);
         ArrayList<String> list = new ArrayList();
 
         CmOperationalLogs sysLog = new CmOperationalLogs();

+ 6 - 2
src/main/resources/mappings/modules/user/NewCmShopMapper.xml

@@ -59,7 +59,7 @@
 		u.source AS "source",
 		a.shopType AS "shopType",
 		a.cardNumber AS "cardNumber",
-        a.commIssion AS "commIssion",
+		a.chargeSupport AS "chargeSupport",
 		d.name AS "province",c.name AS "city",b.name AS "town"
 	</sql>
 
@@ -275,11 +275,15 @@
 	<update id="update">
 		UPDATE shop
 		<set>
+			<if test="name != null and name != ''" >
 			name = #{name},
+			</if>
 		    website = #{website},
 			wxOfficialAccount = #{wxOfficialAccount},
 			wxApplets = #{wxApplets},
-			commIssion=#{commIssion},
+			<if test="chargeSupport != null" >
+				chargeSupport=#{chargeSupport},
+			</if>
 			<if test="sname != null and sname != ''" >
 				sname = #{sname},
 			</if>

+ 25 - 27
src/main/webapp/WEB-INF/views/modules/user/cmNewProductShopEdit.jsp

@@ -29,7 +29,9 @@
 <body>
 <ul class="nav nav-tabs">
     <li><a href="${ctx}/user/newCmShop/special/new">新品供应商</a></li>
-    <li class="active"><a href="${ctx}/user/newCmShop/special/new/edit?id=${newCmShop.shopID}&shopType=${newCmshop.shopType}">${not empty newCmShop.shopID?'编辑':'添加'}特殊供应商</a></li>
+    <li class="active"><a
+            href="${ctx}/user/newCmShop/special/new/edit?id=${newCmShop.shopID}&shopType=${newCmshop.shopType}">${not empty newCmShop.shopID?'编辑':'添加'}特殊供应商</a>
+    </li>
 </ul>
 <br/>
 <form:form id="inputForm" modelAttribute="newCmShop" action="${ctx}/user/newCmShop/special/new/save" method="post"
@@ -55,7 +57,7 @@
                 ${newCmShop.linkMan}
             </c:if>
             <c:if test="${newCmShop.shopType eq 2}">
-            <form:input path="linkMan" htmlEscape="false" maxlength="6" class="input-xlarge required"/>
+                <form:input path="linkMan" htmlEscape="false" maxlength="6" class="input-xlarge required"/>
             </c:if>
         </div>
     </div>
@@ -66,20 +68,21 @@
                 ${newCmShop.contractMobile}
             </c:if>
             <c:if test="${newCmShop.shopType eq 2}">
-            <form:input path="contractMobile" htmlEscape="false" type="number" maxlength="11" class="input-xlarge required"/>
+                <form:input path="contractMobile" htmlEscape="false" type="number" maxlength="11"
+                            class="input-xlarge required"/>
             </c:if>
         </div>
     </div>
     <div class="control-group">
         <c:if test="${newCmShop.shopType eq 2}">
-        <label class="control-label"><font color="red">*</font>状态:</label>
-        <div class="controls">
-            <form:select path="status" class="input-xlarge required">
-                <form:option value="" label="请选择"/>
-                <form:option value="90" label="已上线" selected="selected" htmlEscape="false"/>
-                <form:option value="91" label="已下线" htmlEscape="false"/>
-            </form:select>
-        </div>
+            <label class="control-label"><font color="red">*</font>状态:</label>
+            <div class="controls">
+                <form:select path="status" class="input-xlarge required">
+                    <form:option value="" label="请选择"/>
+                    <form:option value="90" label="已上线" selected="selected" htmlEscape="false"/>
+                    <form:option value="91" label="已下线" htmlEscape="false"/>
+                </form:select>
+            </div>
         </c:if>
         <c:if test="${newCmShop.shopType eq 3}">
             <label class="control-label"><font color="red">*</font>收款卡号:</label>
@@ -88,6 +91,13 @@
             </div>
         </c:if>
     </div>
+    <div class="control-group">
+        <label class="control-label"><font color="red">*</font>线上支付手续费:</label>
+        <div class="controls">
+            <form:radiobutton path="chargeSupport" value="1" label="采美承担" checked="true"/>
+            <form:radiobutton path="chargeSupport" value="2" label="供应商承担"/>
+        </div>
+    </div>
     <div class="control-group">
         <tr>
             <th><b>分账商户号:</b></th>
@@ -114,19 +124,7 @@
                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<button
                     class="addParams" onclick="return false">添加分帐号
             </button>
-        </td>
-<td>
-</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-    <strong>线上支付手续费:</strong>
-
-    <c:if test="${empty newCmShop.commIssion || newCmShop.commIssion==0}">
-        <input type="radio" checked="checked" name="commIssion" value="0"  class="required" />采美承担
-        <input type="radio" name="commIssion" value="1" class="required" />供应商承担
-    </c:if>
-    <c:if test="${newCmShop.commIssion==1}">
-        <input type="radio"  name="commIssion" value="0"  class="required" />采美承担
-        <input type="radio" checked="checked" name="commIssion" value="1" class="required" />供应商承担
-    </c:if></td>
+            </td>
         </tr>
     </div>
 
@@ -144,9 +142,9 @@
         // alertx("+++++"+val.length)         splitCodes[${varIndex.index}].splitCode
         productParametersIndex++;
         var html = '<div id="paramsItem" class="paramsItem">';
-        html += '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="splitCodes[' + [productParametersIndex] + '].splitCode" id="splitCode" maxlength="8" placeholder="请输入分帐商户号" type="text" class="input-small"/>&nbsp;';
-        html += '<input name="splitCodes[' + [productParametersIndex] + '].email" id="email" maxlength="10" placeholder="请输入对应邮箱号"  type="text"   class="input-small"/>&nbsp;';
-        html += '<input name="splitCodes[' + [productParametersIndex] + '].codeRemark" id="codeRemark" maxlength="10" placeholder="请输入账户备注"  type="text"   class="input-small"/>&nbsp;';
+        html += '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="splitCodes[' + [productParametersIndex] + '].splitCode" id="splitCode" maxlength="15" placeholder="请输入分帐商户号" type="text" class="input-small"/>&nbsp;';
+        html += '<input name="splitCodes[' + [productParametersIndex] + '].email" id="email" maxlength="15" placeholder="请输入对应邮箱号"  type="text"   class="input-small"/>&nbsp;';
+        html += '<input name="splitCodes[' + [productParametersIndex] + '].codeRemark" id="codeRemark" maxlength="15" placeholder="请输入账户备注"  type="text"   class="input-small"/>&nbsp;';
         html += '<span type="button" style="cursor: pointer;color: #0B61A4" onclick="deleteParams(this)"">删除</span>';
         html += '</div>';
         $("#addParamsItems").append(html).show();

+ 8 - 19
src/main/webapp/WEB-INF/views/modules/user/newCmShopForm.jsp

@@ -11,7 +11,6 @@
                 //$("#name").focus();
                 $("#inputForm").validate({
                     submitHandler: function (form) {
-                        debugger
                         var bindMobile = $("#contractMobile").val();
                         var userID = $("#userID").val();
                         $.post("${ctx}/new/user/agency/checkMobile?bindMobile=" + bindMobile + "&userID=" + userID, function (data) {
@@ -780,6 +779,13 @@
             </tr>
         </table>
     </div>
+    <div class="control-group">
+        <label class="control-label"><font color="red">*</font>线上支付手续费:</label>
+        <div class="controls">
+            <form:radiobutton path="chargeSupport" value="1" label="采美承担" checked="true"/>
+            <form:radiobutton path="chargeSupport" value="2" label="供应商承担"/>
+        </div>
+    </div>
     <div class="control-group">
         <tr>
             <th><b>分账商户号:</b></th>
@@ -803,25 +809,8 @@
                         </div>
                     </c:forEach>
                 </div>
-                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<button
-                    class="addParams" onclick="return false">添加分帐号
-            </button>
-     &emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp; &emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp; &emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;
-
-                <strong>线上支付手续费:</strong>
-
-                <c:if test="${empty newCmShop.commIssion || newCmShop.commIssion==0}">
-                    <input type="radio" checked="checked" name="commIssion" value="0"  class="required" />采美承担
-                    <input type="radio" name="commIssion" value="1" class="required" />供应商承担
-                </c:if>
-                <c:if test="${newCmShop.commIssion==1}">
-                    <input type="radio"  name="commIssion" value="0"  class="required" />采美承担
-                    <input type="radio" checked="checked" name="commIssion" value="1" class="required" />供应商承担
-                </c:if>
-
-
+                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<button class="addParams" onclick="return false">添加分帐号</button>
             </td>
-
         </tr>
     </div>
     <div class="control-group">