mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-14 13:42:07 +08:00
禅道问题修复:1、用户已存在提示 -> 手机号已存在;2、新增组织拼音解析异常修复;
This commit is contained in:
+8
-1
@@ -1,11 +1,15 @@
|
|||||||
package com.cf.imes.framework.common.util.pinyin;
|
package com.cf.imes.framework.common.util.pinyin;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.util.ArrayUtil;
|
||||||
import net.sourceforge.pinyin4j.PinyinHelper;
|
import net.sourceforge.pinyin4j.PinyinHelper;
|
||||||
import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
|
import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
|
||||||
import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
|
import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
|
||||||
import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
|
import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
|
||||||
import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
|
import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author there
|
* @author there
|
||||||
*/
|
*/
|
||||||
@@ -52,7 +56,10 @@ public class PinYinUtils {
|
|||||||
for (int i = 0; i < newChar.length; i++) {
|
for (int i = 0; i < newChar.length; i++) {
|
||||||
if (newChar[i] > 128) {
|
if (newChar[i] > 128) {
|
||||||
try {
|
try {
|
||||||
pinyinStr += PinyinHelper.toHanyuPinyinStringArray(newChar[i], defaultFormat)[0].charAt(0);
|
String[] hanyuPinyinStringArray = PinyinHelper.toHanyuPinyinStringArray(newChar[i], defaultFormat);
|
||||||
|
if (ArrayUtil.isNotEmpty(hanyuPinyinStringArray)) {
|
||||||
|
pinyinStr += hanyuPinyinStringArray[0].charAt(0);
|
||||||
|
}
|
||||||
} catch (BadHanyuPinyinOutputFormatCombination e) {
|
} catch (BadHanyuPinyinOutputFormatCombination e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -36,7 +36,7 @@ public interface ErrorCodeConstants {
|
|||||||
ErrorCode ROLE_NOT_SUPERADMIN_NO_ORGAN_ID_OPER_ERROR = new ErrorCode(1_002_002_007, "非超管分配权限");
|
ErrorCode ROLE_NOT_SUPERADMIN_NO_ORGAN_ID_OPER_ERROR = new ErrorCode(1_002_002_007, "非超管分配权限");
|
||||||
|
|
||||||
// ========== 用户模块 1-002-003-000 ==========
|
// ========== 用户模块 1-002-003-000 ==========
|
||||||
ErrorCode USER_USERNAME_EXISTS = new ErrorCode(1_002_003_000, "用户账号已经存在");
|
ErrorCode USER_USERNAME_EXISTS = new ErrorCode(1_002_003_000, "手机号已经存在");
|
||||||
ErrorCode USER_MOBILE_EXISTS = new ErrorCode(1_002_003_001, "手机号已经存在");
|
ErrorCode USER_MOBILE_EXISTS = new ErrorCode(1_002_003_001, "手机号已经存在");
|
||||||
ErrorCode USER_EMAIL_EXISTS = new ErrorCode(1_002_003_002, "邮箱已经存在");
|
ErrorCode USER_EMAIL_EXISTS = new ErrorCode(1_002_003_002, "邮箱已经存在");
|
||||||
ErrorCode USER_NOT_EXISTS = new ErrorCode(1_002_003_003, "用户不存在");
|
ErrorCode USER_NOT_EXISTS = new ErrorCode(1_002_003_003, "用户不存在");
|
||||||
|
|||||||
Reference in New Issue
Block a user