Compare commits
2 Commits
17e62f4753
...
1190d2d41f
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1190d2d41f | ||
![]() |
bc2557e508 |
@ -11,7 +11,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
* @author ruoyi
|
||||
*/
|
||||
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
|
||||
@MapperScan("com.ruoyi.base.mapper")
|
||||
@MapperScan("com.ruoyi.**.mapper")
|
||||
public class RuoYiApplication
|
||||
{
|
||||
public static void main(String[] args)
|
||||
|
@ -120,10 +120,7 @@ mybatis-plus:
|
||||
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
||||
banner: false # 关闭控制台的 Banner 打印
|
||||
mapper-locations:
|
||||
- classpath*:mapper/**/*Mapper.xml
|
||||
- classpath*:mapper/*/*.xml # 扫描子模块下的 mapper.xml文件
|
||||
- classpath:mapper/*/*.xml # 扫描当前模块下的 mapper.xml 文件
|
||||
- classpath*:mapper/*.xml
|
||||
type-aliases-package: com.ruoyi.**.domain
|
||||
# PageHelper分页插件
|
||||
pagehelper:
|
||||
|
@ -4,31 +4,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.base.mapper.BaseCardMapper">
|
||||
|
||||
<resultMap type="BaseCard" id="BaseCardResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="cardName" column="card_name" />
|
||||
<result property="userType" column="user_type" />
|
||||
<result property="content" column="content" />
|
||||
<result property="sort" column="sort" />
|
||||
<result property="isSystem" column="is_system" />
|
||||
<result property="image" column="image" />
|
||||
<result property="monthPrice" column="month_price" />
|
||||
<result property="quarterPrice" column="quarter_price" />
|
||||
<result property="yearPrice" column="year_price" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="isShow" column="is_show" />
|
||||
<result property="creator" column="creator" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updater" column="updater" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseCardVo">
|
||||
select id, card_name, user_type, content, sort, is_system, image, month_price, quarter_price, year_price, remark, is_show, creator, create_time, updater, update_time, del_flag from dl_base_card
|
||||
</sql>
|
||||
|
||||
<select id="queryListPage" parameterType="BaseCard" resultMap="BaseCardResult">
|
||||
<select id="queryListPage" parameterType="BaseCard" resultType="com.ruoyi.base.domain.BaseCard">
|
||||
<include refid="selectBaseCardVo"/>
|
||||
<where>
|
||||
del_flag=0
|
||||
|
@ -15,8 +15,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="lng" column="lng" />
|
||||
<result property="lat" column="lat" />
|
||||
<result property="isShow" column="is_show" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseCityVo">
|
||||
|
@ -9,7 +9,7 @@
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="tel" column="tel" />
|
||||
<result property="name" column="name" />
|
||||
<result property="city" column="city" />
|
||||
<result property="cityId" column="city_id" />
|
||||
<result property="detail" column="detail" />
|
||||
<result property="isDefault" column="is_default" />
|
||||
<result property="creator" column="creator" />
|
||||
|
@ -17,7 +17,7 @@ import org.springframework.web.client.RestTemplate;
|
||||
// 表示通过aop框架暴露该代理对象,AopContext能够访问
|
||||
@EnableAspectJAutoProxy(exposeProxy = true)
|
||||
// 指定要扫描的Mapper类的包的路径
|
||||
@MapperScan("com.ruoyi.**.mapper")
|
||||
//@MapperScan("com.ruoyi.**.mapper")
|
||||
public class ApplicationConfig
|
||||
{
|
||||
/**
|
||||
|
@ -24,8 +24,8 @@ import org.springframework.core.env.ConfigurableEnvironment;
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Configuration() // 目的:先于 MyBatis Plus 自动配置,避免 @MapperScan 可能扫描不到 Mapper 打印 warn 日志
|
||||
@MapperScan(basePackages ={"com.ruoyi"}, annotationClass = Mapper.class,
|
||||
lazyInitialization = "${mybatis.lazy-initialization:false}") // Mapper 懒加载,目前仅用于单元测试
|
||||
//@MapperScan(basePackages ={"com.ruoyi"}, annotationClass = Mapper.class,
|
||||
// lazyInitialization = "${mybatis.lazy-initialization:false}") // Mapper 懒加载,目前仅用于单元测试
|
||||
public class MybatisAutoConfiguration {
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user