package com.mandi.fendan.util;
|
|
import java.util.HashMap;
|
import java.util.Map;
|
|
import javax.annotation.Resource;
|
|
import org.springframework.stereotype.Service;
|
|
import com.mandi.dao.common.ObjectResult;
|
import com.mandi.fendan.mapper.Fd_BsheetMapper;
|
|
/**
|
* 编号生成器
|
* 使用redis并发性更好
|
*
|
*/
|
@Service
|
public class PrefixUtil {
|
|
private static Map<String, String> lockMap=new HashMap<String, String>();
|
|
@Resource
|
private Fd_BsheetMapper fbper;
|
|
|
//获取销售业务单编号
|
public static ObjectResult<String> getPrex(){
|
|
|
//查找业务单号
|
|
synchronized (lockMap) {
|
|
//fbper表查找当前最大的序号
|
}
|
|
return null;
|
}
|
|
}
|