批量推送代码

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
郭庆泰
2026-08-29 17:52:05 +08:00
co-authored by Claude
parent 36528b6e0c
commit e47f76478b
130 changed files with 3972 additions and 2546 deletions
@@ -23,6 +23,9 @@ import com.ruoyi.framework.web.service.SysPermissionService;
import com.ruoyi.framework.web.service.TokenService;
import com.ruoyi.system.service.ISysConfigService;
import com.ruoyi.system.service.ISysMenuService;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.business.domain.BizExpert;
import com.ruoyi.business.service.IBizExpertService;
/**
* 登录验证
@@ -47,6 +50,12 @@ public class SysLoginController
@Autowired
private ISysConfigService configService;
@Autowired
private ISysUserService userService;
@Autowired
private IBizExpertService expertService;
/**
* 登录方法
*
@@ -56,6 +65,11 @@ public class SysLoginController
@PostMapping("/login")
public AjaxResult login(@RequestBody LoginBody loginBody)
{
// 待审核专家拦截: role_type=doctor 且 biz_expert.audit_status='1' → 禁止登录
if (isPendingExpert(loginBody.getUsername()))
{
return AjaxResult.error("您的信息正在审核中");
}
AjaxResult ajax = AjaxResult.success();
// 生成令牌
String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
@@ -64,6 +78,29 @@ public class SysLoginController
return ajax;
}
/**
* 判断用户是否为待审核专家 (role_type=doctor 且 biz_expert.audit_status='1')
*/
private boolean isPendingExpert(String username)
{
if (username == null || username.isEmpty())
{
return false;
}
SysUser probe = userService.selectUserByUserName(username);
// 邮箱登录兜底 (用户名查不到且含 @ 时按邮箱反查)
if (probe == null && username.contains("@"))
{
probe = userService.selectUserByEmail(username);
}
if (probe == null || probe.getUserId() == null || !"doctor".equals(probe.getRoleType()))
{
return false;
}
BizExpert expert = expertService.getByUserId(probe.getUserId());
return expert != null && "1".equals(expert.getAuditStatus());
}
/**
* 获取用户信息
*
@@ -28,12 +28,12 @@ ruoyi:
# 阿里云短信配置 (hwt-code ali.sms 模式)
# dev/prod 区分走代码: phone 以 "10" 开头视为 dev 测试 (固定码 1234), 其它走 aliyun 真发
sms:
accessKeyId: LTAI5t7S88DmdTxHPzPtJTwG
accessKeySecret: UIkwjMpmlYjgX5IMLjPj8FQNPthdlR
signName: 北京仙仁掌医学科技发展
template: SMS_321560247
esignTemplate: SMS_492460505
esignBaseUrl: https://risingdoctor.com/hg
accessKeyId: LTAI5tAgeAUviVdPSsxYCkPY
accessKeySecret: 556LX6mXnJIPZgf0vFXcl4mKCzzgKq
signName: 北京整合医学学会
template: SMS_291440833
esignTemplate: SMS_512040098
esignBaseUrl: https://hegui.bahim.org.cn
endpoint: dysmsapi.aliyuncs.com
regionId: cn-hangzhou
# 发票 OCR (本地 Java 识别, PaddleOCR ONNX Runtime, 替代原 ry-ocr Python 微服务)