1. 业务开发

步骤
1、后台创建规则并配置好规则
2、调用编码规则 IDUtil.getId("规则名称","序号",Map)

[!tip]
规则配置自定义变量 需要在业务代码中通过参数传递,自定义变量的值 必须是自定义变量的key值,例如:a:100,自定义变量 必须填写 a ,序号会自动补全,例如需要填写3,业务数据id为1,最终生成的序号为 001

1.1. 范例

员工代码片段

    public ResultData save(@ModelAttribute @ApiIgnore EmployeeEntity employee, HttpServletResponse response, HttpServletRequest request) {

         ...
         employee.setEmployeeCode(IDUtil.getId("员工编号", Long.parseLong(employee.getId()));
         ...

    }
Copyright © mingsoft.net 2012-2022 all right reserved,powered by Gitbook该文件修订时间: 2023-01-05 11:45:32

results matching ""

    No results matching ""

    results matching ""

      No results matching ""