|
@@ -419,12 +419,12 @@ public class GenerateCodeServiceImpl implements GenerateCodeService {
|
|
for (int j = 0; j < qrRepertoryColumnList.size(); j++) {
|
|
for (int j = 0; j < qrRepertoryColumnList.size(); j++) {
|
|
QrRepertoryColumnVO qrRepertoryColumn = qrRepertoryColumnList.get(j);
|
|
QrRepertoryColumnVO qrRepertoryColumn = qrRepertoryColumnList.get(j);
|
|
Long qrRepertoryColumnId = qrRepertoryColumn.getId();
|
|
Long qrRepertoryColumnId = qrRepertoryColumn.getId();
|
|
- // 非clone列,设置code和url
|
|
|
|
|
|
+ // 非clone列,设置code
|
|
String code = buildUniqueCode(uniqueSet, qrRepertoryColumn, codeSb, paramMap, qrRepertorySerialNumberMap, 0);
|
|
String code = buildUniqueCode(uniqueSet, qrRepertoryColumn, codeSb, paramMap, qrRepertorySerialNumberMap, 0);
|
|
if (code == null) {
|
|
if (code == null) {
|
|
throw new RuntimeException("生成码失败,重复生成码次数超过" + REPEAT_BUILD_CODE_TIMES + "次");
|
|
throw new RuntimeException("生成码失败,重复生成码次数超过" + REPEAT_BUILD_CODE_TIMES + "次");
|
|
}
|
|
}
|
|
- //判断拆分数量是否为空
|
|
|
|
|
|
+ // 判断拆分数量是否为空
|
|
int splitNum = 0;
|
|
int splitNum = 0;
|
|
if(splitCache.containsKey(qrRepertoryColumnId)){
|
|
if(splitCache.containsKey(qrRepertoryColumnId)){
|
|
splitNum = splitCache.get(qrRepertoryColumnId).getSplitNum();
|
|
splitNum = splitCache.get(qrRepertoryColumnId).getSplitNum();
|
|
@@ -569,9 +569,7 @@ public class GenerateCodeServiceImpl implements GenerateCodeService {
|
|
*/
|
|
*/
|
|
private String buildUniqueCode( HashSet<String> uniqueSet, QrRepertoryColumnVO qrRepertoryColumn, StringBuilder codeSb, Map<String, Object> paramMap, Map<String, QrRepertorySerialNumber> qrRepertorySerialNumberMap, int buildTimes) {
|
|
private String buildUniqueCode( HashSet<String> uniqueSet, QrRepertoryColumnVO qrRepertoryColumn, StringBuilder codeSb, Map<String, Object> paramMap, Map<String, QrRepertorySerialNumber> qrRepertorySerialNumberMap, int buildTimes) {
|
|
// 生成码
|
|
// 生成码
|
|
- log.info("buildUniqueCode==>进来了");
|
|
|
|
buildCodeByClass(qrRepertoryColumn, codeSb, paramMap, qrRepertorySerialNumberMap);
|
|
buildCodeByClass(qrRepertoryColumn, codeSb, paramMap, qrRepertorySerialNumberMap);
|
|
- log.info("buildUniqueCode==>活着出来了");
|
|
|
|
String code = codeSb.toString();
|
|
String code = codeSb.toString();
|
|
|
|
|
|
// add成功,说明码没有重复
|
|
// add成功,说明码没有重复
|