Huanyi пре 1 месец
родитељ
комит
4fc4d9b2c3

+ 0 - 1
ruoyi-admin/src/main/java/org/dromara/web/domain/ChargeRecord.java

@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.annotation.*;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import java.util.Date;
-import com.fasterxml.jackson.annotation.JsonFormat;
 
 import java.io.Serial;
 

+ 3 - 8
ruoyi-admin/src/main/java/org/dromara/web/service/impl/InvoiceManagementServiceImpl.java

@@ -45,12 +45,9 @@ public class InvoiceManagementServiceImpl implements InvoiceManagementService {
         emailService.send(sendBo);
 
         LambdaUpdateWrapper<ChargeRecord> wrapper = new LambdaUpdateWrapper<>();
-        wrapper.eq(ChargeRecord::getId, bo.getId())
-            .set(ChargeRecord::getWhetherInvoice, 1);
+        wrapper.eq(ChargeRecord::getId, bo.getId()).set(ChargeRecord::getWhetherInvoice, 1);
         int updateFlag = chargeRecordMapper.update(wrapper);
-        if (updateFlag <= 0) {
-            throw new RuntimeException("开票失败!");
-        }
+        if (updateFlag <= 0) throw new RuntimeException("开票失败!");
 
         ChargeRecord chargeRecord = chargeRecordMapper.selectById(bo.getId());
 
@@ -66,9 +63,7 @@ public class InvoiceManagementServiceImpl implements InvoiceManagementService {
         record.setFailReason("");
 
         int insertFlag = invoiceRecordMapper.insert(record);
-        if (insertFlag <= 0) {
-            throw new RuntimeException("开票失败!");
-        }
+        if (insertFlag <= 0) throw new RuntimeException("开票失败!");
 
         return R.ok();
     }

+ 8 - 3
ruoyi-admin/src/main/resources/application-dev.yml

@@ -49,9 +49,13 @@ spring:
           driverClassName: com.mysql.cj.jdbc.Driver
           # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
           # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
-          url: jdbc:mysql://192.168.1.146:3306/wkx_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
+#          url: jdbc:mysql://192.168.1.146:3306/wkx_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
+#          username: root
+#          password: P@ssw0rd
+          # 本地数据库
+          url: jdbc:mysql://localhost:3306/wkx_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
           username: root
-          password: P@ssw0rd
+          password: 1234
 #        # 从库数据源
 #        slave:
 #          lazy: true
@@ -98,7 +102,8 @@ spring:
 spring.data:
   redis:
     # 地址
-    host: 192.168.1.146
+#    host: 192.168.1.146
+    host: localhost
     # 端口,默认为6379
     port: 6379
     # 数据库索引