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
47bed68d
Commit
47bed68d
authored
Apr 21, 2020
by
qinxunjia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改一些内容
parent
78c171e1
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
190 additions
and
46 deletions
+190
-46
pom.xml
pom.xml
+18
-0
BizController.java
src/main/java/com/jz/sms/api/BizController.java
+1
-1
ChuanLanSmsService.java
.../java/com/jz/sms/chuanlan/service/ChuanLanSmsService.java
+9
-4
ChuanLanSmsServiceImpl.java
.../jz/sms/chuanlan/service/impl/ChuanLanSmsServiceImpl.java
+14
-8
XfaceDmHubBatchSendRequestDTO.java
...in/java/com/jz/sms/dto/XfaceDmHubBatchSendRequestDTO.java
+39
-0
XfaceDmHubSendRequestDTO.java
src/main/java/com/jz/sms/dto/XfaceDmHubSendRequestDTO.java
+51
-0
MessageService.java
src/main/java/com/jz/sms/service/MessageService.java
+5
-31
MessageServiceImpl.java
...main/java/com/jz/sms/service/impl/MessageServiceImpl.java
+51
-0
XfaceCreateTempLateWrapperImpl.java
...s/wrapper/maintenance/XfaceCreateTempLateWrapperImpl.java
+2
-2
No files found.
pom.xml
View file @
47bed68d
...
...
@@ -48,6 +48,24 @@
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
</dependency>
<!--redis-->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-redis
</artifactId>
</dependency>
<!--redis-->
<!--rabbitmq-->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-amqp
</artifactId>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
fastjson
</artifactId>
<version>
1.2.62
</version>
</dependency>
</dependencies>
...
...
src/main/java/com/jz/sms/api/BizController.java
View file @
47bed68d
...
...
@@ -28,7 +28,7 @@ public class BizController {
*/
@RequestMapping
(
"/sms/template"
)
public
XfaceDmHubTemplateResponseDTO
template
(
XfaceDmHubTemplateRequestDTO
requestDTO
)
{
XfaceDmHubTemplateResponseDTO
responseDTO
=
service
.
send
(
requestDTO
);
XfaceDmHubTemplateResponseDTO
responseDTO
=
service
.
createTemplate
(
requestDTO
);
return
responseDTO
;
}
...
...
src/main/java/com/jz/sms/chuanlan/service/ChuanLanSmsService.java
View file @
47bed68d
package
com
.
jz
.
sms
.
chuanlan
.
service
;
import
com.jz.sms.dto.XfaceDmHubTemplateRequestDTO
;
import
com.jz.sms.dto.XfaceDmHubTemplateResponseDTO
;
import
com.jz.sms.dto.*
;
public
interface
ChuanLanSmsService
{
...
...
@@ -9,9 +8,15 @@ public interface ChuanLanSmsService {
XfaceDmHubTemplateResponseDTO
createTemplate
(
XfaceDmHubTemplateRequestDTO
requestDTO
);
XfaceDmHub
TemplateResponseDTO
sendByFixed
(
XfaceDmHubTemplate
RequestDTO
requestDTO
);
XfaceDmHub
SendResponseDTO
sendByFixed
(
XfaceDmHubSend
RequestDTO
requestDTO
);
XfaceDmHubTemplateResponseDTO
sendByVariable
(
XfaceDmHubTemplateRequestDTO
requestDTO
);
XfaceDmHubSendResponseDTO
sendByVariable
(
XfaceDmHubSendRequestDTO
requestDTO
);
XfaceDmHubSendResponseDTO
sendBatchByFixed
(
XfaceDmHubSendRequestDTO
requestDTO
);
XfaceDmHubBatchSendResponseDTO
sendBatchByVariable
(
XfaceDmHubBatchSendRequestDTO
requestDTO
);
}
src/main/java/com/jz/sms/chuanlan/service/impl/ChuanLanSmsServiceImpl.java
View file @
47bed68d
...
...
@@ -2,10 +2,7 @@ package com.jz.sms.chuanlan.service.impl;
import
com.jz.sms.chuanlan.service.ChuanLanSmsService
;
import
com.jz.sms.dto.XfaceClTemplateRequestDTO
;
import
com.jz.sms.dto.XfaceClTemplateResponseDTO
;
import
com.jz.sms.dto.XfaceDmHubTemplateRequestDTO
;
import
com.jz.sms.dto.XfaceDmHubTemplateResponseDTO
;
import
com.jz.sms.dto.*
;
import
org.springframework.stereotype.Service
;
...
...
@@ -30,17 +27,26 @@ public class ChuanLanSmsServiceImpl implements ChuanLanSmsService {
return
responseDTO
;
}
@Override
public
XfaceDmHubTemplateResponseDTO
sendByFixed
(
XfaceDmHubTemplateRequestDTO
requestDTO
)
{
public
XfaceDmHubSendResponseDTO
sendByFixed
(
XfaceDmHubSendRequestDTO
requestDTO
)
{
return
null
;
}
@Override
public
XfaceDmHubTemplateResponseDTO
sendByVariable
(
XfaceDmHubTemplateRequestDTO
requestDTO
)
{
public
XfaceDmHubSendResponseDTO
sendByVariable
(
XfaceDmHubSendRequestDTO
requestDTO
)
{
return
null
;
}
@Override
public
XfaceDmHubSendResponseDTO
sendBatchByFixed
(
XfaceDmHubSendRequestDTO
requestDTO
)
{
return
null
;
}
@Override
public
XfaceDmHubBatchSendResponseDTO
sendBatchByVariable
(
XfaceDmHubBatchSendRequestDTO
requestDTO
)
{
return
null
;
}
}
src/main/java/com/jz/sms/dto/XfaceDmHubBatchSendRequestDTO.java
View file @
47bed68d
package
com
.
jz
.
sms
.
dto
;
import
com.alibaba.fastjson.JSONObject
;
import
java.util.List
;
public
class
XfaceDmHubBatchSendRequestDTO
{
// 批量发送短信的模板id
private
String
templateId
;
// 批次号
private
String
batchId
;
// 短信数据
private
List
<
JSONObject
>
data
;
public
String
getTemplateId
()
{
return
templateId
;
}
public
void
setTemplateId
(
String
templateId
)
{
this
.
templateId
=
templateId
;
}
public
String
getBatchId
()
{
return
batchId
;
}
public
void
setBatchId
(
String
batchId
)
{
this
.
batchId
=
batchId
;
}
public
List
<
JSONObject
>
getData
()
{
return
data
;
}
public
void
setData
(
List
<
JSONObject
>
data
)
{
this
.
data
=
data
;
}
}
src/main/java/com/jz/sms/dto/XfaceDmHubSendRequestDTO.java
View file @
47bed68d
package
com
.
jz
.
sms
.
dto
;
import
com.alibaba.fastjson.JSONObject
;
import
java.util.List
;
public
class
XfaceDmHubSendRequestDTO
{
// 发送短信的模板ID
private
String
templateId
;
// DMHUb的批次号
private
String
batchId
;
// 渠道类型(初期给到DMHUb系统库的类型,如果是sms,data里面会直接反手机号,
// 如果是customerIdentity.memberId,data返回memberId,需要查询系统memberId用户对应的手机号发送短信)
private
String
audienceIdType
;
// 发送数据
private
List
<
JSONObject
>
data
;
public
String
getTemplateId
()
{
return
templateId
;
}
public
void
setTemplateId
(
String
templateId
)
{
this
.
templateId
=
templateId
;
}
public
String
getBatchId
()
{
return
batchId
;
}
public
void
setBatchId
(
String
batchId
)
{
this
.
batchId
=
batchId
;
}
public
String
getAudienceIdType
()
{
return
audienceIdType
;
}
public
void
setAudienceIdType
(
String
audienceIdType
)
{
this
.
audienceIdType
=
audienceIdType
;
}
public
List
<
JSONObject
>
getData
()
{
return
data
;
}
public
void
setData
(
List
<
JSONObject
>
data
)
{
this
.
data
=
data
;
}
}
src/main/java/com/jz/sms/service/MessageService.java
View file @
47bed68d
package
com
.
jz
.
sms
.
service
;
import
com.jz.sms.config.SMSConfig
;
import
com.jz.sms.dto.XfaceDmHubTemplateRequestDTO
;
import
com.jz.sms.dto.XfaceDmHubTemplateResponseDTO
;
import
com.jz.sms.repository.MessageMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.jz.sms.dto.*
;
@Service
public
class
MessageService
{
public
interface
MessageService
{
/** 数据层 */
// @Autowired
// private MessageMapper messageMapper;
XfaceDmHubTemplateResponseDTO
createTemplate
(
XfaceDmHubTemplateRequestDTO
requestDTO
);
/**
* 短信模板创建
* @param requestDTO
* @return
*/
public
XfaceDmHubTemplateResponseDTO
createTemplate
(
XfaceDmHubTemplateRequestDTO
requestDTO
)
{
XfaceDmHubTemplateResponseDTO
responseDTO
=
new
XfaceDmHubTemplateResponseDTO
();
try
{
// XfaceClTemplateRequestDTO clTemplateRequestDTO = new XfaceClTemplateRequestDTO();
// XfaceClTemplateResponseDTO clTemplateResponseDTO = new XfaceClTemplateResponseDTO();
// logger.info("短信通道请求URL:"+url);
// logger.info("短信通道返回内容:"+responseStr);
}
catch
(
Exception
exception
)
{
// 记录异常日志
throw
exception
;
}
return
responseDTO
;
}
XfaceDmHubSendResponseDTO
send
(
XfaceDmHubSendRequestDTO
requestDTO
);
XfaceDmHubBatchSendResponseDTO
batchSend
(
XfaceDmHubBatchSendRequestDTO
requestDTO
);
}
src/main/java/com/jz/sms/service/impl/MessageServiceImpl.java
0 → 100644
View file @
47bed68d
package
com
.
jz
.
sms
.
service
.
impl
;
import
com.jz.sms.config.SMSConfig
;
import
com.jz.sms.dto.*
;
import
com.jz.sms.repository.MessageMapper
;
import
com.jz.sms.service.MessageService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
@Service
public
class
MessageServiceImpl
implements
MessageService
{
/**
* 数据层
*/
@Autowired
private
MessageMapper
messageMapper
;
/**
* 短信模板创建
*
* @param requestDTO
* @return
*/
@Override
public
XfaceDmHubTemplateResponseDTO
createTemplate
(
XfaceDmHubTemplateRequestDTO
requestDTO
)
{
XfaceDmHubTemplateResponseDTO
responseDTO
=
new
XfaceDmHubTemplateResponseDTO
();
try
{
// XfaceClTemplateRequestDTO clTemplateRequestDTO = new XfaceClTemplateRequestDTO();
// XfaceClTemplateResponseDTO clTemplateResponseDTO = new XfaceClTemplateResponseDTO();
// logger.info("短信通道请求URL:"+url);
// logger.info("短信通道返回内容:"+responseStr);
}
catch
(
Exception
exception
)
{
// 记录异常日志
throw
exception
;
}
return
responseDTO
;
}
@Override
public
XfaceDmHubSendResponseDTO
send
(
XfaceDmHubSendRequestDTO
requestDTO
)
{
return
null
;
}
@Override
public
XfaceDmHubBatchSendResponseDTO
batchSend
(
XfaceDmHubBatchSendRequestDTO
requestDTO
)
{
return
null
;
}
}
src/main/java/com/jz/sms/wrapper/maintenance/XfaceCreateTempLateWrapperImpl.java
View file @
47bed68d
...
...
@@ -2,7 +2,7 @@ package com.jz.sms.wrapper.maintenance;
import
com.jz.sms.dto.XfaceDmHubTemplateRequestDTO
;
import
com.jz.sms.dto.XfaceDmHubTemplateResponseDTO
;
import
com.jz.sms.service.
MessageService
;
import
com.jz.sms.service.
impl.MessageServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -10,7 +10,7 @@ import org.springframework.stereotype.Service;
public
class
XfaceCreateTempLateWrapperImpl
{
@Autowired
private
MessageService
messageService
;
private
MessageService
Impl
messageService
;
public
XfaceDmHubTemplateResponseDTO
doProcessRequest
(
XfaceDmHubTemplateRequestDTO
requestDTO
)
{
...
...
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