提交代码

master
胡锐 2 weeks ago
parent 2d641998ea
commit d31dc80ec8
  1. 2
      bweb/src/main/java/com/bweb/controller/BsGasChannelConfigController.java
  2. 31
      service/src/main/java/com/hfkj/dao/BsGasChannelConfigMapper.java
  3. 14
      service/src/main/java/com/hfkj/dao/BsGasChannelConfigSqlProvider.java
  4. 3
      service/src/main/java/com/hfkj/dao/BsMerchantMapperExt.java
  5. 16
      service/src/main/java/com/hfkj/entity/BsGasChannelConfig.java
  6. 60
      service/src/main/java/com/hfkj/entity/BsGasChannelConfigExample.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());

@ -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},",

@ -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}");
}

@ -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" +
"<if test='gasName != null'> and a.merName like concat('%',#{gasName},'%') </if>" +
"<if test='distanceLimit != null'> <![CDATA[ and a.distance <= #{distanceLimit} ]]> </if>" +

@ -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);

@ -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<Boolean> values) {
addCriterion("show_status in", values, "showStatus");
return (Criteria) this;
}
public Criteria andShowStatusNotIn(List<Boolean> 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;

Loading…
Cancel
Save