Jelajahi Sumber

联合丽格V1.0.2:用户管理,组织列表

kaick 2 tahun lalu
induk
melakukan
81c68438cc

+ 8 - 0
src/main/java/com/caimei/modules/user/dao/NewCmShopDao.java

@@ -63,4 +63,12 @@ public interface NewCmShopDao extends CrudDao<NewCmShop> {
     Integer cmrectCount(Integer shopID);
 
     Integer therectip();
+
+    /**
+     * 修改供应商信息
+     *
+     * @param shop 供应商信息
+     * @return 结果
+     */
+    public int updateShop(NewCmShop shop);
 }

+ 13 - 0
src/main/java/com/caimei/modules/user/service/NewCmShopService.java

@@ -1,5 +1,6 @@
 package com.caimei.modules.user.service;
 
+import java.util.Date;
 import java.util.List;
 
 import com.caimei.dfs.image.beens.ImageUploadInfo;
@@ -385,4 +386,16 @@ public class NewCmShopService extends CrudService<NewCmShopDao, NewCmShop> {
         return newCmShopDao.therectip();
     }
 
+    /**
+     * 修改供应商信息
+     *
+     * @param shop 供应商信息
+     * @return 结果
+     */
+    @Transactional
+    public int updateShop(NewCmShop shop)
+    {
+        return newCmShopDao.updateShop(shop);
+    }
+
 }

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

@@ -187,6 +187,27 @@ public class NewCmShopController extends BaseController {
         return "modules/user/newCmShopForm";
     }
 
