|
|
|
@@ -19,6 +19,7 @@ import com.iformall.enums.*; |
|
|
|
import com.iformall.service.*; |
|
|
|
import com.iformall.utils.Constant; |
|
|
|
import com.iformall.utils.IPUtil; |
|
|
|
import com.iformall.utils.RedisCacheUtils; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import me.chanjar.weixin.common.error.WxErrorException; |
|
|
|
@@ -82,9 +83,18 @@ public class TtUserGrantController extends BaseController { |
|
|
|
if(wxAppinfo == null){ |
|
|
|
return new ResultData(ErrorCode.APP_ID_NOT_FOUND); |
|
|
|
} |
|
|
|
if(!wxAppinfo.getEnable().equals(EnumEnableType.Enable.getCode())){ |
|
|
|
if(wxAppinfo.getEnable().equals(EnumEnableType.Disable.getCode())){ |
|
|
|
return new ResultData(ErrorCode.APP_ID_NOT_ENABLE); |
|
|
|
} |
|
|
|
String key = "webapp:enable:"+wxAppinfo.getTenantId(); |
|
|
|
if(wxAppinfo.getEnable().equals(EnumEnableType.Auditing.getCode())){ |
|
|
|
resultMap.put("enable",wxAppinfo.getEnable()); |
|
|
|
if(!objectCommonRedisTemplate.hasKey(key)){ |
|
|
|
RedisCacheUtils.cache(objectCommonRedisTemplate, key, wxAppinfo.getEnable(), 0); |
|
|
|
} |
|
|
|
}else{ |
|
|
|
RedisCacheUtils.removeCache(objectCommonRedisTemplate, key); |
|
|
|
} |
|
|
|
|
|
|
|
TtMaService ttMaService = getWeappServiceByAppInfo(wxAppinfo); |
|
|
|
|
|
|
|
|