hjg
2023-11-18 bb48edb3d9faaaeab0088151c86fc24137acdb08
提交 | 用户 | 时间
58d006 1 package com.mandi.fendan.util;
A 2
3 import java.util.HashMap;
4 import java.util.Map;
5
6 import javax.annotation.Resource;
7
8 import org.springframework.stereotype.Service;
9
10 import com.mandi.dao.common.ObjectResult;
11 import com.mandi.fendan.mapper.Fd_BsheetMapper;
12
13 /**
14  * 编号生成器
15  * 使用redis并发性更好
16  *
17  */
18 @Service
19 public class PrefixUtil {
20     
21     private static Map<String, String> lockMap=new HashMap<String, String>();
22     
23     @Resource
24     private Fd_BsheetMapper fbper;
25     
26     
27     //获取销售业务单编号
28     public static  ObjectResult<String> getPrex(){
29         
30         
31         //查找业务单号
32             
33         synchronized (lockMap) {
34             
35             //fbper表查找当前最大的序号
36         }
37         
38         return null;
39     }
40
41 }