diff --git a/couplet-common/couplet-trouble-log/src/main/java/com/couplet/common/log/aop/AopRecord.java b/couplet-common/couplet-trouble-log/src/main/java/com/couplet/common/log/aop/AopRecord.java
new file mode 100644
index 0000000..1676967
--- /dev/null
+++ b/couplet-common/couplet-trouble-log/src/main/java/com/couplet/common/log/aop/AopRecord.java
@@ -0,0 +1,10 @@
+package com.couplet.common.log.aop;
+
+/**
+ * @author DongXiaoDong
+ * @version 1.0
+ * @date 2024/3/28 23:12
+ * @description
+ */
+public class AopRecord {
+}
diff --git a/couplet-modules/couplet-modules-mq/src/main/resources/bootstrap.yml b/couplet-modules/couplet-modules-mq/src/main/resources/bootstrap.yml
index 61d454f..29958e8 100644
--- a/couplet-modules/couplet-modules-mq/src/main/resources/bootstrap.yml
+++ b/couplet-modules/couplet-modules-mq/src/main/resources/bootstrap.yml
@@ -15,11 +15,11 @@ spring:
discovery:
# 服务注册地址
server-addr: 121.89.211.230:8848
- namespace: 172469
+ namespace: a439ce3f-2c42-4b4c-9c4d-c8db49933c15
config:
# 配置中心地址
server-addr: 121.89.211.230:8848
- namespace: 172469
+ namespace: a439ce3f-2c42-4b4c-9c4d-c8db49933c15
# 配置文件格式
file-extension: yml
# 共享配置
diff --git a/couplet-modules/couplet-modules-vehicle/src/main/resources/bootstrap.yml b/couplet-modules/couplet-modules-vehicle/src/main/resources/bootstrap.yml
index f985e0c..7676300 100644
--- a/couplet-modules/couplet-modules-vehicle/src/main/resources/bootstrap.yml
+++ b/couplet-modules/couplet-modules-vehicle/src/main/resources/bootstrap.yml
@@ -15,11 +15,11 @@ spring:
discovery:
# 服务注册地址
server-addr: 121.89.211.230:8848
- namespace: 172469
+ namespace: a439ce3f-2c42-4b4c-9c4d-c8db49933c15
config:
# 配置中心地址
server-addr: 121.89.211.230:8848
- namespace: 172469
+ namespace: a439ce3f-2c42-4b4c-9c4d-c8db49933c15
# 配置文件格式
file-extension: yml
# 共享配置
diff --git a/couplet-modules/couplet-trouble/pom.xml b/couplet-modules/couplet-trouble/pom.xml
index 48700fc..2addc7f 100644
--- a/couplet-modules/couplet-trouble/pom.xml
+++ b/couplet-modules/couplet-trouble/pom.xml
@@ -19,9 +19,65 @@
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-sentinel
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+
+
+ io.springfox
+ springfox-swagger-ui
+ ${swagger.fox.version}
+
+
+
+
+ com.mysql
+ mysql-connector-j
+
+
+
com.couplet
- couplet-modules-system
+ couplet-common-datasource
+
+
+
+
+ com.couplet
+ couplet-common-datascope
+
+
+
+
+ com.couplet
+ couplet-common-log
+
+
+
+
+ com.couplet
+ couplet-common-swagger
diff --git a/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/CoupletTroubleApplication.java b/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/CoupletTroubleApplication.java
index c0882ce..9c269b4 100644
--- a/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/CoupletTroubleApplication.java
+++ b/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/CoupletTroubleApplication.java
@@ -11,6 +11,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
* @description
*/
@SpringBootApplication(scanBasePackages = "com.couplet.**")
+@EnableFeignClients(basePackages = "com.couplet.**")
public class CoupletTroubleApplication {
public static void main(String[] args) {
SpringApplication.run(CoupletTroubleApplication.class);
diff --git a/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/controller/SysTroubleController.java b/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/controller/SysTroubleController.java
index 7455c48..766a579 100644
--- a/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/controller/SysTroubleController.java
+++ b/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/controller/SysTroubleController.java
@@ -6,13 +6,13 @@ import com.couplet.common.core.web.page.TableDataInfo;
import com.couplet.common.log.annotation.Log;
import com.couplet.common.log.enums.BusinessType;
import com.couplet.trouble.domain.coupletTroubleCode;
-import com.couplet.trouble.domain.req.TroubleAddReq;
import com.couplet.trouble.domain.req.TroubleUpdReq;
import com.couplet.trouble.service.SysTroubleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
+
import java.util.List;
/**
@@ -42,8 +42,8 @@ public class SysTroubleController extends BaseController {
*/
@Log(title = "新增故障码数据", businessType = BusinessType.INSERT)
@PostMapping("insertTrouble")
- public Result> insert(@Validated @RequestBody TroubleAddReq troubleAddReq) {
- return toAjax(troubleService.addTrouble(troubleAddReq));
+ public Result> insert(@Validated @RequestBody coupletTroubleCode troubleAddReq) {
+ return toAjax(troubleService.save(troubleAddReq));
}
/**
@@ -51,8 +51,8 @@ public class SysTroubleController extends BaseController {
*/
@Log(title = "修改故障码数据",businessType = BusinessType.UPDATE)
@PostMapping("updateTrouble")
- public Result> edit(@Validated @RequestBody TroubleUpdReq troubleUpdReq) {
- return toAjax(troubleService.updateTrouble(troubleUpdReq));
+ public Result> edit(@Validated @RequestBody coupletTroubleCode troubleUpdReq) {
+ return toAjax(troubleService.updateById(troubleUpdReq));
}
/**
diff --git a/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/domain/coupletTroubleCode.java b/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/domain/coupletTroubleCode.java
index 37d2a2b..9745629 100644
--- a/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/domain/coupletTroubleCode.java
+++ b/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/domain/coupletTroubleCode.java
@@ -18,8 +18,7 @@ import lombok.experimental.SuperBuilder;
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
-@EqualsAndHashCode(callSuper = true)
-public class coupletTroubleCode extends BaseEntity {
+public class coupletTroubleCode {
/**
* 主键id
*/
diff --git a/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/domain/TroubleGrade.java b/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/domain/coupletTroubleGrade.java
similarity index 85%
rename from couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/domain/TroubleGrade.java
rename to couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/domain/coupletTroubleGrade.java
index 6bc822e..0d9ecc3 100644
--- a/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/domain/TroubleGrade.java
+++ b/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/domain/coupletTroubleGrade.java
@@ -9,7 +9,7 @@ import lombok.Data;
* @description
*/
@Data
-public class TroubleGrade {
+public class coupletTroubleGrade {
private Integer gradeId;
private String gradeName;
}
diff --git a/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/domain/TroubleType.java b/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/domain/coupletTroubleType.java
similarity index 86%
rename from couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/domain/TroubleType.java
rename to couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/domain/coupletTroubleType.java
index deb51ab..408bfcc 100644
--- a/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/domain/TroubleType.java
+++ b/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/domain/coupletTroubleType.java
@@ -9,7 +9,7 @@ import lombok.Data;
* @description
*/
@Data
-public class TroubleType {
+public class coupletTroubleType {
private Integer typeId;
private String typeName;
}
diff --git a/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/domain/req/TroubleUpdReq.java b/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/domain/req/TroubleUpdReq.java
index 8c982fe..7f777e2 100644
--- a/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/domain/req/TroubleUpdReq.java
+++ b/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/domain/req/TroubleUpdReq.java
@@ -1,5 +1,7 @@
package com.couplet.trouble.domain.req;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
import com.couplet.common.core.annotation.Excel;
import lombok.*;
import lombok.experimental.SuperBuilder;
@@ -19,6 +21,7 @@ public class TroubleUpdReq {
* 主键id
*/
@Excel(name = "故障码主键", cellType = Excel.ColumnType.NUMERIC)
+ @TableId(value = "trouble_id",type = IdType.AUTO)
private Integer troubleId;
/**
diff --git a/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/mapper/SysTroubleMapper.java b/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/mapper/SysTroubleMapper.java
index 8cb71ef..fc06c16 100644
--- a/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/mapper/SysTroubleMapper.java
+++ b/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/mapper/SysTroubleMapper.java
@@ -18,7 +18,7 @@ import java.util.List;
public interface SysTroubleMapper extends BaseMapper {
List selectTroubleList(coupletTroubleCode trouble);
- int addTrouble(TroubleAddReq troubleAddReq);
+// int addTrouble(TroubleAddReq troubleAddReq);
- int updateTrouble(TroubleUpdReq troubleUpdReq);
+// int updateTrouble(TroubleUpdReq troubleUpdReq);
}
diff --git a/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/service/SysTroubleService.java b/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/service/SysTroubleService.java
index 59f46f1..2a66cde 100644
--- a/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/service/SysTroubleService.java
+++ b/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/service/SysTroubleService.java
@@ -16,7 +16,7 @@ import java.util.List;
public interface SysTroubleService extends IService {
List selectTroubleList(coupletTroubleCode trouble);
- int addTrouble (TroubleAddReq troubleAddReq);
+// int addTrouble (TroubleAddReq troubleAddReq);
- int updateTrouble(TroubleUpdReq troubleUpdReq);
+// int updateTrouble(TroubleUpdReq troubleUpdReq);
}
diff --git a/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/service/impl/SysTroubleServiceImpl.java b/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/service/impl/SysTroubleServiceImpl.java
index 6ab2c50..8855cc8 100644
--- a/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/service/impl/SysTroubleServiceImpl.java
+++ b/couplet-modules/couplet-trouble/src/main/java/com/couplet/trouble/service/impl/SysTroubleServiceImpl.java
@@ -35,23 +35,23 @@ public class SysTroubleServiceImpl extends ServiceImpl
-
-
-
-
@@ -23,20 +19,20 @@
LEFT JOIN couplet_trouble_grade g on t.trouble_grade_id = g.grade_id
LEFT JOIN couplet_trouble_type y on t.trouble_type_id= y.type_id
-
- insert into couplet_trouble_code (trouble_code,trouble_position,trouble_value,trouble_tag,trouble_type_id,trouble_grade_id)
- values (#{troubleCode},#{troublePosition},#{troubleValue},#{troubleTag},#{troubleTypeId},#{troubleGradeId})
-
-
- update couplet_trouble_code set
- trouble_code = #{troubleCode},
- trouble_position = #{troublePosition},
- trouble_value = #{troubleValue},
- trouble_tag = #{troubleTag},
- trouble_type_id = #{troubleTypeId},
- trouble_grade_id = #{troubleGradeId}
- where trouble_id = #{troubleId}
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+