Browse Source

【数据库整理】用户管理

chao 3 năm trước cách đây
mục cha
commit
f45ad65aae

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

@@ -36,6 +36,7 @@ public class NewCmShop extends DataEntity<NewCmShop> {
     private String linkMan;        // 联系人
     private String contractPhone;        // 固定电话
     private String contractMobile;        // 手机号
+    private String contractEmail;
     private String fax;        // 传真
     private String zipCode;        // 邮编
     private String info;        // 介绍
@@ -99,6 +100,15 @@ public class NewCmShop extends DataEntity<NewCmShop> {
         super(id);
     }
 
+    @Length(min = 0, max = 50, message = "联系人1邮箱长度必须介于 0 和 50 之间")
+    public String getContractEmail() {
+        return contractEmail;
+    }
+
+    public void setContractEmail(String contractEmail) {
+        this.contractEmail = contractEmail;
+    }
+
     @NotNull(message = "shopID不能为空")
     public Integer getShopID() {
         return shopID;

+ 1 - 4
src/main/java/com/caimei/modules/user/web/newUser/SpController.java

@@ -391,9 +391,6 @@ public class SpController extends BaseController {
     @RequiresPermissions("user:newCmClub:edit")
     @RequestMapping(value = "cmSpSave")
     public String save(NewCmSp newCmSp, Model model, RedirectAttributes redirectAttributes) {
-        if (!beanValidator(model, newCmSp)) {
-            return form(newCmSp, model);
-        }
         List<NewCmSp> spManager = cmSpService.findSpManager();
         CmUser cmUser = cmUserService.get(newCmSp.getUserID() + "");
         //身份判断 防止出现多个协销经理
@@ -401,7 +398,7 @@ public class SpController extends BaseController {
             // 已经存在协销经理了
             if ((spManager.size() == 1) && (spManager.get(0).getUserID() != newCmSp.getUserID())) {
                 addMessage(model, "已经存在协销经理了");
-                return form(newCmSp, model);
+                return "redirect:" + Global.getAdminPath() + "/new/user/cmSp/cmSpList/?repage";
             }
             cmUser.setRegisterUserTypeID(UserType.SERVICEPROVIDER.getCode() + ""); // 设置为协销经理
         }

+ 1 - 1
src/main/resources/mappings/modules/user/CmUserMapper.xml

@@ -424,7 +424,7 @@
 				tipStatus = #{tipStatus},
 			</if>
         </set>
-        WHERE companyUserID=#{companyUserID} AND userID != #{companyUserID}
+        WHERE userID != #{companyUserID}
     </update>
 
     <update id="updateUserStatus">

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/order/newOrderList.jsp

@@ -153,7 +153,7 @@
                 <label>协销人员:</label>
                 <form:select path="serviceProviderId" class="select-ele input-medium required">
                     <form:option value="" label="所有"/>
-                    <form:options items="${serviceProviderList}" itemLabel="linkMan1" itemValue="serviceProviderID"
+                    <form:options items="${serviceProviderList}" itemLabel="linkMan" itemValue="serviceProviderID"
                                   htmlEscape="false"/>
                 </form:select>
             </div>

+ 2 - 2
src/main/webapp/WEB-INF/views/modules/user/cmSpSelect.jsp

@@ -29,7 +29,7 @@
 		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
 		<div class="ul-form">
 			<label>协销姓名:</label>
-			<form:input path="linkMan1" htmlEscape="false" maxlength="50" class="input-medium"/>
+			<form:input path="linkMan" htmlEscape="false" maxlength="50" class="input-medium"/>
 			<label>手机号:</label>
 			<form:input path="contractMobile1" htmlEscape="false" maxlength="20" class="input-medium"/>
 			<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
@@ -50,7 +50,7 @@
 			<tr>
 				<td><input class="check-item" type="radio" name="newCmSp" checked= "checked"
 						   value='${newCmSp.serviceProviderID}'/></td>
-				<td>${newCmSp.linkMan1}</td>
+				<td>${newCmSp.linkMan}</td>
 				<td>${newCmSp.contractMobile1}</td>
 			</tr>
 		</c:forEach>

+ 0 - 5
src/main/webapp/WEB-INF/views/modules/user/newCmClubForm.jsp

@@ -81,12 +81,7 @@
 		<td width="13%">${newCmClub.name}</td>
 		<th width="12%"><span class="red">* </span>联系人一:</th>
 		<td width="13%">
-			<c:if test="${not empty newCmClub.linkMan}">
 			${newCmClub.linkMan}
-		</c:if>
-			<c:if test="${empty newCmClub.linkMan}">
-				${newCmClub.linkMan1}
-			</c:if></td>
 		<th width="12%">职务:</th>
 		<td width="13%">${newCmClub.duty1}</td>
 	</tr>

+ 4 - 4
src/main/webapp/WEB-INF/views/modules/user/newCmClubList.jsp

@@ -248,10 +248,10 @@
             <%--htmlEscape="false"/>--%>
             <%--</form:select>--%>
         <label>手机号:</label>
-        <form:input path="contractMobile1" htmlEscape="false" maxlength="50" class="input-medium"/>
+        <form:input path="contractMobile" htmlEscape="false" maxlength="50" class="input-medium"/>
         <br/>
         <label>联系人:</label>
-        <form:input path="linkMan1" htmlEscape="false" maxlength="50" class="input-medium"/>
+        <form:input path="linkMan" htmlEscape="false" maxlength="50" class="input-medium"/>
         <label>注册时间:</label>
         <form:input path="startTime" type="text" maxlength="20" class="input-mini Wdate" value="${startTime}"
                     onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
@@ -311,12 +311,12 @@
                     ${newCmClub.linkMan}
                 </c:if>
                 <c:if test="${empty newCmClub.linkMan}">
-                    ${newCmClub.linkMan1}
+                    ${newCmClub.linkMan}
                 </c:if>
             </td>
 
             <td>
-                    ${newCmClub.contractMobile1}
+                    ${newCmClub.contractMobile}
             </td>
             <td>
                     ${fns:getDictLabel(newCmClub.status, 'club_status', newCmClub.status)}

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/userNew/cmAgencyForm.jsp

@@ -512,7 +512,7 @@
             <td width="13%"><form:input path="sname" htmlEscape="false" maxlength="20"
                                         class="input-medium"  value="${newCmClub.userIdentity eq 4 && newCmClub.status eq 90?'':newCmClub.sname}"/></td>
             <th width="12%">注册邮箱:</th>
-            <td width="13%"><form:input path="contractEmail1" htmlEscape="false" maxlength="20"
+            <td width="13%"><form:input path="contractEmail" htmlEscape="false" maxlength="20"
                                         class="input-medium"/></td>
         </tr>
         <tr height="28">