ソースを参照

Merge remote-tracking branch 'origin/master'

pangjl 4 年 前
コミット
434a5b9825

+ 32 - 0
src/main/java/com/minpay/db/table/model/VmRechargeRule.java

@@ -60,6 +60,14 @@ public class VmRechargeRule extends AbstractMINBean {
     private String state;
 
     /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column vm_recharge_rule.VRR_BRANCH
+     *
+     * @mbggenerated
+     */
+    private String branch;
+
+    /**
      * This method was generated by MyBatis Generator.
      * This method returns the value of the database column vm_recharge_rule.VRR_ID
      *
@@ -226,4 +234,28 @@ public class VmRechargeRule extends AbstractMINBean {
     public void setState(String state) {
         this.state = state == null ? null : state.trim();
     }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column vm_recharge_rule.VRR_BRANCH
+     *
+     * @return the value of vm_recharge_rule.VRR_BRANCH
+     *
+     * @mbggenerated
+     */
+    public String getBranch() {
+        return branch;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column vm_recharge_rule.VRR_BRANCH
+     *
+     * @param branch the value for vm_recharge_rule.VRR_BRANCH
+     *
+     * @mbggenerated
+     */
+    public void setBranch(String branch) {
+        this.branch = branch == null ? null : branch.trim();
+    }
 }

+ 78 - 0
src/main/java/com/minpay/db/table/model/VmRechargeRuleExample.java

@@ -735,6 +735,84 @@ public class VmRechargeRuleExample {
             addCriterion("VRR_STATE not between", value1, value2, "state");
             return (Criteria) this;
         }
+
+        public Criteria andBranchIsNull() {
+            addCriterion("VRR_BRANCH is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andBranchIsNotNull() {
+            addCriterion("VRR_BRANCH is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andBranchEqualTo(String value) {
+            if(value == null ){
+                andBranchIsNull();
+            } else {
+                addCriterion("VRR_BRANCH =", value, "branch");
+            }
+            return (Criteria) this;
+        }
+
+        public Criteria andBranchNotEqualTo(String value) {
+            if(value == null ){
+                andBranchIsNotNull();
+            } else {
+                addCriterion("VRR_BRANCH <>", value, "branch");
+            }
+            return (Criteria) this;
+        }
+
+        public Criteria andBranchGreaterThan(String value) {
+            addCriterion("VRR_BRANCH >", value, "branch");
+            return (Criteria) this;
+        }
+
+        public Criteria andBranchGreaterThanOrEqualTo(String value) {
+            addCriterion("VRR_BRANCH >=", value, "branch");
+            return (Criteria) this;
+        }
+
+        public Criteria andBranchLessThan(String value) {
+            addCriterion("VRR_BRANCH <", value, "branch");
+            return (Criteria) this;
+        }
+
+        public Criteria andBranchLessThanOrEqualTo(String value) {
+            addCriterion("VRR_BRANCH <=", value, "branch");
+            return (Criteria) this;
+        }
+
+        public Criteria andBranchLike(String value) {
+            addCriterion("VRR_BRANCH like", value, "branch");
+            return (Criteria) this;
+        }
+
+        public Criteria andBranchNotLike(String value) {
+            addCriterion("VRR_BRANCH not like", value, "branch");
+            return (Criteria) this;
+        }
+
+        public Criteria andBranchIn(List<String> values) {
+            addCriterion("VRR_BRANCH in", values, "branch");
+            return (Criteria) this;
+        }
+
+        public Criteria andBranchNotIn(List<String> values) {
+            addCriterion("VRR_BRANCH not in", values, "branch");
+            return (Criteria) this;
+        }
+
+        public Criteria andBranchBetween(String value1, String value2) {
+            addCriterion("VRR_BRANCH between", value1, value2, "branch");
+            return (Criteria) this;
+        }
+
+        public Criteria andBranchNotBetween(String value1, String value2) {
+            addCriterion("VRR_BRANCH not between", value1, value2, "branch");
+            return (Criteria) this;
+        }
     }
 
     /**

+ 6 - 0
src/main/java/com/minpay/shouhuo/RechargeManageAction.java

@@ -71,6 +71,11 @@ public class RechargeManageAction implements IMINAction {
 		if(!StringUtils.isNullOrEmpty(rechargeAmt)){
 			createCriteria.andRechargeAmtEqualTo(rechargeAmt);
 		}
+		User user = session.getUser();
+		if(!Constant.DEFAULT_INSTITUTIONS.equals( user.getBranchId())){
+			createCriteria.andBranchEqualTo(user.getBranchId());
+		}
+
 		if(!StringUtils.isNullOrEmpty(dates)){
 			dates = dates.replaceAll("-", "").replaceAll(" ", "");
 			createCriteria.andCreateTimeBetween(dates.substring(0, 8),dates.substring(8, 16));
@@ -120,6 +125,7 @@ public class RechargeManageAction implements IMINAction {
 		vmRechargeRule.setDesc(desc);
 		vmRechargeRule.setCreateTime(time);
 		vmRechargeRule.setCreateUser(user.getId());
+		vmRechargeRule.setBranch(user.getBranchId());
 		Service.lookup(IMINDataBaseService.class).insertSelective(VmRechargeRuleMapper.class, vmRechargeRule);
 		String logInfo = "添加充值规则:" + id;
 		Service.lookup(ILogService.class).logging(session, logInfo);

+ 20 - 5
src/main/resources/com/minpay/db/table/mapper/VmRechargeRuleMapper.xml

@@ -13,6 +13,7 @@
     <result column="VRR_CREATE_TIME" jdbcType="VARCHAR" property="createTime" />
     <result column="VRR_CREATE_USER" jdbcType="VARCHAR" property="createUser" />
     <result column="VRR_STATE" jdbcType="VARCHAR" property="state" />
+    <result column="VRR_BRANCH" jdbcType="VARCHAR" property="branch" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <!--
@@ -86,7 +87,7 @@
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
     VRR_ID, VRR_RECHARGE_AMT, VRR_GIVE_AMT, VRR_DESC, VRR_CREATE_TIME, VRR_CREATE_USER, 
-    VRR_STATE
+    VRR_STATE, VRR_BRANCH
   </sql>
   <select id="selectByExample" parameterType="com.minpay.db.table.model.VmRechargeRuleExample" resultMap="BaseResultMap">
     <!--
@@ -141,10 +142,10 @@
     -->
     insert into vm_recharge_rule (VRR_ID, VRR_RECHARGE_AMT, VRR_GIVE_AMT, 
       VRR_DESC, VRR_CREATE_TIME, VRR_CREATE_USER, 
-      VRR_STATE)
+      VRR_STATE, VRR_BRANCH)
     values (#{id,jdbcType=VARCHAR}, #{rechargeAmt,jdbcType=VARCHAR}, #{giveAmt,jdbcType=VARCHAR}, 
       #{desc,jdbcType=VARCHAR}, #{createTime,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, 
-      #{state,jdbcType=VARCHAR})
+      #{state,jdbcType=VARCHAR}, #{branch,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.minpay.db.table.model.VmRechargeRule">
     <!--
@@ -174,6 +175,9 @@
       <if test="state != null">
         VRR_STATE,
       </if>
+      <if test="branch != null">
+        VRR_BRANCH,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -197,6 +201,9 @@
       <if test="state != null">
         #{state,jdbcType=VARCHAR},
       </if>
+      <if test="branch != null">
+        #{branch,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.minpay.db.table.model.VmRechargeRuleExample" resultType="java.lang.Integer">
@@ -237,6 +244,9 @@
       <if test="record.state != null">
         VRR_STATE = #{record.state,jdbcType=VARCHAR},
       </if>
+      <if test="record.branch != null">
+        VRR_BRANCH = #{record.branch,jdbcType=VARCHAR},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -254,7 +264,8 @@
       VRR_DESC = #{record.desc,jdbcType=VARCHAR},
       VRR_CREATE_TIME = #{record.createTime,jdbcType=VARCHAR},
       VRR_CREATE_USER = #{record.createUser,jdbcType=VARCHAR},
-      VRR_STATE = #{record.state,jdbcType=VARCHAR}
+      VRR_STATE = #{record.state,jdbcType=VARCHAR},
+      VRR_BRANCH = #{record.branch,jdbcType=VARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -284,6 +295,9 @@
       <if test="state != null">
         VRR_STATE = #{state,jdbcType=VARCHAR},
       </if>
+      <if test="branch != null">
+        VRR_BRANCH = #{branch,jdbcType=VARCHAR},
+      </if>
     </set>
     where VRR_ID = #{id,jdbcType=VARCHAR}
   </update>
@@ -298,7 +312,8 @@
       VRR_DESC = #{desc,jdbcType=VARCHAR},
       VRR_CREATE_TIME = #{createTime,jdbcType=VARCHAR},
       VRR_CREATE_USER = #{createUser,jdbcType=VARCHAR},
-      VRR_STATE = #{state,jdbcType=VARCHAR}
+      VRR_STATE = #{state,jdbcType=VARCHAR},
+      VRR_BRANCH = #{branch,jdbcType=VARCHAR}
     where VRR_ID = #{id,jdbcType=VARCHAR}
   </update>
 </mapper>

+ 1 - 0
src/main/webapp/admin/rechargeManage/rechargeRuleManage.html

@@ -82,6 +82,7 @@
 		      	,{field: 'giveAmt', title: '赠送金额', width:'12%'}
 		      	,{field: 'desc', title: '备注', width:'15%'}
 		      	,{field: 'createTime', title: '创建日期',width:'15%'}
+				,{field: 'branch', title: '所属商户',width:'15%'}
 		      	,{field: 'operate', title: '操作', width: '25%', toolbar: '#barDemo',fixed: 'right'}
 		    ]]
 		    ,done: function(res, curr, count){