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
2f5047d5
Commit
2f5047d5
authored
Apr 22, 2020
by
qinxunjia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试请求
parent
ee15d7ea
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
56 additions
and
39 deletions
+56
-39
BizController.java
src/main/java/com/jz/sms/api/BizController.java
+21
-17
SysBatchMapper.java
src/main/java/com/jz/sms/repository/SysBatchMapper.java
+3
-0
TemplateMapper.java
src/main/java/com/jz/sms/repository/TemplateMapper.java
+3
-0
MessageServiceImpl.java
...main/java/com/jz/sms/service/impl/MessageServiceImpl.java
+17
-17
XfaceCreateTempLateWrapper.java
...z/sms/wrapper/maintenance/XfaceCreateTempLateWrapper.java
+1
-1
MessageMapper.xml
src/main/resources/mapper/MessageMapper.xml
+4
-4
SysBatchMapper.xml
src/main/resources/mapper/SysBatchMapper.xml
+7
-0
No files found.
src/main/java/com/jz/sms/api/BizController.java
View file @
2f5047d5
...
@@ -3,22 +3,22 @@ package com.jz.sms.api;
...
@@ -3,22 +3,22 @@ package com.jz.sms.api;
import
com.jz.sms.chuanlan.service.ChuanLanSmsService
;
import
com.jz.sms.chuanlan.service.ChuanLanSmsService
;
import
com.jz.sms.dto.XfaceDmHubTemplateRequestDTO
;
import
com.jz.sms.dto.XfaceDmHubTemplateRequestDTO
;
import
com.jz.sms.dto.XfaceDmHubTemplateResponseDTO
;
import
com.jz.sms.dto.XfaceDmHubTemplateResponseDTO
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Map
;
@RestController
@RestController
@RequestMapping
(
"test"
)
@RequestMapping
(
"
/
test"
)
public
class
BizController
{
public
class
BizController
{
@Autowired
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
BizController
.
class
);
private
ChuanLanSmsService
service
;
@RequestMapping
(
"index"
)
public
String
index
()
{
return
"success"
;
@Autowired
}
private
ChuanLanSmsService
service
;
/**
/**
...
@@ -26,33 +26,37 @@ public class BizController {
...
@@ -26,33 +26,37 @@ public class BizController {
*
*
* @return
* @return
*/
*/
@
Reque
stMapping
(
"/sms/template"
)
@
Po
stMapping
(
"/sms/template"
)
public
XfaceDmHubTemplateResponseDTO
template
(
XfaceDmHubTemplateRequestDTO
requestDTO
)
{
public
String
template
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
XfaceDmHubTemplateResponseDTO
responseDTO
=
service
.
createTemplate
(
requestDTO
);
log
.
info
(
"**********创建模板入参*******:{}"
,
params
);
return
responseDTO
;
return
"ok"
;
}
}
/**
/**
* 批量发送(通知或营销类)
* 批量发送(通知或营销类)
*
* @return
* @return
*/
*/
@
Reque
stMapping
(
"/sms/batch"
)
@
Po
stMapping
(
"/sms/batch"
)
public
String
batch
()
{
public
String
batch
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
log
.
info
(
"**********批量发送入参*******:{}"
,
params
);
return
"success"
;
return
"success"
;
}
}
/**
/**
* 发送单条(通知或营销类)
* 发送单条(通知或营销类)
*
* @return
* @return
*/
*/
@RequestMapping
(
"/sms/send"
)
@RequestMapping
(
"/sms/send"
)
public
String
send
()
{
public
String
send
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
log
.
info
(
"**********单条发送入参*******:{}"
,
params
);
return
"success"
;
return
"success"
;
}
}
}
}
src/main/java/com/jz/sms/repository/SysBatchMapper.java
View file @
2f5047d5
...
@@ -3,7 +3,10 @@ package com.jz.sms.repository;
...
@@ -3,7 +3,10 @@ package com.jz.sms.repository;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
com.jz.sms.repository.domain.SmsTemplateInfo
;
import
com.jz.sms.repository.domain.SmsTemplateInfo
;
import
com.jz.sms.repository.domain.SysBatchInfo
;
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
>
{
public
interface
SysBatchMapper
extends
BaseMapper
<
SysBatchInfo
>
{
...
...
src/main/java/com/jz/sms/repository/TemplateMapper.java
View file @
2f5047d5
...
@@ -3,7 +3,10 @@ package com.jz.sms.repository;
...
@@ -3,7 +3,10 @@ package com.jz.sms.repository;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
com.jz.sms.repository.domain.SmsTemplateInfo
;
import
com.jz.sms.repository.domain.SmsTemplateInfo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Repository
;
@Repository
public
interface
TemplateMapper
extends
BaseMapper
<
SmsTemplateInfo
>
{
public
interface
TemplateMapper
extends
BaseMapper
<
SmsTemplateInfo
>
{
...
...
src/main/java/com/jz/sms/service/impl/MessageServiceImpl.java
View file @
2f5047d5
...
@@ -16,11 +16,11 @@ import org.springframework.stereotype.Service;
...
@@ -16,11 +16,11 @@ import org.springframework.stereotype.Service;
public
class
MessageServiceImpl
implements
MessageService
{
public
class
MessageServiceImpl
implements
MessageService
{
@Autowired
//
@Autowired
private
SysBatchMapper
sysBatchMapper
;
//
private SysBatchMapper sysBatchMapper;
//
@Autowired
//
@Autowired
private
TemplateMapper
templateMapper
;
//
private TemplateMapper templateMapper;
@Autowired
@Autowired
private
ChuanLanSmsService
chuanLanSmsService
;
private
ChuanLanSmsService
chuanLanSmsService
;
...
@@ -56,18 +56,18 @@ public class MessageServiceImpl implements MessageService {
...
@@ -56,18 +56,18 @@ public class MessageServiceImpl implements MessageService {
String
audienceIdType
=
requestDTO
.
getAudienceIdType
();
String
audienceIdType
=
requestDTO
.
getAudienceIdType
();
JSONObject
data
=
requestDTO
.
getData
();
JSONObject
data
=
requestDTO
.
getData
();
// 获取模板信息
// 获取模板信息
SmsTemplateInfo
templateInfo
=
templateMapper
.
selectOne
(
new
SmsTemplateInfo
(
templateId
));
//
SmsTemplateInfo templateInfo = templateMapper.selectOne(new SmsTemplateInfo(templateId));
if
(
null
==
templateInfo
)
{
//
if (null == templateInfo) {
return
null
;
//
return null;
}
//
}
//
String
content
=
templateInfo
.
getContent
();
//
String content = templateInfo.getContent();
String
smsType
=
templateInfo
.
getType
();
//
String smsType = templateInfo.getType();
//
// 系统记录批次,不管是单发还是批量发送都当是批量发送处理
//
// 系统记录批次,不管是单发还是批量发送都当是批量发送处理
SysBatchInfo
info
=
new
SysBatchInfo
();
//
SysBatchInfo info = new SysBatchInfo();
info
.
setBatchId
(
IdHandler
.
nextId
());
//
info.setBatchId(IdHandler.nextId());
Integer
insert
=
sysBatchMapper
.
insert
(
info
);
//
Integer insert = sysBatchMapper.insert(info);
// chuanLanSmsService.sendByFixed(content);
// chuanLanSmsService.sendByFixed(content);
...
...
src/main/java/com/jz/sms/wrapper/maintenance/XfaceCreateTempLateWrapper.java
View file @
2f5047d5
...
@@ -18,7 +18,7 @@ public class XfaceCreateTempLateWrapper {
...
@@ -18,7 +18,7 @@ public class XfaceCreateTempLateWrapper {
XfaceCreateTempLateWrapperImpl
xfaceCreateTempLateWrapperImpl
;
XfaceCreateTempLateWrapperImpl
xfaceCreateTempLateWrapperImpl
;
// @ApiOperation(value = "SMS0001 短信模板创建", httpMethod = "POST")
// @ApiOperation(value = "SMS0001 短信模板创建", httpMethod = "POST")
@PostMapping
(
value
=
"/sms/template
/create
"
)
@PostMapping
(
value
=
"/sms/template"
)
@ResponseBody
@ResponseBody
public
XfaceDmHubTemplateResponseDTO
processRequest
(
@Valid
@RequestBody
XfaceDmHubTemplateRequestDTO
requestDTO
)
{
public
XfaceDmHubTemplateResponseDTO
processRequest
(
@Valid
@RequestBody
XfaceDmHubTemplateRequestDTO
requestDTO
)
{
...
...
src/main/resources/mapper/MessageMapper.xml
View file @
2f5047d5
<
!--<?xml version="1.0" encoding="UTF-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">--
>
<!
DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"
>
<
!--<mapper namespace="com.qianlian.cloud.tms.repository.BaApplicationConfigMapper">--
>
<
mapper
namespace=
"com.jz.sms.repository.MessageMapper"
>
<!--</mapper>-->
</mapper>
\ No newline at end of file
\ No newline at end of file
src/main/resources/mapper/SysBatchMapper.xml
0 → 100644
View file @
2f5047d5
<?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>
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