提交代码

yy_dev
胡锐 1 year ago
parent 0632b96f51
commit 4c7c2254fe
  1. 190
      service/src/main/java/com/hfkj/dao/BsTradeSettleMapper.java
  2. 7
      service/src/main/java/com/hfkj/dao/BsTradeSettleMapperExt.java
  3. 556
      service/src/main/java/com/hfkj/dao/BsTradeSettleSqlProvider.java
  4. 493
      service/src/main/java/com/hfkj/entity/BsTradeSettle.java
  5. 2061
      service/src/main/java/com/hfkj/entity/BsTradeSettleExample.java
  6. 35
      service/src/main/java/com/hfkj/service/BsTradeSettleService.java
  7. 41
      service/src/main/java/com/hfkj/service/impl/BsTradeSettleServiceImpl.java

@ -0,0 +1,190 @@
package com.hfkj.dao;
import com.hfkj.entity.BsTradeSettle;
import com.hfkj.entity.BsTradeSettleExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
import org.springframework.stereotype.Repository;
/**
*
* 代码由工具生成,请勿修改!!!
* 如果需要扩展请在其父类进行扩展
*
**/
@Repository
public interface BsTradeSettleMapper extends BsTradeSettleMapperExt {
@SelectProvider(type=BsTradeSettleSqlProvider.class, method="countByExample")
long countByExample(BsTradeSettleExample example);
@DeleteProvider(type=BsTradeSettleSqlProvider.class, method="deleteByExample")
int deleteByExample(BsTradeSettleExample example);
@Delete({
"delete from bs_trade_settle",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into bs_trade_settle (company_id, agent_id, ",
"salesman_id, salesman_name, ",
"mer_id, mer_name, mer_abbreviate, ",
"mer_no, store_id, store_name, ",
"platform_type, platform_mer_no, ",
"platform_trade_no, platform_log_no, ",
"pay_mode, out_trade_no, ",
"trade_type, trade_amount, ",
"trade_time, shd_fee_amt, ",
"settle_amount, settle_date, ",
"fee_rate, create_time, ",
"ext_1, ext_2, ext_3)",
"values (#{companyId,jdbcType=BIGINT}, #{agentId,jdbcType=BIGINT}, ",
"#{salesmanId,jdbcType=BIGINT}, #{salesmanName,jdbcType=VARCHAR}, ",
"#{merId,jdbcType=BIGINT}, #{merName,jdbcType=VARCHAR}, #{merAbbreviate,jdbcType=VARCHAR}, ",
"#{merNo,jdbcType=VARCHAR}, #{storeId,jdbcType=BIGINT}, #{storeName,jdbcType=VARCHAR}, ",
"#{platformType,jdbcType=INTEGER}, #{platformMerNo,jdbcType=VARCHAR}, ",
"#{platformTradeNo,jdbcType=VARCHAR}, #{platformLogNo,jdbcType=VARCHAR}, ",
"#{payMode,jdbcType=VARCHAR}, #{outTradeNo,jdbcType=VARCHAR}, ",
"#{tradeType,jdbcType=INTEGER}, #{tradeAmount,jdbcType=DECIMAL}, ",
"#{tradeTime,jdbcType=TIMESTAMP}, #{shdFeeAmt,jdbcType=DECIMAL}, ",
"#{settleAmount,jdbcType=DECIMAL}, #{settleDate,jdbcType=DATE}, ",
"#{feeRate,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(BsTradeSettle record);
@InsertProvider(type=BsTradeSettleSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(BsTradeSettle record);
@SelectProvider(type=BsTradeSettleSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT),
@Result(column="salesman_id", property="salesmanId", jdbcType=JdbcType.BIGINT),
@Result(column="salesman_name", property="salesmanName", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_abbreviate", property="merAbbreviate", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR),
@Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT),
@Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_type", property="platformType", jdbcType=JdbcType.INTEGER),
@Result(column="platform_mer_no", property="platformMerNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_trade_no", property="platformTradeNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_log_no", property="platformLogNo", jdbcType=JdbcType.VARCHAR),
@Result(column="pay_mode", property="payMode", jdbcType=JdbcType.VARCHAR),
@Result(column="out_trade_no", property="outTradeNo", jdbcType=JdbcType.VARCHAR),
@Result(column="trade_type", property="tradeType", jdbcType=JdbcType.INTEGER),
@Result(column="trade_amount", property="tradeAmount", jdbcType=JdbcType.DECIMAL),
@Result(column="trade_time", property="tradeTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="shd_fee_amt", property="shdFeeAmt", jdbcType=JdbcType.DECIMAL),
@Result(column="settle_amount", property="settleAmount", jdbcType=JdbcType.DECIMAL),
@Result(column="settle_date", property="settleDate", jdbcType=JdbcType.DATE),
@Result(column="fee_rate", property="feeRate", jdbcType=JdbcType.DECIMAL),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
List<BsTradeSettle> selectByExample(BsTradeSettleExample example);
@Select({
"select",
"id, company_id, agent_id, salesman_id, salesman_name, mer_id, mer_name, mer_abbreviate, ",
"mer_no, store_id, store_name, platform_type, platform_mer_no, platform_trade_no, ",
"platform_log_no, pay_mode, out_trade_no, trade_type, trade_amount, trade_time, ",
"shd_fee_amt, settle_amount, settle_date, fee_rate, create_time, ext_1, ext_2, ",
"ext_3",
"from bs_trade_settle",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT),
@Result(column="salesman_id", property="salesmanId", jdbcType=JdbcType.BIGINT),
@Result(column="salesman_name", property="salesmanName", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_abbreviate", property="merAbbreviate", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR),
@Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT),
@Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_type", property="platformType", jdbcType=JdbcType.INTEGER),
@Result(column="platform_mer_no", property="platformMerNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_trade_no", property="platformTradeNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_log_no", property="platformLogNo", jdbcType=JdbcType.VARCHAR),
@Result(column="pay_mode", property="payMode", jdbcType=JdbcType.VARCHAR),
@Result(column="out_trade_no", property="outTradeNo", jdbcType=JdbcType.VARCHAR),
@Result(column="trade_type", property="tradeType", jdbcType=JdbcType.INTEGER),
@Result(column="trade_amount", property="tradeAmount", jdbcType=JdbcType.DECIMAL),
@Result(column="trade_time", property="tradeTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="shd_fee_amt", property="shdFeeAmt", jdbcType=JdbcType.DECIMAL),
@Result(column="settle_amount", property="settleAmount", jdbcType=JdbcType.DECIMAL),
@Result(column="settle_date", property="settleDate", jdbcType=JdbcType.DATE),
@Result(column="fee_rate", property="feeRate", jdbcType=JdbcType.DECIMAL),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
BsTradeSettle selectByPrimaryKey(Long id);
@UpdateProvider(type=BsTradeSettleSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") BsTradeSettle record, @Param("example") BsTradeSettleExample example);
@UpdateProvider(type=BsTradeSettleSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") BsTradeSettle record, @Param("example") BsTradeSettleExample example);
@UpdateProvider(type=BsTradeSettleSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(BsTradeSettle record);
@Update({
"update bs_trade_settle",
"set company_id = #{companyId,jdbcType=BIGINT},",
"agent_id = #{agentId,jdbcType=BIGINT},",
"salesman_id = #{salesmanId,jdbcType=BIGINT},",
"salesman_name = #{salesmanName,jdbcType=VARCHAR},",
"mer_id = #{merId,jdbcType=BIGINT},",
"mer_name = #{merName,jdbcType=VARCHAR},",
"mer_abbreviate = #{merAbbreviate,jdbcType=VARCHAR},",
"mer_no = #{merNo,jdbcType=VARCHAR},",
"store_id = #{storeId,jdbcType=BIGINT},",
"store_name = #{storeName,jdbcType=VARCHAR},",
"platform_type = #{platformType,jdbcType=INTEGER},",
"platform_mer_no = #{platformMerNo,jdbcType=VARCHAR},",
"platform_trade_no = #{platformTradeNo,jdbcType=VARCHAR},",
"platform_log_no = #{platformLogNo,jdbcType=VARCHAR},",
"pay_mode = #{payMode,jdbcType=VARCHAR},",
"out_trade_no = #{outTradeNo,jdbcType=VARCHAR},",
"trade_type = #{tradeType,jdbcType=INTEGER},",
"trade_amount = #{tradeAmount,jdbcType=DECIMAL},",
"trade_time = #{tradeTime,jdbcType=TIMESTAMP},",
"shd_fee_amt = #{shdFeeAmt,jdbcType=DECIMAL},",
"settle_amount = #{settleAmount,jdbcType=DECIMAL},",
"settle_date = #{settleDate,jdbcType=DATE},",
"fee_rate = #{feeRate,jdbcType=DECIMAL},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(BsTradeSettle record);
}

@ -0,0 +1,7 @@
package com.hfkj.dao;
/**
* mapper扩展类
*/
public interface BsTradeSettleMapperExt {
}

@ -0,0 +1,556 @@
package com.hfkj.dao;
import com.hfkj.entity.BsTradeSettle;
import com.hfkj.entity.BsTradeSettleExample.Criteria;
import com.hfkj.entity.BsTradeSettleExample.Criterion;
import com.hfkj.entity.BsTradeSettleExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class BsTradeSettleSqlProvider {
public String countByExample(BsTradeSettleExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("bs_trade_settle");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(BsTradeSettleExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("bs_trade_settle");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(BsTradeSettle record) {
SQL sql = new SQL();
sql.INSERT_INTO("bs_trade_settle");
if (record.getCompanyId() != null) {
sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}");
}
if (record.getAgentId() != null) {
sql.VALUES("agent_id", "#{agentId,jdbcType=BIGINT}");
}
if (record.getSalesmanId() != null) {
sql.VALUES("salesman_id", "#{salesmanId,jdbcType=BIGINT}");
}
if (record.getSalesmanName() != null) {
sql.VALUES("salesman_name", "#{salesmanName,jdbcType=VARCHAR}");
}
if (record.getMerId() != null) {
sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}");
}
if (record.getMerName() != null) {
sql.VALUES("mer_name", "#{merName,jdbcType=VARCHAR}");
}
if (record.getMerAbbreviate() != null) {
sql.VALUES("mer_abbreviate", "#{merAbbreviate,jdbcType=VARCHAR}");
}
if (record.getMerNo() != null) {
sql.VALUES("mer_no", "#{merNo,jdbcType=VARCHAR}");
}
if (record.getStoreId() != null) {
sql.VALUES("store_id", "#{storeId,jdbcType=BIGINT}");
}
if (record.getStoreName() != null) {
sql.VALUES("store_name", "#{storeName,jdbcType=VARCHAR}");
}
if (record.getPlatformType() != null) {
sql.VALUES("platform_type", "#{platformType,jdbcType=INTEGER}");
}
if (record.getPlatformMerNo() != null) {
sql.VALUES("platform_mer_no", "#{platformMerNo,jdbcType=VARCHAR}");
}
if (record.getPlatformTradeNo() != null) {
sql.VALUES("platform_trade_no", "#{platformTradeNo,jdbcType=VARCHAR}");
}
if (record.getPlatformLogNo() != null) {
sql.VALUES("platform_log_no", "#{platformLogNo,jdbcType=VARCHAR}");
}
if (record.getPayMode() != null) {
sql.VALUES("pay_mode", "#{payMode,jdbcType=VARCHAR}");
}
if (record.getOutTradeNo() != null) {
sql.VALUES("out_trade_no", "#{outTradeNo,jdbcType=VARCHAR}");
}
if (record.getTradeType() != null) {
sql.VALUES("trade_type", "#{tradeType,jdbcType=INTEGER}");
}
if (record.getTradeAmount() != null) {
sql.VALUES("trade_amount", "#{tradeAmount,jdbcType=DECIMAL}");
}
if (record.getTradeTime() != null) {
sql.VALUES("trade_time", "#{tradeTime,jdbcType=TIMESTAMP}");
}
if (record.getShdFeeAmt() != null) {
sql.VALUES("shd_fee_amt", "#{shdFeeAmt,jdbcType=DECIMAL}");
}
if (record.getSettleAmount() != null) {
sql.VALUES("settle_amount", "#{settleAmount,jdbcType=DECIMAL}");
}
if (record.getSettleDate() != null) {
sql.VALUES("settle_date", "#{settleDate,jdbcType=DATE}");
}
if (record.getFeeRate() != null) {
sql.VALUES("fee_rate", "#{feeRate,jdbcType=DECIMAL}");
}
if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}");
}
return sql.toString();
}
public String selectByExample(BsTradeSettleExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("company_id");
sql.SELECT("agent_id");
sql.SELECT("salesman_id");
sql.SELECT("salesman_name");
sql.SELECT("mer_id");
sql.SELECT("mer_name");
sql.SELECT("mer_abbreviate");
sql.SELECT("mer_no");
sql.SELECT("store_id");
sql.SELECT("store_name");
sql.SELECT("platform_type");
sql.SELECT("platform_mer_no");
sql.SELECT("platform_trade_no");
sql.SELECT("platform_log_no");
sql.SELECT("pay_mode");
sql.SELECT("out_trade_no");
sql.SELECT("trade_type");
sql.SELECT("trade_amount");
sql.SELECT("trade_time");
sql.SELECT("shd_fee_amt");
sql.SELECT("settle_amount");
sql.SELECT("settle_date");
sql.SELECT("fee_rate");
sql.SELECT("create_time");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("bs_trade_settle");
applyWhere(sql, example, false);
if (example != null && example.getOrderByClause() != null) {
sql.ORDER_BY(example.getOrderByClause());
}
return sql.toString();
}
public String updateByExampleSelective(Map<String, Object> parameter) {
BsTradeSettle record = (BsTradeSettle) parameter.get("record");
BsTradeSettleExample example = (BsTradeSettleExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("bs_trade_settle");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getCompanyId() != null) {
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}");
}
if (record.getAgentId() != null) {
sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}");
}
if (record.getSalesmanId() != null) {
sql.SET("salesman_id = #{record.salesmanId,jdbcType=BIGINT}");
}
if (record.getSalesmanName() != null) {
sql.SET("salesman_name = #{record.salesmanName,jdbcType=VARCHAR}");
}
if (record.getMerId() != null) {
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
}
if (record.getMerName() != null) {
sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}");
}
if (record.getMerAbbreviate() != null) {
sql.SET("mer_abbreviate = #{record.merAbbreviate,jdbcType=VARCHAR}");
}
if (record.getMerNo() != null) {
sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}");
}
if (record.getStoreId() != null) {
sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}");
}
if (record.getStoreName() != null) {
sql.SET("store_name = #{record.storeName,jdbcType=VARCHAR}");
}
if (record.getPlatformType() != null) {
sql.SET("platform_type = #{record.platformType,jdbcType=INTEGER}");
}
if (record.getPlatformMerNo() != null) {
sql.SET("platform_mer_no = #{record.platformMerNo,jdbcType=VARCHAR}");
}
if (record.getPlatformTradeNo() != null) {
sql.SET("platform_trade_no = #{record.platformTradeNo,jdbcType=VARCHAR}");
}
if (record.getPlatformLogNo() != null) {
sql.SET("platform_log_no = #{record.platformLogNo,jdbcType=VARCHAR}");
}
if (record.getPayMode() != null) {
sql.SET("pay_mode = #{record.payMode,jdbcType=VARCHAR}");
}
if (record.getOutTradeNo() != null) {
sql.SET("out_trade_no = #{record.outTradeNo,jdbcType=VARCHAR}");
}
if (record.getTradeType() != null) {
sql.SET("trade_type = #{record.tradeType,jdbcType=INTEGER}");
}
if (record.getTradeAmount() != null) {
sql.SET("trade_amount = #{record.tradeAmount,jdbcType=DECIMAL}");
}
if (record.getTradeTime() != null) {
sql.SET("trade_time = #{record.tradeTime,jdbcType=TIMESTAMP}");
}
if (record.getShdFeeAmt() != null) {
sql.SET("shd_fee_amt = #{record.shdFeeAmt,jdbcType=DECIMAL}");
}
if (record.getSettleAmount() != null) {
sql.SET("settle_amount = #{record.settleAmount,jdbcType=DECIMAL}");
}
if (record.getSettleDate() != null) {
sql.SET("settle_date = #{record.settleDate,jdbcType=DATE}");
}
if (record.getFeeRate() != null) {
sql.SET("fee_rate = #{record.feeRate,jdbcType=DECIMAL}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
}
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByExample(Map<String, Object> parameter) {
SQL sql = new SQL();
sql.UPDATE("bs_trade_settle");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}");
sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}");
sql.SET("salesman_id = #{record.salesmanId,jdbcType=BIGINT}");
sql.SET("salesman_name = #{record.salesmanName,jdbcType=VARCHAR}");
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}");
sql.SET("mer_abbreviate = #{record.merAbbreviate,jdbcType=VARCHAR}");
sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}");
sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}");
sql.SET("store_name = #{record.storeName,jdbcType=VARCHAR}");
sql.SET("platform_type = #{record.platformType,jdbcType=INTEGER}");
sql.SET("platform_mer_no = #{record.platformMerNo,jdbcType=VARCHAR}");
sql.SET("platform_trade_no = #{record.platformTradeNo,jdbcType=VARCHAR}");
sql.SET("platform_log_no = #{record.platformLogNo,jdbcType=VARCHAR}");
sql.SET("pay_mode = #{record.payMode,jdbcType=VARCHAR}");
sql.SET("out_trade_no = #{record.outTradeNo,jdbcType=VARCHAR}");
sql.SET("trade_type = #{record.tradeType,jdbcType=INTEGER}");
sql.SET("trade_amount = #{record.tradeAmount,jdbcType=DECIMAL}");
sql.SET("trade_time = #{record.tradeTime,jdbcType=TIMESTAMP}");
sql.SET("shd_fee_amt = #{record.shdFeeAmt,jdbcType=DECIMAL}");
sql.SET("settle_amount = #{record.settleAmount,jdbcType=DECIMAL}");
sql.SET("settle_date = #{record.settleDate,jdbcType=DATE}");
sql.SET("fee_rate = #{record.feeRate,jdbcType=DECIMAL}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
BsTradeSettleExample example = (BsTradeSettleExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(BsTradeSettle record) {
SQL sql = new SQL();
sql.UPDATE("bs_trade_settle");
if (record.getCompanyId() != null) {
sql.SET("company_id = #{companyId,jdbcType=BIGINT}");
}
if (record.getAgentId() != null) {
sql.SET("agent_id = #{agentId,jdbcType=BIGINT}");
}
if (record.getSalesmanId() != null) {
sql.SET("salesman_id = #{salesmanId,jdbcType=BIGINT}");
}
if (record.getSalesmanName() != null) {
sql.SET("salesman_name = #{salesmanName,jdbcType=VARCHAR}");
}
if (record.getMerId() != null) {
sql.SET("mer_id = #{merId,jdbcType=BIGINT}");
}
if (record.getMerName() != null) {
sql.SET("mer_name = #{merName,jdbcType=VARCHAR}");
}
if (record.getMerAbbreviate() != null) {
sql.SET("mer_abbreviate = #{merAbbreviate,jdbcType=VARCHAR}");
}
if (record.getMerNo() != null) {
sql.SET("mer_no = #{merNo,jdbcType=VARCHAR}");
}
if (record.getStoreId() != null) {
sql.SET("store_id = #{storeId,jdbcType=BIGINT}");
}
if (record.getStoreName() != null) {
sql.SET("store_name = #{storeName,jdbcType=VARCHAR}");
}
if (record.getPlatformType() != null) {
sql.SET("platform_type = #{platformType,jdbcType=INTEGER}");
}
if (record.getPlatformMerNo() != null) {
sql.SET("platform_mer_no = #{platformMerNo,jdbcType=VARCHAR}");
}
if (record.getPlatformTradeNo() != null) {
sql.SET("platform_trade_no = #{platformTradeNo,jdbcType=VARCHAR}");
}
if (record.getPlatformLogNo() != null) {
sql.SET("platform_log_no = #{platformLogNo,jdbcType=VARCHAR}");
}
if (record.getPayMode() != null) {
sql.SET("pay_mode = #{payMode,jdbcType=VARCHAR}");
}
if (record.getOutTradeNo() != null) {
sql.SET("out_trade_no = #{outTradeNo,jdbcType=VARCHAR}");
}
if (record.getTradeType() != null) {
sql.SET("trade_type = #{tradeType,jdbcType=INTEGER}");
}
if (record.getTradeAmount() != null) {
sql.SET("trade_amount = #{tradeAmount,jdbcType=DECIMAL}");
}
if (record.getTradeTime() != null) {
sql.SET("trade_time = #{tradeTime,jdbcType=TIMESTAMP}");
}
if (record.getShdFeeAmt() != null) {
sql.SET("shd_fee_amt = #{shdFeeAmt,jdbcType=DECIMAL}");
}
if (record.getSettleAmount() != null) {
sql.SET("settle_amount = #{settleAmount,jdbcType=DECIMAL}");
}
if (record.getSettleDate() != null) {
sql.SET("settle_date = #{settleDate,jdbcType=DATE}");
}
if (record.getFeeRate() != null) {
sql.SET("fee_rate = #{feeRate,jdbcType=DECIMAL}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();
}
protected void applyWhere(SQL sql, BsTradeSettleExample example, boolean includeExamplePhrase) {
if (example == null) {
return;
}
String parmPhrase1;
String parmPhrase1_th;
String parmPhrase2;
String parmPhrase2_th;
String parmPhrase3;
String parmPhrase3_th;
if (includeExamplePhrase) {
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
} else {
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
}
StringBuilder sb = new StringBuilder();
List<Criteria> oredCriteria = example.getOredCriteria();
boolean firstCriteria = true;
for (int i = 0; i < oredCriteria.size(); i++) {
Criteria criteria = oredCriteria.get(i);
if (criteria.isValid()) {
if (firstCriteria) {
firstCriteria = false;
} else {
sb.append(" or ");
}
sb.append('(');
List<Criterion> criterions = criteria.getAllCriteria();
boolean firstCriterion = true;
for (int j = 0; j < criterions.size(); j++) {
Criterion criterion = criterions.get(j);
if (firstCriterion) {
firstCriterion = false;
} else {
sb.append(" and ");
}
if (criterion.isNoValue()) {
sb.append(criterion.getCondition());
} else if (criterion.isSingleValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j));
} else {
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler()));
}
} else if (criterion.isBetweenValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j));
} else {
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler()));
}
} else if (criterion.isListValue()) {
sb.append(criterion.getCondition());
sb.append(" (");
List<?> listItems = (List<?>) criterion.getValue();
boolean comma = false;
for (int k = 0; k < listItems.size(); k++) {
if (comma) {
sb.append(", ");
} else {
comma = true;
}
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase3, i, j, k));
} else {
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler()));
}
}
sb.append(')');
}
}
sb.append(')');
}
}
if (sb.length() > 0) {
sql.WHERE(sb.toString());
}
}
}

@ -0,0 +1,493 @@
package com.hfkj.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* bs_trade_settle
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class BsTradeSettle implements Serializable {
/**
* 主键
*/
private Long id;
/**
* 公司id
*/
private Long companyId;
/**
* 代理商id
*/
private Long agentId;
/**
* 业务员id
*/
private Long salesmanId;
/**
* 业务员名称
*/
private String salesmanName;
/**
* 商户id
*/
private Long merId;
/**
* 商户名称
*/
private String merName;
/**
* 商户简称
*/
private String merAbbreviate;
/**
* 商户号
*/
private String merNo;
/**
* 门店id
*/
private Long storeId;
/**
* 门店名称
*/
private String storeName;
/**
* 平台类型 1拉卡拉
*/
private Integer platformType;
/**
* 平台商户号
*/
private String platformMerNo;
/**
* 平台流水号
*/
private String platformTradeNo;
/**
* 平台对账单流水号
*/
private String platformLogNo;
/**
* 支付模式
微信WECHAT
支付宝ALIPAY
银联UQRCODEPAY
建行龙支付DRAGON
*/
private String payMode;
/**
* 商户交易流水
*/
private String outTradeNo;
/**
* 交易类型 1支付 2退款
*/
private Integer tradeType;
/**
* 交易金额
*/
private BigDecimal tradeAmount;
/**
* 交易时间
*/
private Date tradeTime;
/**
* 交易手续费
*/
private BigDecimal shdFeeAmt;
/**
* 结算金额
*/
private BigDecimal settleAmount;
/**
* 结算日期
*/
private Date settleDate;
/**
* 费率
*/
private BigDecimal feeRate;
/**
* 创建时间
*/
private Date createTime;
private String ext1;
private String ext2;
private String ext3;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getCompanyId() {
return companyId;
}
public void setCompanyId(Long companyId) {
this.companyId = companyId;
}
public Long getAgentId() {
return agentId;
}
public void setAgentId(Long agentId) {
this.agentId = agentId;
}
public Long getSalesmanId() {
return salesmanId;
}
public void setSalesmanId(Long salesmanId) {
this.salesmanId = salesmanId;
}
public String getSalesmanName() {
return salesmanName;
}
public void setSalesmanName(String salesmanName) {
this.salesmanName = salesmanName;
}
public Long getMerId() {
return merId;
}
public void setMerId(Long merId) {
this.merId = merId;
}
public String getMerName() {
return merName;
}
public void setMerName(String merName) {
this.merName = merName;
}
public String getMerAbbreviate() {
return merAbbreviate;
}
public void setMerAbbreviate(String merAbbreviate) {
this.merAbbreviate = merAbbreviate;
}
public String getMerNo() {
return merNo;
}
public void setMerNo(String merNo) {
this.merNo = merNo;
}
public Long getStoreId() {
return storeId;
}
public void setStoreId(Long storeId) {
this.storeId = storeId;
}
public String getStoreName() {
return storeName;
}
public void setStoreName(String storeName) {
this.storeName = storeName;
}
public Integer getPlatformType() {
return platformType;
}
public void setPlatformType(Integer platformType) {
this.platformType = platformType;
}
public String getPlatformMerNo() {
return platformMerNo;
}
public void setPlatformMerNo(String platformMerNo) {
this.platformMerNo = platformMerNo;
}
public String getPlatformTradeNo() {
return platformTradeNo;
}
public void setPlatformTradeNo(String platformTradeNo) {
this.platformTradeNo = platformTradeNo;
}
public String getPlatformLogNo() {
return platformLogNo;
}
public void setPlatformLogNo(String platformLogNo) {
this.platformLogNo = platformLogNo;
}
public String getPayMode() {
return payMode;
}
public void setPayMode(String payMode) {
this.payMode = payMode;
}
public String getOutTradeNo() {
return outTradeNo;
}
public void setOutTradeNo(String outTradeNo) {
this.outTradeNo = outTradeNo;
}
public Integer getTradeType() {
return tradeType;
}
public void setTradeType(Integer tradeType) {
this.tradeType = tradeType;
}
public BigDecimal getTradeAmount() {
return tradeAmount;
}
public void setTradeAmount(BigDecimal tradeAmount) {
this.tradeAmount = tradeAmount;
}
public Date getTradeTime() {
return tradeTime;
}
public void setTradeTime(Date tradeTime) {
this.tradeTime = tradeTime;
}
public BigDecimal getShdFeeAmt() {
return shdFeeAmt;
}
public void setShdFeeAmt(BigDecimal shdFeeAmt) {
this.shdFeeAmt = shdFeeAmt;
}
public BigDecimal getSettleAmount() {
return settleAmount;
}
public void setSettleAmount(BigDecimal settleAmount) {
this.settleAmount = settleAmount;
}
public Date getSettleDate() {
return settleDate;
}
public void setSettleDate(Date settleDate) {
this.settleDate = settleDate;
}
public BigDecimal getFeeRate() {
return feeRate;
}
public void setFeeRate(BigDecimal feeRate) {
this.feeRate = feeRate;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getExt1() {
return ext1;
}
public void setExt1(String ext1) {
this.ext1 = ext1;
}
public String getExt2() {
return ext2;
}
public void setExt2(String ext2) {
this.ext2 = ext2;
}
public String getExt3() {
return ext3;
}
public void setExt3(String ext3) {
this.ext3 = ext3;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
BsTradeSettle other = (BsTradeSettle) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
&& (this.getAgentId() == null ? other.getAgentId() == null : this.getAgentId().equals(other.getAgentId()))
&& (this.getSalesmanId() == null ? other.getSalesmanId() == null : this.getSalesmanId().equals(other.getSalesmanId()))
&& (this.getSalesmanName() == null ? other.getSalesmanName() == null : this.getSalesmanName().equals(other.getSalesmanName()))
&& (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId()))
&& (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName()))
&& (this.getMerAbbreviate() == null ? other.getMerAbbreviate() == null : this.getMerAbbreviate().equals(other.getMerAbbreviate()))
&& (this.getMerNo() == null ? other.getMerNo() == null : this.getMerNo().equals(other.getMerNo()))
&& (this.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId()))
&& (this.getStoreName() == null ? other.getStoreName() == null : this.getStoreName().equals(other.getStoreName()))
&& (this.getPlatformType() == null ? other.getPlatformType() == null : this.getPlatformType().equals(other.getPlatformType()))
&& (this.getPlatformMerNo() == null ? other.getPlatformMerNo() == null : this.getPlatformMerNo().equals(other.getPlatformMerNo()))
&& (this.getPlatformTradeNo() == null ? other.getPlatformTradeNo() == null : this.getPlatformTradeNo().equals(other.getPlatformTradeNo()))
&& (this.getPlatformLogNo() == null ? other.getPlatformLogNo() == null : this.getPlatformLogNo().equals(other.getPlatformLogNo()))
&& (this.getPayMode() == null ? other.getPayMode() == null : this.getPayMode().equals(other.getPayMode()))
&& (this.getOutTradeNo() == null ? other.getOutTradeNo() == null : this.getOutTradeNo().equals(other.getOutTradeNo()))
&& (this.getTradeType() == null ? other.getTradeType() == null : this.getTradeType().equals(other.getTradeType()))
&& (this.getTradeAmount() == null ? other.getTradeAmount() == null : this.getTradeAmount().equals(other.getTradeAmount()))
&& (this.getTradeTime() == null ? other.getTradeTime() == null : this.getTradeTime().equals(other.getTradeTime()))
&& (this.getShdFeeAmt() == null ? other.getShdFeeAmt() == null : this.getShdFeeAmt().equals(other.getShdFeeAmt()))
&& (this.getSettleAmount() == null ? other.getSettleAmount() == null : this.getSettleAmount().equals(other.getSettleAmount()))
&& (this.getSettleDate() == null ? other.getSettleDate() == null : this.getSettleDate().equals(other.getSettleDate()))
&& (this.getFeeRate() == null ? other.getFeeRate() == null : this.getFeeRate().equals(other.getFeeRate()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
result = prime * result + ((getAgentId() == null) ? 0 : getAgentId().hashCode());
result = prime * result + ((getSalesmanId() == null) ? 0 : getSalesmanId().hashCode());
result = prime * result + ((getSalesmanName() == null) ? 0 : getSalesmanName().hashCode());
result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode());
result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode());
result = prime * result + ((getMerAbbreviate() == null) ? 0 : getMerAbbreviate().hashCode());
result = prime * result + ((getMerNo() == null) ? 0 : getMerNo().hashCode());
result = prime * result + ((getStoreId() == null) ? 0 : getStoreId().hashCode());
result = prime * result + ((getStoreName() == null) ? 0 : getStoreName().hashCode());
result = prime * result + ((getPlatformType() == null) ? 0 : getPlatformType().hashCode());
result = prime * result + ((getPlatformMerNo() == null) ? 0 : getPlatformMerNo().hashCode());
result = prime * result + ((getPlatformTradeNo() == null) ? 0 : getPlatformTradeNo().hashCode());
result = prime * result + ((getPlatformLogNo() == null) ? 0 : getPlatformLogNo().hashCode());
result = prime * result + ((getPayMode() == null) ? 0 : getPayMode().hashCode());
result = prime * result + ((getOutTradeNo() == null) ? 0 : getOutTradeNo().hashCode());
result = prime * result + ((getTradeType() == null) ? 0 : getTradeType().hashCode());
result = prime * result + ((getTradeAmount() == null) ? 0 : getTradeAmount().hashCode());
result = prime * result + ((getTradeTime() == null) ? 0 : getTradeTime().hashCode());
result = prime * result + ((getShdFeeAmt() == null) ? 0 : getShdFeeAmt().hashCode());
result = prime * result + ((getSettleAmount() == null) ? 0 : getSettleAmount().hashCode());
result = prime * result + ((getSettleDate() == null) ? 0 : getSettleDate().hashCode());
result = prime * result + ((getFeeRate() == null) ? 0 : getFeeRate().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", companyId=").append(companyId);
sb.append(", agentId=").append(agentId);
sb.append(", salesmanId=").append(salesmanId);
sb.append(", salesmanName=").append(salesmanName);
sb.append(", merId=").append(merId);
sb.append(", merName=").append(merName);
sb.append(", merAbbreviate=").append(merAbbreviate);
sb.append(", merNo=").append(merNo);
sb.append(", storeId=").append(storeId);
sb.append(", storeName=").append(storeName);
sb.append(", platformType=").append(platformType);
sb.append(", platformMerNo=").append(platformMerNo);
sb.append(", platformTradeNo=").append(platformTradeNo);
sb.append(", platformLogNo=").append(platformLogNo);
sb.append(", payMode=").append(payMode);
sb.append(", outTradeNo=").append(outTradeNo);
sb.append(", tradeType=").append(tradeType);
sb.append(", tradeAmount=").append(tradeAmount);
sb.append(", tradeTime=").append(tradeTime);
sb.append(", shdFeeAmt=").append(shdFeeAmt);
sb.append(", settleAmount=").append(settleAmount);
sb.append(", settleDate=").append(settleDate);
sb.append(", feeRate=").append(feeRate);
sb.append(", createTime=").append(createTime);
sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

