|
@@ -11,6 +11,7 @@ import org.fouram.core.base.service.BaseService;
|
|
|
import org.fouram.core.base.service.RequestService;
|
|
|
import org.fouram.core.plugin.weixin.cp.util.WXCpUserUtil;
|
|
|
import org.fouram.core.util.Base64Util;
|
|
|
+import org.fouram.core.util.ConfConfig;
|
|
|
import org.fouram.core.util.JSONUtil;
|
|
|
import org.fouram.core.util.JsonNodeUtil;
|
|
|
import org.fouram.core.util.Tools;
|
|
@@ -44,8 +45,6 @@ public class SapUserService extends BaseService {
|
|
|
@Autowired
|
|
|
private SapBlacklistService sapBlacklistService;
|
|
|
|
|
|
- private static boolean isTestMobile = true;
|
|
|
-
|
|
|
public void saveOrUpdateSapUsers() throws Exception {
|
|
|
HttpHeaders headers = getHttpHeaders();
|
|
|
String userUrl = "https://api15.sapsf.cn/odata/v2/User?$filter=status in 'active'&$format=json&$expand=personKeyNav";
|
|
@@ -145,8 +144,10 @@ public class SapUserService extends BaseService {
|
|
|
List<SapUser> sapUsers = selectListByPersonId(personId);
|
|
|
SapUser wxSapUser = sapUsers.get(0);
|
|
|
String mobile = wxSapUser.getFormatBusinessPhone();
|
|
|
- // 手机号码脱敏
|
|
|
- if (isTestMobile) {
|
|
|
+ // 测试企业微信,手机号码脱敏
|
|
|
+ // fouram wxCp.corpId = ww51602aeb8dab7a95
|
|
|
+ // prod wxCp.corpId = ww911e29458d3a46fd
|
|
|
+ if (!ConfConfig.getConfigString("wxCp.corpId").equals("ww911e29458d3a46fd")) {
|
|
|
if (StringUtils.isNotBlank(mobile) && mobile.length() == 11) {
|
|
|
mobile = mobile.substring(0, 8) + "999";
|
|
|
} else {
|