提交 9d716e10 authored 作者: liruixin's avatar liruixin

货主付款

上级 15abca51
...@@ -6,6 +6,7 @@ import lombok.NoArgsConstructor; ...@@ -6,6 +6,7 @@ import lombok.NoArgsConstructor;
import lombok.Setter; import lombok.Setter;
import lombok.ToString; import lombok.ToString;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
/** /**
...@@ -22,19 +23,29 @@ public class OwnerPaymentSettlementParam { ...@@ -22,19 +23,29 @@ public class OwnerPaymentSettlementParam {
@ApiModelProperty(value="列表id",example = "10") @ApiModelProperty(value="列表id",example = "10")
private Integer id; private Integer id;
@NotBlank(message = "收款人不能为空")
@ApiModelProperty(value = "收款人", example = "收款人") @ApiModelProperty(value = "收款人", example = "收款人")
private String payee; private String payee;
@NotBlank(message = "收款银行不能为空")
@ApiModelProperty(value = "收款银行", example = "浙江银行") @ApiModelProperty(value = "收款银行", example = "浙江银行")
private String payeeBankName; private String payeeBankName;
@NotBlank(message = "收款银行卡卡号不能为空")
@ApiModelProperty(value = "收款银行卡卡号", example = "62213545878787") @ApiModelProperty(value = "收款银行卡卡号", example = "62213545878787")
private String payeeBankCardNo; private String payeeBankCardNo;
@NotBlank(message = "付款银行不能为空")
@ApiModelProperty(value = "付款银行", example = "浙江银行") @ApiModelProperty(value = "付款银行", example = "浙江银行")
private String paymentBankName; private String paymentBankName;
@NotBlank(message = "付款银行卡卡号不能为空")
@ApiModelProperty(value = "付款银行卡卡号", example = "62213545878787") @ApiModelProperty(value = "付款银行卡卡号", example = "62213545878787")
private String paymentBankCardNo; private String paymentBankCardNo;
@NotBlank(message = "付款凭证不能为空")
@ApiModelProperty(value = "付款凭证", example = "/a.png")
private String paymentImg;
} }
...@@ -33,4 +33,18 @@ public class SettlementOwnerDaoImpl extends BaseDaoImpl<SettlementOwnerMapper, S ...@@ -33,4 +33,18 @@ public class SettlementOwnerDaoImpl extends BaseDaoImpl<SettlementOwnerMapper, S
.set(SettlementOwner::getStatus, status) .set(SettlementOwner::getStatus, status)
); );
} }
@Override
public boolean updatePayment(SettlementOwner settlementOwner) {
return update(lUdWrapper()
.eq(SettlementOwner::getSettlementNo, settlementOwner.getSettlementNo())
.set(SettlementOwner::getStatus, settlementOwner.getStatus())
.set(SettlementOwner::getPayee, settlementOwner.getPayee())
.set(SettlementOwner::getPayeeBankCardNo, settlementOwner.getPayeeBankCardNo())
.set(SettlementOwner::getPayeeBankName, settlementOwner.getPayeeBankName())
.set(SettlementOwner::getPaymentImg, settlementOwner.getPaymentImg())
.set(SettlementOwner::getPaymentBankCardNo, settlementOwner.getPaymentBankCardNo())
.set(SettlementOwner::getPaymentBankName, settlementOwner.getPaymentBankName())
);
}
} }
...@@ -14,4 +14,6 @@ public interface SettlementOwnerDao extends BaseDao<SettlementOwnerMapper, Settl ...@@ -14,4 +14,6 @@ public interface SettlementOwnerDao extends BaseDao<SettlementOwnerMapper, Settl
boolean updateStatusBySettlementNo(@Param("settlementNo")String settlementNo, @Param("status")Integer status); boolean updateStatusBySettlementNo(@Param("settlementNo")String settlementNo, @Param("status")Integer status);
boolean updatePayment(SettlementOwner settlementOwner);
} }
...@@ -5,9 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableId; ...@@ -5,9 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.msl.common.config.KeyColumn; import com.msl.common.config.KeyColumn;
import com.msl.common.model.HasKey; import com.msl.common.model.HasKey;
import lombok.Getter; import lombok.*;
import lombok.NoArgsConstructor;
import lombok.Setter;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
...@@ -23,6 +21,8 @@ import java.time.LocalDateTime; ...@@ -23,6 +21,8 @@ import java.time.LocalDateTime;
@Setter @Setter
@NoArgsConstructor @NoArgsConstructor
@TableName(autoResultMap = true) @TableName(autoResultMap = true)
@Builder
@AllArgsConstructor
public class SettlementOwner implements HasKey<Integer> { public class SettlementOwner implements HasKey<Integer> {
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
......
...@@ -112,6 +112,11 @@ public class SettlementOwnerServiceImpl implements SettlementOwnerService { ...@@ -112,6 +112,11 @@ public class SettlementOwnerServiceImpl implements SettlementOwnerService {
throw new ServiceSystemException(PerformanceResultEnum.SETTLEMENT_ORDER_STATUS_CHANGED); throw new ServiceSystemException(PerformanceResultEnum.SETTLEMENT_ORDER_STATUS_CHANGED);
} }
//更新状态为付款待确认 //更新状态为付款待确认
settlementOwnerDao.updateStatusBySettlementNo(settlementOwner.getSettlementNo(),SettlementOwnerEnum.Status.PAYMENT_TO_BE_CONFIRMED.getCode()); SettlementOwner settlement = SettlementOwner.builder().payee(param.getPayee()).payeeBankCardNo(param.getPayeeBankCardNo())
.payeeBankName(param.getPayeeBankName()).paymentBankCardNo(param.getPaymentBankCardNo())
.paymentBankName(param.getPaymentBankName()).paymentImg(param.getPaymentImg())
.settlementNo(settlementOwner.getSettlementNo())
.status(SettlementOwnerEnum.Status.PAYMENT_TO_BE_CONFIRMED.getCode()).build();
settlementOwnerDao.updatePayment(settlement);
} }
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论