Merge remote-tracking branch 'origin/server_five_dongxiaodong' into server_five_xiaoyao

# Conflicts:
#	couplet-auth/src/main/resources/bootstrap.yml
#	couplet-gateway/src/main/resources/bootstrap.yml
#	couplet-modules/couplet-electronic-fence/couplet-electronic-fence-server/src/main/resources/bootstrap.yml
#	couplet-modules/couplet-enterprisemanagement/couplet-enterprisemanagement-server/src/main/resources/bootstrap.yml
#	couplet-modules/couplet-file/src/main/resources/bootstrap.yml
#	couplet-modules/couplet-gen/src/main/resources/bootstrap.yml
#	couplet-modules/couplet-job/src/main/resources/bootstrap.yml
#	couplet-modules/couplet-system/src/main/resources/bootstrap.yml
#	couplet-visual/couplet-monitor/src/main/resources/bootstrap.yml
server_five_liuyunhu
lijiayao 2024-03-30 00:42:31 +08:00
commit 09c28eb1fb
15 changed files with 121 additions and 53 deletions

View File

@ -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 {
}

View File

@ -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
# 共享配置

View File

@ -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
# 共享配置

View File

@ -19,9 +19,65 @@
<dependencies>
<!-- SpringCloud Alibaba Nacos -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<!-- SpringCloud Alibaba Nacos Config -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- SpringCloud Alibaba Sentinel -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>
<!-- SpringBoot Actuator -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- Swagger UI -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${swagger.fox.version}</version>
</dependency>
<!-- Mysql Connector -->
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
</dependency>
<!-- MuYu Common DataSource -->
<dependency>
<groupId>com.couplet</groupId>
<artifactId>couplet-modules-system</artifactId>
<artifactId>couplet-common-datasource</artifactId>
</dependency>
<!-- MuYu Common DataScope -->
<dependency>
<groupId>com.couplet</groupId>
<artifactId>couplet-common-datascope</artifactId>
</dependency>
<!-- MuYu Common Log -->
<dependency>
<groupId>com.couplet</groupId>
<artifactId>couplet-common-log</artifactId>
</dependency>
<!-- MuYu Common Swagger -->
<dependency>
<groupId>com.couplet</groupId>
<artifactId>couplet-common-swagger</artifactId>
</dependency>
</dependencies>

View File

@ -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);

View File

@ -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));
}
/**

View File

@ -18,8 +18,7 @@ import lombok.experimental.SuperBuilder;
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class coupletTroubleCode extends BaseEntity {
public class coupletTroubleCode {
/**
* id
*/

View File

@ -9,7 +9,7 @@ import lombok.Data;
* @description
*/
@Data
public class TroubleGrade {
public class coupletTroubleGrade {
private Integer gradeId;
private String gradeName;
}

View File

@ -9,7 +9,7 @@ import lombok.Data;
* @description
*/
@Data
public class TroubleType {
public class coupletTroubleType {
private Integer typeId;
private String typeName;
}

View File

@ -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;
/**

View File

@ -18,7 +18,7 @@ import java.util.List;
public interface SysTroubleMapper extends BaseMapper<coupletTroubleCode> {
List<coupletTroubleCode> selectTroubleList(coupletTroubleCode trouble);
int addTrouble(TroubleAddReq troubleAddReq);
// int addTrouble(TroubleAddReq troubleAddReq);
int updateTrouble(TroubleUpdReq troubleUpdReq);
// int updateTrouble(TroubleUpdReq troubleUpdReq);
}

View File

@ -16,7 +16,7 @@ import java.util.List;
public interface SysTroubleService extends IService<coupletTroubleCode> {
List<coupletTroubleCode> selectTroubleList(coupletTroubleCode trouble);
int addTrouble (TroubleAddReq troubleAddReq);
// int addTrouble (TroubleAddReq troubleAddReq);
int updateTrouble(TroubleUpdReq troubleUpdReq);
// int updateTrouble(TroubleUpdReq troubleUpdReq);
}

View File

@ -35,23 +35,23 @@ public class SysTroubleServiceImpl extends ServiceImpl<SysTroubleMapper, couplet
/**
*
* @param troubleAddReq
// * @param troubleAddReq
* @return
*/
@Override
public int addTrouble(TroubleAddReq troubleAddReq) {
return sysTroubleMapper.addTrouble(troubleAddReq);
}
/**
*
* @param troubleUpdReq
* @return
*/
@Override
public int updateTrouble(TroubleUpdReq troubleUpdReq) {
return sysTroubleMapper.updateTrouble(troubleUpdReq);
}
// @Override
// public int addTrouble(TroubleAddReq troubleAddReq) {
// return sysTroubleMapper.addTrouble(troubleAddReq);
// }
//
// /**
// * 修改故障码数据
// * @param troubleUpdReq
// * @return
// */
// @Override
// public int updateTrouble(TroubleUpdReq troubleUpdReq) {
// return sysTroubleMapper.updateTrouble(troubleUpdReq);
// }
}

View File

@ -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
# 共享配置
@ -30,3 +30,6 @@ spring:
logging:
level:
com.couplet.trouble.mapper: DEBUG
mybatis-plus:
configuration:
map-underscore-to-camel-case: true

View File

@ -12,10 +12,6 @@
<result property="troubleTag" column="trouble_tag"/>
<result property="troubleTypeId" column="trouble_typeId"/>
<result property="troubleValue" column="trouble_value"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
</resultMap>
<sql id="selectTroubleVo">
@ -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
</sql>
<insert id="addTrouble">
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})
</insert>
<update id="updateTrouble">
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}
</update>
<!-- <insert id="addTrouble">-->
<!-- 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})-->
<!-- </insert>-->
<!-- <update id="updateTrouble">-->
<!-- 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}-->
<!-- </update>-->
<!-- <update id="updateTrouble" parameterType="com.couplet.trouble.domain.req.TroubleUpdReq">-->
<!-- update dxd_trouble_code-->
<!-- <set>-->