From ecb4788dea2bb4f298b4be58c4fce61ac359560f Mon Sep 17 00:00:00 2001 From: "autumn.g@foxmail.com" Date: Fri, 21 Jul 2023 16:19:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E5=88=86=E8=B4=A6=E5=8D=95=E8=A1=A8?= =?UTF-8?q?=20=E7=9B=B8=E5=85=B3=E5=AE=9E=E4=BD=93=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jsowell/pile/domain/ClearingBillInfo.java | 101 ++++++++ .../pile/mapper/ClearingBillInfoMapper.java | 47 ++++ .../pile/service/ClearingBillInfoService.java | 19 ++ .../impl/ClearingBillInfoServiceImpl.java | 44 ++++ .../mapper/pile/ClearingBillInfoMapper.xml | 238 ++++++++++++++++++ 5 files changed, 449 insertions(+) create mode 100644 jsowell-pile/src/main/java/com/jsowell/pile/domain/ClearingBillInfo.java create mode 100644 jsowell-pile/src/main/java/com/jsowell/pile/mapper/ClearingBillInfoMapper.java create mode 100644 jsowell-pile/src/main/java/com/jsowell/pile/service/ClearingBillInfoService.java create mode 100644 jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ClearingBillInfoServiceImpl.java create mode 100644 jsowell-pile/src/main/resources/mapper/pile/ClearingBillInfoMapper.xml diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/domain/ClearingBillInfo.java b/jsowell-pile/src/main/java/com/jsowell/pile/domain/ClearingBillInfo.java new file mode 100644 index 000000000..0c743a6ac --- /dev/null +++ b/jsowell-pile/src/main/java/com/jsowell/pile/domain/ClearingBillInfo.java @@ -0,0 +1,101 @@ +package com.jsowell.pile.domain; + +import lombok.*; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 清分账单表 + */ +@Getter +@Setter +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class ClearingBillInfo { + /** + * 主键 + */ + private Integer id; + + /** + * 账单状态(0-未清分;1-清分在途;2-可提现;3-提现申请中;4-已提现;5等待处理;6-线下结算) + */ + private String billStatus; + + /** + * 清分账单编号 + */ + private String clearingBillCode; + + /** + * 清分时间 + */ + private Date clearingTime; + + /** + * 运营商id + */ + private String merchantId; + + /** + * 订单来源(1-有电充平台) + */ + private String orderSource; + + /** + * 应收金额 + */ + private BigDecimal receivableAmount; + + /** + * 应清分金额 + */ + private BigDecimal shouldClearingAmount; + + /** + * 实际清分金额 + */ + private BigDecimal actualClearingAmount; + + /** + * 手续费 + */ + private BigDecimal feeAmount; + + /** + * 可提现金额 + */ + private BigDecimal withdrawableAmount; + + /** + * 提现单号 + */ + private String withdrawCode; + + /** + * 创建人 + */ + private String createBy; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新人 + */ + private String updateBy; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 删除标识(0-正常;1-删除) + */ + private String delFlag; +} \ No newline at end of file diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/mapper/ClearingBillInfoMapper.java b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/ClearingBillInfoMapper.java new file mode 100644 index 000000000..849561d36 --- /dev/null +++ b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/ClearingBillInfoMapper.java @@ -0,0 +1,47 @@ +package com.jsowell.pile.mapper; + +import com.jsowell.pile.domain.ClearingBillInfo; + +public interface ClearingBillInfoMapper { + /** + * delete by primary key + * @param id primaryKey + * @return deleteCount + */ + int deleteByPrimaryKey(Integer id); + + /** + * insert record to table + * @param record the record + * @return insert count + */ + int insert(ClearingBillInfo record); + + /** + * insert record to table selective + * @param record the record + * @return insert count + */ + int insertSelective(ClearingBillInfo record); + + /** + * select by primary key + * @param id primary key + * @return object by primary key + */ + ClearingBillInfo selectByPrimaryKey(Integer id); + + /** + * update record selective + * @param record the updated record + * @return update count + */ + int updateByPrimaryKeySelective(ClearingBillInfo record); + + /** + * update record + * @param record the updated record + * @return update count + */ + int updateByPrimaryKey(ClearingBillInfo record); +} \ No newline at end of file diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/ClearingBillInfoService.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/ClearingBillInfoService.java new file mode 100644 index 000000000..7085133d4 --- /dev/null +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/ClearingBillInfoService.java @@ -0,0 +1,19 @@ +package com.jsowell.pile.service; + +import com.jsowell.pile.domain.ClearingBillInfo; +public interface ClearingBillInfoService{ + + + int deleteByPrimaryKey(Integer id); + + int insert(ClearingBillInfo record); + + int insertSelective(ClearingBillInfo record); + + ClearingBillInfo selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(ClearingBillInfo record); + + int updateByPrimaryKey(ClearingBillInfo record); + +} diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ClearingBillInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ClearingBillInfoServiceImpl.java new file mode 100644 index 000000000..ce8147122 --- /dev/null +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ClearingBillInfoServiceImpl.java @@ -0,0 +1,44 @@ +package com.jsowell.pile.service.impl; + +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import com.jsowell.pile.domain.ClearingBillInfo; +import com.jsowell.pile.mapper.ClearingBillInfoMapper; +import com.jsowell.pile.service.ClearingBillInfoService; +@Service +public class ClearingBillInfoServiceImpl implements ClearingBillInfoService{ + + @Resource + private ClearingBillInfoMapper clearingBillInfoMapper; + + @Override + public int deleteByPrimaryKey(Integer id) { + return clearingBillInfoMapper.deleteByPrimaryKey(id); + } + + @Override + public int insert(ClearingBillInfo record) { + return clearingBillInfoMapper.insert(record); + } + + @Override + public int insertSelective(ClearingBillInfo record) { + return clearingBillInfoMapper.insertSelective(record); + } + + @Override + public ClearingBillInfo selectByPrimaryKey(Integer id) { + return clearingBillInfoMapper.selectByPrimaryKey(id); + } + + @Override + public int updateByPrimaryKeySelective(ClearingBillInfo record) { + return clearingBillInfoMapper.updateByPrimaryKeySelective(record); + } + + @Override + public int updateByPrimaryKey(ClearingBillInfo record) { + return clearingBillInfoMapper.updateByPrimaryKey(record); + } + +} diff --git a/jsowell-pile/src/main/resources/mapper/pile/ClearingBillInfoMapper.xml b/jsowell-pile/src/main/resources/mapper/pile/ClearingBillInfoMapper.xml new file mode 100644 index 000000000..7dffab1cf --- /dev/null +++ b/jsowell-pile/src/main/resources/mapper/pile/ClearingBillInfoMapper.xml @@ -0,0 +1,238 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + id, bill_status, clearing_bill_code, clearing_time, merchant_id, order_source, receivable_amount, + should_clearing_amount, actual_clearing_amount, fee_amount, withdrawable_amount, + withdraw_code, create_by, create_time, update_by, update_time, del_flag + + + + + delete from clearing_bill_info + where id = #{id,jdbcType=INTEGER} + + + + insert into clearing_bill_info (bill_status, clearing_bill_code, clearing_time, + merchant_id, order_source, receivable_amount, + should_clearing_amount, actual_clearing_amount, + fee_amount, withdrawable_amount, withdraw_code, + create_by, create_time, update_by, + update_time, del_flag) + values (#{billStatus,jdbcType=VARCHAR}, #{clearingBillCode,jdbcType=VARCHAR}, #{clearingTime,jdbcType=TIMESTAMP}, + #{merchantId,jdbcType=VARCHAR}, #{orderSource,jdbcType=VARCHAR}, #{receivableAmount,jdbcType=DECIMAL}, + #{shouldClearingAmount,jdbcType=DECIMAL}, #{actualClearingAmount,jdbcType=DECIMAL}, + #{feeAmount,jdbcType=DECIMAL}, #{withdrawableAmount,jdbcType=DECIMAL}, #{withdrawCode,jdbcType=VARCHAR}, + #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, + #{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=VARCHAR}) + + + + insert into clearing_bill_info + + + bill_status, + + + clearing_bill_code, + + + clearing_time, + + + merchant_id, + + + order_source, + + + receivable_amount, + + + should_clearing_amount, + + + actual_clearing_amount, + + + fee_amount, + + + withdrawable_amount, + + + withdraw_code, + + + create_by, + + + create_time, + + + update_by, + + + update_time, + + + del_flag, + + + + + #{billStatus,jdbcType=VARCHAR}, + + + #{clearingBillCode,jdbcType=VARCHAR}, + + + #{clearingTime,jdbcType=TIMESTAMP}, + + + #{merchantId,jdbcType=VARCHAR}, + + + #{orderSource,jdbcType=VARCHAR}, + + + #{receivableAmount,jdbcType=DECIMAL}, + + + #{shouldClearingAmount,jdbcType=DECIMAL}, + + + #{actualClearingAmount,jdbcType=DECIMAL}, + + + #{feeAmount,jdbcType=DECIMAL}, + + + #{withdrawableAmount,jdbcType=DECIMAL}, + + + #{withdrawCode,jdbcType=VARCHAR}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{delFlag,jdbcType=VARCHAR}, + + + + + + update clearing_bill_info + + + bill_status = #{billStatus,jdbcType=VARCHAR}, + + + clearing_bill_code = #{clearingBillCode,jdbcType=VARCHAR}, + + + clearing_time = #{clearingTime,jdbcType=TIMESTAMP}, + + + merchant_id = #{merchantId,jdbcType=VARCHAR}, + + + order_source = #{orderSource,jdbcType=VARCHAR}, + + + receivable_amount = #{receivableAmount,jdbcType=DECIMAL}, + + + should_clearing_amount = #{shouldClearingAmount,jdbcType=DECIMAL}, + + + actual_clearing_amount = #{actualClearingAmount,jdbcType=DECIMAL}, + + + fee_amount = #{feeAmount,jdbcType=DECIMAL}, + + + withdrawable_amount = #{withdrawableAmount,jdbcType=DECIMAL}, + + + withdraw_code = #{withdrawCode,jdbcType=VARCHAR}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + del_flag = #{delFlag,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + + update clearing_bill_info + set bill_status = #{billStatus,jdbcType=VARCHAR}, + clearing_bill_code = #{clearingBillCode,jdbcType=VARCHAR}, + clearing_time = #{clearingTime,jdbcType=TIMESTAMP}, + merchant_id = #{merchantId,jdbcType=VARCHAR}, + order_source = #{orderSource,jdbcType=VARCHAR}, + receivable_amount = #{receivableAmount,jdbcType=DECIMAL}, + should_clearing_amount = #{shouldClearingAmount,jdbcType=DECIMAL}, + actual_clearing_amount = #{actualClearingAmount,jdbcType=DECIMAL}, + fee_amount = #{feeAmount,jdbcType=DECIMAL}, + withdrawable_amount = #{withdrawableAmount,jdbcType=DECIMAL}, + withdraw_code = #{withdrawCode,jdbcType=VARCHAR}, + create_by = #{createBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_by = #{updateBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + del_flag = #{delFlag,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file