+    @RequiresPermissions("user:newCmShop:view")
+    @RequestMapping(value = "formShop")
+    public String formShop(NewCmShop newCmShop, Model model) {
+        //获取供应商证书信息
+        newCmShop = newCmShopService.get(newCmShop.getShopID().toString());
+        model.addAttribute("newCmShop", newCmShop);
+        return "modules/user/newCmShopSetForm";
+    }
+    @RequiresPermissions("user:newCmShop:edit")
+    @RequestMapping(value = "updateShop")
+    public String updateShop(NewCmShop newCmShop, Model model, RedirectAttributes redirectAttributes) {
+            if (newCmShop.getShopID()==null) {
+                addMessage(redirectAttributes, "保存失败");
+            }
+            if (newCmShopService.updateShop(newCmShop)>0) {
+                addMessage(redirectAttributes, "保存成功");
+            }else {
+                addMessage(redirectAttributes, "保存失败");
+            }
+        return "redirect:" + Global.getAdminPath() + "/user/newCmShop";
+    }
 
     @RequestMapping(value = "maintenanceList")
     public String maintenanceList(CmDiscernReceipt cmDiscernReceipt, HttpServletRequest request, HttpServletResponse response, Model model) throws ParseException {

+ 123 - 0
src/main/resources/mappings/modules/user/NewCmShopMapper.xml

@@ -526,6 +526,129 @@
         LIMIT 1
     </select>
 
+
+    <resultMap type="com.caimei.modules.user.entity.NewCmShop" id="ShopResult">
+        <result property="shopID"    column="shopID"    />
+        <result property="userID"    column="userID"    />
+        <result property="name"    column="name"    />
+        <result property="sname"    column="sname"    />
+        <result property="logo"    column="logo"    />
+        <result property="rebateAmount"    column="rebateAmount"    />
+        <result property="legalPerson"    column="legalPerson"    />
+        <result property="businessLicense"    column="businessLicense"    />
+        <result property="businessLicenseImage"    column="businessLicenseImage"    />
+        <result property="taxCertificate"    column="taxCertificate"    />
+        <result property="taxCertificateImage"    column="taxCertificateImage"    />
+<!--        <result property="authorizationCertificateImage"    column="authorizationCertificateImage"    />-->
+        <result property="provinceID"    column="provinceID"    />
+        <result property="cityID"    column="cityID"    />
+        <result property="townID"    column="townID"    />
+        <result property="address"    column="address"    />
+        <result property="registeredCapital"    column="registeredCapital"    />
+        <result property="nature"    column="nature"    />
+        <result property="turnover"    column="turnover"    />
+        <result property="linkMan"    column="linkMan"    />
+        <result property="contractPhone"    column="contractPhone"    />
+        <result property="contractMobile"    column="contractMobile"    />
+        <result property="contractEmail"    column="contractEmail"    />
+        <result property="fax"    column="fax"    />
+        <result property="zipCode"    column="zipCode"    />
+        <result property="info"    column="info"    />
+        <result property="productDesc"    column="productDesc"    />
+        <result property="addTime"    column="addTime"    />
+        <result property="auditStatus"    column="auditStatus"    />
+        <result property="auditTime"    column="auditTime"    />
+        <result property="auditNote"    column="auditNote"    />
+        <result property="validFlag"    column="validFlag"    />
+        <result property="status"    column="status"    />
+        <result property="maintenanceFee"    column="maintenanceFee"    />
+        <result property="maintenanceDate"    column="maintenanceDate"    />
+        <result property="businessScope"    column="businessScope"    />
+        <result property="socialCreditCode"    column="socialCreditCode"    />
+        <result property="mainpro"    column="mainpro"    />
+        <result property="firstShopType"    column="firstShopType"    />
+        <result property="secondShopType"    column="secondShopType"    />
+        <result property="medicalPracticeLicenseImg1"    column="medicalPracticeLicenseImg1"    />
+        <result property="medicalPracticeLicenseImg2"    column="medicalPracticeLicenseImg2"    />
+        <result property="medicalPracticeLicenseImg3"    column="medicalPracticeLicenseImg3"    />
+        <result property="bankAccount"    column="bankAccount"    />
+        <result property="bankAccountName"    column="bankAccountName"    />
+        <result property="bankName"    column="bankName"    />
+        <result property="checkMan"    column="checkMan"    />
+        <result property="ableRebateAmount"    column="ableRebateAmount"    />
+        <result property="website"    column="website"    />
+        <result property="wxOfficialAccount"    column="wxOfficialAccount"    />
+        <result property="wxApplets"    column="wxApplets"    />
+        <result property="shopType"    column="shopType"    />
+        <result property="cardNumber"    column="cardNumber"    />
+<!--        <result property="accountType"    column="accountType"    />-->
+<!--        <result property="banOfDeposit"    column="banOfDeposit"    />-->
+<!--        <result property="accountName"    column="accountName"    />-->
+        <result property="chargeSupport"    column="chargeSupport"    />
+    </resultMap>
+
+    <update id="updateShop" parameterType="com.caimei.modules.user.entity.NewCmShop">
+        update shop
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="userID != null">userID = #{userID},</if>
+            <if test="name != null and name != ''">name = #{name},</if>
+            <if test="sname != null and sname != ''">sname = #{sname},</if>
+            <if test="logo != null and logo != ''">logo = #{logo},</if>
+            <if test="rebateAmount != null">rebateAmount = #{rebateAmount},</if>
+            <if test="legalPerson != null and legalPerson != ''">legalPerson = #{legalPerson},</if>
+            <if test="businessLicense != null and businessLicense != ''">businessLicense = #{businessLicense},</if>
+            <if test="businessLicenseImage != null and businessLicenseImage != ''">businessLicenseImage = #{businessLicenseImage},</if>
+            <if test="taxCertificate != null and taxCertificate != ''">taxCertificate = #{taxCertificate},</if>
+            <if test="taxCertificateImage != null and taxCertificateImage != ''">taxCertificateImage = #{taxCertificateImage},</if>
+<!--            <if test="authorizationCertificateImage != null and authorizationCertificateImage != ''">authorizationCertificateImage = #{authorizationCertificateImage},</if>-->
+            <if test="provinceID != null">provinceID = #{provinceID},</if>
+            <if test="cityID != null">cityID = #{cityID},</if>
+            <if test="townID != null">townID = #{townID},</if>
+            <if test="address != null and address != ''">address = #{address},</if>
+            <if test="registeredCapital != null and registeredCapital != ''">registeredCapital = #{registeredCapital},</if>
+            <if test="nature != null and nature != ''">nature = #{nature},</if>
+            <if test="turnover != null and turnover != ''">turnover = #{turnover},</if>
+            <if test="linkMan != null and linkMan != ''">linkMan = #{linkMan},</if>
+            <if test="contractPhone != null and contractPhone != ''">contractPhone = #{contractPhone},</if>
+            <if test="contractMobile != null and contractMobile != ''">contractMobile = #{contractMobile},</if>
+            <if test="contractEmail != null and contractEmail != ''">contractEmail = #{contractEmail},</if>
+            <if test="fax != null and fax != ''">fax = #{fax},</if>
+            <if test="zipCode != null and zipCode != ''">zipCode = #{zipCode},</if>
+            <if test="info != null and info != ''">info = #{info},</if>
+            <if test="productDesc != null and productDesc != ''">productDesc = #{productDesc},</if>
+            <if test="addTime != null and addTime != ''">addTime = #{addTime},</if>
+            <if test="auditStatus != null and auditStatus != ''">auditStatus = #{auditStatus},</if>
+            <if test="auditTime != null and auditTime != ''">auditTime = #{auditTime},</if>
+            <if test="auditNote != null and auditNote != ''">auditNote = #{auditNote},</if>
+            <if test="validFlag != null and validFlag != ''">validFlag = #{validFlag},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="maintenanceFee != null and maintenanceFee != ''">maintenanceFee = #{maintenanceFee},</if>
+            <if test="maintenanceDate != null">maintenanceDate = #{maintenanceDate},</if>
+            <if test="businessScope != null and businessScope != ''">businessScope = #{businessScope},</if>
+            <if test="socialCreditCode != null and socialCreditCode != ''">socialCreditCode = #{socialCreditCode},</if>
+            <if test="mainpro != null and mainpro != ''">mainpro = #{mainpro},</if>
+            <if test="firstShopType != null and firstShopType != ''">firstShopType = #{firstShopType},</if>
+            <if test="secondShopType != null and secondShopType != ''">secondShopType = #{secondShopType},</if>
+            <if test="medicalPracticeLicenseImg1 != null and medicalPracticeLicenseImg1 != ''">medicalPracticeLicenseImg1 = #{medicalPracticeLicenseImg1},</if>
+            <if test="medicalPracticeLicenseImg2 != null and medicalPracticeLicenseImg2 != ''">medicalPracticeLicenseImg2 = #{medicalPracticeLicenseImg2},</if>
+            <if test="medicalPracticeLicenseImg3 != null and medicalPracticeLicenseImg3 != ''">medicalPracticeLicenseImg3 = #{medicalPracticeLicenseImg3},</if>
+            <if test="bankAccount != null and bankAccount != ''">bankAccount = #{bankAccount},</if>
+            <if test="bankAccountName != null and bankAccountName != ''">bankAccountName = #{bankAccountName},</if>
+            <if test="bankName != null and bankName != ''">bankName = #{bankName},</if>
+            <if test="checkMan != null and checkMan != ''">checkMan = #{checkMan},</if>
+            <if test="ableRebateAmount != null">ableRebateAmount = #{ableRebateAmount},</if>
+            <if test="website != null and website != ''">website = #{website},</if>
+            <if test="wxOfficialAccount != null and wxOfficialAccount != ''">wxOfficialAccount = #{wxOfficialAccount},</if>
+            <if test="wxApplets != null and wxApplets != ''">wxApplets = #{wxApplets},</if>
+            <if test="shopType != null and shopType != ''">shopType = #{shopType},</if>
+            <if test="cardNumber != null and cardNumber != ''">cardNumber = #{cardNumber},</if>
+<!--            <if test="accountType != null and accountType != ''">accountType = #{accountType},</if>-->
+<!--            <if test="banOfDeposit != null and banOfDeposit != ''">banOfDeposit = #{banOfDeposit},</if>-->
+<!--            <if test="accountName != null and accountName != ''">accountName = #{accountName},</if>-->
+            <if test="chargeSupport != null and chargeSupport != ''">chargeSupport = #{chargeSupport},</if>
+        </trim>
+        where shopID = #{shopID}
+    </update>
 </mapper>
 
 

+ 1 - 0
src/main/webapp/WEB-INF/views/modules/user/newCmShopList.jsp

@@ -311,6 +311,7 @@
 				</c:if>
 				<a href="${ctx}/user/newCmShop/viewOperationUser?shopID=${newCmShop.shopID}&userID=${newCmShop.userID}&name=${newCmShop.name}">查看运营人员</a>
 				<a href="${ctx}/user/newCmShop/maintenanceList?shopID=${newCmShop.shopID}&shopName=${newCmShop.name}">上架费记录</a>
+				<a href="${ctx}/user/newCmShop/formShop?shopID=${newCmShop.shopID}">线下转账信息</a>
 			</td></shiro:hasPermission>
 		</tr>
 	</c:forEach>

+ 63 - 0
src/main/webapp/WEB-INF/views/modules/user/newCmShopSetForm.jsp

@@ -0,0 +1,63 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+	<title>组织列表管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			//$("#name").focus();
+			$("#inputForm").validate({
+				submitHandler: function(form){
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+		});
+
+	</script>
+</head>
+<body>
+<ul class="nav nav-tabs">
+	<li><a href="${ctx}/user/newCmShop/">供应商信息列表</a></li>
+	<li class="active"><a href="${ctx}/user/newCmShop/formShop?shopID=${newCmShop.shopID}">线下转账信息</a></li>
+</ul><br/>
+	<form:form id="inputForm" modelAttribute="newCmShop" action="${ctx}/user/newCmShop/updateShop" method="post" class="form-horizontal">
+		<form:hidden path="shopID"/>
+		<sys:message content="${message}"/>
+		<div class="control-group">
+			<label class="control-label"><font color="red">*</font>开户行:</label>
+			<div class="controls">
+				<form:input path="bankName" placeholder="请输入开户行" htmlEscape="false" maxlength="30" class="input-xlarge required"/>
+			</div>
+		</div>
+
+		<div class="control-group">
+			<label class="control-label"><font color="red">*</font>银行卡号:</label>
+			<div class="controls">
+				<form:input  path="bankAccount" placeholder="请输入银行卡号" htmlEscape="false" type="number" maxlength="30" class="input-xlarge required"/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label"><font color="red">*</font>户名:</label>
+			<div class="controls">
+				<form:input path="bankAccountName" placeholder="请输入开户行" htmlEscape="false" maxlength="30"  class="input-xlarge required"/>
+			</div>
+		</div>
+
+		<div class="form-actions">
+			<input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;
+			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
+		</div>
+	</form:form>
+</body>
+</html>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/weisha/cmMallOrganizeList.jsp

@@ -118,7 +118,7 @@
 						<a href="${ctx}/weisha/cmMallOrganize/form?id=${cmUserOrganize.id}">编辑</a>
 <%--						<a href="${ctx}/weisha/cmOrganizeBuyer?organizeId=${cmUserOrganize.id}">采购员</a>--%>
 						<a href="${ctx}/weisha/cmOrganizeStore/list?organizeId=${cmUserOrganize.id}">机构列表</a>
-						<a href="${ctx}/weisha/cmOrganizeProduct/list?organizeId=${cmUserOrganize.id}">商品列表</a>
+<%--						<a href="${ctx}/weisha/cmOrganizeProduct/list?organizeId=${cmUserOrganize.id}">商品列表</a>--%>
 						<a href="${ctx}/weisha/cmMallUser/getMallUser?organizeId=${cmUserOrganize.id}">后台用户</a>
 <%--						<a href="${ctx}/weisha/cmOrganizePromotions/list?organizeId=${cmUserOrganize.id}&type=1">促销活动</a>--%>
 					</td>