feat(crm): 添加客户编码自动生成功能
- 新增 selectMaxCustomerCode 方法查询最大客户编码 - 实现客户编码自动生成逻辑,支持纯数字和带前缀格式 - 添加正则表达式解析编码规则并递增末尾数字 - 集成编码生成功能到客户插入业务流程中
This commit is contained in:
@@ -23,5 +23,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectMaxCustomerCode" resultType="String">
|
||||
SELECT customer_code FROM crm_customer WHERE del_flag = 0 ORDER BY LENGTH(customer_code) DESC, customer_code DESC LIMIT 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user