diff --git a/daily-plan/src/main/java/com/rax/dailyplan/service/impl/DailyPlanServiceImpl.java b/daily-plan/src/main/java/com/rax/dailyplan/service/impl/DailyPlanServiceImpl.java
index f46c70e..b453ed1 100644
--- a/daily-plan/src/main/java/com/rax/dailyplan/service/impl/DailyPlanServiceImpl.java
+++ b/daily-plan/src/main/java/com/rax/dailyplan/service/impl/DailyPlanServiceImpl.java
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.rax.common.core.util.R;
import com.rax.common.security.service.RaxUser;
+import com.rax.common.security.util.SecurityUtils;
import com.rax.dailyplan.dto.DailyPlanDTO;
import com.rax.dailyplan.entity.DailyPlan;
import com.rax.dailyplan.mapper.DailyPlanMapper;
diff --git a/upms/upms-biz/pom.xml b/upms/upms-biz/pom.xml
index b12e146..5f37ffc 100644
--- a/upms/upms-biz/pom.xml
+++ b/upms/upms-biz/pom.xml
@@ -1,93 +1,93 @@
- 4.0.0
-
- com.rax
- upms
- 3.7.3
-
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 4.0.0
+
+ com.rax
+ upms
+ 3.7.3
+
- upms-biz
- jar
+ upms-biz
+ jar
- 通用用户权限管理系统业务处理模块
+ 通用用户权限管理系统业务处理模块
-
-
-
- com.rax
- auth
-
-
-
- com.rax
- quartz
-
-
-
- com.rax
- upms-api
-
-
-
- com.rax
- common-oss
-
-
-
- com.rax
- common-feign
-
-
-
- com.rax
- common-security
-
-
-
- com.rax
- common-log
-
+
+
+
+ com.rax
+ auth
+
+
+
+ com.rax
+ quartz
+
+
+
+ com.rax
+ upms-api
+
+
+
+ com.rax
+ common-oss
+
+
+
+ com.rax
+ common-feign
+
+
+
+ com.rax
+ common-security
+
+
+
+ com.rax
+ common-log
+
com.rax
daily-plan
-
-
- org.springdoc
- springdoc-openapi-starter-webmvc-ui
-
-
-
- com.rax
- common-swagger
-
-
-
- com.baomidou
- mybatis-plus-spring-boot3-starter
-
-
- com.mysql
- mysql-connector-j
-
-
-
- io.springboot.sms
- aliyun-sms-spring-boot-starter
-
-
-
- com.rax
- common-xss
-
-
-
- org.springframework.boot
- spring-boot-starter-undertow
-
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-ui
+
+
+
+ com.rax
+ common-swagger
+
+
+
+ com.baomidou
+ mybatis-plus-spring-boot3-starter
+
+
+ com.mysql
+ mysql-connector-j
+
+
+
+ io.springboot.sms
+ aliyun-sms-spring-boot-starter
+
+
+
+ com.rax
+ common-xss
+
+
+
+ org.springframework.boot
+ spring-boot-starter-undertow
+
org.springframework.boot
spring-boot-starter-data-mongodb
@@ -105,44 +105,54 @@
druid-spring-boot-starter
1.2.21
-
-
+
org.bouncycastle
bcprov-jdk15on
1.68
-
+
+
+ com.aliyun
+ aliyun-java-sdk-core
+ 4.6.0
+
+
+ com.aliyun
+ dysmsapi20170525
+ 2.0.24
+
+
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
- io.fabric8
- docker-maven-plugin
-
-
-
-
- src/main/resources
- true
-
- **/*.xlsx
- **/*.xls
-
-
-
- src/main/resources
- false
-
- **/*.xlsx
- **/*.xls
-
-
-
-
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+ io.fabric8
+ docker-maven-plugin
+
+
+
+
+ src/main/resources
+ true
+
+ **/*.xlsx
+ **/*.xls
+
+
+
+ src/main/resources
+ false
+
+ **/*.xlsx
+ **/*.xls
+
+
+
+
diff --git a/upms/upms-biz/src/main/java/com/rax/admin/config/SmsConfig.java b/upms/upms-biz/src/main/java/com/rax/admin/config/SmsConfig.java
new file mode 100644
index 0000000..427f95c
--- /dev/null
+++ b/upms/upms-biz/src/main/java/com/rax/admin/config/SmsConfig.java
@@ -0,0 +1,24 @@
+package com.rax.admin.config;
+
+import io.springboot.sms.SmsProperties;
+import io.springboot.sms.core.SmsClient;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * project_name:remote-control-backend
+ * time:2024/8/15 14:44
+ */
+@Configuration
+public class SmsConfig {
+
+ @Autowired
+ private SmsProperties smsProperties;
+
+ @Bean
+ public SmsClient smsClient(){
+ SmsClient smsClient = new SmsClient(smsProperties);
+ return smsClient;
+ }
+}
diff --git a/upms/upms-biz/src/main/java/com/rax/admin/config/SmsProperties.java b/upms/upms-biz/src/main/java/com/rax/admin/config/SmsProperties.java
new file mode 100644
index 0000000..0d7573d
--- /dev/null
+++ b/upms/upms-biz/src/main/java/com/rax/admin/config/SmsProperties.java
@@ -0,0 +1,20 @@
+package com.rax.admin.config;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+/**
+ * project_name:remote-control-backend
+ * time:2024/8/15 14:29
+ * 此properties是自配置的,解决和阿里云短信服务配置冲突, 暂不用
+ */
+@ConfigurationProperties(prefix = "ali.sms")
+@Component
+@Data
+public class SmsProperties {
+ private String accessKeyId;
+ private String accessSecret;
+ private String signName;
+ private String templateCode;
+}
diff --git a/upms/upms-biz/src/main/java/com/rax/admin/service/impl/SendSmsService.java b/upms/upms-biz/src/main/java/com/rax/admin/service/impl/SendSmsService.java
new file mode 100644
index 0000000..92b9642
--- /dev/null
+++ b/upms/upms-biz/src/main/java/com/rax/admin/service/impl/SendSmsService.java
@@ -0,0 +1,64 @@
+//package com.rax.vital.util;
+//
+//import com.aliyun.dysmsapi20170525.Client;
+//import com.aliyun.dysmsapi20170525.models.SendSmsRequest;
+//import com.aliyun.teaopenapi.models.Config;
+//import com.aliyun.teautil.models.RuntimeOptions;
+//import com.aliyuncs.exceptions.ClientException;
+//import com.rax.admin.config.SmsProperties;
+//import lombok.Data;
+//import lombok.extern.slf4j.Slf4j;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.beans.factory.annotation.Value;
+//import org.springframework.stereotype.Component;
+//
+//
+//@Component
+//@Slf4j
+//@Data
+//public class SendSmsService {
+//
+// @Autowired
+// private SmsProperties smsProperties;
+//
+// private String REGION_ID = "cn-hangzhou";
+// private String PRODUCT = "Dysmsapi";
+// private String ENDPOINT = "dysmsapi.aliyuncs.com";
+//
+// /**
+// * 发送短信通知
+// *
+// * @param mobile 手机号
+// * @param code 验证码
+// * @return 执行结果
+// */
+// public boolean sendSMS(String mobile, String code) {
+// try {
+// Config config = new Config();
+// config.setAccessKeyId(smsProperties.getAccessKeyId());
+// config.setAccessKeySecret(smsProperties.getAccessSecret());
+// config.endpoint = ENDPOINT;
+//
+// Client client = new Client(config);
+//
+//
+// SendSmsRequest request = new SendSmsRequest()
+// .setSignName(smsProperties.getSignName())
+// .setTemplateCode(smsProperties.getTemplateCode());
+//
+// request.setPhoneNumbers(mobile);
+// request.setTemplateParam("{\"code\":\"" + code + "\"}");
+//
+// RuntimeOptions runtimeOptions = new RuntimeOptions();
+// client.sendSmsWithOptions(request, runtimeOptions);
+// return true;
+// } catch (ClientException e) {
+// log.error("发送短信失败{}", e.getMessage());
+// return false;
+// } catch (Exception e) {
+// log.error("发送短信失败{}", e.getMessage());
+// return false;
+// }
+// }
+//}
+//
diff --git a/upms/upms-biz/src/main/java/com/rax/admin/service/impl/SysLogServiceImpl.java b/upms/upms-biz/src/main/java/com/rax/admin/service/impl/SysLogServiceImpl.java
index 52833a2..b4bfa73 100644
--- a/upms/upms-biz/src/main/java/com/rax/admin/service/impl/SysLogServiceImpl.java
+++ b/upms/upms-biz/src/main/java/com/rax/admin/service/impl/SysLogServiceImpl.java
@@ -82,6 +82,7 @@ public class SysLogServiceImpl extends ServiceImpl impleme
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean saveLog(SysLog sysLog) {
+ System.out.println("sysLog = " + sysLog);
SysUser sysUser = userService.getOne(Wrappers.lambdaQuery().eq(SysUser::getUsername, sysLog.getCreateBy()));
sysLog.setHospitalId(sysUser.getHospitalId());
baseMapper.insert(sysLog);
diff --git a/upms/upms-biz/src/main/java/com/rax/admin/service/impl/SysMobileServiceImpl.java b/upms/upms-biz/src/main/java/com/rax/admin/service/impl/SysMobileServiceImpl.java
index 99b460a..1f1c3b0 100644
--- a/upms/upms-biz/src/main/java/com/rax/admin/service/impl/SysMobileServiceImpl.java
+++ b/upms/upms-biz/src/main/java/com/rax/admin/service/impl/SysMobileServiceImpl.java
@@ -11,8 +11,10 @@ import com.rax.common.core.constant.SecurityConstants;
import com.rax.common.core.exception.ErrorCodes;
import com.rax.common.core.util.MsgUtils;
import com.rax.common.core.util.R;
+import io.springboot.sms.core.SmsClient;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
@@ -34,6 +36,9 @@ public class SysMobileServiceImpl implements SysMobileService {
private final SysUserMapper userMapper;
+ @Autowired
+ private SmsClient smsClient;
+
/**
* 发送手机验证码 TODO: 调用短信网关发送验证码,测试返回前端
* @param mobile mobile
@@ -58,6 +63,7 @@ public class SysMobileServiceImpl implements SysMobileService {
String code = RandomUtil.randomNumbers(Integer.parseInt(SecurityConstants.CODE_SIZE));
log.debug("手机号生成验证码成功:{},{}", mobile, code);
+ smsClient.sendCode(code, mobile);
redisTemplate.opsForValue()
.set(CacheConstants.DEFAULT_CODE_KEY + mobile, code, SecurityConstants.CODE_TIME, TimeUnit.SECONDS);
return R.ok(Boolean.TRUE, code);
diff --git a/upms/upms-biz/src/main/java/com/rax/vital/medicine/service/impl/AIMedicineServiceImpl.java b/upms/upms-biz/src/main/java/com/rax/vital/medicine/service/impl/AIMedicineServiceImpl.java
index f94117e..5c432e7 100644
--- a/upms/upms-biz/src/main/java/com/rax/vital/medicine/service/impl/AIMedicineServiceImpl.java
+++ b/upms/upms-biz/src/main/java/com/rax/vital/medicine/service/impl/AIMedicineServiceImpl.java
@@ -197,7 +197,7 @@ public class AIMedicineServiceImpl implements AIMedicineService {
@Override
public Map getAiMedicine(MongoTemplate template) {
Query query = new Query();
- query.limit(2);
+ query.limit(1);
query.with(Sort.by(Sort.Order.desc("Time")));
List