liupeng пре 5 година
родитељ
комит
cae6caceda

+ 7 - 4
code/sapparent/sapservice/src/main/java/org/fouram/service/SapUserService.java

@@ -35,6 +35,7 @@ public class SapUserService extends BaseService {
 	private SapPersonalService sapPersonalService;
 
 	private static boolean isTestWXSync = true;
+	private static boolean isTestMobile = true;
 
 	public List<SapUser> getSapUsers() throws Exception {
 		HttpHeaders headers = getHttpHeaders();
@@ -57,10 +58,12 @@ public class SapUserService extends BaseService {
 					String email = JsonNodeUtil.getValue(userNode, "email");
 					String personId = JsonNodeUtil.getValue(userNode, "personKeyNav", "personIdExternal");
 					// 手机号码脱敏
-					if (StringUtils.isNotBlank(mobile) && mobile.length() == 11) {
-						mobile = mobile.substring(0, 8) + "999";
-					} else {
-						mobile = "";
+					if (isTestMobile) {
+						if (StringUtils.isNotBlank(mobile) && mobile.length() == 11) {
+							mobile = mobile.substring(0, 8) + "999";
+						} else {
+							mobile = "";
+						}
 					}
 					SapUser sapUser = SapUser.builder().userId(userId).personId(personId).username(username).name(name)
 							.mobile(mobile).formatMobile(mobile).businessPhone(businessPhone)