|
|
@@ -21,6 +21,8 @@ import com.iformall.utils.Constant; |
|
|
|
import com.iformall.utils.IPUtil; |
|
|
|
import com.iformall.utils.MaUtil; |
|
|
|
import com.iformall.utils.RedisCacheUtils; |
|
|
|
import com.iformall.utils.SysConfigConstant; |
|
|
|
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
@@ -221,14 +223,14 @@ public class WxUserGrantController extends BaseController { |
|
|
|
user.setIsValid(EnumYesOrNo.YES.getCode()); |
|
|
|
} |
|
|
|
} |
|
|
|
WxAppinfo wxAppinfo = WxAppInfoCache.getCacheAppInfo(objectCommonRedisTemplate, user.getTenantId()); |
|
|
|
if (null == wxAppinfo) { |
|
|
|
wxAppinfo = wxAppinfoServie.getCAppInfo(user); |
|
|
|
if (null != wxAppinfo) { |
|
|
|
WxAppInfoCache.cacheApp(objectCommonRedisTemplate, wxAppinfo); |
|
|
|
} |
|
|
|
SysConfig promot = sysConfigService.getByKey(SysConfigConstant.promotContentCount, user); |
|
|
|
if (null != promot) { |
|
|
|
user.setPromotContentCount(Integer.parseInt(promot.getConfigItemValue())); |
|
|
|
} |
|
|
|
SysConfig completion = sysConfigService.getByKey(SysConfigConstant.completionContentCount, user); |
|
|
|
if (null != completion) { |
|
|
|
user.setCompletionContentCount(Integer.parseInt(completion.getConfigItemValue())); |
|
|
|
} |
|
|
|
user.setSecret(wxAppinfo.getSecret()); |
|
|
|
return new ResultData(user); |
|
|
|
} |
|
|
|
|
|
|
|