package cn.com.taiji.core.entity.settle.mobilepay; | package cn.com.taiji.core.entity.settle.mobilepay; | ||||
import cn.com.taiji.core.entity.settle.AbstractUUIDEntity; | import cn.com.taiji.core.entity.settle.AbstractUUIDEntity; | ||||
import cn.com.taiji.core.entity.settle.notice.InpTransNotice; | |||||
import lombok.Getter; | import lombok.Getter; | ||||
import lombok.Setter; | import lombok.Setter; | ||||
@Entity | @Entity | ||||
@Table(name = "settle_mobile_pay_inp_notice") | @Table(name = "settle_mobile_pay_inp_notice") | ||||
public class MobilePayInpNotice extends AbstractUUIDEntity { | public class MobilePayInpNotice extends AbstractUUIDEntity { | ||||
//清分日期 | |||||
@Column(name = "clear_date") | |||||
private String clearDate; | |||||
//清分月份 | |||||
@Column(name = "CLEAR_MONTH") | |||||
private String clearMonth; | |||||
//UP上半月、DOWN下半月 | |||||
@Column(name = "clear_type") | |||||
private String clearType; | |||||
//清分开始日期 | |||||
@Column(name = "START_CLEAR_DATE") | |||||
private String startClearDate; | |||||
// 清分截止日期 | |||||
@Column(name = "END_CLEAR_DATE") | |||||
private String endClearDate; | |||||
//交易数量 | //交易数量 | ||||
@Column(name = "count") | |||||
@Column(name = "COUNT") | |||||
private Long count; | private Long count; | ||||
//交易金额 | //交易金额 | ||||
@Column(name = "amount") | |||||
@Column(name = "AMOUNT") | |||||
private Long amount; | private Long amount; | ||||
//银行收款交易数量 | //银行收款交易数量 | ||||
@Column(name = "cash_count") | |||||
@Column(name = "CASH_COUNT") | |||||
private Long cashCount; | private Long cashCount; | ||||
//银行收款交易金额 | //银行收款交易金额 | ||||
@Column(name = "cash_amount") | |||||
@Column(name = "CASH_AMOUNT") | |||||
private Long cashAmount; | private Long cashAmount; | ||||
//付款单是否生成 | //付款单是否生成 | ||||
@Column(name = "pay_bill") | |||||
@Column(name = "PAY_BILL") | |||||
private boolean payBill = false; | private boolean payBill = false; | ||||
//付款单生成时间 | //付款单生成时间 | ||||
@Column(name = "pay_bill_time") | |||||
@Column(name = "PAY_BILL_TIME") | |||||
private LocalDateTime payBillTime; | private LocalDateTime payBillTime; | ||||
//付款单文件路径 | //付款单文件路径 | ||||
@Column(name = "pay_bill_url") | |||||
@Column(name = "PAY_BILL_URL") | |||||
private String payBillUrl; | private String payBillUrl; | ||||
//是否生成文件 | |||||
@Column(name = "DATA_FILE") | |||||
private boolean dataFile = false; | |||||
//文件生成时间 | |||||
@Column(name = "DATA_FILE_TIME") | |||||
private LocalDateTime dataFileTime; | |||||
//文件路径 | |||||
@Column(name = "DATA_FILE_URL") | |||||
private String dataFileUrl; | |||||
public MobilePayInpNotice savePayBill(String url){ | public MobilePayInpNotice savePayBill(String url){ | ||||
this.setPayBill(true); | this.setPayBill(true); | ||||
this.setPayBillUrl(url); | this.setPayBillUrl(url); | ||||
this.setPayBillTime(LocalDateTime.now()); | this.setPayBillTime(LocalDateTime.now()); | ||||
// this.setPayBillId(payBillId); | |||||
return this; | |||||
} | |||||
public MobilePayInpNotice saveDataFile(String url){ | |||||
this.setDataFile(true); | |||||
this.setDataFileUrl(url); | |||||
this.setDataFileTime(LocalDateTime.now()); | |||||
return this; | return this; | ||||
} | } | ||||
} | } |
@Column(name = "pay_bill_url") | @Column(name = "pay_bill_url") | ||||
private String payBillUrl; | private String payBillUrl; | ||||
//是否生成文件 | |||||
@Column(name = "data_file") | |||||
private boolean dataFile = false; | |||||
//文件生成时间 | |||||
@Column(name = "data_file_time") | |||||
private LocalDateTime dataFileTime; | |||||
//文件路径 | |||||
@Column(name = "data_file_url") | |||||
private String dataFileUrl; | |||||
public MobilePayOutNotice saveDataFile(String url){ | |||||
this.setDataFile(true); | |||||
this.setDataFileUrl(url); | |||||
this.setDataFileTime(LocalDateTime.now()); | |||||
return this; | |||||
} | |||||
public MobilePayOutNotice savePayBill(String url){ | public MobilePayOutNotice savePayBill(String url){ | ||||
this.setPayBill(true); | this.setPayBill(true); | ||||
this.setPayBillUrl(url); | this.setPayBillUrl(url); |
@Column(name = "initial_num") | @Column(name = "initial_num") | ||||
private Long initialNum;//期初数 | private Long initialNum;//期初数 | ||||
@Column(name = "validate_num") | @Column(name = "validate_num") | ||||
private Long validateNum;//校验 | |||||
private String validateNum;//校验 | |||||
@Column(name = "update_time") | @Column(name = "update_time") | ||||
private LocalDateTime updateTime;//更新时间 | private LocalDateTime updateTime;//更新时间 | ||||
} | } |
import cn.com.taiji.common.repo.jpa.AbstractJpaRepo; | import cn.com.taiji.common.repo.jpa.AbstractJpaRepo; | ||||
import cn.com.taiji.core.entity.settle.mobilepay.MobilePayInpNotice; | import cn.com.taiji.core.entity.settle.mobilepay.MobilePayInpNotice; | ||||
import cn.com.taiji.core.entity.settle.notice.InpTransNotice; | |||||
import org.springframework.data.jpa.repository.Query; | import org.springframework.data.jpa.repository.Query; | ||||
import java.util.List; | import java.util.List; | ||||
*/ | */ | ||||
public interface MobilePayInpNoticeRepo extends AbstractJpaRepo<MobilePayInpNotice, String> { | public interface MobilePayInpNoticeRepo extends AbstractJpaRepo<MobilePayInpNotice, String> { | ||||
MobilePayInpNotice findByClearDate(String clearDate); | |||||
// 省内清分方式 上半月: 1-15 日 下半月: 16-月底 | |||||
@Query(" from MobilePayInpNotice where clearType = ?1 and clearMonth = ?2") | |||||
MobilePayInpNotice findBy(String clearType, String clearMonth); | |||||
@Query("from MobilePayInpNotice where clearDate between ?1 and ?2") | |||||
List<MobilePayInpNotice> listByBetweenClearDate(String startClearDate, String endClearDate); | |||||
// List<MobilePayInpNotice> findByPayBillId(String payBillId); | |||||
} | } |
import cn.com.taiji.common.repo.jpa.AbstractJpaRepo; | import cn.com.taiji.common.repo.jpa.AbstractJpaRepo; | ||||
import cn.com.taiji.core.entity.settle.mobilepay.MobilePayOutNotice; | import cn.com.taiji.core.entity.settle.mobilepay.MobilePayOutNotice; | ||||
import cn.com.taiji.core.entity.settle.notice.OutTransNotice; | |||||
import org.springframework.data.jpa.repository.Query; | |||||
import java.util.List; | |||||
/** | /** | ||||
* @author nieqiongqiong | * @author nieqiongqiong | ||||
MobilePayOutNotice findByClearDate(String clearDate); | MobilePayOutNotice findByClearDate(String clearDate); | ||||
@Query(" from MobilePayOutNotice where clearDate >= ?1 and clearDate <= ?2 order by clearDate asc") | |||||
List<MobilePayOutNotice> listBy(String startClearDate, String endClearDate); | |||||
} | } |