Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dmhub-plugin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinxunjia
dmhub-plugin
Commits
b80c7b07
Commit
b80c7b07
authored
Apr 22, 2020
by
qinxunjia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dao修改
parent
ca00cbcf
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
57 additions
and
18 deletions
+57
-18
Application.java
src/main/java/com/jz/Application.java
+2
-0
MybatisPlusConfig.java
src/main/java/com/jz/sms/config/MybatisPlusConfig.java
+43
-0
MessageMapper.java
...main/java/com/jz/sms/repository/mapper/MessageMapper.java
+1
-2
SysBatchMapper.java
...ain/java/com/jz/sms/repository/mapper/SysBatchMapper.java
+1
-2
TemplateMapper.java
...ain/java/com/jz/sms/repository/mapper/TemplateMapper.java
+1
-2
MessageServiceImpl.java
...main/java/com/jz/sms/service/impl/MessageServiceImpl.java
+6
-9
MessageMapper.xml
src/main/resources/mapper/MessageMapper.xml
+1
-1
SysBatchMapper.xml
src/main/resources/mapper/SysBatchMapper.xml
+1
-1
TemplateMapper.xml
src/main/resources/mapper/TemplateMapper.xml
+1
-1
No files found.
src/main/java/com/jz/Application.java
View file @
b80c7b07
package
com
.
jz
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
@SpringBootApplication
@MapperScan
(
" com.jz.sms.repository.mapper"
)
public
class
Application
{
public
static
void
main
(
String
[]
args
)
{
...
...
src/main/java/com/jz/sms/config/MybatisPlusConfig.java
0 → 100644
View file @
b80c7b07
package
com
.
jz
.
sms
.
config
;
import
com.baomidou.mybatisplus.plugins.PaginationInterceptor
;
import
com.baomidou.mybatisplus.plugins.PerformanceInterceptor
;
import
org.mybatis.spring.mapper.MapperScannerConfigurer
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
@Configuration
//@MapperScan("com.baomidou.springboot.mapper*")//这个注解,作用相当于下面的@Bean MapperScannerConfigurer,2者配置1份即可
public
class
MybatisPlusConfig
{
/**
* SQL输出拦截器,性能分析器,不建议生产环境使用,开发环境使用(方便)
*/
@Bean
public
PerformanceInterceptor
performanceInterceptor
()
{
PerformanceInterceptor
performanceInterceptor
=
new
PerformanceInterceptor
();
//sql格式化
performanceInterceptor
.
setFormat
(
true
);
return
performanceInterceptor
;
}
/**
* mybatis-plus分页插件<br>
* 文档:http://mp.baomidou.com<br>
*/
@Bean
public
PaginationInterceptor
paginationInterceptor
()
{
PaginationInterceptor
paginationInterceptor
=
new
PaginationInterceptor
();
//paginationInterceptor.setDialectType("mysql"); //指定数据库类型,不写自动匹配
return
paginationInterceptor
;
};
@Bean
public
MapperScannerConfigurer
mapperScannerConfigurer
()
{
MapperScannerConfigurer
scannerConfigurer
=
new
MapperScannerConfigurer
();
scannerConfigurer
.
setBasePackage
(
"com.baomidou.springboot.mapper*"
);
return
scannerConfigurer
;
}
}
\ No newline at end of file
src/main/java/com/jz/sms/repository/MessageMapper.java
→
src/main/java/com/jz/sms/repository/
mapper/
MessageMapper.java
View file @
b80c7b07
package
com
.
jz
.
sms
.
repository
;
package
com
.
jz
.
sms
.
repository
.
mapper
;
import
org.springframework.stereotype.Repository
;
/**
* Mybatis 接口文件
*/
@Repository
public
interface
MessageMapper
{
// int createTemplate(XXXX....)
...
...
src/main/java/com/jz/sms/repository/SysBatchMapper.java
→
src/main/java/com/jz/sms/repository/
mapper/
SysBatchMapper.java
View file @
b80c7b07
package
com
.
jz
.
sms
.
repository
;
package
com
.
jz
.
sms
.
repository
.
mapper
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
com.jz.sms.repository.domain.SmsTemplateInfo
;
...
...
@@ -6,7 +6,6 @@ import com.jz.sms.repository.domain.SysBatchInfo;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Repository
;
@Repository
public
interface
SysBatchMapper
extends
BaseMapper
<
SysBatchInfo
>
{
...
...
src/main/java/com/jz/sms/repository/TemplateMapper.java
→
src/main/java/com/jz/sms/repository/
mapper/
TemplateMapper.java
View file @
b80c7b07
package
com
.
jz
.
sms
.
repository
;
package
com
.
jz
.
sms
.
repository
.
mapper
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
com.jz.sms.repository.domain.SmsTemplateInfo
;
...
...
@@ -6,7 +6,6 @@ import org.apache.ibatis.annotations.Mapper;
import
org.springframework.stereotype.Repository
;
@Repository
public
interface
TemplateMapper
extends
BaseMapper
<
SmsTemplateInfo
>
{
...
...
src/main/java/com/jz/sms/service/impl/MessageServiceImpl.java
View file @
b80c7b07
...
...
@@ -3,12 +3,9 @@ package com.jz.sms.service.impl;
import
com.alibaba.fastjson.JSONObject
;
import
com.jz.sms.chuanlan.service.ChuanLanSmsService
;
import
com.jz.sms.dto.*
;
import
com.jz.sms.repository.SysBatchMapper
;
import
com.jz.sms.repository.TemplateMapper
;
import
com.jz.sms.repository.domain.SmsTemplateInfo
;
import
com.jz.sms.repository.domain.SysBatchInfo
;
import
com.jz.sms.repository.mapper.SysBatchMapper
;
import
com.jz.sms.repository.mapper.TemplateMapper
;
import
com.jz.sms.service.MessageService
;
import
com.jz.sms.util.id.IdHandler
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -16,11 +13,11 @@ import org.springframework.stereotype.Service;
public
class
MessageServiceImpl
implements
MessageService
{
//
@Autowired
//
private SysBatchMapper sysBatchMapper;
@Autowired
private
SysBatchMapper
sysBatchMapper
;
//
//
@Autowired
//
private TemplateMapper templateMapper;
@Autowired
private
TemplateMapper
templateMapper
;
@Autowired
private
ChuanLanSmsService
chuanLanSmsService
;
...
...
src/main/resources/mapper/MessageMapper.xml
View file @
b80c7b07
<?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.jz.sms.repository.MessageMapper"
>
<mapper
namespace=
"com.jz.sms.repository.
mapper.
MessageMapper"
>
</mapper>
\ No newline at end of file
src/main/resources/mapper/SysBatchMapper.xml
View file @
b80c7b07
<?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.jz.sms.repository.SysBatchMapper"
>
<mapper
namespace=
"com.jz.sms.repository.
mapper.
SysBatchMapper"
>
...
...
src/main/resources/mapper/TemplateMapper.xml
View file @
b80c7b07
<?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.jz.sms.repository.TemplateMapper"
>
<mapper
namespace=
"com.jz.sms.repository.
mapper.
TemplateMapper"
>
<resultMap
id=
"baseMap"
type=
"com.jz.sms.repository.domain.SmsTemplateInfo"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment