|
|
@ -20,6 +20,8 @@ package com.epmet.service.impl; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
import com.epmet.commons.tools.redis.RedisKeys; |
|
|
|
import com.epmet.commons.tools.redis.RedisUtils; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.dao.ExternalAppDao; |
|
|
|
import com.epmet.dao.ExternalAppSecretDao; |
|
|
@ -65,6 +67,9 @@ public class ExternalAppServiceImpl implements ExternalAppService { |
|
|
|
@Autowired |
|
|
|
private OperCrmOpenFeignClient operCrmOpenFeignClient; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private RedisUtils redisUtils; |
|
|
|
|
|
|
|
@Transactional |
|
|
|
@Override |
|
|
|
public ExternalAppResultDTO add(String appName, String customerId, String customerType) { |
|
|
@ -184,8 +189,11 @@ public class ExternalAppServiceImpl implements ExternalAppService { |
|
|
|
public String resetSecret(String appId) { |
|
|
|
String secret = genSecret(); |
|
|
|
if (externalAppSecretDao.updateSecret(appId, secret) > 0) { |
|
|
|
// 删除外部应用的秘钥缓存,再次使用的时候将主动加载入缓存
|
|
|
|
redisUtils.delete(RedisKeys.getExternalAppSecretKey(appId)); |
|
|
|
return secret; |
|
|
|
} |
|
|
|
|
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|