style:()删除无用的测试类

dev.vehiclegateway
袁子龙 2024-10-06 14:35:47 +08:00
parent a63bde6c84
commit b9c4334cb5
16 changed files with 35 additions and 66 deletions

View File

@ -1,6 +1,6 @@
package com.muyu.auth.service; package com.muyu.auth.service;
import com.muyu.auth.form.EnterpriseSettlement;
import com.muyu.common.core.constant.CacheConstants; import com.muyu.common.core.constant.CacheConstants;
import com.muyu.common.core.constant.Constants; import com.muyu.common.core.constant.Constants;
import com.muyu.common.core.constant.SecurityConstants; import com.muyu.common.core.constant.SecurityConstants;

View File

@ -1,44 +0,0 @@
package com.muyu.cloud.common.many.datasource;
import com.muyu.cloud.common.many.datasource.constents.DatasourceContent;
import lombok.extern.log4j.Log4j2;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
/**
*
* @author
* @package com.muyu.cloud.common.many.datasource
* @name JDBCDemo
* @date 2024/9/30 18:14
*/
@Log4j2
public class JDBCDemo {
public static void main(String[] args) {
String databaseName = "my_database";
String connectUrl = DatasourceContent.getDatasourceUrl("mysql");
String createDatabaseUrl = "jdbc:mysql://" + DatasourceContent.IP + ":" + DatasourceContent.PORT + "?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8";
String createDatabaseSql = "CREATE DATABASE IF NOT EXISTS " + databaseName + ";";
try (Connection adminConn = DriverManager.getConnection(createDatabaseUrl, DatasourceContent.USER_NAME, DatasourceContent.PASSWORD);
Statement stmt = adminConn.createStatement()) {
boolean success = stmt.execute(createDatabaseSql);
if (success) {
log.info("数据库 {} 创建成功", databaseName);
} else {
log.warn("数据库 {} 创建失败,可能已存在或权限不足", databaseName);
}
} catch (SQLException e) {
e.printStackTrace();
log.error("连接数据库时发生错误或创建数据库失败", e);
}
}
}

View File

@ -29,7 +29,8 @@ import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* @Author: DongZeLiang *
* @author liuwu
* @date: 2024/6/3 * @date: 2024/6/3
* @Description: * @Description:
* @Version: 1.0 * @Version: 1.0

View File

@ -1,7 +1,8 @@
package com.muyu.cloud.common.many.datasource.constents; package com.muyu.cloud.common.many.datasource.constents;
/** /**
* @author DongZl *
* @author liuwu
* @description: * @description:
* @Date 2023-8-1 11:02 * @Date 2023-8-1 11:02
*/ */

View File

@ -8,7 +8,8 @@ import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
/** /**
* @author DongZl *
* @author liuwu
* @description: * @description:
* @Date 2023-8-1 11:15 * @Date 2023-8-1 11:15
*/ */

View File

@ -8,7 +8,8 @@ import org.springframework.stereotype.Component;
import java.sql.SQLException; import java.sql.SQLException;
/** /**
* @Author: DongZeLiang * Druid
* @author liuwu
* @date: 2024/6/3 * @date: 2024/6/3
* @Description: Druid * @Description: Druid
* @Version: 1.0 * @Version: 1.0

View File

@ -6,7 +6,7 @@ import org.springframework.util.Assert;
/** /**
* *
* *
* @author Dongzl * @author liuwu
*/ */
@Slf4j @Slf4j
public class DynamicDataSourceHolder { public class DynamicDataSourceHolder {

View File

@ -1,7 +1,8 @@
package com.muyu.cloud.common.saas.contents; package com.muyu.cloud.common.saas.contents;
/** /**
* @Author: DongZeLiang * SAAS
* @author liuwu
* @date: 2024/6/3 * @date: 2024/6/3
* @Description: SAAS * @Description: SAAS
* @Version: 1.0 * @Version: 1.0

View File

@ -6,7 +6,7 @@ import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
/** /**
* @Author: DongZeLiang * @Author: liuwu
* @date: 2024/6/3 * @date: 2024/6/3
* @Description: * @Description:
* @Version: 1.0 * @Version: 1.0

View File

@ -4,7 +4,8 @@ package com.muyu.cloud.common.saas.exception;
import com.muyu.common.core.exception.ServiceException; import com.muyu.common.core.exception.ServiceException;
/** /**
* @Author: DongZeLiang * SaaS
* @author liuwu
* @date: 2024/6/3 * @date: 2024/6/3
* @Description: SaaS * @Description: SaaS
* @Version: 1.0 * @Version: 1.0

View File

@ -14,7 +14,8 @@ import org.springframework.web.servlet.AsyncHandlerInterceptor;
/** /**
* @Author: DongZeLiang * SAAS
* @author liuwu
* @date: 2024/6/3 * @date: 2024/6/3
* @Description: SAAS * @Description: SAAS
* @Version: 1.0 * @Version: 1.0

View File

@ -9,14 +9,14 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
/** /**
* Mapper * Mapper
* @author yupnig * @author yupnig
* @package com.muyu.server.mapper * @package com.muyu.server.mapper
* @name EnterpriseDao * @name EnterpriseMapper
* @date 2024-09-29 14:31:06 * @date 2024-09-29 14:31:06
*/ */
@Mapper @Mapper
public interface EnterpriseDao { public interface EnterpriseMapper {
// 查询分页信息 // 查询分页信息
public ArrayList<HashMap> selectEnterprise(Map param); public ArrayList<HashMap> selectEnterprise(Map param);
//查询企业记录总数 //查询企业记录总数

View File

@ -4,7 +4,7 @@ import cn.hutool.core.map.MapUtil;
import com.muyu.cache.EnterpriseCacheService; import com.muyu.cache.EnterpriseCacheService;
import com.muyu.common.domain.Enterprise; import com.muyu.common.domain.Enterprise;
import com.muyu.common.util.PageUtils; import com.muyu.common.util.PageUtils;
import com.muyu.server.mapper.EnterpriseDao; import com.muyu.server.mapper.EnterpriseMapper;
import com.muyu.server.service.EnterpriseService; import com.muyu.server.service.EnterpriseService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -22,7 +22,7 @@ import java.util.*;
public class EnterpriseServiceImpl implements EnterpriseService { public class EnterpriseServiceImpl implements EnterpriseService {
@Autowired @Autowired
private EnterpriseDao enterpriseDao; private EnterpriseMapper enterpriseDao;
@Autowired @Autowired
private EnterpriseCacheService enterpriseCacheService; private EnterpriseCacheService enterpriseCacheService;

View File

@ -13,9 +13,16 @@ import com.muyu.server.service.SysCarService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Collections;
import java.util.List; import java.util.List;
/**
*
* @author sx
* @package com.muyu.server.service.impl
* @name SysCarServiceImpl
* @date 2024-09-29 14:31:06
*/
@DS("lizzDB") @DS("lizzDB")
@Service @Service
public class SysCarServiceImpl extends ServiceImpl<SysCarMapper, SysCar> implements SysCarService { public class SysCarServiceImpl extends ServiceImpl<SysCarMapper, SysCar> implements SysCarService {

View File

@ -3,7 +3,6 @@ package com.muyu.server.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSON;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.muyu.cache.SysCarCacheService;
import com.muyu.common.domain.MessageTemplateType; import com.muyu.common.domain.MessageTemplateType;
import com.muyu.common.domain.SysCar; import com.muyu.common.domain.SysCar;
import com.muyu.common.domain.Template; import com.muyu.common.domain.Template;
@ -21,7 +20,8 @@ import java.sql.*;
import java.util.List; import java.util.List;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
/** /**
* @Authorliuxinyue *
* @author liuxinyue
* @Packagecom.template.service.impl * @Packagecom.template.service.impl
* @Projectcloud-server-c * @Projectcloud-server-c
* @nameTemplateServiceImp * @nameTemplateServiceImp
@ -31,8 +31,7 @@ import java.util.concurrent.ExecutionException;
@Service @Service
public class TemplateServiceImpl extends ServiceImpl<TemplateMapper, Template> implements TemplateService { public class TemplateServiceImpl extends ServiceImpl<TemplateMapper, Template> implements TemplateService {
@Autowired
private static TemplateMapper templateMapper;
@Autowired @Autowired
private SysCarService sysCarService; private SysCarService sysCarService;

View File

@ -6,7 +6,7 @@
1.在mybats的开发中namespace有特殊的意思一定要是对应接口的全限定名 1.在mybats的开发中namespace有特殊的意思一定要是对应接口的全限定名
通过namespace可以简历mapper.xml和接口之间的关系(名字不重要,位置不重要) 通过namespace可以简历mapper.xml和接口之间的关系(名字不重要,位置不重要)
--> -->
<mapper namespace="com.muyu.server.mapper.EnterpriseDao"> <mapper namespace="com.muyu.server.mapper.EnterpriseMapper">
<!--查询企业信息--> <!--查询企业信息-->
<select id="selectEnterprise" resultType="HashMap" parameterType="Map"> <select id="selectEnterprise" resultType="HashMap" parameterType="Map">
@ -27,7 +27,7 @@
</select> </select>
<!--新增企业信息--> <!--新增企业信息-->
<insert id="insert" parameterType="com.muyu.server.mapper.EnterpriseDao"> <insert id="insert" parameterType="com.muyu.server.mapper.EnterpriseMapper">
insert into tb_enterprise insert into tb_enterprise
set enterprise_name = #{enterpriseName}, set enterprise_name = #{enterpriseName},
enterprise_car_count = #{enterpriseCarCount}, enterprise_car_count = #{enterpriseCarCount},