删除没用的文件

server_five_liuyunhu
dongxiaodong 2024-04-04 14:45:07 +08:00
parent eac6f6076d
commit 846073f528
14 changed files with 153 additions and 44 deletions

View File

@ -1,10 +0,0 @@
package com.couplet.log.annotation;
/**
* @author DongXiaoDong
* @version 1.0
* @date 2024/3/28 15:39
* @description
*/
public @interface Record {
}

View File

@ -1,10 +0,0 @@
package com.couplet.log.aop;
/**
* @author DongXiaoDong
* @version 1.0
* @date 2024/3/28 23:12
* @description
*/
public class AopRecord {
}

View File

@ -0,0 +1,36 @@
package com.couplet.msg;
import java.util.Random;
/**
* @author DongXiaoDong
* @version 1.0
* @date 2024/4/4 11:34
* @description
*/
public class Randoms {
public static void main(String[] args) {
String gtaNumber = generateGTA();
System.out.println("随机生成的GTA开头的七位数字" + gtaNumber);
}
public static String generateGTA() {
// 生成四位以"GTA"开头的字符串
String prefix = "GTA";
// 生成三位随机数字
String randomNumber = generateRandomNumber(4);
// 拼接字符串
return prefix + randomNumber;
}
public static String generateRandomNumber(int length) {
// 生成随机数
Random random = new Random();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < length; i++) {
// 生成0到9之间的随机数字并转换为字符串
sb.append(random.nextInt(10));
}
return sb.toString();
}
}

View File

@ -82,6 +82,11 @@
<artifactId>couplet-common-swagger</artifactId> <artifactId>couplet-common-swagger</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.couplet</groupId>
<artifactId>couplet-analyze-msg</artifactId>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -0,0 +1,10 @@
package com.couplet.business.server.controller;
/**
* @author DongXiaoDong
* @version 1.0
* @date 2024/4/4 10:37
* @description
*/
public class TroubleLogController {
}

View File

@ -1,11 +1,14 @@
package com.couplet.business.server.mapper; package com.couplet.business.server.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.couplet.analyze.msg.domain.CoupletMsgData;
import com.couplet.common.domain.CoupletTroubleCode; import com.couplet.common.domain.CoupletTroubleCode;
import com.couplet.common.domain.CoupletTroubleGrade; import com.couplet.common.domain.CoupletTroubleGrade;
import com.couplet.common.domain.CoupletTroubleLog;
import com.couplet.common.domain.CoupletTroubleType; import com.couplet.common.domain.CoupletTroubleType;
import com.couplet.common.domain.request.TroubleResp; import com.couplet.common.domain.request.TroubleResp;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@ -22,8 +25,4 @@ public interface SysTroubleMapper extends BaseMapper<CoupletTroubleCode> {
List<CoupletTroubleType> selectTroubleListByType(); List<CoupletTroubleType> selectTroubleListByType();
List<CoupletTroubleGrade> selectTroubleListByGrade(); List<CoupletTroubleGrade> selectTroubleListByGrade();
// int addTrouble(TroubleAddReq troubleAddReq);
// int updateTrouble(TroubleUpdReq troubleUpdReq);
} }

View File

@ -0,0 +1,16 @@
package com.couplet.business.server.mapper;
import com.couplet.analyze.msg.domain.CoupletMsgData;
import org.apache.ibatis.annotations.Mapper;
/**
* @author DongXiaoDong
* @version 1.0
* @date 2024/4/4 10:38
* @description
*/
@Mapper
public interface TroubleLogMapper {
}

View File

@ -1,11 +1,13 @@
package com.couplet.business.server.service; package com.couplet.business.server.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.couplet.analyze.msg.domain.CoupletMsgData;
import com.couplet.common.core.domain.PageResult; import com.couplet.common.core.domain.PageResult;
import com.couplet.common.domain.CoupletTroubleCode; import com.couplet.common.domain.CoupletTroubleCode;
import com.couplet.common.domain.CoupletTroubleGrade; import com.couplet.common.domain.CoupletTroubleGrade;
import com.couplet.common.domain.CoupletTroubleType; import com.couplet.common.domain.CoupletTroubleType;
import com.couplet.common.domain.request.TroubleResp; import com.couplet.common.domain.request.TroubleResp;
import io.swagger.models.auth.In;
import java.util.List; import java.util.List;
@ -22,8 +24,4 @@ public interface SysTroubleService extends IService<CoupletTroubleCode> {
List<CoupletTroubleType> selectTroubleListByType(); List<CoupletTroubleType> selectTroubleListByType();
List<CoupletTroubleGrade> selectTroubleListByGrade(); List<CoupletTroubleGrade> selectTroubleListByGrade();
// int addTrouble (TroubleAddReq troubleAddReq);
// int updateTrouble(TroubleUpdReq troubleUpdReq);
} }

