From a6a866925295c081b0b413178643456c9f185b57 Mon Sep 17 00:00:00 2001 From: yuanye <418471657@qq.com> Date: Tue, 7 Jun 2022 18:33:12 +0800 Subject: [PATCH] 1 --- .../java/com/hai/dao/ApiMerchantsMapper.java | 13 ++-- .../com/hai/dao/ApiMerchantsSqlProvider.java | 14 +++++ .../java/com/hai/entity/ApiMerchants.java | 17 ++++++ .../com/hai/entity/ApiMerchantsExample.java | 61 +++++++++++++++++++ 4 files changed, 100 insertions(+), 5 deletions(-) diff --git a/hai-service/src/main/java/com/hai/dao/ApiMerchantsMapper.java b/hai-service/src/main/java/com/hai/dao/ApiMerchantsMapper.java index ba57bfbe..1a476ef7 100644 --- a/hai-service/src/main/java/com/hai/dao/ApiMerchantsMapper.java +++ b/hai-service/src/main/java/com/hai/dao/ApiMerchantsMapper.java @@ -43,14 +43,14 @@ public interface ApiMerchantsMapper extends ApiMerchantsMapperExt { "phone, api_key, mch_id, ", "operator_id, operator_name, ", "create_time, update_time, ", - "`status`, ext_1, ext_2, ", - "ext_3)", + "amounts, `status`, ", + "ext_1, ext_2, ext_3)", "values (#{merchantName,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, ", "#{phone,jdbcType=VARCHAR}, #{apiKey,jdbcType=VARCHAR}, #{mchId,jdbcType=VARCHAR}, ", "#{operatorId,jdbcType=BIGINT}, #{operatorName,jdbcType=VARCHAR}, ", "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", - "#{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", - "#{ext3,jdbcType=VARCHAR})" + "#{amounts,jdbcType=DECIMAL}, #{status,jdbcType=INTEGER}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) @Options(useGeneratedKeys=true,keyProperty="id") int insert(ApiMerchants record); @@ -71,6 +71,7 @@ public interface ApiMerchantsMapper extends ApiMerchantsMapperExt { @Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="amounts", property="amounts", jdbcType=JdbcType.DECIMAL), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), @@ -81,7 +82,7 @@ public interface ApiMerchantsMapper extends ApiMerchantsMapperExt { @Select({ "select", "id, merchant_name, user_name, phone, api_key, mch_id, operator_id, operator_name, ", - "create_time, update_time, `status`, ext_1, ext_2, ext_3", + "create_time, update_time, amounts, `status`, ext_1, ext_2, ext_3", "from api_merchants", "where id = #{id,jdbcType=BIGINT}" }) @@ -96,6 +97,7 @@ public interface ApiMerchantsMapper extends ApiMerchantsMapperExt { @Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="amounts", property="amounts", jdbcType=JdbcType.DECIMAL), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), @@ -123,6 +125,7 @@ public interface ApiMerchantsMapper extends ApiMerchantsMapperExt { "operator_name = #{operatorName,jdbcType=VARCHAR},", "create_time = #{createTime,jdbcType=TIMESTAMP},", "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "amounts = #{amounts,jdbcType=DECIMAL},", "`status` = #{status,jdbcType=INTEGER},", "ext_1 = #{ext1,jdbcType=VARCHAR},", "ext_2 = #{ext2,jdbcType=VARCHAR},", diff --git a/hai-service/src/main/java/com/hai/dao/ApiMerchantsSqlProvider.java b/hai-service/src/main/java/com/hai/dao/ApiMerchantsSqlProvider.java index 173669ed..1564c445 100644 --- a/hai-service/src/main/java/com/hai/dao/ApiMerchantsSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/ApiMerchantsSqlProvider.java @@ -64,6 +64,10 @@ public class ApiMerchantsSqlProvider { sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); } + if (record.getAmounts() != null) { + sql.VALUES("amounts", "#{amounts,jdbcType=DECIMAL}"); + } + if (record.getStatus() != null) { sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); } @@ -99,6 +103,7 @@ public class ApiMerchantsSqlProvider { sql.SELECT("operator_name"); sql.SELECT("create_time"); sql.SELECT("update_time"); + sql.SELECT("amounts"); sql.SELECT("`status`"); sql.SELECT("ext_1"); sql.SELECT("ext_2"); @@ -160,6 +165,10 @@ public class ApiMerchantsSqlProvider { sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); } + if (record.getAmounts() != null) { + sql.SET("amounts = #{record.amounts,jdbcType=DECIMAL}"); + } + if (record.getStatus() != null) { sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); } @@ -194,6 +203,7 @@ public class ApiMerchantsSqlProvider { sql.SET("operator_name = #{record.operatorName,jdbcType=VARCHAR}"); sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + sql.SET("amounts = #{record.amounts,jdbcType=DECIMAL}"); sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); @@ -244,6 +254,10 @@ public class ApiMerchantsSqlProvider { sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); } + if (record.getAmounts() != null) { + sql.SET("amounts = #{amounts,jdbcType=DECIMAL}"); + } + if (record.getStatus() != null) { sql.SET("`status` = #{status,jdbcType=INTEGER}"); } diff --git a/hai-service/src/main/java/com/hai/entity/ApiMerchants.java b/hai-service/src/main/java/com/hai/entity/ApiMerchants.java index e7164aee..8d8b6d92 100644 --- a/hai-service/src/main/java/com/hai/entity/ApiMerchants.java +++ b/hai-service/src/main/java/com/hai/entity/ApiMerchants.java @@ -1,6 +1,7 @@ package com.hai.entity; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; /** @@ -63,6 +64,11 @@ public class ApiMerchants implements Serializable { */ private Date updateTime; + /** + * 账号余额 + */ + private BigDecimal amounts; + /** * 状态 100 正常 。101 禁用 */ @@ -165,6 +171,14 @@ public class ApiMerchants implements Serializable { this.updateTime = updateTime; } + public BigDecimal getAmounts() { + return amounts; + } + + public void setAmounts(BigDecimal amounts) { + this.amounts = amounts; + } + public Integer getStatus() { return status; } @@ -219,6 +233,7 @@ public class ApiMerchants implements Serializable { && (this.getOperatorName() == null ? other.getOperatorName() == null : this.getOperatorName().equals(other.getOperatorName())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getAmounts() == null ? other.getAmounts() == null : this.getAmounts().equals(other.getAmounts())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) @@ -239,6 +254,7 @@ public class ApiMerchants implements Serializable { result = prime * result + ((getOperatorName() == null) ? 0 : getOperatorName().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getAmounts() == null) ? 0 : getAmounts().hashCode()); result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); @@ -262,6 +278,7 @@ public class ApiMerchants implements Serializable { sb.append(", operatorName=").append(operatorName); sb.append(", createTime=").append(createTime); sb.append(", updateTime=").append(updateTime); + sb.append(", amounts=").append(amounts); sb.append(", status=").append(status); sb.append(", ext1=").append(ext1); sb.append(", ext2=").append(ext2); diff --git a/hai-service/src/main/java/com/hai/entity/ApiMerchantsExample.java b/hai-service/src/main/java/com/hai/entity/ApiMerchantsExample.java index 6469c548..e718050e 100644 --- a/hai-service/src/main/java/com/hai/entity/ApiMerchantsExample.java +++ b/hai-service/src/main/java/com/hai/entity/ApiMerchantsExample.java @@ -1,5 +1,6 @@ package com.hai.entity; +import java.math.BigDecimal; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -785,6 +786,66 @@ public class ApiMerchantsExample { return (Criteria) this; } + public Criteria andAmountsIsNull() { + addCriterion("amounts is null"); + return (Criteria) this; + } + + public Criteria andAmountsIsNotNull() { + addCriterion("amounts is not null"); + return (Criteria) this; + } + + public Criteria andAmountsEqualTo(BigDecimal value) { + addCriterion("amounts =", value, "amounts"); + return (Criteria) this; + } + + public Criteria andAmountsNotEqualTo(BigDecimal value) { + addCriterion("amounts <>", value, "amounts"); + return (Criteria) this; + } + + public Criteria andAmountsGreaterThan(BigDecimal value) { + addCriterion("amounts >", value, "amounts"); + return (Criteria) this; + } + + public Criteria andAmountsGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("amounts >=", value, "amounts"); + return (Criteria) this; + } + + public Criteria andAmountsLessThan(BigDecimal value) { + addCriterion("amounts <", value, "amounts"); + return (Criteria) this; + } + + public Criteria andAmountsLessThanOrEqualTo(BigDecimal value) { + addCriterion("amounts <=", value, "amounts"); + return (Criteria) this; + } + + public Criteria andAmountsIn(List values) { + addCriterion("amounts in", values, "amounts"); + return (Criteria) this; + } + + public Criteria andAmountsNotIn(List values) { + addCriterion("amounts not in", values, "amounts"); + return (Criteria) this; + } + + public Criteria andAmountsBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("amounts between", value1, value2, "amounts"); + return (Criteria) this; + } + + public Criteria andAmountsNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("amounts not between", value1, value2, "amounts"); + return (Criteria) this; + } + public Criteria andStatusIsNull() { addCriterion("`status` is null"); return (Criteria) this;