@ -0,0 +1,35 @@
package com.hfkj.service;
import com.hfkj.entity.BsTradeSettle;
import java.util.List;
import java.util.Map;
/**
* 交易结算
* @className: BsTradeSettleService
* @author: HuRui
* @date: 2023/8/4
**/
public interface BsTradeSettleService {
/**
* 编辑数据
* @param tradeSettle
*/
void editData(BsTradeSettle tradeSettle);
/**
* 查询详情
* @param id
* @return
*/
BsTradeSettle getDetailById(Long id);
/**
* 查询交易列表
* @param param
* @return
*/
List<BsTradeSettle> getTradeSettleList(Map<String,Object> param);
}

@ -0,0 +1,41 @@
package com.hfkj.service.impl;
import com.hfkj.dao.BsTradeSettleMapper;
import com.hfkj.entity.BsTradeSettle;
import com.hfkj.service.BsTradeSettleService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
* @className: BsTradeSettleServiceImpl
* @author: HuRui
* @date: 2023/8/4
**/
@Service("tradeSettleService")
public class BsTradeSettleServiceImpl implements BsTradeSettleService {
@Resource
private BsTradeSettleMapper tradeSettleMapper;
@Override
public void editData(BsTradeSettle tradeSettle) {
if (tradeSettle.getId() == null) {
tradeSettleMapper.insert(tradeSettle);
} else {
tradeSettleMapper.updateByPrimaryKey(tradeSettle);
}
}
@Override
public BsTradeSettle getDetailById(Long id) {
return tradeSettleMapper.selectByPrimaryKey(id);
}
@Override
public List<BsTradeSettle> getTradeSettleList(Map<String, Object> param) {
return null;
}
}
Loading…
Cancel
Save