|
|
@@ -24,10 +24,12 @@ import com.ytpm.general.Result;
|
|
|
import com.ytpm.general.StatusCode;
|
|
|
import com.ytpm.lemonios.dao.AdRecordMapper;
|
|
|
import com.ytpm.lemonios.dao.AppUserMapper;
|
|
|
+import com.ytpm.lemonios.dao.DitchMapper;
|
|
|
import com.ytpm.lemonios.service.AppUserService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.checkerframework.checker.units.qual.A;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
@@ -59,6 +61,8 @@ public class WxController {
|
|
|
private RiskFeign riskFeign;
|
|
|
@Autowired
|
|
|
private AppUserService appUserService;
|
|
|
+ @Autowired
|
|
|
+ private DitchMapper ditchMapper;
|
|
|
|
|
|
@PostMapping("/login")
|
|
|
@ApiOperation("微信登录")
|
|
|
@@ -96,7 +100,15 @@ public class WxController {
|
|
|
//根据应用ID获取配置调用接口登录
|
|
|
WxDefaultConfig defaultConfig = appUserMapper.getDefaultConfigByDitchId(param.getDitchId());
|
|
|
if(Objects.isNull(defaultConfig)){
|
|
|
- return new Result<>(StatusCode.ACCESS_ERR,"登录失败,未找到相应配置!");
|
|
|
+ YtDitch ditch = ditchMapper.selectById(param.getDitchId());
|
|
|
+ if (ditch != null){
|
|
|
+ WxDefaultConfig defaultConfig1 = appUserMapper.getByAppId(ditch.getAppId());
|
|
|
+ if (Objects.isNull(defaultConfig1)){
|
|
|
+ return new Result<>(StatusCode.ACCESS_ERR,"登录失败,未找到相应配置!");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return new Result<>(StatusCode.ACCESS_ERR,"登录失败,未找到相应配置!");
|
|
|
+ }
|
|
|
}
|
|
|
IosUserInfo userInfo = setIosUserInfo(param);
|
|
|
param.setLoginIp(getClientIp(request));
|