parent
1e3f5a682e
commit
4b528ea63b
@ -0,0 +1,40 @@
|
|||||||
|
package com.ruoyi.gysl.entity.BaseModel;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公共实体类
|
||||||
|
* @author du
|
||||||
|
* @since 2025/3/21 13:48
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BaseModel {
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Long createId;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Long updateId;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.ruoyi.gysl.entity.request;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目评价配置请求参数
|
||||||
|
* @author du
|
||||||
|
* @since 2025/3/21 17:13
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PjpzRequest {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价要素
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "评价要素")
|
||||||
|
private String pjys;
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package com.ruoyi.gysl.entity.request;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目知识库分页请求类
|
||||||
|
* @author du
|
||||||
|
* @since 2025/3/21 14:37
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class XmzskPageReq {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "文件名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "类型")
|
||||||
|
private String lx;
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.ruoyi.gysl.entity.response.ImgResponse;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目图例组装实体类
|
||||||
|
* @author du
|
||||||
|
* @since 2025/3/21 16:03
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ImgResponse {
|
||||||
|
|
||||||
|
@ApiModelProperty("图片")
|
||||||
|
private String[] images;
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.ruoyi.gysl.entity.response;
|
||||||
|
|
||||||
|
import com.ruoyi.gysl.entity.response.ImgResponse.ImgResponse;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目图例分页返回类
|
||||||
|
* @author du
|
||||||
|
* @since 2025/3/21 15:52
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ProjectLegendResponse {
|
||||||
|
|
||||||
|
@ApiModelProperty("id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("图片类型1")
|
||||||
|
private ImgResponse type1;
|
||||||
|
|
||||||
|
@ApiModelProperty("图片类型2")
|
||||||
|
private ImgResponse type2;
|
||||||
|
|
||||||
|
}
|
@ -1,15 +0,0 @@
|
|||||||
package com.ruoyi.gysl.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.ruoyi.gysl.entity.Xmzsk;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* (Xmzsk)表数据库访问层
|
|
||||||
*
|
|
||||||
* @author makejava
|
|
||||||
* @since 2025-02-24 14:31:17
|
|
||||||
*/
|
|
||||||
public interface XmzskDao extends BaseMapper<Xmzsk> {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,26 @@
|
|||||||
|
package com.ruoyi.gysl.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.ruoyi.gysl.entity.Xmzsk;
|
||||||
|
import com.ruoyi.gysl.entity.request.XmzskPageReq;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (Xmzsk)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2025-02-24 14:31:17
|
||||||
|
*/
|
||||||
|
public interface XmzskMapper extends BaseMapper<Xmzsk> {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询所有数据
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @return 所有数据
|
||||||
|
*/
|
||||||
|
Page<Xmzsk> page(Page<Xmzsk> page,@Param("req") XmzskPageReq req);
|
||||||
|
}
|
||||||
|
|
@ -1,25 +1,23 @@
|
|||||||
package com.ruoyi.gysl.service;
|
package com.ruoyi.gysl.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.ruoyi.gysl.entity.Xmxl;
|
import com.ruoyi.gysl.entity.Xmxl;
|
||||||
import com.ruoyi.gysl.entity.request.ZwIdPageReq;
|
import com.ruoyi.gysl.entity.request.ZwIdPageReq;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目巡礼(Xmxl)表服务接口
|
* 项目巡礼(Xmxl)表服务接口
|
||||||
*
|
*
|
||||||
* @author makejava
|
* @author makejava
|
||||||
* @since 2025-03-19 14:19:22
|
* @since 2025-03-21 14:15:40
|
||||||
*/
|
*/
|
||||||
public interface XmxlService extends IService<Xmxl> {
|
public interface XmxlService extends IService<Xmxl> {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询所有数据
|
* 查询所有数据
|
||||||
*
|
|
||||||
* @param page 分页对象
|
|
||||||
* @param zwIdPageReq 查询实体
|
|
||||||
* @return 所有数据
|
|
||||||
*/
|
*/
|
||||||
Page<Xmxl> page(Page<Xmxl> page , ZwIdPageReq zwIdPageReq);
|
List<Xmxl> list(ZwIdPageReq projectRemark);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,32 +1,29 @@
|
|||||||
package com.ruoyi.gysl.service.impl;
|
package com.ruoyi.gysl.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.ruoyi.gysl.entity.Xmxl;
|
||||||
import com.ruoyi.gysl.entity.request.ZwIdPageReq;
|
import com.ruoyi.gysl.entity.request.ZwIdPageReq;
|
||||||
import com.ruoyi.gysl.mapper.XmxlMapper;
|
import com.ruoyi.gysl.mapper.XmxlMapper;
|
||||||
import com.ruoyi.gysl.entity.Xmxl;
|
|
||||||
import com.ruoyi.gysl.service.XmxlService;
|
import com.ruoyi.gysl.service.XmxlService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目巡礼(Xmxl)表服务实现类
|
* 项目巡礼(Xmxl)表服务实现类
|
||||||
*
|
*
|
||||||
* @author makejava
|
* @author makejava
|
||||||
* @since 2025-03-19 14:19:22
|
* @since 2025-03-21 14:15:41
|
||||||
*/
|
*/
|
||||||
@Service("xmxlService")
|
@Service("xmxlService")
|
||||||
public class XmxlServiceImpl extends ServiceImpl<XmxlMapper, Xmxl> implements XmxlService {
|
public class XmxlServiceImpl extends ServiceImpl<XmxlMapper, Xmxl> implements XmxlService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询所有数据
|
* 查询所有数据
|
||||||
*
|
|
||||||
* @param page 分页对象
|
|
||||||
* @param zwIdPageReq 查询实体
|
|
||||||
* @return 所有数据
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Page<Xmxl> page(Page<Xmxl> page, ZwIdPageReq zwIdPageReq) {
|
public List<Xmxl> list(ZwIdPageReq projectRemark) {
|
||||||
return baseMapper.page(page,zwIdPageReq);
|
return baseMapper.list(projectRemark);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
<?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.ruoyi.gysl.mapper.PjpzMapper">
|
||||||
|
<select id="page" resultType="com.ruoyi.gysl.entity.Pjpz">
|
||||||
|
select * from pjpz
|
||||||
|
<where>
|
||||||
|
<if test="req.pjys != null and req.pjys != ''">
|
||||||
|
AND pjys like concat('%',#{req.pjys},'%')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,14 @@
|
|||||||
|
<?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.ruoyi.gysl.mapper.WysmxInformationMapper">
|
||||||
|
<select id="selectOne" resultType="com.ruoyi.gysl.entity.WysmxInformation">
|
||||||
|
select * from wysmx_information
|
||||||
|
<where>
|
||||||
|
<if test="req.xmId != null and req.xmId != ''">
|
||||||
|
AND xm_id = #{req.xmId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,17 @@
|
|||||||
|
<?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.ruoyi.gysl.mapper.XmzskMapper">
|
||||||
|
<select id="page" resultType="com.ruoyi.gysl.entity.Xmzsk">
|
||||||
|
select * from xmzsk
|
||||||
|
<where>
|
||||||
|
<if test="req.name != null and req.name != ''">
|
||||||
|
AND name like concat('%',#{req.name},'%')
|
||||||
|
</if>
|
||||||
|
<if test="req.lx != null and req.lx != ''">
|
||||||
|
AND lx = #{req.lx}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -1,132 +1,128 @@
|
|||||||
//package com.ruoyi.framework.config;
|
package com.ruoyi.framework.config;
|
||||||
//
|
|
||||||
//import java.io.IOException;
|
import java.io.IOException;
|
||||||
//import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
//import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
//import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
//import java.util.List;
|
import java.util.List;
|
||||||
//import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
//import org.apache.ibatis.io.VFS;
|
|
||||||
//import org.apache.ibatis.session.SqlSessionFactory;
|
import com.baomidou.mybatisplus.annotation.DbType;
|
||||||
//import org.mybatis.spring.SqlSessionFactoryBean;
|
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||||
//import org.mybatis.spring.boot.autoconfigure.SpringBootVFS;
|
import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
|
||||||
//import org.springframework.beans.factory.annotation.Autowired;
|
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||||
//import org.springframework.context.annotation.Bean;
|
import org.apache.ibatis.io.VFS;
|
||||||
//import org.springframework.context.annotation.Configuration;
|
import org.apache.ibatis.session.SqlSessionFactory;
|
||||||
//import org.springframework.core.env.Environment;
|
import org.mybatis.spring.SqlSessionFactoryBean;
|
||||||
//import org.springframework.core.io.DefaultResourceLoader;
|
import org.mybatis.spring.boot.autoconfigure.SpringBootVFS;
|
||||||
//import org.springframework.core.io.Resource;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
//import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
import org.springframework.context.annotation.Bean;
|
||||||
//import org.springframework.core.io.support.ResourcePatternResolver;
|
import org.springframework.context.annotation.Configuration;
|
||||||
//import org.springframework.core.type.classreading.CachingMetadataReaderFactory;
|
import org.springframework.core.env.Environment;
|
||||||
//import org.springframework.core.type.classreading.MetadataReader;
|
import org.springframework.core.io.DefaultResourceLoader;
|
||||||
//import org.springframework.core.type.classreading.MetadataReaderFactory;
|
import org.springframework.core.io.Resource;
|
||||||
//import org.springframework.util.ClassUtils;
|
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
||||||
//import com.ruoyi.common.utils.StringUtils;
|
import org.springframework.core.io.support.ResourcePatternResolver;
|
||||||
//
|
import org.springframework.core.type.classreading.CachingMetadataReaderFactory;
|
||||||
///**
|
import org.springframework.core.type.classreading.MetadataReader;
|
||||||
// * Mybatis支持*匹配扫描包
|
import org.springframework.core.type.classreading.MetadataReaderFactory;
|
||||||
// *
|
import org.springframework.util.ClassUtils;
|
||||||
// * @author ruoyi
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
// */
|
|
||||||
//@Configuration
|
/**
|
||||||
//public class MyBatisConfig
|
* Mybatis支持*匹配扫描包
|
||||||
//{
|
*
|
||||||
// @Autowired
|
* @author ruoyi
|
||||||
// private Environment env;
|
*/
|
||||||
//
|
@Configuration
|
||||||
// static final String DEFAULT_RESOURCE_PATTERN = "**/*.class";
|
public class MyBatisConfig
|
||||||
//
|
{
|
||||||
// public static String setTypeAliasesPackage(String typeAliasesPackage)
|
@Autowired
|
||||||
// {
|
private Environment env;
|
||||||
// ResourcePatternResolver resolver = (ResourcePatternResolver) new PathMatchingResourcePatternResolver();
|
|
||||||
// MetadataReaderFactory metadataReaderFactory = new CachingMetadataReaderFactory(resolver);
|
static final String DEFAULT_RESOURCE_PATTERN = "**/*.class";
|
||||||
// List<String> allResult = new ArrayList<String>();
|
|
||||||
// try
|
public static String setTypeAliasesPackage(String typeAliasesPackage)
|
||||||
// {
|
{
|
||||||
// for (String aliasesPackage : typeAliasesPackage.split(","))
|
ResourcePatternResolver resolver = (ResourcePatternResolver) new PathMatchingResourcePatternResolver();
|
||||||
// {
|
MetadataReaderFactory metadataReaderFactory = new CachingMetadataReaderFactory(resolver);
|
||||||
// List<String> result = new ArrayList<String>();
|
List<String> allResult = new ArrayList<String>();
|
||||||
// aliasesPackage = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX
|
try
|
||||||
// + ClassUtils.convertClassNameToResourcePath(aliasesPackage.trim()) + "/" + DEFAULT_RESOURCE_PATTERN;
|
{
|
||||||
// Resource[] resources = resolver.getResources(aliasesPackage);
|
for (String aliasesPackage : typeAliasesPackage.split(","))
|
||||||
// if (resources != null && resources.length > 0)
|
{
|
||||||
// {
|
List<String> result = new ArrayList<String>();
|
||||||
// MetadataReader metadataReader = null;
|
aliasesPackage = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX
|
||||||
// for (Resource resource : resources)
|
+ ClassUtils.convertClassNameToResourcePath(aliasesPackage.trim()) + "/" + DEFAULT_RESOURCE_PATTERN;
|
||||||
// {
|
Resource[] resources = resolver.getResources(aliasesPackage);
|
||||||
// if (resource.isReadable())
|
if (resources != null && resources.length > 0)
|
||||||
// {
|
{
|
||||||
// metadataReader = metadataReaderFactory.getMetadataReader(resource);
|
MetadataReader metadataReader = null;
|
||||||
// try
|
for (Resource resource : resources)
|
||||||
// {
|
{
|
||||||
// result.add(Class.forName(metadataReader.getClassMetadata().getClassName()).getPackage().getName());
|
if (resource.isReadable())
|
||||||
// }
|
{
|
||||||
// catch (ClassNotFoundException e)
|
metadataReader = metadataReaderFactory.getMetadataReader(resource);
|
||||||
// {
|
try
|
||||||
// e.printStackTrace();
|
{
|
||||||
// }
|
result.add(Class.forName(metadataReader.getClassMetadata().getClassName()).getPackage().getName());
|
||||||
// }
|
}
|
||||||
// }
|
catch (ClassNotFoundException e)
|
||||||
// }
|
{
|
||||||
// if (result.size() > 0)
|
e.printStackTrace();
|
||||||
// {
|
}
|
||||||
// HashSet<String> hashResult = new HashSet<String>(result);
|
}
|
||||||
// allResult.addAll(hashResult);
|
}
|
||||||
// }
|
}
|
||||||
// }
|
if (result.size() > 0)
|
||||||
// if (allResult.size() > 0)
|
{
|
||||||
// {
|
HashSet<String> hashResult = new HashSet<String>(result);
|
||||||
// typeAliasesPackage = String.join(",", (String[]) allResult.toArray(new String[0]));
|
allResult.addAll(hashResult);
|
||||||
// }
|
}
|
||||||
// else
|
}
|
||||||
// {
|
if (allResult.size() > 0)
|
||||||
// throw new RuntimeException("mybatis typeAliasesPackage 路径扫描错误,参数typeAliasesPackage:" + typeAliasesPackage + "未找到任何包");
|
{
|
||||||
// }
|
typeAliasesPackage = String.join(",", (String[]) allResult.toArray(new String[0]));
|
||||||
// }
|
}
|
||||||
// catch (IOException e)
|
else
|
||||||
// {
|
{
|
||||||
// e.printStackTrace();
|
throw new RuntimeException("mybatis typeAliasesPackage 路径扫描错误,参数typeAliasesPackage:" + typeAliasesPackage + "未找到任何包");
|
||||||
// }
|
}
|
||||||
// return typeAliasesPackage;
|
}
|
||||||
// }
|
catch (IOException e)
|
||||||
//
|
{
|
||||||
// public Resource[] resolveMapperLocations(String[] mapperLocations)
|
e.printStackTrace();
|
||||||
// {
|
}
|
||||||
// ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver();
|
return typeAliasesPackage;
|
||||||
// List<Resource> resources = new ArrayList<Resource>();
|
}
|
||||||
// if (mapperLocations != null)
|
|
||||||
// {
|
public Resource[] resolveMapperLocations(String[] mapperLocations)
|
||||||
// for (String mapperLocation : mapperLocations)
|
{
|
||||||
// {
|
ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver();
|
||||||
// try
|
List<Resource> resources = new ArrayList<Resource>();
|
||||||
// {
|
if (mapperLocations != null)
|
||||||
// Resource[] mappers = resourceResolver.getResources(mapperLocation);
|
{
|
||||||
// resources.addAll(Arrays.asList(mappers));
|
for (String mapperLocation : mapperLocations)
|
||||||
// }
|
{
|
||||||
// catch (IOException e)
|
try
|
||||||
// {
|
{
|
||||||
// // ignore
|
Resource[] mappers = resourceResolver.getResources(mapperLocation);
|
||||||
// }
|
resources.addAll(Arrays.asList(mappers));
|
||||||
// }
|
}
|
||||||
// }
|
catch (IOException e)
|
||||||
// return resources.toArray(new Resource[resources.size()]);
|
{
|
||||||
// }
|
// ignore
|
||||||
//
|
}
|
||||||
// @Bean
|
}
|
||||||
// public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception
|
}
|
||||||
// {
|
return resources.toArray(new Resource[resources.size()]);
|
||||||
// String typeAliasesPackage = env.getProperty("mybatis.typeAliasesPackage");
|
}
|
||||||
// String mapperLocations = env.getProperty("mybatis.mapperLocations");
|
|
||||||
// String configLocation = env.getProperty("mybatis.configLocation");
|
@Bean
|
||||||
// typeAliasesPackage = setTypeAliasesPackage(typeAliasesPackage);
|
public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
||||||
// VFS.addImplClass(SpringBootVFS.class);
|
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
||||||
//
|
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
|
||||||
// final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
|
interceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());
|
||||||
// sessionFactory.setDataSource(dataSource);
|
return interceptor;
|
||||||
// sessionFactory.setTypeAliasesPackage(typeAliasesPackage);
|
}
|
||||||
// sessionFactory.setMapperLocations(resolveMapperLocations(StringUtils.split(mapperLocations, ",")));
|
}
|
||||||
// sessionFactory.setConfigLocation(new DefaultResourceLoader().getResource(configLocation));
|
|
||||||
// return sessionFactory.getObject();
|
|
||||||
// }
|
|
||||||
//}
|
|
Loading…
Reference in new issue