客户余额,额度记录流水
This commit is contained in:
+23
@@ -23,6 +23,15 @@ public interface BmsCustomerMapper
|
||||
*/
|
||||
public BmsCustomer selectBmsCustomerByCustomerId(Long customerId);
|
||||
|
||||
/**
|
||||
* 只取客户档案物理额度列(credit_ed 在通用查询里是账户可用额度的子查询别名,
|
||||
* 账户首次初始化时必须读取档案原始值)
|
||||
*
|
||||
* @param customerId 客户ID
|
||||
* @return 仅含 creditEd/tempEd 的客户对象
|
||||
*/
|
||||
public BmsCustomer selectRawCreditByCustomerId(Long customerId);
|
||||
|
||||
/**
|
||||
* 查询客户主列表
|
||||
*
|
||||
@@ -103,6 +112,20 @@ public interface BmsCustomerMapper
|
||||
*/
|
||||
public int deleteBmsCustomerProfileAttachmentByCustomerId(Long customerId);
|
||||
|
||||
/**
|
||||
* 同步客户档案额度字段(额度以客户余额账户为准,调整后回写档案)
|
||||
*
|
||||
* @param customerId 客户ID
|
||||
* @param creditEd 信用额度
|
||||
* @param tempEd 临时额度
|
||||
* @param updateBy 更新人
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCustomerCredit(@org.apache.ibatis.annotations.Param("customerId") Long customerId,
|
||||
@org.apache.ibatis.annotations.Param("creditEd") java.math.BigDecimal creditEd,
|
||||
@org.apache.ibatis.annotations.Param("tempEd") java.math.BigDecimal tempEd,
|
||||
@org.apache.ibatis.annotations.Param("updateBy") String updateBy);
|
||||
|
||||
/**
|
||||
* 批量删除客户附件
|
||||
*
|
||||
|
||||
+6
@@ -14,6 +14,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import com.ruoyi.customer.customerinfo.mapper.BmsCustomerMapper;
|
||||
import com.ruoyi.customer.customerinfo.domain.BmsCustomer;
|
||||
import com.ruoyi.customer.customerinfo.service.IBmsCustomerService;
|
||||
import com.ruoyi.customer.customermoney.service.ICustomerMoneyService;
|
||||
|
||||
/**
|
||||
* 客户主Service业务层处理
|
||||
@@ -27,6 +28,9 @@ public class BmsCustomerServiceImpl implements IBmsCustomerService
|
||||
@Autowired
|
||||
private BmsCustomerMapper bmsCustomerMapper;
|
||||
|
||||
@Autowired
|
||||
private ICustomerMoneyService customerMoneyService;
|
||||
|
||||
/**
|
||||
* 查询客户主
|
||||
*
|
||||
@@ -226,6 +230,8 @@ public class BmsCustomerServiceImpl implements IBmsCustomerService
|
||||
saveBmsCustomerAttachments(bmsCustomer.getCustomerId(), bmsCustomer.getAttachmentList());
|
||||
saveBmsCustomerCompanies(bmsCustomer.getCustomerId(), bmsCustomer.getCompanyList());
|
||||
saveBmsCustomerContacts(bmsCustomer.getCustomerId(), bmsCustomer.getContactList());
|
||||
// 新建客户即初始化默认CNY账户:余额0、总额度1000 CNY,写INIT流水
|
||||
customerMoneyService.initDefaultCnyAccount(bmsCustomer.getCustomerId());
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user