diff --git a/src/main/java/cn/chjyj/szwh/bean/UserAccountBill.java b/src/main/java/cn/chjyj/szwh/bean/UserAccountBill.java new file mode 100644 index 0000000..9908d4e --- /dev/null +++ b/src/main/java/cn/chjyj/szwh/bean/UserAccountBill.java @@ -0,0 +1,276 @@ +package cn.chjyj.szwh.bean; + + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 用户账单 + */ +public class UserAccountBill { + /** + * user_account_bill + * id,user_isli as userIsli,batchcode,order_user_id as orderUserId,center_number as centerNumber + * center_name as centerNumber,service_number as serviceNumber,service_name as serviceName, + * service_charge as serviceCharge,thatday_buy_money as thatdayBuyMoney,preliminary_capital as preliminaryCapital, + * available_capital as availableCapital,disburse_capital as disburseCapital,entrust_cost as entrustCost, + * thatday_sale_money as thatdaySaleMoney,service_charge_allot as serviceChargeAllot,capital_remaining as capitalRemaining, + * freeze_earnest_money as freezeEarnestMoney,createtime,close_time as closeTime + */ + private Integer id; + + /** + * 用户ISLI码 + */ + private String userIsli; + + /** + * 订单号 + */ + private String batchcode; + + /** + * 订单用户信息ID + */ + private Integer orderUserId; + + /** + * 分中心编号 + */ + private String centerNumber; + + /** + * 分中心名称 + */ + private String centerName; + + /** + * 服务机构编号 + */ + private String serviceNumber; + + /** + * 服务机构名称 + */ + private String serviceName; + + /** + * 佣金/服务费 + */ + private BigDecimal serviceCharge; + + /** + * 当日买入金额 + */ + private BigDecimal thatdayBuyMoney; + + /** + * 期初资金 + */ + private BigDecimal preliminaryCapital; + + /** + * 可用资金 + */ + private BigDecimal availableCapital; + + /** + * 可出资金 + */ + private BigDecimal disburseCapital; + + /** + * 委托费 + */ + private BigDecimal entrustCost; + + /** + * 当日卖出金额 + */ + private BigDecimal thatdaySaleMoney; + + /** + * 服务费分配 + */ + private BigDecimal serviceChargeAllot; + + /** + * 资金余额 + */ + private BigDecimal capitalRemaining; + + /** + * 冻结保证金 + */ + private BigDecimal freezeEarnestMoney; + + /** + * 创建时间 + */ + private Date createtime; + + /** + * 结算时间 + */ + private Date closeTime; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getUserIsli() { + return userIsli; + } + + public void setUserIsli(String userIsli) { + this.userIsli = userIsli; + } + + public String getBatchcode() { + return batchcode; + } + + public void setBatchcode(String batchcode) { + this.batchcode = batchcode; + } + + public Integer getOrderUserId() { + return orderUserId; + } + + public void setOrderUserId(Integer orderUserId) { + this.orderUserId = orderUserId; + } + + public String getCenterNumber() { + return centerNumber; + } + + public void setCenterNumber(String centerNumber) { + this.centerNumber = centerNumber; + } + + public String getCenterName() { + return centerName; + } + + public void setCenterName(String centerName) { + this.centerName = centerName; + } + + public String getServiceNumber() { + return serviceNumber; + } + + public void setServiceNumber(String serviceNumber) { + this.serviceNumber = serviceNumber; + } + + public String getServiceName() { + return serviceName; + } + + public void setServiceName(String serviceName) { + this.serviceName = serviceName; + } + + public BigDecimal getServiceCharge() { + return serviceCharge; + } + + public void setServiceCharge(BigDecimal serviceCharge) { + this.serviceCharge = serviceCharge; + } + + public BigDecimal getThatdayBuyMoney() { + return thatdayBuyMoney; + } + + public void setThatdayBuyMoney(BigDecimal thatdayBuyMoney) { + this.thatdayBuyMoney = thatdayBuyMoney; + } + + public BigDecimal getPreliminaryCapital() { + return preliminaryCapital; + } + + public void setPreliminaryCapital(BigDecimal preliminaryCapital) { + this.preliminaryCapital = preliminaryCapital; + } + + public BigDecimal getAvailableCapital() { + return availableCapital; + } + + public void setAvailableCapital(BigDecimal availableCapital) { + this.availableCapital = availableCapital; + } + + public BigDecimal getDisburseCapital() { + return disburseCapital; + } + + public void setDisburseCapital(BigDecimal disburseCapital) { + this.disburseCapital = disburseCapital; + } + + public BigDecimal getEntrustCost() { + return entrustCost; + } + + public void setEntrustCost(BigDecimal entrustCost) { + this.entrustCost = entrustCost; + } + + public BigDecimal getThatdaySaleMoney() { + return thatdaySaleMoney; + } + + public void setThatdaySaleMoney(BigDecimal thatdaySaleMoney) { + this.thatdaySaleMoney = thatdaySaleMoney; + } + + public BigDecimal getServiceChargeAllot() { + return serviceChargeAllot; + } + + public void setServiceChargeAllot(BigDecimal serviceChargeAllot) { + this.serviceChargeAllot = serviceChargeAllot; + } + + public BigDecimal getCapitalRemaining() { + return capitalRemaining; + } + + public void setCapitalRemaining(BigDecimal capitalRemaining) { + this.capitalRemaining = capitalRemaining; + } + + public BigDecimal getFreezeEarnestMoney() { + return freezeEarnestMoney; + } + + public void setFreezeEarnestMoney(BigDecimal freezeEarnestMoney) { + this.freezeEarnestMoney = freezeEarnestMoney; + } + + public Date getCreatetime() { + return createtime; + } + + public void setCreatetime(Date createtime) { + this.createtime = createtime; + } + + public Date getCloseTime() { + return closeTime; + } + + public void setCloseTime(Date closeTime) { + this.closeTime = closeTime; + } +} \ No newline at end of file diff --git a/src/main/java/cn/chjyj/szwh/mapper/UserAccountBillMapper.java b/src/main/java/cn/chjyj/szwh/mapper/UserAccountBillMapper.java new file mode 100644 index 0000000..71786db --- /dev/null +++ b/src/main/java/cn/chjyj/szwh/mapper/UserAccountBillMapper.java @@ -0,0 +1,22 @@ +package cn.chjyj.szwh.mapper; + +import cn.chjyj.szwh.bean.UserAccountBill; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; +import org.springframework.web.bind.annotation.PostMapping; + +import java.util.List; + +@Component +public interface UserAccountBillMapper { + /** + * 用户的账单明细 + * @param userisli + * @param statrs + * @param limit + * @return + */ + List getUserAccBill(@Param("userisli") String userisli, + @Param("startrs") int statrs, + @Param("limit") int limit); +} diff --git a/src/main/resources/mapper/szwh/UserAccountBillMapper.xml b/src/main/resources/mapper/szwh/UserAccountBillMapper.xml new file mode 100644 index 0000000..109d608 --- /dev/null +++ b/src/main/resources/mapper/szwh/UserAccountBillMapper.xml @@ -0,0 +1,152 @@ + + + + + + id,user_isli as userIsli,batchcode,order_user_id as orderUserId,center_number as centerNumber, + center_name as centerNumber,service_number as serviceNumber,service_name as serviceName, + service_charge as serviceCharge,thatday_buy_money as thatdayBuyMoney,preliminary_capital as preliminaryCapital, + available_capital as availableCapital,disburse_capital as disburseCapital,entrust_cost as entrustCost, + thatday_sale_money as thatdaySaleMoney,service_charge_allot as serviceChargeAllot,capital_remaining as capitalRemaining, + freeze_earnest_money as freezeEarnestMoney,createtime,close_time as closeTime + + user_account_bill + + + + + + + + + + + + + insert into + + (user_isli,username,institution_code,agency_type,cert_type,idNumber,cell_phone, + bank_account,legals_name,legals_type,legals_idnum,legals_phone,bank_card_type, + bank_type,bank_name,bank_username,bank_userid,bank_userphone,bank_address,attest_status, + registertime,attesttime + ) + values ( + #{userIsli}, + #{username}, + #{institutionCode}, + #{agencyType}, + #{certType}, + #{idNumber}, + #{cellPhone}, + #{bankAccount}, + #{legalsName}, + #{legalsType}, + #{legalsIdnum}, + #{legalsPhone}, + #{bankCardType}, + #{bankType}, + #{bankName}, + #{bankUsername}, + #{bankUserid}, + #{bankUserphone}, + #{bankAddress}, + #{attestStatus}, + #{registertime}, + #{attesttime} + ) + + + + update + + + + user_isli=#{userIsli}, + + + username=#{username}, + + + institution_code =#{institutionCode}, + + + agency_type=#{agencyType} + + + cert_type=#{certType} + + + idNumber=#{idNumber} + + + cell_phone=#{cellPhone} + + + bank_account=#{bankAccount} + + + legals_name=#{legalsName} + + + legals_type=#{legalsType} + + + legals_idnum=#{legalsIdnum} + + + legals_phone=#{legalsPhone} + + + bank_card_type=#{bankCardType} + + + bank_type=#{bankType} + + + bank_name=#{bankName} + + + bank_username=#{bankUsername} + + + bank_userid=#{bankUserid} + + + bank_userphone=#{bankUserphone} + + + bank_address=#{bankAddress} + + + attest_status=#{attestStatus} + + + registertime=#{registertime} + + + attesttime=#{} + + + where id=#{id}; + + + \ No newline at end of file diff --git a/src/test/java/cn/chjyj/szwh/mapper/UserAccountBillMapperTest.java b/src/test/java/cn/chjyj/szwh/mapper/UserAccountBillMapperTest.java new file mode 100644 index 0000000..c0bd7af --- /dev/null +++ b/src/test/java/cn/chjyj/szwh/mapper/UserAccountBillMapperTest.java @@ -0,0 +1,30 @@ +package cn.chjyj.szwh.mapper; + +import cn.chjyj.szwh.bean.UserAccountBill; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +import java.util.List; + +import static org.junit.Assert.*; + +@SpringBootTest +@RunWith(SpringRunner.class) +public class UserAccountBillMapperTest { + @Autowired + private UserAccountBillMapper userAccountBillMapper; + + @Test + public void getUserAccBill() { + String userisli = "999998-000000001874-8"; + int startrs=0; + int limit =20; + List ucblist = userAccountBillMapper.getUserAccBill(userisli,startrs,limit); + for(UserAccountBill ua:ucblist){ + System.out.println(ua.getCenterName()); + } + } +} \ No newline at end of file