修改service注入为null
This commit is contained in:
parent
1541b160b6
commit
2e5a65b2c3
|
@ -9,6 +9,7 @@ import com.snow.framework.excel.FinanceAlipayFlowListener;
|
|||
import com.snow.framework.util.ShiroUtils;
|
||||
import com.snow.system.domain.FinanceAlipayFlowImport;
|
||||
import com.snow.system.domain.SysUser;
|
||||
import com.snow.system.mapper.FinanceAlipayFlowMapper;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
@ -43,6 +44,8 @@ public class FinanceAlipayFlowController extends BaseController
|
|||
@Autowired
|
||||
private IFinanceAlipayFlowService financeAlipayFlowService;
|
||||
|
||||
|
||||
|
||||
@RequiresPermissions("system:flow:view")
|
||||
@GetMapping()
|
||||
public String flow()
|
||||
|
@ -142,11 +145,13 @@ public class FinanceAlipayFlowController extends BaseController
|
|||
{
|
||||
|
||||
String operName = ShiroUtils.getSysUser().getLoginName();
|
||||
ExcelReader excelReader = EasyExcel.read(file.getInputStream(), FinanceAlipayFlowImport.class, new FinanceAlipayFlowListener()).build();
|
||||
ReadSheet readSheet = EasyExcel.readSheet(5).build();
|
||||
Long userId = ShiroUtils.getSysUser().getUserId();
|
||||
FinanceAlipayFlowListener financeAlipayFlowListener = new FinanceAlipayFlowListener(financeAlipayFlowService, operName, "459816669@qq.com","金启明",userId);
|
||||
ExcelReader excelReader = EasyExcel.read(file.getInputStream(), FinanceAlipayFlowImport.class, financeAlipayFlowListener).build();
|
||||
ReadSheet readSheet = EasyExcel.readSheet(0).build();
|
||||
excelReader.read(readSheet);
|
||||
// 这里千万别忘记关闭,读的时候会创建临时文件,到时磁盘会崩的
|
||||
excelReader.finish();
|
||||
return AjaxResult.success("");
|
||||
return AjaxResult.success("导入成功");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,8 +2,12 @@ package com.snow.framework.excel;
|
|||
|
||||
import com.alibaba.excel.context.AnalysisContext;
|
||||
import com.alibaba.excel.event.AnalysisEventListener;
|
||||
import com.snow.common.utils.bean.BeanUtils;
|
||||
import com.snow.system.domain.FinanceAlipayFlow;
|
||||
import com.snow.system.domain.FinanceAlipayFlowImport;
|
||||
import com.snow.system.mapper.FinanceAlipayFlowMapper;
|
||||
import com.snow.system.service.IFinanceAlipayFlowService;
|
||||
import com.snow.system.service.impl.FinanceAlipayFlowServiceImpl;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
@ -25,13 +29,50 @@ import java.util.Map;
|
|||
public class FinanceAlipayFlowListener extends AnalysisEventListener<FinanceAlipayFlowImport> {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(FinanceAlipayFlowListener.class);
|
||||
|
||||
/**
|
||||
* 假设这个是一个DAO,当然有业务逻辑这个也可以是一个service。当然如果不用存储这个对象没用。
|
||||
*/
|
||||
|
||||
private IFinanceAlipayFlowService financeAlipayFlowService;
|
||||
|
||||
/**
|
||||
* 导入人
|
||||
*/
|
||||
private String operName;
|
||||
|
||||
/** 交易主体账户 */
|
||||
|
||||
private String tradeAccount;
|
||||
|
||||
|
||||
/** 交易真实姓名 */
|
||||
private String tradeRealName;
|
||||
|
||||
/**
|
||||
* 导入人
|
||||
*/
|
||||
private long belongUserId;
|
||||
/**
|
||||
* 如果使用了spring,请使用这个构造方法。每次创建Listener的时候需要把spring管理的类传进来
|
||||
*
|
||||
* @param financeAlipayFlowService
|
||||
*/
|
||||
public FinanceAlipayFlowListener(IFinanceAlipayFlowService financeAlipayFlowService,String operName,String tradeAccount,String tradeRealName,long belongUserId) {
|
||||
this.financeAlipayFlowService = financeAlipayFlowService;
|
||||
this.operName=operName;
|
||||
this.tradeAccount=tradeAccount;
|
||||
this.tradeRealName=tradeRealName;
|
||||
this.belongUserId=belongUserId;
|
||||
}
|
||||
//创建list集合封装最终的数据
|
||||
List<FinanceAlipayFlowImport> list = new ArrayList<>();
|
||||
|
||||
//一行一行去读取excle内容
|
||||
@Override
|
||||
public void invoke(FinanceAlipayFlowImport productVO, AnalysisContext analysisContext) {
|
||||
list.add(productVO);
|
||||
public void invoke(FinanceAlipayFlowImport financeAlipayFlowImport, AnalysisContext analysisContext) {
|
||||
|
||||
list.add(financeAlipayFlowImport);
|
||||
}
|
||||
|
||||
//读取excel表头信息
|
||||
|
@ -43,30 +84,66 @@ public class FinanceAlipayFlowListener extends AnalysisEventListener<FinanceAlip
|
|||
//读取完成后执行
|
||||
@Override
|
||||
public void doAfterAllAnalysed(AnalysisContext analysisContext) {
|
||||
|
||||
|
||||
buildSelectProductAppSql();
|
||||
saveData();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void buildSelectProductAppSql(){
|
||||
StringBuilder stringBuilder=new StringBuilder();
|
||||
public void saveData(){
|
||||
list.forEach(t->{
|
||||
if(StringUtils.isEmpty(t.getId())){
|
||||
// System.out.println("select * from clms_product where code='"+t.getProductNo()+"'");
|
||||
}else {
|
||||
stringBuilder.append("update clms_product_app set brand_ratio_id=(select brand_ratio_id from clms_product where code='"+t.getOrderNo()+"') where code='"+t.getTradeNo()+"';\r\n");
|
||||
FinanceAlipayFlow financeAlipayFlow=new FinanceAlipayFlow();
|
||||
BeanUtils.copyProperties(t,financeAlipayFlow);
|
||||
String capitalStatus = t.getCapitalStatus();
|
||||
if(StringUtils.isEmpty(capitalStatus)){
|
||||
financeAlipayFlow.setCapitalStatus(0);
|
||||
}
|
||||
else if(capitalStatus.equals("已支出")){
|
||||
financeAlipayFlow.setCapitalStatus(1);
|
||||
}else if(capitalStatus.equals("已收入")){
|
||||
financeAlipayFlow.setCapitalStatus(2);
|
||||
}else if(capitalStatus.equals("资金转移")){
|
||||
financeAlipayFlow.setCapitalStatus(3);
|
||||
}else {
|
||||
financeAlipayFlow.setCapitalStatus(10);
|
||||
}
|
||||
|
||||
String incomeExpenditureType = t.getIncomeExpenditureType();
|
||||
if(StringUtils.isEmpty(incomeExpenditureType)){
|
||||
financeAlipayFlow.setIncomeExpenditureType(0);
|
||||
}
|
||||
else if(incomeExpenditureType.equals("收入")){
|
||||
financeAlipayFlow.setIncomeExpenditureType(2);
|
||||
}else if(incomeExpenditureType.equals("支出")){
|
||||
financeAlipayFlow.setIncomeExpenditureType(1);
|
||||
}
|
||||
String tradeStatus = t.getTradeStatus();
|
||||
if(StringUtils.isEmpty(tradeStatus)){
|
||||
financeAlipayFlow.setTradeStatus(null);
|
||||
}
|
||||
else if(tradeStatus.equals("交易成功")){
|
||||
financeAlipayFlow.setTradeStatus(1);
|
||||
}else if(tradeStatus.equals("交易关闭")){
|
||||
financeAlipayFlow.setTradeStatus(2);
|
||||
}else if(tradeStatus.equals("还款成功")){
|
||||
financeAlipayFlow.setTradeStatus(3);
|
||||
}else if(tradeStatus.equals("退款成功")){
|
||||
financeAlipayFlow.setTradeStatus(4);
|
||||
}
|
||||
String tradeType = t.getTradeType();
|
||||
if(StringUtils.isEmpty(tradeType)){
|
||||
financeAlipayFlow.setTradeType(null);
|
||||
}
|
||||
else if(tradeType.equals("即时到账交易")){
|
||||
financeAlipayFlow.setTradeType(1);
|
||||
}else if(tradeType.equals("支付宝担保交易")){
|
||||
financeAlipayFlow.setTradeType(2);
|
||||
}
|
||||
financeAlipayFlow.setCreateBy(operName);
|
||||
financeAlipayFlow.setBelongUserId(belongUserId);
|
||||
financeAlipayFlow.setTradeRealName(tradeRealName);
|
||||
financeAlipayFlow.setTradeAccount(tradeAccount);
|
||||
|
||||
financeAlipayFlowService.insertFinanceAlipayFlow(financeAlipayFlow);
|
||||
});
|
||||
try {
|
||||
BufferedWriter out = new BufferedWriter(new FileWriter("d:\\onlineProductAppSql.txt"));
|
||||
out.write(stringBuilder.toString());
|
||||
out.close();
|
||||
log.info("创建文件成功");
|
||||
} catch (IOException e) {
|
||||
log.error("写入文件异常");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,8 +2,6 @@ package com.snow.system.domain;
|
|||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.snow.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
@ -55,7 +53,7 @@ public class FinanceAlipayFlow extends BaseEntity
|
|||
|
||||
/** 商品名称 */
|
||||
@ExcelProperty(index = 9)
|
||||
private String goodName;
|
||||
private String goodsName;
|
||||
/** 交易金额 */
|
||||
@ExcelProperty(index = 10)
|
||||
private BigDecimal tradePrice;
|
||||
|
@ -253,37 +251,11 @@ public class FinanceAlipayFlow extends BaseEntity
|
|||
this.tradeRealName = tradeRealName;
|
||||
}
|
||||
|
||||
public String getGoodName() {
|
||||
return goodName;
|
||||
public String getGoodsName() {
|
||||
return goodsName;
|
||||
}
|
||||
|
||||
public void setGoodName(String goodName) {
|
||||
this.goodName = goodName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("tradeNo", getTradeNo())
|
||||
.append("orderNo", getOrderNo())
|
||||
.append("tradeCreateTime", getTradeCreateTime())
|
||||
.append("payTime", getPayTime())
|
||||
.append("lastModifyTime", getLastModifyTime())
|
||||
.append("tradeSourcePlace", getTradeSourcePlace())
|
||||
.append("tradeType", getTradeType())
|
||||
.append("counterparty", getCounterparty())
|
||||
.append("tradePrice", getTradePrice())
|
||||
.append("tradeStatus", getTradeStatus())
|
||||
.append("incomeExpenditureType", getIncomeExpenditureType())
|
||||
.append("serviceCharge", getServiceCharge())
|
||||
.append("refundPrice", getRefundPrice())
|
||||
.append("capitalStatus", getCapitalStatus())
|
||||
.append("remark", getRemark())
|
||||
.append("belongUserId", getBelongUserId())
|
||||
.append("tradeAccount", getTradeAccount())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.toString();
|
||||
public void setGoodsName(String goodsName) {
|
||||
this.goodsName = goodsName;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
package com.snow.system.domain;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
|
||||
/**
|
||||
* @program: snow
|
||||
* @description
|
||||
* @author: 没用的阿吉
|
||||
* @create: 2020-11-09 21:47
|
||||
**/
|
||||
public class FinanceAlipayFlowHead {
|
||||
|
||||
/** 交易主体账户 */
|
||||
@ExcelProperty(index = 0)
|
||||
private String tradeAccount;
|
||||
|
||||
|
||||
/** 交易真实姓名 */
|
||||
@ExcelProperty(index = 1)
|
||||
private String tradeRealName;
|
||||
|
||||
public String getTradeAccount() {
|
||||
return tradeAccount;
|
||||
}
|
||||
|
||||
public void setTradeAccount(String tradeAccount) {
|
||||
this.tradeAccount = tradeAccount;
|
||||
}
|
||||
|
||||
public String getTradeRealName() {
|
||||
return tradeRealName;
|
||||
}
|
||||
|
||||
public void setTradeRealName(String tradeRealName) {
|
||||
this.tradeRealName = tradeRealName;
|
||||
}
|
||||
}
|
|
@ -1,289 +1,216 @@
|
|||
package com.snow.system.domain;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.snow.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 财务支付宝流水对象 finance_alipay_flow
|
||||
*
|
||||
* @author snow
|
||||
* @date 2020-11-09
|
||||
* @String 2020-11-09
|
||||
*/
|
||||
public class FinanceAlipayFlowImport extends BaseEntity
|
||||
public class FinanceAlipayFlowImport
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ID */
|
||||
private Long id;
|
||||
|
||||
|
||||
/** 交易号 */
|
||||
@ExcelProperty(index = 1)
|
||||
@ExcelProperty(index = 0)
|
||||
private String tradeNo;
|
||||
|
||||
/** 商家订单号 */
|
||||
@ExcelProperty(index = 2)
|
||||
@ExcelProperty(index = 1)
|
||||
private String orderNo;
|
||||
|
||||
/** 交易创建时间 */
|
||||
@ExcelProperty(index = 3)
|
||||
@ExcelProperty(index = 2)
|
||||
private Date tradeCreateTime;
|
||||
|
||||
/** 交易支付时间 */
|
||||
@ExcelProperty(index = 4)
|
||||
@ExcelProperty(index = 3)
|
||||
private Date payTime;
|
||||
|
||||
/** 最近修改时间 */
|
||||
@ExcelProperty(index = 5)
|
||||
@ExcelProperty(index = 4)
|
||||
private Date lastModifyTime;
|
||||
|
||||
/** 交易来源地 */
|
||||
@ExcelProperty(index =6)
|
||||
@ExcelProperty(index =5)
|
||||
private String tradeSourcePlace;
|
||||
|
||||
/** 交易类型 */
|
||||
@ExcelProperty(index = 7)
|
||||
private Integer tradeType;
|
||||
@ExcelProperty(index = 6)
|
||||
private String tradeType;
|
||||
|
||||
/** 交易对方 */
|
||||
@ExcelProperty(index = 8)
|
||||
@ExcelProperty(index = 7)
|
||||
private String counterparty;
|
||||
|
||||
/** 商品名称 */
|
||||
@ExcelProperty(index = 9)
|
||||
private String goodName;
|
||||
@ExcelProperty(index = 8)
|
||||
private String goodsName;
|
||||
/** 交易金额 */
|
||||
@ExcelProperty(index = 10)
|
||||
@ExcelProperty(index = 9)
|
||||
private BigDecimal tradePrice;
|
||||
|
||||
/** 交易状态 */
|
||||
@ExcelProperty(index = 12)
|
||||
private String tradeStatus;
|
||||
|
||||
/** 收支类型 */
|
||||
@ExcelProperty(index = 11)
|
||||
@ExcelProperty(index = 10)
|
||||
private String incomeExpenditureType;
|
||||
|
||||
/** 交易状态 */
|
||||
@ExcelProperty(index = 11)
|
||||
private String tradeStatus;
|
||||
|
||||
|
||||
|
||||
/** 服务费 */
|
||||
@ExcelProperty(index = 13)
|
||||
@ExcelProperty(index = 12)
|
||||
private BigDecimal serviceCharge;
|
||||
|
||||
/** 退款金额 */
|
||||
@ExcelProperty(index = 14)
|
||||
@ExcelProperty(index = 13)
|
||||
private BigDecimal refundPrice;
|
||||
|
||||
@ExcelProperty(index = 14)
|
||||
private String remark;
|
||||
|
||||
/** 资金状态 */
|
||||
@ExcelProperty(index = 16)
|
||||
@ExcelProperty(index = 15)
|
||||
private String capitalStatus;
|
||||
|
||||
/** 所属人 */
|
||||
|
||||
private Long belongUserId;
|
||||
|
||||
/** 交易主体账户 */
|
||||
|
||||
private String tradeAccount;
|
||||
|
||||
|
||||
/** 交易真实姓名 */
|
||||
private String tradeRealName;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
public String getTradeNo() {
|
||||
return tradeNo;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setTradeNo(String tradeNo)
|
||||
{
|
||||
public void setTradeNo(String tradeNo) {
|
||||
this.tradeNo = tradeNo;
|
||||
}
|
||||
|
||||
public String getTradeNo()
|
||||
{
|
||||
return tradeNo;
|
||||
public String getOrderNo() {
|
||||
return orderNo;
|
||||
}
|
||||
public void setOrderNo(String orderNo)
|
||||
{
|
||||
|
||||
public void setOrderNo(String orderNo) {
|
||||
this.orderNo = orderNo;
|
||||
}
|
||||
|
||||
public String getOrderNo()
|
||||
{
|
||||
return orderNo;
|
||||
public Date getTradeCreateTime() {
|
||||
return tradeCreateTime;
|
||||
}
|
||||
public void setTradeCreateTime(Date tradeCreateTime)
|
||||
{
|
||||
|
||||
public void setTradeCreateTime(Date tradeCreateTime) {
|
||||
this.tradeCreateTime = tradeCreateTime;
|
||||
}
|
||||
|
||||
public Date getTradeCreateTime()
|
||||
{
|
||||
return tradeCreateTime;
|
||||
public Date getPayTime() {
|
||||
return payTime;
|
||||
}
|
||||
public void setPayTime(Date payTime)
|
||||
{
|
||||
|
||||
public void setPayTime(Date payTime) {
|
||||
this.payTime = payTime;
|
||||
}
|
||||
|
||||
public Date getPayTime()
|
||||
{
|
||||
return payTime;
|
||||
public Date getLastModifyTime() {
|
||||
return lastModifyTime;
|
||||
}
|
||||
public void setLastModifyTime(Date lastModifyTime)
|
||||
{
|
||||
|
||||
public void setLastModifyTime(Date lastModifyTime) {
|
||||
this.lastModifyTime = lastModifyTime;
|
||||
}
|
||||
|
||||
public Date getLastModifyTime()
|
||||
{
|
||||
return lastModifyTime;
|
||||
public String getTradeSourcePlace() {
|
||||
return tradeSourcePlace;
|
||||
}
|
||||
public void setTradeSourcePlace(String tradeSourcePlace)
|
||||
{
|
||||
|
||||
public void setTradeSourcePlace(String tradeSourcePlace) {
|
||||
this.tradeSourcePlace = tradeSourcePlace;
|
||||
}
|
||||
|
||||
public String getTradeSourcePlace()
|
||||
{
|
||||
return tradeSourcePlace;
|
||||
public String getTradeType() {
|
||||
return tradeType;
|
||||
}
|
||||
public void setTradeType(Integer tradeType)
|
||||
{
|
||||
|
||||
public void setTradeType(String tradeType) {
|
||||
this.tradeType = tradeType;
|
||||
}
|
||||
|
||||
public Integer getTradeType()
|
||||
{
|
||||
return tradeType;
|
||||
public String getCounterparty() {
|
||||
return counterparty;
|
||||
}
|
||||
public void setCounterparty(String counterparty)
|
||||
{
|
||||
|
||||
public void setCounterparty(String counterparty) {
|
||||
this.counterparty = counterparty;
|
||||
}
|
||||
|
||||
public String getCounterparty()
|
||||
{
|
||||
return counterparty;
|
||||
public String getGoodsName() {
|
||||
return goodsName;
|
||||
}
|
||||
public void setTradePrice(BigDecimal tradePrice)
|
||||
{
|
||||
|
||||
public void setGoodsName(String goodsName) {
|
||||
this.goodsName = goodsName;
|
||||
}
|
||||
|
||||
public BigDecimal getTradePrice() {
|
||||
return tradePrice;
|
||||
}
|
||||
|
||||
public void setTradePrice(BigDecimal tradePrice) {
|
||||
this.tradePrice = tradePrice;
|
||||
}
|
||||
|
||||
public BigDecimal getTradePrice()
|
||||
{
|
||||
return tradePrice;
|
||||
}
|
||||
public void setTradeStatus(String tradeStatus)
|
||||
{
|
||||
this.tradeStatus = tradeStatus;
|
||||
public String getIncomeExpenditureType() {
|
||||
return incomeExpenditureType;
|
||||
}
|
||||
|
||||
public String getTradeStatus()
|
||||
{
|
||||
return tradeStatus;
|
||||
}
|
||||
public void setIncomeExpenditureType(String incomeExpenditureType)
|
||||
{
|
||||
public void setIncomeExpenditureType(String incomeExpenditureType) {
|
||||
this.incomeExpenditureType = incomeExpenditureType;
|
||||
}
|
||||
|
||||
public String getIncomeExpenditureType()
|
||||
{
|
||||
return incomeExpenditureType;
|
||||
public String getTradeStatus() {
|
||||
return tradeStatus;
|
||||
}
|
||||
public void setServiceCharge(BigDecimal serviceCharge)
|
||||
{
|
||||
|
||||
public void setTradeStatus(String tradeStatus) {
|
||||
this.tradeStatus = tradeStatus;
|
||||
}
|
||||
|
||||
public BigDecimal getServiceCharge() {
|
||||
return serviceCharge;
|
||||
}
|
||||
|
||||
public void setServiceCharge(BigDecimal serviceCharge) {
|
||||
this.serviceCharge = serviceCharge;
|
||||
}
|
||||
|
||||
public BigDecimal getServiceCharge()
|
||||
{
|
||||
return serviceCharge;
|
||||
public BigDecimal getRefundPrice() {
|
||||
return refundPrice;
|
||||
}
|
||||
public void setRefundPrice(BigDecimal refundPrice)
|
||||
{
|
||||
|
||||
public void setRefundPrice(BigDecimal refundPrice) {
|
||||
this.refundPrice = refundPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getRefundPrice()
|
||||
{
|
||||
return refundPrice;
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
public void setCapitalStatus(String capitalStatus)
|
||||
{
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getCapitalStatus() {
|
||||
return capitalStatus;
|
||||
}
|
||||
|
||||
public void setCapitalStatus(String capitalStatus) {
|
||||
this.capitalStatus = capitalStatus;
|
||||
}
|
||||
|
||||
public String getCapitalStatus()
|
||||
{
|
||||
return capitalStatus;
|
||||
}
|
||||
public void setBelongUserId(Long belongUserId)
|
||||
{
|
||||
this.belongUserId = belongUserId;
|
||||
}
|
||||
|
||||
public Long getBelongUserId()
|
||||
{
|
||||
return belongUserId;
|
||||
}
|
||||
public void setTradeAccount(String tradeAccount)
|
||||
{
|
||||
this.tradeAccount = tradeAccount;
|
||||
}
|
||||
|
||||
public String getTradeAccount()
|
||||
{
|
||||
return tradeAccount;
|
||||
}
|
||||
|
||||
public String getGoodName() {
|
||||
return goodName;
|
||||
}
|
||||
|
||||
public void setGoodName(String goodName) {
|
||||
this.goodName = goodName;
|
||||
}
|
||||
|
||||
public String getTradeRealName() {
|
||||
return tradeRealName;
|
||||
}
|
||||
|
||||
public void setTradeRealName(String tradeRealName) {
|
||||
this.tradeRealName = tradeRealName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("tradeNo", getTradeNo())
|
||||
.append("orderNo", getOrderNo())
|
||||
.append("tradeCreateTime", getTradeCreateTime())
|
||||
.append("payTime", getPayTime())
|
||||
.append("lastModifyTime", getLastModifyTime())
|
||||
.append("tradeSourcePlace", getTradeSourcePlace())
|
||||
.append("tradeType", getTradeType())
|
||||
.append("counterparty", getCounterparty())
|
||||
.append("tradePrice", getTradePrice())
|
||||
.append("tradeStatus", getTradeStatus())
|
||||
.append("incomeExpenditureType", getIncomeExpenditureType())
|
||||
.append("serviceCharge", getServiceCharge())
|
||||
.append("refundPrice", getRefundPrice())
|
||||
.append("capitalStatus", getCapitalStatus())
|
||||
.append("remark", getRemark())
|
||||
.append("belongUserId", getBelongUserId())
|
||||
.append("tradeAccount", getTradeAccount())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="belongUserId != null "> and belong_user_id = #{belongUserId}</if>
|
||||
<if test="tradeAccount != null and tradeAccount != ''"> and trade_account = #{tradeAccount}</if>
|
||||
<if test="tradeRealName != null and tradeRealName != ''"> and trade_real_name like concat('%', #{tradeRealName}, '%')</if>
|
||||
<if test="goodName != null and goodName != ''"> and good_name like concat('%', #{goodName}, '%')</if>
|
||||
<if test="goodsName != null and goodsName != ''"> and goods_name like concat('%', #{goodsName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
@ -86,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="tradeRealName != null">trade_real_name,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="goodName != null">good_name,</if>
|
||||
<if test="goodsName != null">goods_name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="tradeNo != null">#{tradeNo},</if>
|
||||
|
@ -109,7 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="tradeRealName != null">#{tradeRealName},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="goodName != null">#{goodName},</if>
|
||||
<if test="goodsName != null">#{goodsName},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
@ -136,7 +136,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="tradeRealName != null">trade_real_name = #{tradeRealName},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="goodName != null">good_name = #{goodName},</if>
|
||||
<if test="goodsName != null">goods_name = #{goodsName},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
|
Loading…
Reference in New Issue