信用明细查询
This commit is contained in:
+5
-2
@@ -1612,14 +1612,15 @@ public class UserShipperApplicationService {
|
||||
userShipperEntity1.setAuthorizedUsedAmount(limitData.getBigDecimal("nengrossmny"));
|
||||
userShipperEntity1.setSettlementCurrency(limitData.getString("currencycode"));
|
||||
userShipperEntity1.setCreditAmount(limitData.getBigDecimal("nbalancemny"));
|
||||
userShipperMapper.updateById(userShipperEntity1);
|
||||
|
||||
//关联明细表:同步agreedaydatas到agreement_details
|
||||
com.alibaba.fastjson.JSONArray agreedaydatas = dataJson.getJSONArray("agreedaydatas");
|
||||
if (agreedaydatas != null && !agreedaydatas.isEmpty()) {
|
||||
// 先删除该货主已有的协议明细,避免重复
|
||||
agreementDetailsMapper.delete(new LambdaQueryWrapper<AgreementDetails>()
|
||||
.eq(AgreementDetails::getShipperId, userShipperEntity1.getShipperId()));
|
||||
for (int i = 0; i < agreedaydatas.size(); i++) {
|
||||
int i;
|
||||
for ( i = 0; i < agreedaydatas.size(); i++) {
|
||||
com.alibaba.fastjson.JSONObject agreeItem = agreedaydatas.getJSONObject(i);
|
||||
AgreementDetails agreementDetails = new AgreementDetails();
|
||||
agreementDetails.setShipperId(userShipperEntity1.getShipperId());
|
||||
@@ -1632,6 +1633,8 @@ public class UserShipperApplicationService {
|
||||
agreementDetails.setPtype(agreeItem.getString("ptype"));
|
||||
agreementDetailsMapper.insert(agreementDetails);
|
||||
}
|
||||
userShipperEntity1.setAgreementCount(i);
|
||||
userShipperMapper.updateById(userShipperEntity1);
|
||||
log.info("同步协议明细成功,custcode={},shipperId={},共{}条", userShipperEntity1.getCustomerNcCode(), userShipperEntity1.getShipperId(), agreedaydatas.size());
|
||||
}
|
||||
log.info("更新货主额度同步成功,custcode={},shipperId={}", userShipperEntity1.getCustomerNcCode(), userShipperEntity1.getShipperId());
|
||||
|
||||
+3
@@ -285,4 +285,7 @@ public class UserShipperEntity extends BaseVOEntity {
|
||||
@ApiModelProperty(name = "信用余额")
|
||||
private BigDecimal creditAmount;
|
||||
|
||||
@ApiModelProperty("协议数量")
|
||||
private Integer agreementCount;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user