xubh 4 éve
szülő
commit
cacd444fc8

+ 192 - 0
src/main/java/com/minpay/db/table/model/VmGameRule.java

@@ -60,6 +60,54 @@ public class VmGameRule extends AbstractMINBean {
     private String createUser;
 
     /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column vm_game_rule.VGL_REWARD_GRADE
+     *
+     * @mbggenerated
+     */
+    private String rewardGrade;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column vm_game_rule.VGL_REWARD_AMT_RATIO
+     *
+     * @mbggenerated
+     */
+    private String rewardAmtRatio;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column vm_game_rule.VGL_REWARD_TYPE
+     *
+     * @mbggenerated
+     */
+    private String rewardType;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column vm_game_rule.VGL_JACKPOT_AMT
+     *
+     * @mbggenerated
+     */
+    private String jackpotAmt;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column vm_game_rule.VGL_EXTRACT_RATIO
+     *
+     * @mbggenerated
+     */
+    private String extractRatio;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column vm_game_rule.VGL_TYPE
+     *
+     * @mbggenerated
+     */
+    private String type;
+
+    /**
      * This method was generated by MyBatis Generator.
      * This method returns the value of the database column vm_game_rule.VGL_ID
      *
@@ -226,4 +274,148 @@ public class VmGameRule extends AbstractMINBean {
     public void setCreateUser(String createUser) {
         this.createUser = createUser == null ? null : createUser.trim();
     }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column vm_game_rule.VGL_REWARD_GRADE
+     *
+     * @return the value of vm_game_rule.VGL_REWARD_GRADE
+     *
+     * @mbggenerated
+     */
+    public String getRewardGrade() {
+        return rewardGrade;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column vm_game_rule.VGL_REWARD_GRADE
+     *
+     * @param rewardGrade the value for vm_game_rule.VGL_REWARD_GRADE
+     *
+     * @mbggenerated
+     */
+    public void setRewardGrade(String rewardGrade) {
+        this.rewardGrade = rewardGrade == null ? null : rewardGrade.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column vm_game_rule.VGL_REWARD_AMT_RATIO
+     *
+     * @return the value of vm_game_rule.VGL_REWARD_AMT_RATIO
+     *
+     * @mbggenerated
+     */
+    public String getRewardAmtRatio() {
+        return rewardAmtRatio;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column vm_game_rule.VGL_REWARD_AMT_RATIO
+     *
+     * @param rewardAmtRatio the value for vm_game_rule.VGL_REWARD_AMT_RATIO
+     *
+     * @mbggenerated
+     */
+    public void setRewardAmtRatio(String rewardAmtRatio) {
+        this.rewardAmtRatio = rewardAmtRatio == null ? null : rewardAmtRatio.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column vm_game_rule.VGL_REWARD_TYPE
+     *
+     * @return the value of vm_game_rule.VGL_REWARD_TYPE
+     *
+     * @mbggenerated
+     */
+    public String getRewardType() {
+        return rewardType;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column vm_game_rule.VGL_REWARD_TYPE
+     *
+     * @param rewardType the value for vm_game_rule.VGL_REWARD_TYPE
+     *
+     * @mbggenerated
+     */
+    public void setRewardType(String rewardType) {
+        this.rewardType = rewardType == null ? null : rewardType.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column vm_game_rule.VGL_JACKPOT_AMT
+     *
+     * @return the value of vm_game_rule.VGL_JACKPOT_AMT
+     *
+     * @mbggenerated
+     */
+    public String getJackpotAmt() {
+        return jackpotAmt;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column vm_game_rule.VGL_JACKPOT_AMT
+     *
+     * @param jackpotAmt the value for vm_game_rule.VGL_JACKPOT_AMT
+     *
+     * @mbggenerated
+     */
+    public void setJackpotAmt(String jackpotAmt) {
+        this.jackpotAmt = jackpotAmt == null ? null : jackpotAmt.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column vm_game_rule.VGL_EXTRACT_RATIO
+     *
+     * @return the value of vm_game_rule.VGL_EXTRACT_RATIO
+     *
+     * @mbggenerated
+     */
+    public String getExtractRatio() {
+        return extractRatio;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column vm_game_rule.VGL_EXTRACT_RATIO
+     *
+     * @param extractRatio the value for vm_game_rule.VGL_EXTRACT_RATIO
+     *
+     * @mbggenerated
+     */
+    public void setExtractRatio(String extractRatio) {
+        this.extractRatio = extractRatio == null ? null : extractRatio.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column vm_game_rule.VGL_TYPE
+     *
+     * @return the value of vm_game_rule.VGL_TYPE
+     *
+     * @mbggenerated
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column vm_game_rule.VGL_TYPE
+     *
+     * @param type the value for vm_game_rule.VGL_TYPE
+     *
+     * @mbggenerated
+     */
+    public void setType(String type) {
+        this.type = type == null ? null : type.trim();
+    }
 }

+ 468 - 0
src/main/java/com/minpay/db/table/model/VmGameRuleExample.java

@@ -735,6 +735,474 @@ public class VmGameRuleExample {
             addCriterion("VGL_CREATE_USER not between", value1, value2, "createUser");
             return (Criteria) this;
         }
+
+        public Criteria andRewardGradeIsNull() {
+            addCriterion("VGL_REWARD_GRADE is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardGradeIsNotNull() {
+            addCriterion("VGL_REWARD_GRADE is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardGradeEqualTo(String value) {
+            if(value == null ){
+                andRewardGradeIsNull();
+            } else {
+                addCriterion("VGL_REWARD_GRADE =", value, "rewardGrade");
+            }
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardGradeNotEqualTo(String value) {
+            if(value == null ){
+                andRewardGradeIsNotNull();
+            } else {
+                addCriterion("VGL_REWARD_GRADE <>", value, "rewardGrade");
+            }
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardGradeGreaterThan(String value) {
+            addCriterion("VGL_REWARD_GRADE >", value, "rewardGrade");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardGradeGreaterThanOrEqualTo(String value) {
+            addCriterion("VGL_REWARD_GRADE >=", value, "rewardGrade");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardGradeLessThan(String value) {
+            addCriterion("VGL_REWARD_GRADE <", value, "rewardGrade");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardGradeLessThanOrEqualTo(String value) {
+            addCriterion("VGL_REWARD_GRADE <=", value, "rewardGrade");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardGradeLike(String value) {
+            addCriterion("VGL_REWARD_GRADE like", value, "rewardGrade");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardGradeNotLike(String value) {
+            addCriterion("VGL_REWARD_GRADE not like", value, "rewardGrade");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardGradeIn(List<String> values) {
+            addCriterion("VGL_REWARD_GRADE in", values, "rewardGrade");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardGradeNotIn(List<String> values) {
+            addCriterion("VGL_REWARD_GRADE not in", values, "rewardGrade");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardGradeBetween(String value1, String value2) {
+            addCriterion("VGL_REWARD_GRADE between", value1, value2, "rewardGrade");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardGradeNotBetween(String value1, String value2) {
+            addCriterion("VGL_REWARD_GRADE not between", value1, value2, "rewardGrade");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardAmtRatioIsNull() {
+            addCriterion("VGL_REWARD_AMT_RATIO is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardAmtRatioIsNotNull() {
+            addCriterion("VGL_REWARD_AMT_RATIO is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardAmtRatioEqualTo(String value) {
+            if(value == null ){
+                andRewardAmtRatioIsNull();
+            } else {
+                addCriterion("VGL_REWARD_AMT_RATIO =", value, "rewardAmtRatio");
+            }
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardAmtRatioNotEqualTo(String value) {
+            if(value == null ){
+                andRewardAmtRatioIsNotNull();
+            } else {
+                addCriterion("VGL_REWARD_AMT_RATIO <>", value, "rewardAmtRatio");
+            }
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardAmtRatioGreaterThan(String value) {
+            addCriterion("VGL_REWARD_AMT_RATIO >", value, "rewardAmtRatio");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardAmtRatioGreaterThanOrEqualTo(String value) {
+            addCriterion("VGL_REWARD_AMT_RATIO >=", value, "rewardAmtRatio");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardAmtRatioLessThan(String value) {
+            addCriterion("VGL_REWARD_AMT_RATIO <", value, "rewardAmtRatio");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardAmtRatioLessThanOrEqualTo(String value) {
+            addCriterion("VGL_REWARD_AMT_RATIO <=", value, "rewardAmtRatio");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardAmtRatioLike(String value) {
+            addCriterion("VGL_REWARD_AMT_RATIO like", value, "rewardAmtRatio");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardAmtRatioNotLike(String value) {
+            addCriterion("VGL_REWARD_AMT_RATIO not like", value, "rewardAmtRatio");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardAmtRatioIn(List<String> values) {
+            addCriterion("VGL_REWARD_AMT_RATIO in", values, "rewardAmtRatio");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardAmtRatioNotIn(List<String> values) {
+            addCriterion("VGL_REWARD_AMT_RATIO not in", values, "rewardAmtRatio");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardAmtRatioBetween(String value1, String value2) {
+            addCriterion("VGL_REWARD_AMT_RATIO between", value1, value2, "rewardAmtRatio");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardAmtRatioNotBetween(String value1, String value2) {
+            addCriterion("VGL_REWARD_AMT_RATIO not between", value1, value2, "rewardAmtRatio");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardTypeIsNull() {
+            addCriterion("VGL_REWARD_TYPE is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardTypeIsNotNull() {
+            addCriterion("VGL_REWARD_TYPE is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardTypeEqualTo(String value) {
+            if(value == null ){
+                andRewardTypeIsNull();
+            } else {
+                addCriterion("VGL_REWARD_TYPE =", value, "rewardType");
+            }
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardTypeNotEqualTo(String value) {
+            if(value == null ){
+                andRewardTypeIsNotNull();
+            } else {
+                addCriterion("VGL_REWARD_TYPE <>", value, "rewardType");
+            }
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardTypeGreaterThan(String value) {
+            addCriterion("VGL_REWARD_TYPE >", value, "rewardType");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardTypeGreaterThanOrEqualTo(String value) {
+            addCriterion("VGL_REWARD_TYPE >=", value, "rewardType");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardTypeLessThan(String value) {
+            addCriterion("VGL_REWARD_TYPE <", value, "rewardType");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardTypeLessThanOrEqualTo(String value) {
+            addCriterion("VGL_REWARD_TYPE <=", value, "rewardType");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardTypeLike(String value) {
+            addCriterion("VGL_REWARD_TYPE like", value, "rewardType");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardTypeNotLike(String value) {
+            addCriterion("VGL_REWARD_TYPE not like", value, "rewardType");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardTypeIn(List<String> values) {
+            addCriterion("VGL_REWARD_TYPE in", values, "rewardType");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardTypeNotIn(List<String> values) {
+            addCriterion("VGL_REWARD_TYPE not in", values, "rewardType");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardTypeBetween(String value1, String value2) {
+            addCriterion("VGL_REWARD_TYPE between", value1, value2, "rewardType");
+            return (Criteria) this;
+        }
+
+        public Criteria andRewardTypeNotBetween(String value1, String value2) {
+            addCriterion("VGL_REWARD_TYPE not between", value1, value2, "rewardType");
+            return (Criteria) this;
+        }
+
+        public Criteria andJackpotAmtIsNull() {
+            addCriterion("VGL_JACKPOT_AMT is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andJackpotAmtIsNotNull() {
+            addCriterion("VGL_JACKPOT_AMT is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andJackpotAmtEqualTo(String value) {
+            if(value == null ){
+                andJackpotAmtIsNull();
+            } else {
+                addCriterion("VGL_JACKPOT_AMT =", value, "jackpotAmt");
+            }
+            return (Criteria) this;
+        }
+
+        public Criteria andJackpotAmtNotEqualTo(String value) {
+            if(value == null ){
+                andJackpotAmtIsNotNull();
+            } else {
+                addCriterion("VGL_JACKPOT_AMT <>", value, "jackpotAmt");
+            }
+            return (Criteria) this;
+        }
+
+        public Criteria andJackpotAmtGreaterThan(String value) {
+            addCriterion("VGL_JACKPOT_AMT >", value, "jackpotAmt");
+            return (Criteria) this;
+        }
+
+        public Criteria andJackpotAmtGreaterThanOrEqualTo(String value) {
+            addCriterion("VGL_JACKPOT_AMT >=", value, "jackpotAmt");
+            return (Criteria) this;
+        }
+
+        public Criteria andJackpotAmtLessThan(String value) {
+            addCriterion("VGL_JACKPOT_AMT <", value, "jackpotAmt");
+            return (Criteria) this;
+        }
+
+        public Criteria andJackpotAmtLessThanOrEqualTo(String value) {
+            addCriterion("VGL_JACKPOT_AMT <=", value, "jackpotAmt");
+            return (Criteria) this;
+        }
+
+        public Criteria andJackpotAmtLike(String value) {
+            addCriterion("VGL_JACKPOT_AMT like", value, "jackpotAmt");
+            return (Criteria) this;
+        }
+
+        public Criteria andJackpotAmtNotLike(String value) {
+            addCriterion("VGL_JACKPOT_AMT not like", value, "jackpotAmt");
+            return (Criteria) this;
+        }
+
+        public Criteria andJackpotAmtIn(List<String> values) {
+            addCriterion("VGL_JACKPOT_AMT in", values, "jackpotAmt");
+            return (Criteria) this;
+        }
+
+        public Criteria andJackpotAmtNotIn(List<String> values) {
+            addCriterion("VGL_JACKPOT_AMT not in", values, "jackpotAmt");
+            return (Criteria) this;
+        }
+
+        public Criteria andJackpotAmtBetween(String value1, String value2) {
+            addCriterion("VGL_JACKPOT_AMT between", value1, value2, "jackpotAmt");
+            return (Criteria) this;
+        }
+
+        public Criteria andJackpotAmtNotBetween(String value1, String value2) {
+            addCriterion("VGL_JACKPOT_AMT not between", value1, value2, "jackpotAmt");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtractRatioIsNull() {
+            addCriterion("VGL_EXTRACT_RATIO is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtractRatioIsNotNull() {
+            addCriterion("VGL_EXTRACT_RATIO is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtractRatioEqualTo(String value) {
+            if(value == null ){
+                andExtractRatioIsNull();
+            } else {
+                addCriterion("VGL_EXTRACT_RATIO =", value, "extractRatio");
+            }
+            return (Criteria) this;
+        }
+
+        public Criteria andExtractRatioNotEqualTo(String value) {
+            if(value == null ){
+                andExtractRatioIsNotNull();
+            } else {
+                addCriterion("VGL_EXTRACT_RATIO <>", value, "extractRatio");
+            }
+            return (Criteria) this;
+        }
+
+        public Criteria andExtractRatioGreaterThan(String value) {
+            addCriterion("VGL_EXTRACT_RATIO >", value, "extractRatio");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtractRatioGreaterThanOrEqualTo(String value) {
+            addCriterion("VGL_EXTRACT_RATIO >=", value, "extractRatio");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtractRatioLessThan(String value) {
+            addCriterion("VGL_EXTRACT_RATIO <", value, "extractRatio");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtractRatioLessThanOrEqualTo(String value) {
+            addCriterion("VGL_EXTRACT_RATIO <=", value, "extractRatio");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtractRatioLike(String value) {
+            addCriterion("VGL_EXTRACT_RATIO like", value, "extractRatio");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtractRatioNotLike(String value) {
+            addCriterion("VGL_EXTRACT_RATIO not like", value, "extractRatio");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtractRatioIn(List<String> values) {
+            addCriterion("VGL_EXTRACT_RATIO in", values, "extractRatio");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtractRatioNotIn(List<String> values) {
+            addCriterion("VGL_EXTRACT_RATIO not in", values, "extractRatio");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtractRatioBetween(String value1, String value2) {
+            addCriterion("VGL_EXTRACT_RATIO between", value1, value2, "extractRatio");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtractRatioNotBetween(String value1, String value2) {
+            addCriterion("VGL_EXTRACT_RATIO not between", value1, value2, "extractRatio");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIsNull() {
+            addCriterion("VGL_TYPE is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIsNotNull() {
+            addCriterion("VGL_TYPE is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeEqualTo(String value) {
+            if(value == null ){
+                andTypeIsNull();
+            } else {
+                addCriterion("VGL_TYPE =", value, "type");
+            }
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotEqualTo(String value) {
+            if(value == null ){
+                andTypeIsNotNull();
+            } else {
+                addCriterion("VGL_TYPE <>", value, "type");
+            }
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeGreaterThan(String value) {
+            addCriterion("VGL_TYPE >", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeGreaterThanOrEqualTo(String value) {
+            addCriterion("VGL_TYPE >=", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeLessThan(String value) {
+            addCriterion("VGL_TYPE <", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeLessThanOrEqualTo(String value) {
+            addCriterion("VGL_TYPE <=", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeLike(String value) {
+            addCriterion("VGL_TYPE like", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotLike(String value) {
+            addCriterion("VGL_TYPE not like", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIn(List<String> values) {
+            addCriterion("VGL_TYPE in", values, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotIn(List<String> values) {
+            addCriterion("VGL_TYPE not in", values, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeBetween(String value1, String value2) {
+            addCriterion("VGL_TYPE between", value1, value2, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotBetween(String value1, String value2) {
+            addCriterion("VGL_TYPE not between", value1, value2, "type");
+            return (Criteria) this;
+        }
     }
 
     /**

+ 35 - 5
src/main/java/com/minpay/shouhuo/GameSetupManageAction.java

@@ -15,6 +15,7 @@ import com.startup.minpay.frame.business.MINHttpServletRequestContext;
 import com.startup.minpay.frame.business.res.MINActionResult;
 import com.startup.minpay.frame.constant.IMINBusinessConstant;
 import com.startup.minpay.frame.constant.IMINTransactionEnum;
+import com.startup.minpay.frame.data.format.MINCopyFormat;
 import com.startup.minpay.frame.exception.MINBusinessException;
 import com.startup.minpay.frame.jdbc.MINRowBounds;
 import com.startup.minpay.frame.service.base.IMINDataBaseService;
@@ -29,7 +30,7 @@ import com.startup.minpay.util.DateTime;
 import java.util.List;
 
 /**
- * 充值规则管理
+ * 游戏规则管理
  * @author xbh
  *
  */
@@ -44,7 +45,7 @@ public class GameSetupManageAction implements IMINAction {
 	public final static String	DELETE_GAME_SETUP			= "deleteGameSetup";
 
 	/**
-	 * 查询充值规则
+	 * 查询游戏规则
 	 * @param session
 	 * @param page
 	 * @param limit
@@ -71,7 +72,8 @@ public class GameSetupManageAction implements IMINAction {
 		MINRowBounds rows = new MINRowBounds(page, limit);
 		// 查询
 		List<VmGameRule> ls = Service.lookup(IMINDataBaseService.class).getMybatisMapper(VmGameRuleMapper.class).selectByExample(vmGameRuleExample, rows);
-		
+		ls = new MINCopyFormat("{state:'stateDesc',type:'typeDesc'}").format(ls);
+		ls = Service.lookup(IFormatService.class).formatEnum(ls, "{stateDesc:'GAME_SETUP_STATE',typeDesc:'GAME_SETUP_TYPE'}");
 		// 格式化
 		ls = Service.lookup(IFormatService.class).formatDateTime(ls, "createTime");
 		// 设置返回值
@@ -92,23 +94,50 @@ public class GameSetupManageAction implements IMINAction {
 			@MINParam(key = "name") String name,
 			@MINParam(key = "desc") String desc,
 			@MINParam(key = "alipayId") String alipayId,
+			@MINParam(key = "type") String type,
+			@MINParam(key = "rewardGrade") String rewardGrade,
+			@MINParam(key = "rewardAmtRatio") String rewardAmtRatio,
+			@MINParam(key = "rewardType") String rewardType,
+			@MINParam(key = "jackpotAmt") String jackpotAmt,
+			@MINParam(key = "extractRatio") String extractRatio,
 			MINSession session) throws MINBusinessException {
 		MINActionResult res = new MINActionResult();
 		User user = session.getUser();
 		if(!Constant.ADMINISTRATION_SYSTEM_NUMBER.equals(user.getBranchId())){
 			throw new MINBusinessException("此用户没有权限,此操作");
 		}
+		VmGameRule vmGameRule = new VmGameRule();
+		//类型为超级大彩蛋时候
+		if("2".equals(type)){
+			if(StringUtils.isNullOrEmpty(rewardGrade)||StringUtils.isNullOrEmpty(rewardAmtRatio)){
+				throw new MINBusinessException("彩蛋等级或中奖金额占比不能为空");
+			}
+			vmGameRule.setRewardGrade(rewardGrade);
+			vmGameRule.setRewardAmtRatio(rewardAmtRatio);
+			vmGameRule.setRewardType(rewardType);
+			if("0".equals(rewardType)){
+				if(StringUtils.isNullOrEmpty(jackpotAmt)){
+					throw new MINBusinessException("奖池金额不能为空");
+				}
+				vmGameRule.setJackpotAmt(jackpotAmt);
 
+			}else  if("1".equals(rewardType)){
+				if(StringUtils.isNullOrEmpty(extractRatio)){
+					throw new MINBusinessException("抽取比例不能为空");
+				}
+				vmGameRule.setExtractRatio(extractRatio);
+			}
+		}
 		String id = Service.lookup(IPublicService.class).getSequence("GAME_RULE_NO");
 		String time = new DateTime().toDateTimeString();
 		id = time.concat(id);
-		VmGameRule vmGameRule = new VmGameRule();
 		vmGameRule.setId(id);
 		vmGameRule.setName(name);
 		vmGameRule.setDesc(desc);
 		vmGameRule.setCreateTime(time);
 		vmGameRule.setAlipayid(alipayId);
 		vmGameRule.setCreateUser(user.getId());
+		vmGameRule.setType(type);
 		Service.lookup(IMINDataBaseService.class).insertSelective(VmGameRuleMapper.class, vmGameRule);
 		String logInfo = user.getName()+"-添加游戏规则:" + id;
 		Service.lookup(ILogService.class).logging(session, logInfo);
@@ -116,7 +145,8 @@ public class GameSetupManageAction implements IMINAction {
 	}
 	@MINValidator(value = ADD_GAME_SETUP)
 	public MINActionResult addGameSetupValidator(
-			@MINParam(key = "name",regex = RegexUtil.NULL, error = "名称不能为空") String name,
+			@MINParam(key = "name",regex = RegexUtil.NOT_NULL, error = "名称不能为空") String name,
+			@MINParam(key = "type",regex = RegexUtil.NOT_NULL, error = "游戏规则不能为空") String type,
 			MINSession session) throws MINBusinessException {
 		MINActionResult res = new MINActionResult();
 		return res;

+ 186 - 90
src/main/resources/com/minpay/db/table/mapper/VmGameRuleMapper.xml

@@ -1,42 +1,48 @@
-<?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.VmGameRuleMapper" >
-  <resultMap id="BaseResultMap" type="com.minpay.db.table.model.VmGameRule" >
+<?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.VmGameRuleMapper">
+  <resultMap id="BaseResultMap" type="com.minpay.db.table.model.VmGameRule">
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
-    <id column="VGL_ID" property="id" jdbcType="VARCHAR" />
-    <result column="VGL_NAME" property="name" jdbcType="VARCHAR" />
-    <result column="VGL_DESC" property="desc" jdbcType="VARCHAR" />
-    <result column="VGL_STATE" property="state" jdbcType="VARCHAR" />
-    <result column="VGL_ALIPAYID" property="alipayid" jdbcType="VARCHAR" />
-    <result column="VGL_CREATE_TIME" property="createTime" jdbcType="VARCHAR" />
-    <result column="VGL_CREATE_USER" property="createUser" jdbcType="VARCHAR" />
+    <id column="VGL_ID" jdbcType="VARCHAR" property="id" />
+    <result column="VGL_NAME" jdbcType="VARCHAR" property="name" />
+    <result column="VGL_DESC" jdbcType="VARCHAR" property="desc" />
+    <result column="VGL_STATE" jdbcType="VARCHAR" property="state" />
+    <result column="VGL_ALIPAYID" jdbcType="VARCHAR" property="alipayid" />
+    <result column="VGL_CREATE_TIME" jdbcType="VARCHAR" property="createTime" />
+    <result column="VGL_CREATE_USER" jdbcType="VARCHAR" property="createUser" />
+    <result column="VGL_REWARD_GRADE" jdbcType="VARCHAR" property="rewardGrade" />
+    <result column="VGL_REWARD_AMT_RATIO" jdbcType="VARCHAR" property="rewardAmtRatio" />
+    <result column="VGL_REWARD_TYPE" jdbcType="VARCHAR" property="rewardType" />
+    <result column="VGL_JACKPOT_AMT" jdbcType="VARCHAR" property="jackpotAmt" />
+    <result column="VGL_EXTRACT_RATIO" jdbcType="VARCHAR" property="extractRatio" />
+    <result column="VGL_TYPE" jdbcType="VARCHAR" property="type" />
   </resultMap>
-  <sql id="Example_Where_Clause" >
+  <sql id="Example_Where_Clause">
     <!--
       WARNING - @mbggenerated
       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}
                 </when>
-                <when test="criterion.singleValue" >
+                <when test="criterion.singleValue">
                   and ${criterion.condition} #{criterion.value}
                 </when>
-                <when test="criterion.betweenValue" >
+                <when test="criterion.betweenValue">
                   and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                 </when>
-                <when test="criterion.listValue" >
+                <when test="criterion.listValue">
                   and ${criterion.condition}
-                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                     #{listItem}
                   </foreach>
                 </when>
@@ -47,29 +53,29 @@
       </foreach>
     </where>
   </sql>
-  <sql id="Update_By_Example_Where_Clause" >
+  <sql id="Update_By_Example_Where_Clause">
     <!--
       WARNING - @mbggenerated
       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}
                 </when>
-                <when test="criterion.singleValue" >
+                <when test="criterion.singleValue">
                   and ${criterion.condition} #{criterion.value}
                 </when>
-                <when test="criterion.betweenValue" >
+                <when test="criterion.betweenValue">
                   and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                 </when>
-                <when test="criterion.listValue" >
+                <when test="criterion.listValue">
                   and ${criterion.condition}
-                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                     #{listItem}
                   </foreach>
                 </when>
@@ -80,32 +86,34 @@
       </foreach>
     </where>
   </sql>
-  <sql id="Base_Column_List" >
+  <sql id="Base_Column_List">
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
-    VGL_ID, VGL_NAME, VGL_DESC, VGL_STATE, VGL_ALIPAYID, VGL_CREATE_TIME, VGL_CREATE_USER
+    VGL_ID, VGL_NAME, VGL_DESC, VGL_STATE, VGL_ALIPAYID, VGL_CREATE_TIME, VGL_CREATE_USER, 
+    VGL_REWARD_GRADE, VGL_REWARD_AMT_RATIO, VGL_REWARD_TYPE, VGL_JACKPOT_AMT, VGL_EXTRACT_RATIO, 
+    VGL_TYPE
   </sql>
-  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.minpay.db.table.model.VmGameRuleExample" >
+  <select id="selectByExample" parameterType="com.minpay.db.table.model.VmGameRuleExample" resultMap="BaseResultMap">
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
     select
-    <if test="distinct" >
+    <if test="distinct">
       distinct
     </if>
     <include refid="Base_Column_List" />
     from vm_game_rule
-    <if test="_parameter != null" >
+    <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
     </if>
-    <if test="orderByClause != null" >
+    <if test="orderByClause != null">
       order by ${orderByClause}
     </if>
   </select>
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
@@ -115,7 +123,7 @@
     from vm_game_rule
     where VGL_ID = #{id,jdbcType=VARCHAR}
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
@@ -123,125 +131,183 @@
     delete from vm_game_rule
     where VGL_ID = #{id,jdbcType=VARCHAR}
   </delete>
-  <delete id="deleteByExample" parameterType="com.minpay.db.table.model.VmGameRuleExample" >
+  <delete id="deleteByExample" parameterType="com.minpay.db.table.model.VmGameRuleExample">
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
     delete from vm_game_rule
-    <if test="_parameter != null" >
+    <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
     </if>
   </delete>
-  <insert id="insert" parameterType="com.minpay.db.table.model.VmGameRule" >
+  <insert id="insert" parameterType="com.minpay.db.table.model.VmGameRule">
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
     insert into vm_game_rule (VGL_ID, VGL_NAME, VGL_DESC, 
       VGL_STATE, VGL_ALIPAYID, VGL_CREATE_TIME, 
-      VGL_CREATE_USER)
+      VGL_CREATE_USER, VGL_REWARD_GRADE, VGL_REWARD_AMT_RATIO, 
+      VGL_REWARD_TYPE, VGL_JACKPOT_AMT, VGL_EXTRACT_RATIO, 
+      VGL_TYPE)
     values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{desc,jdbcType=VARCHAR}, 
       #{state,jdbcType=VARCHAR}, #{alipayid,jdbcType=VARCHAR}, #{createTime,jdbcType=VARCHAR}, 
-      #{createUser,jdbcType=VARCHAR})
+      #{createUser,jdbcType=VARCHAR}, #{rewardGrade,jdbcType=VARCHAR}, #{rewardAmtRatio,jdbcType=VARCHAR}, 
+      #{rewardType,jdbcType=VARCHAR}, #{jackpotAmt,jdbcType=VARCHAR}, #{extractRatio,jdbcType=VARCHAR}, 
+      #{type,jdbcType=VARCHAR})
   </insert>
-  <insert id="insertSelective" parameterType="com.minpay.db.table.model.VmGameRule" >
+  <insert id="insertSelective" parameterType="com.minpay.db.table.model.VmGameRule">
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
     insert into vm_game_rule
-    <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="id != null" >
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
         VGL_ID,
       </if>
-      <if test="name != null" >
+      <if test="name != null">
         VGL_NAME,
       </if>
-      <if test="desc != null" >
+      <if test="desc != null">
         VGL_DESC,
       </if>
-      <if test="state != null" >
+      <if test="state != null">
         VGL_STATE,
       </if>
-      <if test="alipayid != null" >
+      <if test="alipayid != null">
         VGL_ALIPAYID,
       </if>
-      <if test="createTime != null" >
+      <if test="createTime != null">
         VGL_CREATE_TIME,
       </if>
-      <if test="createUser != null" >
+      <if test="createUser != null">
         VGL_CREATE_USER,
       </if>
+      <if test="rewardGrade != null">
+        VGL_REWARD_GRADE,
+      </if>
+      <if test="rewardAmtRatio != null">
+        VGL_REWARD_AMT_RATIO,
+      </if>
+      <if test="rewardType != null">
+        VGL_REWARD_TYPE,
+      </if>
+      <if test="jackpotAmt != null">
+        VGL_JACKPOT_AMT,
+      </if>
+      <if test="extractRatio != null">
+        VGL_EXTRACT_RATIO,
+      </if>
+      <if test="type != null">
+        VGL_TYPE,
+      </if>
     </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="id != null" >
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
         #{id,jdbcType=VARCHAR},
       </if>
-      <if test="name != null" >
+      <if test="name != null">
         #{name,jdbcType=VARCHAR},
       </if>
-      <if test="desc != null" >
+      <if test="desc != null">
         #{desc,jdbcType=VARCHAR},
       </if>
-      <if test="state != null" >
+      <if test="state != null">
         #{state,jdbcType=VARCHAR},
       </if>
-      <if test="alipayid != null" >
+      <if test="alipayid != null">
         #{alipayid,jdbcType=VARCHAR},
       </if>
-      <if test="createTime != null" >
+      <if test="createTime != null">
         #{createTime,jdbcType=VARCHAR},
       </if>
-      <if test="createUser != null" >
+      <if test="createUser != null">
         #{createUser,jdbcType=VARCHAR},
       </if>
+      <if test="rewardGrade != null">
+        #{rewardGrade,jdbcType=VARCHAR},
+      </if>
+      <if test="rewardAmtRatio != null">
+        #{rewardAmtRatio,jdbcType=VARCHAR},
+      </if>
+      <if test="rewardType != null">
+        #{rewardType,jdbcType=VARCHAR},
+      </if>
+      <if test="jackpotAmt != null">
+        #{jackpotAmt,jdbcType=VARCHAR},
+      </if>
+      <if test="extractRatio != null">
+        #{extractRatio,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        #{type,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
-  <select id="countByExample" parameterType="com.minpay.db.table.model.VmGameRuleExample" resultType="java.lang.Integer" >
+  <select id="countByExample" parameterType="com.minpay.db.table.model.VmGameRuleExample" resultType="java.lang.Integer">
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
     select count(*) from vm_game_rule
-    <if test="_parameter != null" >
+    <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
     </if>
   </select>
-  <update id="updateByExampleSelective" parameterType="map" >
+  <update id="updateByExampleSelective" parameterType="map">
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
     update vm_game_rule
-    <set >
-      <if test="record.id != null" >
+    <set>
+      <if test="record.id != null">
         VGL_ID = #{record.id,jdbcType=VARCHAR},
       </if>
-      <if test="record.name != null" >
+      <if test="record.name != null">
         VGL_NAME = #{record.name,jdbcType=VARCHAR},
       </if>
-      <if test="record.desc != null" >
+      <if test="record.desc != null">
         VGL_DESC = #{record.desc,jdbcType=VARCHAR},
       </if>
-      <if test="record.state != null" >
+      <if test="record.state != null">
         VGL_STATE = #{record.state,jdbcType=VARCHAR},
       </if>
-      <if test="record.alipayid != null" >
+      <if test="record.alipayid != null">
         VGL_ALIPAYID = #{record.alipayid,jdbcType=VARCHAR},
       </if>
-      <if test="record.createTime != null" >
+      <if test="record.createTime != null">
         VGL_CREATE_TIME = #{record.createTime,jdbcType=VARCHAR},
       </if>
-      <if test="record.createUser != null" >
+      <if test="record.createUser != null">
         VGL_CREATE_USER = #{record.createUser,jdbcType=VARCHAR},
       </if>
+      <if test="record.rewardGrade != null">
+        VGL_REWARD_GRADE = #{record.rewardGrade,jdbcType=VARCHAR},
+      </if>
+      <if test="record.rewardAmtRatio != null">
+        VGL_REWARD_AMT_RATIO = #{record.rewardAmtRatio,jdbcType=VARCHAR},
+      </if>
+      <if test="record.rewardType != null">
+        VGL_REWARD_TYPE = #{record.rewardType,jdbcType=VARCHAR},
+      </if>
+      <if test="record.jackpotAmt != null">
+        VGL_JACKPOT_AMT = #{record.jackpotAmt,jdbcType=VARCHAR},
+      </if>
+      <if test="record.extractRatio != null">
+        VGL_EXTRACT_RATIO = #{record.extractRatio,jdbcType=VARCHAR},
+      </if>
+      <if test="record.type != null">
+        VGL_TYPE = #{record.type,jdbcType=VARCHAR},
+      </if>
     </set>
-    <if test="_parameter != null" >
+    <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
   </update>
-  <update id="updateByExample" parameterType="map" >
+  <update id="updateByExample" parameterType="map">
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
@@ -253,40 +319,64 @@
       VGL_STATE = #{record.state,jdbcType=VARCHAR},
       VGL_ALIPAYID = #{record.alipayid,jdbcType=VARCHAR},
       VGL_CREATE_TIME = #{record.createTime,jdbcType=VARCHAR},
-      VGL_CREATE_USER = #{record.createUser,jdbcType=VARCHAR}
-    <if test="_parameter != null" >
+      VGL_CREATE_USER = #{record.createUser,jdbcType=VARCHAR},
+      VGL_REWARD_GRADE = #{record.rewardGrade,jdbcType=VARCHAR},
+      VGL_REWARD_AMT_RATIO = #{record.rewardAmtRatio,jdbcType=VARCHAR},
+      VGL_REWARD_TYPE = #{record.rewardType,jdbcType=VARCHAR},
+      VGL_JACKPOT_AMT = #{record.jackpotAmt,jdbcType=VARCHAR},
+      VGL_EXTRACT_RATIO = #{record.extractRatio,jdbcType=VARCHAR},
+      VGL_TYPE = #{record.type,jdbcType=VARCHAR}
+    <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
   </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.minpay.db.table.model.VmGameRule" >
+  <update id="updateByPrimaryKeySelective" parameterType="com.minpay.db.table.model.VmGameRule">
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
     update vm_game_rule
-    <set >
-      <if test="name != null" >
+    <set>
+      <if test="name != null">
         VGL_NAME = #{name,jdbcType=VARCHAR},
       </if>
-      <if test="desc != null" >
+      <if test="desc != null">
         VGL_DESC = #{desc,jdbcType=VARCHAR},
       </if>
-      <if test="state != null" >
+      <if test="state != null">
         VGL_STATE = #{state,jdbcType=VARCHAR},
       </if>
-      <if test="alipayid != null" >
+      <if test="alipayid != null">
         VGL_ALIPAYID = #{alipayid,jdbcType=VARCHAR},
       </if>
-      <if test="createTime != null" >
+      <if test="createTime != null">
         VGL_CREATE_TIME = #{createTime,jdbcType=VARCHAR},
       </if>
-      <if test="createUser != null" >
+      <if test="createUser != null">
         VGL_CREATE_USER = #{createUser,jdbcType=VARCHAR},
       </if>
+      <if test="rewardGrade != null">
+        VGL_REWARD_GRADE = #{rewardGrade,jdbcType=VARCHAR},
+      </if>
+      <if test="rewardAmtRatio != null">
+        VGL_REWARD_AMT_RATIO = #{rewardAmtRatio,jdbcType=VARCHAR},
+      </if>
+      <if test="rewardType != null">
+        VGL_REWARD_TYPE = #{rewardType,jdbcType=VARCHAR},
+      </if>
+      <if test="jackpotAmt != null">
+        VGL_JACKPOT_AMT = #{jackpotAmt,jdbcType=VARCHAR},
+      </if>
+      <if test="extractRatio != null">
+        VGL_EXTRACT_RATIO = #{extractRatio,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        VGL_TYPE = #{type,jdbcType=VARCHAR},
+      </if>
     </set>
     where VGL_ID = #{id,jdbcType=VARCHAR}
   </update>
-  <update id="updateByPrimaryKey" parameterType="com.minpay.db.table.model.VmGameRule" >
+  <update id="updateByPrimaryKey" parameterType="com.minpay.db.table.model.VmGameRule">
     <!--
       WARNING - @mbggenerated
       This element is automatically generated by MyBatis Generator, do not modify.
@@ -297,7 +387,13 @@
       VGL_STATE = #{state,jdbcType=VARCHAR},
       VGL_ALIPAYID = #{alipayid,jdbcType=VARCHAR},
       VGL_CREATE_TIME = #{createTime,jdbcType=VARCHAR},
-      VGL_CREATE_USER = #{createUser,jdbcType=VARCHAR}
+      VGL_CREATE_USER = #{createUser,jdbcType=VARCHAR},
+      VGL_REWARD_GRADE = #{rewardGrade,jdbcType=VARCHAR},
+      VGL_REWARD_AMT_RATIO = #{rewardAmtRatio,jdbcType=VARCHAR},
+      VGL_REWARD_TYPE = #{rewardType,jdbcType=VARCHAR},
+      VGL_JACKPOT_AMT = #{jackpotAmt,jdbcType=VARCHAR},
+      VGL_EXTRACT_RATIO = #{extractRatio,jdbcType=VARCHAR},
+      VGL_TYPE = #{type,jdbcType=VARCHAR}
     where VGL_ID = #{id,jdbcType=VARCHAR}
   </update>
 </mapper>

+ 27 - 152
src/main/webapp/admin/gameSetupManage/gameSetupManage.html

@@ -14,41 +14,24 @@
 			<div class="tiaojian-part2 fr  demoTable">
 				<button class="layui-btn order-bnt1"  data-type="reload" >搜索</button>
 				<button class="layui-btn  order-bnt2" data-type="reset">重置</button>
-				<button class="layui-btn order-bnt2" id = "addUser">添加</button>
+				<button class="layui-btn order-bnt2" id = "addGameSetup">添加</button>
 				<a href="#" id="toggle" class="top">收起</a>
 			</div>
 		</div>
 		<form class="layui-form"  action="javascript:void(0)"  id = "formName">
 			<div class="order-select back-border" id="content">
 				<div class="layui-inline">
-					<label class="f12-gray4">登录名:</label>
-					<input onchange = "changeSelectCon(0,this,'inp')" class="search-select" type="tel" name="logonname" id ="logonname" value="" placeholder="请输入登录名" />
-				</div>
-				<div class="layui-inline">
-					<label class="f12-gray4">日期:</label>
-					<input class="search-select" type="text"  id="dates" placeholder="日期(区间)"   readonly />
-				</div>
-				<div class="layui-inline">
-					<label class="f12-gray4">状态:</label>
-					<div class=""  style="display:inline-block" id = 'state'></div>
-				</div>
-				<div class="d-dashed" style="margin: 10px 0;"></div>
-				<div class="layui-inline">
-					<label class="f12-gray4">姓名:</label>
-					<input onchange = "changeSelectCon(3,this,'inp')" class="search-select" type="tel" name="name"  id ="name" value="" placeholder="请输入姓名" />
+					<label class="f12-gray4">游戏名称:</label>
+					<input onchange = "changeSelectCon(0,this,'inp')" class="search-select" type="tel" name="name"  id ="name" value="" placeholder="游戏名称" />
 				</div>
 				
-				<div class="layui-inline">
-					<label class="f12-gray4">角色:</label>
-					<div class=""  style="display:inline-block" id = 'seleRoleid'></div>
-				</div>
 			</div>
 		</form>
 				
 	</div>
 	
 	<div class="shadow-content" style="margin:1.5rem;">
-			<table id="userManage" lay-filter="tableFilter"></table>
+			<table id="gameSetupManage" lay-filter="tableFilter"></table>
 	</div>
     
     
@@ -56,13 +39,6 @@
     <script type="text/html" id="barDemo">
       	<a class="layui-btn layui-btn-xs" lay-event="detail">查看</a>
      	<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
-		{{#  if(d.stt == '0'){ }}
-	     	<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">冻结</a>
-	    {{#  }; }}
-		<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="esetLogin">重置登录密码</a>
-		{{#  if(d.stt != '0'){ }}
-			<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="enable">解冻</a>
-	    {{#  }; }}
    </script>
 <script>
 	$("#toggle").click(function() {
@@ -72,75 +48,30 @@
 	});
 	layui.use(['table','laydate','form'], function(){
 		var laydate = layui.laydate;
-		//日期范围
-		laydate.render({
-		    elem: '#dates'
-		   ,range: true
-		   ,format:'yyyyMMdd'
-		   ,done: function(value, date, endDate){
-    			  changeSelectCon(1,"dates",'date',value)
-  			}
-		});
 		form = layui.form;
-		initSelect('state', "IM_USER_STATE", "state", ' ', true);
-		form.on('select(state)', function(data){
-   			changeSelectCon(2, data.elem, "sel","state");
-   		}); 
-		$.request({
-			action : '../../RoleManageAction/roleQueryByBranchId',
-			data : { },
-			success : function(data) {
-				var selectName ="roleid";
-				var html = '<select name="';
-				html = html + selectName;
-				html = html + '" lay-filter="';
-				html = html + selectName;
-				html = html + '"';
-				html = html + '><option value="">全部</option>';
-				$.each(data.MINQueryResult, function(i, j) {
-					  html = html + '<option ';
-					  html = html + 'value="';
-				      html = html + j.id + '">';
-				      html = html + j.name+ '</option>';
-				}) 
-				html = html + '</select>';
-				$("#seleRoleid").html(html);
-				form.render();
-			}
-		});	
-		
-		form.on('select(roleid)', function(data){
-   			changeSelectCon(4, data.elem, "sel","roleid");
-   		}); 
-		
 		 form.render();
 	})
 
-	/* layui.use('form', function(){
-		var form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功
-		
-	}) */
 	var table;
 	layui.use('table', function(){
 		table = layui.table;
 		table.render({
-			//tbname:'userManage',
-			id : 'userManage'
-		    ,elem: '#userManage'
+			//tbname:'gameSetupManage',
+			id : 'gameSetupManage'
+		    ,elem: '#gameSetupManage'
 		    ,limit:10
-		    ,url: 'UserManageAction/userQuery' //数据接口
+		    ,url: 'GameSetupManageAction/queryGameSetup' //数据接口
 		    ,method: 'post'
-		    ,where:{MINView:"JSON", token: 'sasasas'}
+		    ,where:{MINView:"JSON"}
 		    ,page: true //开启分页
 		    ,cols: [[ //表头
 				{type:'numbers',title: '序号',width:'5%'}
 		      	,{field: 'id', title: '编号', width:'10%', sort: true}
-				,{field: 'logonname', title: '登录名', width:'12%'}
-		      	,{field: 'name', title: '姓名', width:'12%'}
-		      	,{field: 'rolename', title: '角色', width:'15%'}
-		      	,{field: 'createdate', title: '创建日期',width:'15%'}
-		      	,{field: 'lastlogon', title: '最后登录日期',width:'15%'}
-		      	,{field: 'sttdesc', title: '状态',width:'8%'}
+		      	,{field: 'name', title: '游戏名称', width:'12%'}
+				,{field: 'typeDesc', title: '游戏类型', width:'12%'}
+		      	,{field: 'desc', title: '游戏规则', width:'15%'}
+		      	,{field: 'stateDesc', title: '状态',width:'15%'}
+		      	,{field: 'rewardGrade', title: '彩蛋等级',width:'8%'}
 		      	,{field: 'operate', title: '操作', width: '25%', toolbar: '#barDemo',fixed: 'right'}
 		    ]]
 		    ,done: function(res, curr, count){
@@ -165,7 +96,7 @@
 		    } else if(layEvent == 'del'){ //删除
 				layer.confirm('真的要注销吗', function(index){
 			    	$.request({
-						action : '../../UserManageAction/userDelete',
+						action : '../../gameSetupManageAction/userDelete',
 						data : {
 							id : id //用户名
 						},
@@ -191,7 +122,7 @@
 			} else if(layEvent == 'esetLogin'){//重置登陆密码
 				layer.confirm('确定要重置密码吗?', function(index){
 					$.request({
-						action : '../../UserManageAction/resetLoginPassword',
+						action : '../../gameSetupManageAction/resetLoginPassword',
 						data : {
 							id : id //用户名
 						},
@@ -212,7 +143,7 @@
 			}else if(layEvent =='enable'){
 				layer.confirm('确定要解冻吗?', function(index){
 					$.request({
-						action : '../../UserManageAction/userThaw',
+						action : '../../gameSetupManageAction/userThaw',
 						data : {
 							id : id,
 							state : '0'
@@ -240,7 +171,8 @@
  		    	reLoadFun();
  		    }
  		    ,reset: function(){
- 		    	$('#formName')[0].reset()
+ 		    	$('#formName')[0].reset();
+				$("#conditions").html('<div class="fl f12-gray4-op mt4">所选条件:</div>');
  		    }
 	 	};
 		$('.layui-btn').on('click', function(){
@@ -251,21 +183,13 @@
 	
 	function reLoadFun() {
 		var name = $('#name').val();
-    	var logonname = $('#logonname').val();
-    	var state = $("select[name='state']").val();
-    	var roleid = $("select[name='roleid']").val();
-    	var dates = $("#dates").val();
          //执行重载
-     	table.reload('userManage', {
+     	table.reload('gameSetupManage', {
 	        page: {
 	          curr: 1 //重新从第 1 页开始
 	        }
 	        ,where: {
 	        	name : name,
-	        	logonname : logonname,
-	        	roleid : roleid,
-	        	stt : state,
-	        	dates :dates
 	        }
       	});
 	}
@@ -296,15 +220,15 @@
 	   	      content: '../../web/showDetail.html'
 		});
 	}
-	//添加操作员
-	$(document).on('click','#addUser',function(){
-		openMainTabPage('315002-01', ' 增加操作员', 'userManage/addUser.html', '', '315002', reLoadFun);
+	//添加游戏规则
+	$(document).on('click','#addGameSetup',function(){
+		openMainTabPage('101006-01', ' 增加操作员', 'gameSetupManage/addGameSetup.html', '', '101006', reLoadFun);
 	});
 	//编辑
 	function editDetail(data) {
 	    // 寄存当前数据
 	    layui.sessionData("ROW_DATA", {key:"NOW_ROW", value:data});
-    	openMainTabPage('315002-02', ' 编辑操作员', 'userManage/editUser.html', '', '315002', reLoadFun);
+    	openMainTabPage('315002-02', ' 编辑操作员', 'gameSetupManage/editUser.html', '', '315002', reLoadFun);
 	}
 	function changeSelectCon(index, t, type, dateValue){
 		if (type == "date") {
@@ -337,27 +261,13 @@
 			}
 		}
 	}
-	var array = new Array('登录名','日期','状态','姓名','角色');
+	var array = new Array('游戏名称');
 	function getSelectConHtml(index, t, type,dateValue){
 		var name;
 		var value;
 		if(type == "inp"){
 			value = t.value.substr(0,5)+"..";
 		}
-		if (type == "date") {
-			value = dateValue;
-		}
-		if(type == "sel" && dateValue =="state"){
-			value = $("#state").find("option:selected").text();
-		}
-		if(type == "sel" && dateValue =="roleid"){
-			value = $("#roleid").find("option:selected").text();
-		}
-		if (type == "date") {
-			name = $("#"+t).attr("id");
-		} else {
-			name = $(t).attr("id");
-		}
 		var html = '<div class="fl xuanzhong-active" id = "search' + index + '" name = "' + name + '" onclick = "removeSearch(this)">' +
 						'<div class="fl">' + array[index] + '</div>' +
 						':<i class="iconfont">'+value+'</i>' +
@@ -368,43 +278,8 @@
 		return html;
 	}
 	function removeSearch(t) {
-		if ($(t).attr("name") == 'state') {
-			initSelect('state', "IM_USER_STATE", "state", ' ', true);
-			form.render();
-			$(t).remove();
-		} if ($(t).attr("name") == 'roleid') {
-			$.request({
-				action : '../../RoleManageAction/roleQueryByBranchId',
-				data : { },
-				success : function(data) {
-					var selectName ="roleid";
-					var html = '<select name="';
-					html = html + selectName;
-					html = html + '" lay-filter="';
-					html = html + selectName;
-					html = html + '"';
-					html = html + '><option value="">全部</option>';
-					$.each(data.MINQueryResult, function(i, j) {
-						  html = html + '<option ';
-						  html = html + 'value="';
-					      html = html + j.id + '">';
-					      html = html + j.name+ '</option>';
-					}) 
-					html = html + '</select>';
-					$("#seleRoleid").html(html);
-					form.render();
-				}
-			});	
-			
-			form.on('select(roleid)', function(data){
-	   			changeSelectCon(4, data.elem, "sel","roleid");
-	   		}); 
-			
-			$(t).remove();
-		} else {
-			$("#"+$(t).attr("name")).val('');
-			$(t).remove();
-		}
+		$("#"+$(t).attr("name")).val('');
+		$(t).remove();
 	}
 </script>
 </body>