From d31dc80ec8dcd9690eab84a79d8ffa04f1951837 Mon Sep 17 00:00:00 2001
From: hu177768073 <177768073@qq.com>
Date: Mon, 7 Jul 2025 13:45:50 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../BsGasChannelConfigController.java | 2 +
.../hfkj/dao/BsGasChannelConfigMapper.java | 31 ++++++----
.../dao/BsGasChannelConfigSqlProvider.java | 14 +++++
.../com/hfkj/dao/BsMerchantMapperExt.java | 3 +-
.../com/hfkj/entity/BsGasChannelConfig.java | 16 +++++
.../entity/BsGasChannelConfigExample.java | 60 +++++++++++++++++++
6 files changed, 112 insertions(+), 14 deletions(-)
diff --git a/bweb/src/main/java/com/bweb/controller/BsGasChannelConfigController.java b/bweb/src/main/java/com/bweb/controller/BsGasChannelConfigController.java
index bd036c1..983c394 100644
--- a/bweb/src/main/java/com/bweb/controller/BsGasChannelConfigController.java
+++ b/bweb/src/main/java/com/bweb/controller/BsGasChannelConfigController.java
@@ -39,6 +39,7 @@ public class BsGasChannelConfigController {
|| StringUtils.isBlank(body.getChannelMerNo())
|| StringUtils.isBlank(body.getChannelMerKey())
|| body.getTradeStatus() == null
+ || body.getShowStatus() == null
|| body.getLedgerAccountFlag() == null
) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
@@ -68,6 +69,7 @@ public class BsGasChannelConfigController {
} else {
config.setLedgerAccountData(null);
}
+ config.setShowStatus(body.getShowStatus());
config.setTradeStatus(body.getTradeStatus());
config.setChannelMerNo(body.getChannelMerNo());
config.setChannelMerKey(body.getChannelMerKey());
diff --git a/service/src/main/java/com/hfkj/dao/BsGasChannelConfigMapper.java b/service/src/main/java/com/hfkj/dao/BsGasChannelConfigMapper.java
index bfc8929..6a14d1b 100644
--- a/service/src/main/java/com/hfkj/dao/BsGasChannelConfigMapper.java
+++ b/service/src/main/java/com/hfkj/dao/BsGasChannelConfigMapper.java
@@ -40,17 +40,19 @@ public interface BsGasChannelConfigMapper extends BsGasChannelConfigMapperExt {
@Insert({
"insert into bs_gas_channel_config (gas_channel_type, trade_status, ",
- "channel_type, channel_mer_no, ",
- "channel_mer_key, ledger_account_flag, ",
- "ledger_account_data, create_time, ",
- "update_time, `status`, ",
- "ext_1, ext_2, ext_3)",
+ "show_status, channel_type, ",
+ "channel_mer_no, channel_mer_key, ",
+ "ledger_account_flag, ledger_account_data, ",
+ "create_time, update_time, ",
+ "`status`, ext_1, ext_2, ",
+ "ext_3)",
"values (#{gasChannelType,jdbcType=INTEGER}, #{tradeStatus,jdbcType=BIT}, ",
- "#{channelType,jdbcType=INTEGER}, #{channelMerNo,jdbcType=VARCHAR}, ",
- "#{channelMerKey,jdbcType=VARCHAR}, #{ledgerAccountFlag,jdbcType=BIT}, ",
- "#{ledgerAccountData,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
- "#{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ",
- "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
+ "#{showStatus,jdbcType=BIT}, #{channelType,jdbcType=INTEGER}, ",
+ "#{channelMerNo,jdbcType=VARCHAR}, #{channelMerKey,jdbcType=VARCHAR}, ",
+ "#{ledgerAccountFlag,jdbcType=BIT}, #{ledgerAccountData,jdbcType=VARCHAR}, ",
+ "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
+ "#{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ",
+ "#{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(BsGasChannelConfig record);
@@ -64,6 +66,7 @@ public interface BsGasChannelConfigMapper extends BsGasChannelConfigMapperExt {
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="gas_channel_type", property="gasChannelType", jdbcType=JdbcType.INTEGER),
@Result(column="trade_status", property="tradeStatus", jdbcType=JdbcType.BIT),
+ @Result(column="show_status", property="showStatus", jdbcType=JdbcType.BIT),
@Result(column="channel_type", property="channelType", jdbcType=JdbcType.INTEGER),
@Result(column="channel_mer_no", property="channelMerNo", jdbcType=JdbcType.VARCHAR),
@Result(column="channel_mer_key", property="channelMerKey", jdbcType=JdbcType.VARCHAR),
@@ -80,9 +83,9 @@ public interface BsGasChannelConfigMapper extends BsGasChannelConfigMapperExt {
@Select({
"select",
- "id, gas_channel_type, trade_status, channel_type, channel_mer_no, channel_mer_key, ",
- "ledger_account_flag, ledger_account_data, create_time, update_time, `status`, ",
- "ext_1, ext_2, ext_3",
+ "id, gas_channel_type, trade_status, show_status, channel_type, channel_mer_no, ",
+ "channel_mer_key, ledger_account_flag, ledger_account_data, create_time, update_time, ",
+ "`status`, ext_1, ext_2, ext_3",
"from bs_gas_channel_config",
"where id = #{id,jdbcType=BIGINT}"
})
@@ -90,6 +93,7 @@ public interface BsGasChannelConfigMapper extends BsGasChannelConfigMapperExt {
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="gas_channel_type", property="gasChannelType", jdbcType=JdbcType.INTEGER),
@Result(column="trade_status", property="tradeStatus", jdbcType=JdbcType.BIT),
+ @Result(column="show_status", property="showStatus", jdbcType=JdbcType.BIT),
@Result(column="channel_type", property="channelType", jdbcType=JdbcType.INTEGER),
@Result(column="channel_mer_no", property="channelMerNo", jdbcType=JdbcType.VARCHAR),
@Result(column="channel_mer_key", property="channelMerKey", jdbcType=JdbcType.VARCHAR),
@@ -117,6 +121,7 @@ public interface BsGasChannelConfigMapper extends BsGasChannelConfigMapperExt {
"update bs_gas_channel_config",
"set gas_channel_type = #{gasChannelType,jdbcType=INTEGER},",
"trade_status = #{tradeStatus,jdbcType=BIT},",
+ "show_status = #{showStatus,jdbcType=BIT},",
"channel_type = #{channelType,jdbcType=INTEGER},",
"channel_mer_no = #{channelMerNo,jdbcType=VARCHAR},",
"channel_mer_key = #{channelMerKey,jdbcType=VARCHAR},",
diff --git a/service/src/main/java/com/hfkj/dao/BsGasChannelConfigSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsGasChannelConfigSqlProvider.java
index 14156f9..dc472ec 100644
--- a/service/src/main/java/com/hfkj/dao/BsGasChannelConfigSqlProvider.java
+++ b/service/src/main/java/com/hfkj/dao/BsGasChannelConfigSqlProvider.java
@@ -36,6 +36,10 @@ public class BsGasChannelConfigSqlProvider {
sql.VALUES("trade_status", "#{tradeStatus,jdbcType=BIT}");
}
+ if (record.getShowStatus() != null) {
+ sql.VALUES("show_status", "#{showStatus,jdbcType=BIT}");
+ }
+
if (record.getChannelType() != null) {
sql.VALUES("channel_type", "#{channelType,jdbcType=INTEGER}");
}
@@ -92,6 +96,7 @@ public class BsGasChannelConfigSqlProvider {
}
sql.SELECT("gas_channel_type");
sql.SELECT("trade_status");
+ sql.SELECT("show_status");
sql.SELECT("channel_type");
sql.SELECT("channel_mer_no");
sql.SELECT("channel_mer_key");
@@ -132,6 +137,10 @@ public class BsGasChannelConfigSqlProvider {
sql.SET("trade_status = #{record.tradeStatus,jdbcType=BIT}");
}
+ if (record.getShowStatus() != null) {
+ sql.SET("show_status = #{record.showStatus,jdbcType=BIT}");
+ }
+
if (record.getChannelType() != null) {
sql.SET("channel_type = #{record.channelType,jdbcType=INTEGER}");
}
@@ -187,6 +196,7 @@ public class BsGasChannelConfigSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("gas_channel_type = #{record.gasChannelType,jdbcType=INTEGER}");
sql.SET("trade_status = #{record.tradeStatus,jdbcType=BIT}");
+ sql.SET("show_status = #{record.showStatus,jdbcType=BIT}");
sql.SET("channel_type = #{record.channelType,jdbcType=INTEGER}");
sql.SET("channel_mer_no = #{record.channelMerNo,jdbcType=VARCHAR}");
sql.SET("channel_mer_key = #{record.channelMerKey,jdbcType=VARCHAR}");
@@ -216,6 +226,10 @@ public class BsGasChannelConfigSqlProvider {
sql.SET("trade_status = #{tradeStatus,jdbcType=BIT}");
}
+ if (record.getShowStatus() != null) {
+ sql.SET("show_status = #{showStatus,jdbcType=BIT}");
+ }
+
if (record.getChannelType() != null) {
sql.SET("channel_type = #{channelType,jdbcType=INTEGER}");
}
diff --git a/service/src/main/java/com/hfkj/dao/BsMerchantMapperExt.java b/service/src/main/java/com/hfkj/dao/BsMerchantMapperExt.java
index bdec4da..7712811 100644
--- a/service/src/main/java/com/hfkj/dao/BsMerchantMapperExt.java
+++ b/service/src/main/java/com/hfkj/dao/BsMerchantMapperExt.java
@@ -32,7 +32,8 @@ public interface BsMerchantMapperExt {
" FROM" +
" bs_gas_oil_price a" +
" LEFT JOIN bs_merchant b on b.id = a.mer_id" +
- " where a.oil_no = #{oilNo} and a.`status` = 1" +
+ " LEFT JOIN bs_gas_channel_config c on c.gas_channel_type = b.source_type" +
+ " where a.oil_no = #{oilNo} and a.`status` = 1 and c.show_status = 1" +
" ORDER BY distance asc) a where 1 = 1" +
" and a.merName like concat('%',#{gasName},'%') " +
" " +
diff --git a/service/src/main/java/com/hfkj/entity/BsGasChannelConfig.java b/service/src/main/java/com/hfkj/entity/BsGasChannelConfig.java
index 49c27c8..108c198 100644
--- a/service/src/main/java/com/hfkj/entity/BsGasChannelConfig.java
+++ b/service/src/main/java/com/hfkj/entity/BsGasChannelConfig.java
@@ -25,6 +25,11 @@ public class BsGasChannelConfig implements Serializable {
*/
private Boolean tradeStatus;
+ /**
+ * 展示状态 0:隐藏 1:展示
+ */
+ private Boolean showStatus;
+
/**
* 支付渠道类型
*/
@@ -97,6 +102,14 @@ public class BsGasChannelConfig implements Serializable {
this.tradeStatus = tradeStatus;
}
+ public Boolean getShowStatus() {
+ return showStatus;
+ }
+
+ public void setShowStatus(Boolean showStatus) {
+ this.showStatus = showStatus;
+ }
+
public Integer getChannelType() {
return channelType;
}
@@ -200,6 +213,7 @@ public class BsGasChannelConfig implements Serializable {
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getGasChannelType() == null ? other.getGasChannelType() == null : this.getGasChannelType().equals(other.getGasChannelType()))
&& (this.getTradeStatus() == null ? other.getTradeStatus() == null : this.getTradeStatus().equals(other.getTradeStatus()))
+ && (this.getShowStatus() == null ? other.getShowStatus() == null : this.getShowStatus().equals(other.getShowStatus()))
&& (this.getChannelType() == null ? other.getChannelType() == null : this.getChannelType().equals(other.getChannelType()))
&& (this.getChannelMerNo() == null ? other.getChannelMerNo() == null : this.getChannelMerNo().equals(other.getChannelMerNo()))
&& (this.getChannelMerKey() == null ? other.getChannelMerKey() == null : this.getChannelMerKey().equals(other.getChannelMerKey()))
@@ -220,6 +234,7 @@ public class BsGasChannelConfig implements Serializable {
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getGasChannelType() == null) ? 0 : getGasChannelType().hashCode());
result = prime * result + ((getTradeStatus() == null) ? 0 : getTradeStatus().hashCode());
+ result = prime * result + ((getShowStatus() == null) ? 0 : getShowStatus().hashCode());
result = prime * result + ((getChannelType() == null) ? 0 : getChannelType().hashCode());
result = prime * result + ((getChannelMerNo() == null) ? 0 : getChannelMerNo().hashCode());
result = prime * result + ((getChannelMerKey() == null) ? 0 : getChannelMerKey().hashCode());
@@ -243,6 +258,7 @@ public class BsGasChannelConfig implements Serializable {
sb.append(", id=").append(id);
sb.append(", gasChannelType=").append(gasChannelType);
sb.append(", tradeStatus=").append(tradeStatus);
+ sb.append(", showStatus=").append(showStatus);
sb.append(", channelType=").append(channelType);
sb.append(", channelMerNo=").append(channelMerNo);
sb.append(", channelMerKey=").append(channelMerKey);
diff --git a/service/src/main/java/com/hfkj/entity/BsGasChannelConfigExample.java b/service/src/main/java/com/hfkj/entity/BsGasChannelConfigExample.java
index a6fd4da..75be524 100644
--- a/service/src/main/java/com/hfkj/entity/BsGasChannelConfigExample.java
+++ b/service/src/main/java/com/hfkj/entity/BsGasChannelConfigExample.java
@@ -305,6 +305,66 @@ public class BsGasChannelConfigExample {
return (Criteria) this;
}
+ public Criteria andShowStatusIsNull() {
+ addCriterion("show_status is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowStatusIsNotNull() {
+ addCriterion("show_status is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowStatusEqualTo(Boolean value) {
+ addCriterion("show_status =", value, "showStatus");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowStatusNotEqualTo(Boolean value) {
+ addCriterion("show_status <>", value, "showStatus");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowStatusGreaterThan(Boolean value) {
+ addCriterion("show_status >", value, "showStatus");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowStatusGreaterThanOrEqualTo(Boolean value) {
+ addCriterion("show_status >=", value, "showStatus");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowStatusLessThan(Boolean value) {
+ addCriterion("show_status <", value, "showStatus");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowStatusLessThanOrEqualTo(Boolean value) {
+ addCriterion("show_status <=", value, "showStatus");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowStatusIn(List values) {
+ addCriterion("show_status in", values, "showStatus");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowStatusNotIn(List values) {
+ addCriterion("show_status not in", values, "showStatus");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowStatusBetween(Boolean value1, Boolean value2) {
+ addCriterion("show_status between", value1, value2, "showStatus");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowStatusNotBetween(Boolean value1, Boolean value2) {
+ addCriterion("show_status not between", value1, value2, "showStatus");
+ return (Criteria) this;
+ }
+
public Criteria andChannelTypeIsNull() {
addCriterion("channel_type is null");
return (Criteria) this;