View File

@ -0,0 +1,13 @@
package com.couplet.business.server.service;
import com.couplet.analyze.msg.domain.CoupletMsgData;
/**
* @author DongXiaoDong
* @version 1.0
* @date 2024/4/4 10:38
* @description
*/
public interface TroubleLogService {
}

View File

@ -1,6 +1,7 @@
package com.couplet.business.server.service.impl; package com.couplet.business.server.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.couplet.analyze.msg.domain.CoupletMsgData;
import com.couplet.business.server.mapper.SysTroubleMapper; import com.couplet.business.server.mapper.SysTroubleMapper;
import com.couplet.business.server.service.SysTroubleService; import com.couplet.business.server.service.SysTroubleService;
import com.couplet.common.core.domain.PageResult; import com.couplet.common.core.domain.PageResult;
@ -14,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
import java.util.Random;
/** /**
* @author DongXiaoDong * @author DongXiaoDong
@ -50,25 +52,33 @@ public class SysTroubleServiceImpl extends ServiceImpl<SysTroubleMapper, Couplet
return sysTroubleMapper.selectTroubleListByGrade(); return sysTroubleMapper.selectTroubleListByGrade();
} }
/** /**
* *
// * @param troubleAddReq * GTA
* @return * @return
*/ */
// @Override public static String generateGTA() {
// public int addTrouble(TroubleAddReq troubleAddReq) { // 生成以GTA开头的字符串
// return sysTroubleMapper.addTrouble(troubleAddReq); String codefix = "GTA";
// } // 删除4位数随机数字
// String s = generateRandomNumber(4);
// /** //拼接
// * 修改故障码数据 return codefix + s;
// * @param troubleUpdReq }
// * @return
// */
// @Override
// public int updateTrouble(TroubleUpdReq troubleUpdReq) {
// return sysTroubleMapper.updateTrouble(troubleUpdReq);
// }
/**
* 110
* @param length
* @return
*/
public static String generateRandomNumber(int length) {
Random random = new Random();
StringBuilder builder = new StringBuilder();
for (int i = 0; i < length; i++) {
builder.append(random.nextInt(10));
}
return builder.toString();
}
} }

View File

@ -0,0 +1,23 @@
package com.couplet.business.server.service.impl;
import com.couplet.analyze.msg.domain.CoupletMsgData;
import com.couplet.business.server.mapper.TroubleLogMapper;
import com.couplet.business.server.service.TroubleLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Random;
/**
* @author DongXiaoDong
* @version 1.0
* @date 2024/4/4 10:38
* @description
*/
@Service
public class TroubleLogServiceImpl implements TroubleLogService {
@Autowired
private TroubleLogMapper troubleLogMapper;
}

View File

@ -37,5 +37,9 @@
<select id="selectTroubleListByGrade" resultType="com.couplet.common.domain.CoupletTroubleGrade"> <select id="selectTroubleListByGrade" resultType="com.couplet.common.domain.CoupletTroubleGrade">
select * from couplet_trouble_grade select * from couplet_trouble_grade
</select> </select>
<select id="isTroubleLogCode" resultType="com.couplet.common.domain.CoupletTroubleLog">
select * from couplet_trouble_log where trouble_log_id = #{troubleLogId}
</select>
</mapper> </mapper>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.couplet.business.server.mapper.TroubleLogMapper">
</mapper>

View File

@ -275,6 +275,13 @@
<version>${couplet.version}</version> <version>${couplet.version}</version>
</dependency> </dependency>
<!--车辆解析模块-->
<dependency>
<groupId>com.couplet</groupId>
<artifactId>couplet-analyze-msg</artifactId>
<version>${couplet.version}</version>
</dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>