Quellcode durchsuchen

fix 默认官网微信客服

zoujiajian vor 1 Jahr
Ursprung
Commit
5fcefdca56

+ 5 - 1
netflix-web/src/main/java/com/cyksj/web/controller/kf/CorpKfAppletController.java

@@ -35,8 +35,12 @@ public class CorpKfAppletController {
 	@GetMapping("/get")
 	public Result<String> getCorpKf(Integer scene) throws Exception {
 		CorpKfAccount corpKfAccount = corpKfAccountMapper.selectOne(Wrappers.lambdaQuery(CorpKfAccount.class).eq(CorpKfAccount::getScene, scene).last("limit 1"));
+		//默认官网
 		if (corpKfAccount == null) {
-			return GatewayResponse.SUCCESS.newBuilder().toResult();
+			corpKfAccount = corpKfAccountMapper.selectOne(Wrappers.lambdaQuery(CorpKfAccount.class).eq(CorpKfAccount::getScene, 0).last("limit 1"));
+			if (corpKfAccount == null) {
+				return GatewayResponse.SUCCESS.newBuilder().toResult();
+			}
 		}
 		String openKfId = corpKfAccount.getOpenKfId();
 		String key = RedisService.key.CORP_KF_ACCOUNT_URL.getName() + openKfId;