Browse Source

添加机器所属商户

xubh 5 years ago
parent
commit
aadd748a8e

+ 64 - 0
src/main/java/com/minpay/db/table/model/VmAccount.java

@@ -108,6 +108,22 @@ public class VmAccount extends AbstractMINBean {
     private String state;
     private String state;
 
 
     /**
     /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column vm_account.ACT_EQUIPMENT_ID
+     *
+     * @mbggenerated
+     */
+    private String equipmentId;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column vm_account.ACT_ISBRANCH
+     *
+     * @mbggenerated
+     */
+    private String isbranch;
+
+    /**
      * This method was generated by MyBatis Generator.
      * This method was generated by MyBatis Generator.
      * This method returns the value of the database column vm_account.ACT_ID
      * This method returns the value of the database column vm_account.ACT_ID
      *
      *
@@ -418,4 +434,52 @@ public class VmAccount extends AbstractMINBean {
     public void setState(String state) {
     public void setState(String state) {
         this.state = state == null ? null : state.trim();
         this.state = state == null ? null : state.trim();
     }
     }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column vm_account.ACT_EQUIPMENT_ID
+     *
+     * @return the value of vm_account.ACT_EQUIPMENT_ID
+     *
+     * @mbggenerated
+     */
+    public String getEquipmentId() {
+        return equipmentId;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column vm_account.ACT_EQUIPMENT_ID
+     *
+     * @param equipmentId the value for vm_account.ACT_EQUIPMENT_ID
+     *
+     * @mbggenerated
+     */
+    public void setEquipmentId(String equipmentId) {
+        this.equipmentId = equipmentId == null ? null : equipmentId.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column vm_account.ACT_ISBRANCH
+     *
+     * @return the value of vm_account.ACT_ISBRANCH
+     *
+     * @mbggenerated
+     */
+    public String getIsbranch() {
+        return isbranch;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column vm_account.ACT_ISBRANCH
+     *
+     * @param isbranch the value for vm_account.ACT_ISBRANCH
+     *
+     * @mbggenerated
+     */
+    public void setIsbranch(String isbranch) {
+        this.isbranch = isbranch == null ? null : isbranch.trim();
+    }
 }
 }

+ 156 - 0
src/main/java/com/minpay/db/table/model/VmAccountExample.java

@@ -1203,6 +1203,162 @@ public class VmAccountExample {
             addCriterion("ACT_STATE not between", value1, value2, "state");
             addCriterion("ACT_STATE not between", value1, value2, "state");
             return (Criteria) this;
             return (Criteria) this;
         }
         }
+
+        public Criteria andEquipmentIdIsNull() {
+            addCriterion("ACT_EQUIPMENT_ID is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentIdIsNotNull() {
+            addCriterion("ACT_EQUIPMENT_ID is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentIdEqualTo(String value) {
+            if(value == null ){
+                andEquipmentIdIsNull();
+            } else {
+                addCriterion("ACT_EQUIPMENT_ID =", value, "equipmentId");
+            }
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentIdNotEqualTo(String value) {
+            if(value == null ){
+                andEquipmentIdIsNotNull();
+            } else {
+                addCriterion("ACT_EQUIPMENT_ID <>", value, "equipmentId");
+            }
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentIdGreaterThan(String value) {
+            addCriterion("ACT_EQUIPMENT_ID >", value, "equipmentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentIdGreaterThanOrEqualTo(String value) {
+            addCriterion("ACT_EQUIPMENT_ID >=", value, "equipmentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentIdLessThan(String value) {
+            addCriterion("ACT_EQUIPMENT_ID <", value, "equipmentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentIdLessThanOrEqualTo(String value) {
+            addCriterion("ACT_EQUIPMENT_ID <=", value, "equipmentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentIdLike(String value) {
+            addCriterion("ACT_EQUIPMENT_ID like", value, "equipmentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentIdNotLike(String value) {
+            addCriterion("ACT_EQUIPMENT_ID not like", value, "equipmentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentIdIn(List<String> values) {
+            addCriterion("ACT_EQUIPMENT_ID in", values, "equipmentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentIdNotIn(List<String> values) {
+            addCriterion("ACT_EQUIPMENT_ID not in", values, "equipmentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentIdBetween(String value1, String value2) {
+            addCriterion("ACT_EQUIPMENT_ID between", value1, value2, "equipmentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andEquipmentIdNotBetween(String value1, String value2) {
+            addCriterion("ACT_EQUIPMENT_ID not between", value1, value2, "equipmentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsbranchIsNull() {
+            addCriterion("ACT_ISBRANCH is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsbranchIsNotNull() {
+            addCriterion("ACT_ISBRANCH is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsbranchEqualTo(String value) {
+            if(value == null ){
+                andIsbranchIsNull();
+            } else {
+                addCriterion("ACT_ISBRANCH =", value, "isbranch");
+            }
+            return (Criteria) this;
+        }
+
+        public Criteria andIsbranchNotEqualTo(String value) {
+            if(value == null ){
+                andIsbranchIsNotNull();
+            } else {
+                addCriterion("ACT_ISBRANCH <>", value, "isbranch");
+            }
+            return (Criteria) this;
+        }
+
+        public Criteria andIsbranchGreaterThan(String value) {
+            addCriterion("ACT_ISBRANCH >", value, "isbranch");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsbranchGreaterThanOrEqualTo(String value) {
+            addCriterion("ACT_ISBRANCH >=", value, "isbranch");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsbranchLessThan(String value) {
+            addCriterion("ACT_ISBRANCH <", value, "isbranch");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsbranchLessThanOrEqualTo(String value) {
+            addCriterion("ACT_ISBRANCH <=", value, "isbranch");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsbranchLike(String value) {
+            addCriterion("ACT_ISBRANCH like", value, "isbranch");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsbranchNotLike(String value) {
+            addCriterion("ACT_ISBRANCH not like", value, "isbranch");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsbranchIn(List<String> values) {
+            addCriterion("ACT_ISBRANCH in", values, "isbranch");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsbranchNotIn(List<String> values) {
+            addCriterion("ACT_ISBRANCH not in", values, "isbranch");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsbranchBetween(String value1, String value2) {
+            addCriterion("ACT_ISBRANCH between", value1, value2, "isbranch");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsbranchNotBetween(String value1, String value2) {
+            addCriterion("ACT_ISBRANCH not between", value1, value2, "isbranch");
+            return (Criteria) this;
+        }
     }
     }
 
 
     /**
     /**

+ 1 - 3
src/main/java/com/minpay/huicai/system/action/RoleManageAction.java

@@ -631,9 +631,7 @@ public class RoleManageAction implements IMINAction {
 		ImRoleExample example = new ImRoleExample();
 		ImRoleExample example = new ImRoleExample();
 		ImRoleExample.Criteria criteria = example.createCriteria();
 		ImRoleExample.Criteria criteria = example.createCriteria();
 		User user = session.getUser();
 		User user = session.getUser();
-		if(!user.getBranchId().equals(Constant.DEFAULT_INSTITUTIONS)){
-			criteria.andBranchidEqualTo(user.getBranchId());
-		}
+		criteria.andBranchidEqualTo(user.getBranchId());
 		List<ImRole> ls = Service.lookup(IMINDataBaseService.class).selectByExample(ImRoleMapper.class, example);
 		List<ImRole> ls = Service.lookup(IMINDataBaseService.class).selectByExample(ImRoleMapper.class, example);
 		res.set(IMINBusinessConstant.F_QUERY_RESULT, ls);
 		res.set(IMINBusinessConstant.F_QUERY_RESULT, ls);
 		return res;
 		return res;

+ 17 - 14
src/main/java/com/minpay/payManage/action/BusinessNumManageAction.java

@@ -4,6 +4,7 @@ import com.minpay.common.bean.User;
 import com.minpay.common.constant.Constant;
 import com.minpay.common.constant.Constant;
 import com.minpay.common.format.IFormatService;
 import com.minpay.common.format.IFormatService;
 import com.minpay.common.service.ILogService;
 import com.minpay.common.service.ILogService;
+import com.minpay.common.service.IPublicService;
 import com.minpay.common.util.DateUtil;
 import com.minpay.common.util.DateUtil;
 import com.minpay.db.table.mapper.ImUserMapper;
 import com.minpay.db.table.mapper.ImUserMapper;
 import com.minpay.db.table.mapper.VmAccountMapper;
 import com.minpay.db.table.mapper.VmAccountMapper;
@@ -133,11 +134,11 @@ public class BusinessNumManageAction implements IMINAction {
 		}
 		}
 
 
 		// 获取商品主键
 		// 获取商品主键
-//		String id = Service.lookup(IPublicService.class).getSequence("VM_ACT_ID");
+		String id = Service.lookup(IPublicService.class).getSequence("VM_ACT_ID");
 		VmAccount vti = new VmAccount();
 		VmAccount vti = new VmAccount();
-		vti.setId(accountId); 					// 账户ID
+		vti.setId(id); 							// 账户ID
 		vti.setName(name); 						// 账户名称
 		vti.setName(name); 						// 账户名称
-		vti.setUsrid(user.getBranchId()); 		// 存储机构编号
+		vti.setUsrid(accountId); 				// 存储机构编号
 		vti.setType(type); 						// 账户类型
 		vti.setType(type); 						// 账户类型
 		vti.setNumber(number); 					// 账号
 		vti.setNumber(number); 					// 账号
 		vti.setChannel(user.getChannel()); 		// 渠道(V01:自助售货机)
 		vti.setChannel(user.getChannel()); 		// 渠道(V01:自助售货机)
@@ -145,6 +146,7 @@ public class BusinessNumManageAction implements IMINAction {
 		vti.setCreateTime(nowTime); 			// 创建时间
 		vti.setCreateTime(nowTime); 			// 创建时间
 		vti.setModifyUser(user.getId());		// 修改人
 		vti.setModifyUser(user.getId());		// 修改人
 		vti.setModifyTime(nowTime);				// 修改时间
 		vti.setModifyTime(nowTime);				// 修改时间
+		vti.setIsbranch("1");
 		// 新增收款商户号信息,执行插入数据
 		// 新增收款商户号信息,执行插入数据
 		Service.lookup(IMINDataBaseService.class)
 		Service.lookup(IMINDataBaseService.class)
 				.getMybatisMapper(VmAccountMapper.class)
 				.getMybatisMapper(VmAccountMapper.class)
@@ -155,21 +157,22 @@ public class BusinessNumManageAction implements IMINAction {
 		return res;
 		return res;
 	}
 	}
 
 
+
 	/**
 	/**
-	 * 修改收款商户号
-	 * @param id			账户ID
-	 * @param name			账户名称
-	 * @param type			账户类型
-	 * @param number		三方账号
+	 *修改收款商户号
+	 * @param id	账户ID
+	 * @param accountName 账户名称
+	 * @param accountType	账户类型
+	 * @param number	三方账号
 	 * @param session
 	 * @param session
 	 * @return
 	 * @return
 	 * @throws MINBusinessException
 	 * @throws MINBusinessException
 	 */
 	 */
 	@MINAction(value = MODIFY_TENCENT, transaction = IMINTransactionEnum.CMT )
 	@MINAction(value = MODIFY_TENCENT, transaction = IMINTransactionEnum.CMT )
 	public MINActionResult modifybusinessNum(
 	public MINActionResult modifybusinessNum(
-			@MINParam(key = "id")String id,
-			@MINParam(key = "name") String name,
-			@MINParam(key = "type") String type,
+			@MINParam(key = "id")  String id,
+			@MINParam(key = "accountName") String accountName,
+			@MINParam(key = "accountType") String accountType,
 			@MINParam(key = "number") String number,
 			@MINParam(key = "number") String number,
 			MINSession session) throws MINBusinessException{
 			MINSession session) throws MINBusinessException{
 
 
@@ -180,8 +183,8 @@ public class BusinessNumManageAction implements IMINAction {
 		String dateTime = com.min.util.DateUtil.getCurrentDateTimeString();
 		String dateTime = com.min.util.DateUtil.getCurrentDateTimeString();
 		VmAccount  vti = new VmAccount();
 		VmAccount  vti = new VmAccount();
 		vti.setId(id); 							// 账户ID
 		vti.setId(id); 							// 账户ID
-		vti.setName(name); 						// 账户名称
-		vti.setType(type); 						// 账户类型
+		vti.setName(accountName); 						// 账户名称
+		vti.setType(accountType); 						// 账户类型
 		vti.setNumber(number); 					// 账号
 		vti.setNumber(number); 					// 账号
 		vti.setChannel(user.getChannel()); 		// 渠道(V01:自助售货机)
 		vti.setChannel(user.getChannel()); 		// 渠道(V01:自助售货机)
 		vti.setModifyUser(user.getId());		// 修改人
 		vti.setModifyUser(user.getId());		// 修改人
@@ -192,7 +195,7 @@ public class BusinessNumManageAction implements IMINAction {
 				.getMybatisMapper(VmAccountMapper.class)
 				.getMybatisMapper(VmAccountMapper.class)
 				.updateByPrimaryKeySelective(vti);
 				.updateByPrimaryKeySelective(vti);
 		//记录日志信息
 		//记录日志信息
-		String logInfo = "操作员:"+user.getName() +"修改收款商户号,名称:"+ name +",编号: "+ id;
+		String logInfo = "操作员:"+user.getName() +"修改收款商户号,名称:"+ accountName +",编号: "+ id;
 		Service.lookup(ILogService.class).logging(session, logInfo);
 		Service.lookup(ILogService.class).logging(session, logInfo);
 		return res;
 		return res;
 	}
 	}

+ 153 - 120
src/main/resources/com/minpay/db/table/mapper/VmAccountMapper.xml

@@ -1,48 +1,50 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
-<mapper namespace="com.minpay.db.table.mapper.VmAccountMapper" >
-  <resultMap id="BaseResultMap" type="com.minpay.db.table.model.VmAccount" >
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.minpay.db.table.mapper.VmAccountMapper">
+  <resultMap id="BaseResultMap" type="com.minpay.db.table.model.VmAccount">
     <!--
     <!--
       WARNING - @mbggenerated
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
     -->
-    <id column="ACT_ID" property="id" jdbcType="VARCHAR" />
-    <result column="ACT_CHANNEL" property="channel" jdbcType="VARCHAR" />
-    <result column="ACT_USRID" property="usrid" jdbcType="VARCHAR" />
-    <result column="ACT_TYPE" property="type" jdbcType="VARCHAR" />
-    <result column="ACT_NAME" property="name" jdbcType="VARCHAR" />
-    <result column="ACT_NUMBER" property="number" jdbcType="VARCHAR" />
-    <result column="ACT_AMT" property="amt" jdbcType="VARCHAR" />
-    <result column="ACT_AVA_AMT" property="avaAmt" jdbcType="VARCHAR" />
-    <result column="ACT_CREATE_USER" property="createUser" jdbcType="VARCHAR" />
-    <result column="ACT_CREATE_TIME" property="createTime" jdbcType="VARCHAR" />
-    <result column="ACT_MODIFY_USER" property="modifyUser" jdbcType="VARCHAR" />
-    <result column="ACT_MODIFY_TIME" property="modifyTime" jdbcType="VARCHAR" />
-    <result column="ACT_STATE" property="state" jdbcType="VARCHAR" />
+    <id column="ACT_ID" jdbcType="VARCHAR" property="id" />
+    <result column="ACT_CHANNEL" jdbcType="VARCHAR" property="channel" />
+    <result column="ACT_USRID" jdbcType="VARCHAR" property="usrid" />
+    <result column="ACT_TYPE" jdbcType="VARCHAR" property="type" />
+    <result column="ACT_NAME" jdbcType="VARCHAR" property="name" />
+    <result column="ACT_NUMBER" jdbcType="VARCHAR" property="number" />
+    <result column="ACT_AMT" jdbcType="VARCHAR" property="amt" />
+    <result column="ACT_AVA_AMT" jdbcType="VARCHAR" property="avaAmt" />
+    <result column="ACT_CREATE_USER" jdbcType="VARCHAR" property="createUser" />
+    <result column="ACT_CREATE_TIME" jdbcType="VARCHAR" property="createTime" />
+    <result column="ACT_MODIFY_USER" jdbcType="VARCHAR" property="modifyUser" />
+    <result column="ACT_MODIFY_TIME" jdbcType="VARCHAR" property="modifyTime" />
+    <result column="ACT_STATE" jdbcType="VARCHAR" property="state" />
+    <result column="ACT_EQUIPMENT_ID" jdbcType="VARCHAR" property="equipmentId" />
+    <result column="ACT_ISBRANCH" jdbcType="VARCHAR" property="isbranch" />
   </resultMap>
   </resultMap>
-  <sql id="Example_Where_Clause" >
+  <sql id="Example_Where_Clause">
     <!--
     <!--
       WARNING - @mbggenerated
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
     -->
-    <where >
-      <foreach collection="oredCriteria" item="criteria" separator="or" >
-        <if test="criteria.valid" >
-          <trim prefix="(" suffix=")" prefixOverrides="and" >
-            <foreach collection="criteria.criteria" item="criterion" >
-              <choose >
-                <when test="criterion.noValue" >
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
                   and ${criterion.condition}
                   and ${criterion.condition}
                 </when>
                 </when>
-                <when test="criterion.singleValue" >
+                <when test="criterion.singleValue">
                   and ${criterion.condition} #{criterion.value}
                   and ${criterion.condition} #{criterion.value}
                 </when>
                 </when>
-                <when test="criterion.betweenValue" >
+                <when test="criterion.betweenValue">
                   and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                   and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                 </when>
                 </when>
-                <when test="criterion.listValue" >
+                <when test="criterion.listValue">
                   and ${criterion.condition}
                   and ${criterion.condition}
-                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                     #{listItem}
                     #{listItem}
                   </foreach>
                   </foreach>
                 </when>
                 </when>
@@ -53,29 +55,29 @@
       </foreach>
       </foreach>
     </where>
     </where>
   </sql>
   </sql>
-  <sql id="Update_By_Example_Where_Clause" >
+  <sql id="Update_By_Example_Where_Clause">
     <!--
     <!--
       WARNING - @mbggenerated
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
     -->
-    <where >
-      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
-        <if test="criteria.valid" >
-          <trim prefix="(" suffix=")" prefixOverrides="and" >
-            <foreach collection="criteria.criteria" item="criterion" >
-              <choose >
-                <when test="criterion.noValue" >
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
                   and ${criterion.condition}
                   and ${criterion.condition}
                 </when>
                 </when>
-                <when test="criterion.singleValue" >
+                <when test="criterion.singleValue">
                   and ${criterion.condition} #{criterion.value}
                   and ${criterion.condition} #{criterion.value}
                 </when>
                 </when>
-                <when test="criterion.betweenValue" >
+                <when test="criterion.betweenValue">
                   and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                   and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                 </when>
                 </when>
-                <when test="criterion.listValue" >
+                <when test="criterion.listValue">
                   and ${criterion.condition}
                   and ${criterion.condition}
-                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                     #{listItem}
                     #{listItem}
                   </foreach>
                   </foreach>
                 </when>
                 </when>
@@ -86,33 +88,34 @@
       </foreach>
       </foreach>
     </where>
     </where>
   </sql>
   </sql>
-  <sql id="Base_Column_List" >
+  <sql id="Base_Column_List">
     <!--
     <!--
       WARNING - @mbggenerated
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
     -->
     ACT_ID, ACT_CHANNEL, ACT_USRID, ACT_TYPE, ACT_NAME, ACT_NUMBER, ACT_AMT, ACT_AVA_AMT, 
     ACT_ID, ACT_CHANNEL, ACT_USRID, ACT_TYPE, ACT_NAME, ACT_NUMBER, ACT_AMT, ACT_AVA_AMT, 
-    ACT_CREATE_USER, ACT_CREATE_TIME, ACT_MODIFY_USER, ACT_MODIFY_TIME, ACT_STATE
+    ACT_CREATE_USER, ACT_CREATE_TIME, ACT_MODIFY_USER, ACT_MODIFY_TIME, ACT_STATE, ACT_EQUIPMENT_ID, 
+    ACT_ISBRANCH
   </sql>
   </sql>
-  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.minpay.db.table.model.VmAccountExample" >
+  <select id="selectByExample" parameterType="com.minpay.db.table.model.VmAccountExample" resultMap="BaseResultMap">
     <!--
     <!--
       WARNING - @mbggenerated
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
     -->
     select
     select
-    <if test="distinct" >
+    <if test="distinct">
       distinct
       distinct
     </if>
     </if>
     <include refid="Base_Column_List" />
     <include refid="Base_Column_List" />
     from vm_account
     from vm_account
-    <if test="_parameter != null" >
+    <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
       <include refid="Example_Where_Clause" />
     </if>
     </if>
-    <if test="orderByClause != null" >
+    <if test="orderByClause != null">
       order by ${orderByClause}
       order by ${orderByClause}
     </if>
     </if>
   </select>
   </select>
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
     <!--
     <!--
       WARNING - @mbggenerated
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
       This element is automatically generated by MyBatis Generator, do not modify.
@@ -122,7 +125,7 @@
     from vm_account
     from vm_account
     where ACT_ID = #{id,jdbcType=VARCHAR}
     where ACT_ID = #{id,jdbcType=VARCHAR}
   </select>
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
     <!--
     <!--
       WARNING - @mbggenerated
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
       This element is automatically generated by MyBatis Generator, do not modify.
@@ -130,17 +133,17 @@
     delete from vm_account
     delete from vm_account
     where ACT_ID = #{id,jdbcType=VARCHAR}
     where ACT_ID = #{id,jdbcType=VARCHAR}
   </delete>
   </delete>
-  <delete id="deleteByExample" parameterType="com.minpay.db.table.model.VmAccountExample" >
+  <delete id="deleteByExample" parameterType="com.minpay.db.table.model.VmAccountExample">
     <!--
     <!--
       WARNING - @mbggenerated
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
     -->
     delete from vm_account
     delete from vm_account
-    <if test="_parameter != null" >
+    <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
       <include refid="Example_Where_Clause" />
     </if>
     </if>
   </delete>
   </delete>
-  <insert id="insert" parameterType="com.minpay.db.table.model.VmAccount" >
+  <insert id="insert" parameterType="com.minpay.db.table.model.VmAccount">
     <!--
     <!--
       WARNING - @mbggenerated
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
       This element is automatically generated by MyBatis Generator, do not modify.
@@ -149,164 +152,184 @@
       ACT_TYPE, ACT_NAME, ACT_NUMBER, 
       ACT_TYPE, ACT_NAME, ACT_NUMBER, 
       ACT_AMT, ACT_AVA_AMT, ACT_CREATE_USER, 
       ACT_AMT, ACT_AVA_AMT, ACT_CREATE_USER, 
       ACT_CREATE_TIME, ACT_MODIFY_USER, ACT_MODIFY_TIME, 
       ACT_CREATE_TIME, ACT_MODIFY_USER, ACT_MODIFY_TIME, 
-      ACT_STATE)
+      ACT_STATE, ACT_EQUIPMENT_ID, ACT_ISBRANCH
+      )
     values (#{id,jdbcType=VARCHAR}, #{channel,jdbcType=VARCHAR}, #{usrid,jdbcType=VARCHAR}, 
     values (#{id,jdbcType=VARCHAR}, #{channel,jdbcType=VARCHAR}, #{usrid,jdbcType=VARCHAR}, 
       #{type,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR}, 
       #{type,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR}, 
       #{amt,jdbcType=VARCHAR}, #{avaAmt,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, 
       #{amt,jdbcType=VARCHAR}, #{avaAmt,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, 
       #{createTime,jdbcType=VARCHAR}, #{modifyUser,jdbcType=VARCHAR}, #{modifyTime,jdbcType=VARCHAR}, 
       #{createTime,jdbcType=VARCHAR}, #{modifyUser,jdbcType=VARCHAR}, #{modifyTime,jdbcType=VARCHAR}, 
-      #{state,jdbcType=VARCHAR})
+      #{state,jdbcType=VARCHAR}, #{equipmentId,jdbcType=VARCHAR}, #{isbranch,jdbcType=VARCHAR}
+      )
   </insert>
   </insert>
-  <insert id="insertSelective" parameterType="com.minpay.db.table.model.VmAccount" >
+  <insert id="insertSelective" parameterType="com.minpay.db.table.model.VmAccount">
     <!--
     <!--
       WARNING - @mbggenerated
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
     -->
     insert into vm_account
     insert into vm_account
-    <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="id != null" >
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
         ACT_ID,
         ACT_ID,
       </if>
       </if>
-      <if test="channel != null" >
+      <if test="channel != null">
         ACT_CHANNEL,
         ACT_CHANNEL,
       </if>
       </if>
-      <if test="usrid != null" >
+      <if test="usrid != null">
         ACT_USRID,
         ACT_USRID,
       </if>
       </if>
-      <if test="type != null" >
+      <if test="type != null">
         ACT_TYPE,
         ACT_TYPE,
       </if>
       </if>
-      <if test="name != null" >
+      <if test="name != null">
         ACT_NAME,
         ACT_NAME,
       </if>
       </if>
-      <if test="number != null" >
+      <if test="number != null">
         ACT_NUMBER,
         ACT_NUMBER,
       </if>
       </if>
-      <if test="amt != null" >
+      <if test="amt != null">
         ACT_AMT,
         ACT_AMT,
       </if>
       </if>
-      <if test="avaAmt != null" >
+      <if test="avaAmt != null">
         ACT_AVA_AMT,
         ACT_AVA_AMT,
       </if>
       </if>
-      <if test="createUser != null" >
+      <if test="createUser != null">
         ACT_CREATE_USER,
         ACT_CREATE_USER,
       </if>
       </if>
-      <if test="createTime != null" >
+      <if test="createTime != null">
         ACT_CREATE_TIME,
         ACT_CREATE_TIME,
       </if>
       </if>
-      <if test="modifyUser != null" >
+      <if test="modifyUser != null">
         ACT_MODIFY_USER,
         ACT_MODIFY_USER,
       </if>
       </if>
-      <if test="modifyTime != null" >
+      <if test="modifyTime != null">
         ACT_MODIFY_TIME,
         ACT_MODIFY_TIME,
       </if>
       </if>
-      <if test="state != null" >
+      <if test="state != null">
         ACT_STATE,
         ACT_STATE,
       </if>
       </if>
+      <if test="equipmentId != null">
+        ACT_EQUIPMENT_ID,
+      </if>
+      <if test="isbranch != null">
+        ACT_ISBRANCH,
+      </if>
     </trim>
     </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="id != null" >
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
         #{id,jdbcType=VARCHAR},
         #{id,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="channel != null" >
+      <if test="channel != null">
         #{channel,jdbcType=VARCHAR},
         #{channel,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="usrid != null" >
+      <if test="usrid != null">
         #{usrid,jdbcType=VARCHAR},
         #{usrid,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="type != null" >
+      <if test="type != null">
         #{type,jdbcType=VARCHAR},
         #{type,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="name != null" >
+      <if test="name != null">
         #{name,jdbcType=VARCHAR},
         #{name,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="number != null" >
+      <if test="number != null">
         #{number,jdbcType=VARCHAR},
         #{number,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="amt != null" >
+      <if test="amt != null">
         #{amt,jdbcType=VARCHAR},
         #{amt,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="avaAmt != null" >
+      <if test="avaAmt != null">
         #{avaAmt,jdbcType=VARCHAR},
         #{avaAmt,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="createUser != null" >
+      <if test="createUser != null">
         #{createUser,jdbcType=VARCHAR},
         #{createUser,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="createTime != null" >
+      <if test="createTime != null">
         #{createTime,jdbcType=VARCHAR},
         #{createTime,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="modifyUser != null" >
+      <if test="modifyUser != null">
         #{modifyUser,jdbcType=VARCHAR},
         #{modifyUser,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="modifyTime != null" >
+      <if test="modifyTime != null">
         #{modifyTime,jdbcType=VARCHAR},
         #{modifyTime,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="state != null" >
+      <if test="state != null">
         #{state,jdbcType=VARCHAR},
         #{state,jdbcType=VARCHAR},
       </if>
       </if>
+      <if test="equipmentId != null">
+        #{equipmentId,jdbcType=VARCHAR},
+      </if>
+      <if test="isbranch != null">
+        #{isbranch,jdbcType=VARCHAR},
+      </if>
     </trim>
     </trim>
   </insert>
   </insert>
-  <select id="countByExample" parameterType="com.minpay.db.table.model.VmAccountExample" resultType="java.lang.Integer" >
+  <select id="countByExample" parameterType="com.minpay.db.table.model.VmAccountExample" resultType="java.lang.Integer">
     <!--
     <!--
       WARNING - @mbggenerated
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
     -->
     select count(*) from vm_account
     select count(*) from vm_account
-    <if test="_parameter != null" >
+    <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
       <include refid="Example_Where_Clause" />
     </if>
     </if>
   </select>
   </select>
-  <update id="updateByExampleSelective" parameterType="map" >
+  <update id="updateByExampleSelective" parameterType="map">
     <!--
     <!--
       WARNING - @mbggenerated
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
     -->
     update vm_account
     update vm_account
-    <set >
-      <if test="record.id != null" >
+    <set>
+      <if test="record.id != null">
         ACT_ID = #{record.id,jdbcType=VARCHAR},
         ACT_ID = #{record.id,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="record.channel != null" >
+      <if test="record.channel != null">
         ACT_CHANNEL = #{record.channel,jdbcType=VARCHAR},
         ACT_CHANNEL = #{record.channel,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="record.usrid != null" >
+      <if test="record.usrid != null">
         ACT_USRID = #{record.usrid,jdbcType=VARCHAR},
         ACT_USRID = #{record.usrid,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="record.type != null" >
+      <if test="record.type != null">
         ACT_TYPE = #{record.type,jdbcType=VARCHAR},
         ACT_TYPE = #{record.type,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="record.name != null" >
+      <if test="record.name != null">
         ACT_NAME = #{record.name,jdbcType=VARCHAR},
         ACT_NAME = #{record.name,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="record.number != null" >
+      <if test="record.number != null">
         ACT_NUMBER = #{record.number,jdbcType=VARCHAR},
         ACT_NUMBER = #{record.number,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="record.amt != null" >
+      <if test="record.amt != null">
         ACT_AMT = #{record.amt,jdbcType=VARCHAR},
         ACT_AMT = #{record.amt,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="record.avaAmt != null" >
+      <if test="record.avaAmt != null">
         ACT_AVA_AMT = #{record.avaAmt,jdbcType=VARCHAR},
         ACT_AVA_AMT = #{record.avaAmt,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="record.createUser != null" >
+      <if test="record.createUser != null">
         ACT_CREATE_USER = #{record.createUser,jdbcType=VARCHAR},
         ACT_CREATE_USER = #{record.createUser,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="record.createTime != null" >
+      <if test="record.createTime != null">
         ACT_CREATE_TIME = #{record.createTime,jdbcType=VARCHAR},
         ACT_CREATE_TIME = #{record.createTime,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="record.modifyUser != null" >
+      <if test="record.modifyUser != null">
         ACT_MODIFY_USER = #{record.modifyUser,jdbcType=VARCHAR},
         ACT_MODIFY_USER = #{record.modifyUser,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="record.modifyTime != null" >
+      <if test="record.modifyTime != null">
         ACT_MODIFY_TIME = #{record.modifyTime,jdbcType=VARCHAR},
         ACT_MODIFY_TIME = #{record.modifyTime,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="record.state != null" >
+      <if test="record.state != null">
         ACT_STATE = #{record.state,jdbcType=VARCHAR},
         ACT_STATE = #{record.state,jdbcType=VARCHAR},
       </if>
       </if>
+      <if test="record.equipmentId != null">
+        ACT_EQUIPMENT_ID = #{record.equipmentId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.isbranch != null">
+        ACT_ISBRANCH = #{record.isbranch,jdbcType=VARCHAR},
+      </if>
     </set>
     </set>
-    <if test="_parameter != null" >
+    <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
       <include refid="Update_By_Example_Where_Clause" />
     </if>
     </if>
   </update>
   </update>
-  <update id="updateByExample" parameterType="map" >
+  <update id="updateByExample" parameterType="map">
     <!--
     <!--
       WARNING - @mbggenerated
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
       This element is automatically generated by MyBatis Generator, do not modify.
@@ -324,58 +347,66 @@
       ACT_CREATE_TIME = #{record.createTime,jdbcType=VARCHAR},
       ACT_CREATE_TIME = #{record.createTime,jdbcType=VARCHAR},
       ACT_MODIFY_USER = #{record.modifyUser,jdbcType=VARCHAR},
       ACT_MODIFY_USER = #{record.modifyUser,jdbcType=VARCHAR},
       ACT_MODIFY_TIME = #{record.modifyTime,jdbcType=VARCHAR},
       ACT_MODIFY_TIME = #{record.modifyTime,jdbcType=VARCHAR},
-      ACT_STATE = #{record.state,jdbcType=VARCHAR}
-    <if test="_parameter != null" >
+      ACT_STATE = #{record.state,jdbcType=VARCHAR},
+      ACT_EQUIPMENT_ID = #{record.equipmentId,jdbcType=VARCHAR},
+      ACT_ISBRANCH = #{record.isbranch,jdbcType=VARCHAR}
+    <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
       <include refid="Update_By_Example_Where_Clause" />
     </if>
     </if>
   </update>
   </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.minpay.db.table.model.VmAccount" >
+  <update id="updateByPrimaryKeySelective" parameterType="com.minpay.db.table.model.VmAccount">
     <!--
     <!--
       WARNING - @mbggenerated
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
     -->
     update vm_account
     update vm_account
-    <set >
-      <if test="channel != null" >
+    <set>
+      <if test="channel != null">
         ACT_CHANNEL = #{channel,jdbcType=VARCHAR},
         ACT_CHANNEL = #{channel,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="usrid != null" >
+      <if test="usrid != null">
         ACT_USRID = #{usrid,jdbcType=VARCHAR},
         ACT_USRID = #{usrid,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="type != null" >
+      <if test="type != null">
         ACT_TYPE = #{type,jdbcType=VARCHAR},
         ACT_TYPE = #{type,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="name != null" >
+      <if test="name != null">
         ACT_NAME = #{name,jdbcType=VARCHAR},
         ACT_NAME = #{name,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="number != null" >
+      <if test="number != null">
         ACT_NUMBER = #{number,jdbcType=VARCHAR},
         ACT_NUMBER = #{number,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="amt != null" >
+      <if test="amt != null">
         ACT_AMT = #{amt,jdbcType=VARCHAR},
         ACT_AMT = #{amt,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="avaAmt != null" >
+      <if test="avaAmt != null">
         ACT_AVA_AMT = #{avaAmt,jdbcType=VARCHAR},
         ACT_AVA_AMT = #{avaAmt,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="createUser != null" >
+      <if test="createUser != null">
         ACT_CREATE_USER = #{createUser,jdbcType=VARCHAR},
         ACT_CREATE_USER = #{createUser,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="createTime != null" >
+      <if test="createTime != null">
         ACT_CREATE_TIME = #{createTime,jdbcType=VARCHAR},
         ACT_CREATE_TIME = #{createTime,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="modifyUser != null" >
+      <if test="modifyUser != null">
         ACT_MODIFY_USER = #{modifyUser,jdbcType=VARCHAR},
         ACT_MODIFY_USER = #{modifyUser,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="modifyTime != null" >
+      <if test="modifyTime != null">
         ACT_MODIFY_TIME = #{modifyTime,jdbcType=VARCHAR},
         ACT_MODIFY_TIME = #{modifyTime,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="state != null" >
+      <if test="state != null">
         ACT_STATE = #{state,jdbcType=VARCHAR},
         ACT_STATE = #{state,jdbcType=VARCHAR},
       </if>
       </if>
+      <if test="equipmentId != null">
+        ACT_EQUIPMENT_ID = #{equipmentId,jdbcType=VARCHAR},
+      </if>
+      <if test="isbranch != null">
+        ACT_ISBRANCH = #{isbranch,jdbcType=VARCHAR},
+      </if>
     </set>
     </set>
     where ACT_ID = #{id,jdbcType=VARCHAR}
     where ACT_ID = #{id,jdbcType=VARCHAR}
   </update>
   </update>
-  <update id="updateByPrimaryKey" parameterType="com.minpay.db.table.model.VmAccount" >
+  <update id="updateByPrimaryKey" parameterType="com.minpay.db.table.model.VmAccount">
     <!--
     <!--
       WARNING - @mbggenerated
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
       This element is automatically generated by MyBatis Generator, do not modify.
@@ -392,7 +423,9 @@
       ACT_CREATE_TIME = #{createTime,jdbcType=VARCHAR},
       ACT_CREATE_TIME = #{createTime,jdbcType=VARCHAR},
       ACT_MODIFY_USER = #{modifyUser,jdbcType=VARCHAR},
       ACT_MODIFY_USER = #{modifyUser,jdbcType=VARCHAR},
       ACT_MODIFY_TIME = #{modifyTime,jdbcType=VARCHAR},
       ACT_MODIFY_TIME = #{modifyTime,jdbcType=VARCHAR},
-      ACT_STATE = #{state,jdbcType=VARCHAR}
+      ACT_STATE = #{state,jdbcType=VARCHAR},
+      ACT_EQUIPMENT_ID = #{equipmentId,jdbcType=VARCHAR},
+      ACT_ISBRANCH = #{isbranch,jdbcType=VARCHAR}
     where ACT_ID = #{id,jdbcType=VARCHAR}
     where ACT_ID = #{id,jdbcType=VARCHAR}
   </update>
   </update>
 </mapper>
 </mapper>

+ 3 - 2
src/main/resources/com/minpay/db/table/own/mapper/BusinessNumMapper.xml

@@ -3,7 +3,8 @@
 <mapper namespace="com.minpay.db.table.own.mapper.BusinessNumMapper">
 <mapper namespace="com.minpay.db.table.own.mapper.BusinessNumMapper">
 	<select id="querybusinessNum" resultType="hashmap" parameterType="java.util.Map">
 	<select id="querybusinessNum" resultType="hashmap" parameterType="java.util.Map">
 		SELECT
 		SELECT
-		  vat.ACT_ID 			'accountId',
+		  vat.ACT_ID 			'id',
+		  vat.ACT_USRID 		'accountId',
 		  vat.ACT_NAME 			'accountName',
 		  vat.ACT_NAME 			'accountName',
 		  vat.ACT_TYPE 			'type',
 		  vat.ACT_TYPE 			'type',
 		  vat.ACT_NUMBER 		'number',
 		  vat.ACT_NUMBER 		'number',
@@ -12,7 +13,7 @@
 		vm_account vat
 		vm_account vat
 		WHERE
 		WHERE
 			vat.ACT_TYPE IN ('04', '05', '06')
 			vat.ACT_TYPE IN ('04', '05', '06')
-			and vat.ACT_STATE = "00"
+			and vat.ACT_STATE = "00" and  ACT_ISBRANCH = '1'
 		<if test="accountName!=null  and accountName != ''">
 		<if test="accountName!=null  and accountName != ''">
 			and vat.ACT_NAME  =  #{accountName,jdbcType=VARCHAR}
 			and vat.ACT_NAME  =  #{accountName,jdbcType=VARCHAR}
 		</if>
 		</if>

+ 93 - 70
src/main/webapp/admin/businessNumManage/businessNumUpdate.html

@@ -9,8 +9,14 @@
     <script src="../../js/min-loader-next.js"></script>
     <script src="../../js/min-loader-next.js"></script>
 </head>
 </head>
 <body class="content">
 <body class="content">
-	<form class="layui-form" id = "formName"  action="">
+	<form class="layui-form" id = "formName"  action="javascript:void(0)">
     <div style="margin-top: 20px;margin-left: 20px;margin-right: 120px;padding-bottom:60px;" >
     <div style="margin-top: 20px;margin-left: 20px;margin-right: 120px;padding-bottom:60px;" >
+		<div class="layui-form-item" style="display: none;">
+			<label class="layui-form-label">编号</label>
+			<div class="layui-input-block">
+				<input type="text" name="id" id="id" placeholder="请输入编号" disabled="disabled" autocomplete="off" class="layui-input" >
+			</div>
+		</div>
 		<div class="layui-form-item">
 		<div class="layui-form-item">
 			<label class="layui-form-label">商户号</label>
 			<label class="layui-form-label">商户号</label>
 			<div class="layui-input-block">
 			<div class="layui-input-block">
@@ -36,91 +42,108 @@
 		<div class="layui-form-item">
 		<div class="layui-form-item">
 			<label class="layui-form-label">终端号</label>
 			<label class="layui-form-label">终端号</label>
 			<div class="layui-input-block">
 			<div class="layui-input-block">
-				<input type="text" name="number" id="number" lay-verify="required" autocomplete="off" placeholder="请输入终端号" class="layui-input">
+				<input type="text" name="number" id="number" lay-verify="number" autocomplete="off" placeholder="请输入终端号" class="layui-input">
+			</div>
+		</div>
+      </div>
+		<div class="layui-form-item box-button" >
+			<div class="layui-input-block">
+				<button class="layui-btn" lay-submit="" lay-filter="demo1" lay-filter="demo1" >提交</button>
+				<button  class="layui-btn"  id="cancel">取消</button>
 			</div>
 			</div>
+
 		</div>
 		</div>
-      </div>  
       </form>
       </form>
-       	<div class="layui-form-item box-button">
-           <div class="layui-input-block">
-               <button class="layui-btn" onclick = "updateRole()">提交</button>
-           </div>
-       	</div>
 	<script src="../../js/min-loader-next.js"></script>
 	<script src="../../js/min-loader-next.js"></script>
     <!-- 注意:如果你直接复制所有代码到本地,上述js路径需要改成你本地的 -->
     <!-- 注意:如果你直接复制所有代码到本地,上述js路径需要改成你本地的 -->
     <script>
     <script>
-		layui.use('form', function () {
-			var form = layui.form;
-			var params = layui.sessionData("ROW_DATA").NOW_ROW;
-			var fields = params.fields;
-			$("#accountId").val(params.accountId);
-			$("#accountName").val(params.accountName);
-			$("#number").val(params.number);
-
-			layui.each(rowData, function(index, item){
-
-				if(index =="type") {
-
-					if(item == '04'){
-						$("[name='accountType']:eq(04)").prop("checked", true);
-					} else if (item == '05') {
-						$("[name='accountType']:eq(05)").prop("checked", true);
-					} else if (item == '06') {
-						$("[name='accountType']:eq(06)").prop("checked", true);
-					}
+		var rowData = layui.sessionData("ROW_DATA").NOW_ROW;
+		$("#accountId").val(rowData.accountId);
+		$("#accountName").val(rowData.accountName);
+		$("#number").val(rowData.number);
+		$("#id").val(rowData.id);
 
 
+		layui.each(rowData, function(index, item){
+			if(index =="type") {
+				alert(item);
+				if(item == '04'){
+					$("[name='accountType'][value='04']").prop("checked", "checked");
+
+				} else if (item == '05') {
+					$("[name='accountType'][value='05']").prop("checked", "checked");
+				} else if (item == '06') {
+					$("[name='accountType'][value='06']").prop("checked", "checked");
 				}
 				}
 
 
+			}
+
+		})
+		layui.use(['form', 'layedit', 'laydate','layer'], function() {
+			var form = layui.form,
+					layer = layui.layer,
+					layedit = layui.layedit,
+					laydate = layui.laydate;
+
+			//自定义验证规则
+			form.verify({
+				accountName: function(value) {
+					if (isEmpty(value)) {
+						return   '商户名称不能为空!';
+					}
+				},
+				number: function(value) {
+					if (isEmpty(value)) {
+						return   '请输入终端号!';
+					}
+				}
+
+			});
+			form.on('submit(demo1)', function(data) {debugger;
+
+				// 执行修改
+				$.request({
+					action : '../../BusinessNumManageAction/modifybusinessNum',
+					data : data.field,
+					success : function(data){
+						if (data.MINStatus == 0) {
+							layui.use(['layer'], function(){
+								layer.msg('修改成功!', {
+									icon: 1,
+									time: 3000 //2秒关闭(如果不配置,默认是3秒)
+								}, function(){
+									parent.location.reload();
+								});
+							})
+						} else {
+							layui.use(['layer'], function(){
+								layer.alert(data.MINErrorMessage, {icon: 2});
+							})
+						}
+					},
+					error : function(data) {
+						layui.use(['layer'], function(){
+							layer.alert(data.MINErrorMessage, {icon: 2});
+						})
+					}
+				})
+
+
 			})
 			})
+			$('#cancel').on('click', function(){
+				parent.layer.close(parent.layer.index);
+			});
+
 		});
 		});
 
 
+
+
         // 新增角色按钮
         // 新增角色按钮
-        function updateRole(){
+        /*function updateRole(){
 			var name = document.getElementById('accountName').value;
 			var name = document.getElementById('accountName').value;
 			var number = document.getElementById('number').value;
 			var number = document.getElementById('number').value;
 
 
-        	// 校验数据
-			if (isEmpty(number)) {
-				layui.use(['layer'], function(){
-					layer.alert('终端号不能为空!', {icon: 2});
-				})
-				return;
-			}
-			if (isEmpty(name)) {
-				layui.use(['layer'], function(){
-					layer.alert('商户名称不能为空!', {icon: 2});
-				})
-				return;
-			}
-        	// 执行修改
-        	$.request({
-        		action : '../../BusinessNumManageAction/modifybusinessNum',
-        		data : {
-					data :  data.field ,
-        		},
-        		success : function(data){
-        			if (data.MINStatus == 0) {
-        				layui.use(['layer'], function(){
-        					layer.msg('修改成功!', {
-       							icon: 1,
-       							time: 3000 //2秒关闭(如果不配置,默认是3秒)
-       						}, function(){
-       							parent.location.reload();
-       						});
-                		})
-        			} else {
-        				layui.use(['layer'], function(){
-                			layer.alert(data.MINErrorMessage, {icon: 2});
-                		})
-        			}
-        		},
-        		error : function(data) {
-        			layui.use(['layer'], function(){
-            			layer.alert(data.MINErrorMessage, {icon: 2});
-            		})
-        		}
-        	})
-        }
+
+        }*/
     </script>
     </script>
 </body>
 </body>
 </html>
 </html>