Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
Overview
Overview
Details
Activity
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
base_platform_enterprise
gic-platform-enterprise
Commits
f8af5bcb
Commit
f8af5bcb
authored
Nov 12, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
短信模板
parent
5507d501
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
234 additions
and
0 deletions
+234
-0
EnterpriseSmsController.java
...gic/operation/web/controller/EnterpriseSmsController.java
+57
-0
SmsTemplateVO.java
...main/java/com/gic/operation/web/vo/sms/SmsTemplateVO.java
+177
-0
No files found.
gic-platform-operation-web/src/main/java/com/gic/operation/web/controller/EnterpriseSmsController.java
View file @
f8af5bcb
package
com
.
gic
.
operation
.
web
.
controller
;
import
java.util.Date
;
import
java.util.List
;
import
org.apache.commons.collections.CollectionUtils
;
...
...
@@ -24,6 +25,7 @@ import com.gic.marketing.api.dto.sms.SmsApplicationDTO;
import
com.gic.marketing.api.service.sms.SmsOuterApiService
;
import
com.gic.operation.web.vo.EnterpriseSmsSignVO
;
import
com.gic.operation.web.vo.sms.SmsChannelVO
;
import
com.gic.operation.web.vo.sms.SmsTemplateVO
;
/**
*
...
...
@@ -155,6 +157,61 @@ public class EnterpriseSmsController {
return
EnterpriseRestResponse
.
failure
(
smsResult
);
}
/**
*
* @param enterpriseId
* @param channelType 短信通道类型(1:腾讯云, 2:大汉三通)
* @param search 模板名称/ID
* @param type 类型: 0普通 1营销
* @param beginTime
* @param endTime
* @param page
* @return
*/
@RequestMapping
(
"/list-sms-channel-template"
)
public
RestResponse
channelSmsTemplatePage
(
Integer
enterpriseId
,
Integer
channelType
,
String
search
,
Integer
type
,
Date
beginTime
,
Date
endTime
,
Page
<
Void
>
page
)
{
if
(
channelType
==
null
)
{
//默认腾讯云通道
channelType
=
1
;
}
return
ResultControllerUtils
.
commonResult
(
smsOuterApiService
.
channelSmsTemplatePage
(
enterpriseId
,
channelType
,
search
,
type
,
beginTime
,
endTime
,
page
),
SmsTemplateVO
.
class
);
}
@RequestMapping
(
"/get-sms-channel-template-number"
)
public
RestResponse
countTemplateByChannel
(
Integer
enterpriseId
,
Integer
channelType
)
{
if
(
channelType
==
null
)
{
//默认腾讯云通道
channelType
=
1
;
}
return
ResultControllerUtils
.
commonResult
(
smsOuterApiService
.
countTemplateByChannel
(
enterpriseId
,
channelType
));
}
@RequestMapping
(
"/sync-sms-channel-template"
)
public
RestResponse
checkTemplateStatus
(
Integer
enterpriseId
,
Integer
channelType
,
boolean
checkAll
,
Long
channelTemplateId
)
{
if
(
channelType
==
null
)
{
//默认腾讯云通道
channelType
=
1
;
}
return
ResultControllerUtils
.
commonResult
(
smsOuterApiService
.
checkTemplateStatus
(
enterpriseId
,
channelType
,
checkAll
,
channelTemplateId
));
}
@RequestMapping
(
"/init-sms-channel-template"
)
public
RestResponse
initAddChannelTemplate
(
Integer
enterpriseId
,
Integer
channelType
)
{
if
(
channelType
==
null
)
{
//默认腾讯云通道
channelType
=
1
;
}
return
ResultControllerUtils
.
commonResult
(
smsOuterApiService
.
initAddChannelTemplate
(
enterpriseId
,
channelType
));
}
/**
* 是否符合短信业务配置条件
* @param enterpriseId
...
...
gic-platform-operation-web/src/main/java/com/gic/operation/web/vo/sms/SmsTemplateVO.java
0 → 100644
View file @
f8af5bcb
package
com
.
gic
.
operation
.
web
.
vo
.
sms
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 短信通道模板列表
* @ClassName: SmsTemplateVO
* @Description:
* @author guojuxing
* @date 2020/11/12 10:49 AM
*/
public
class
SmsTemplateVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
4271435356220392959L
;
/**
* 0普通 1营销
*/
private
Integer
type
;
/**
* 模板名称
*/
private
String
name
;
/**
* 模板内容 (变量)
*/
private
String
content
;
/**
* 模板内容 ({1}转化为 {会员名称})
*/
private
String
contentDesc
;
private
Date
createTime
;
private
Date
updateTime
;
private
Long
creatorId
;
private
String
creatorName
;
/** 状态:0:已通过;1:待审核;2:已拒绝 */
private
Integer
status
;
/** 渠道短信id **/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
channelTemplateId
;
/**短信通道类型(1:腾讯云, 2:大汉三通)*/
private
Integer
channelType
;
/**第三方运营商模板id*/
private
String
templateId
;
public
Integer
getType
()
{
return
type
;
}
public
SmsTemplateVO
setType
(
Integer
type
)
{
this
.
type
=
type
;
return
this
;
}
public
String
getName
()
{
return
name
;
}
public
SmsTemplateVO
setName
(
String
name
)
{
this
.
name
=
name
;
return
this
;
}
public
String
getContent
()
{
return
content
;
}
public
SmsTemplateVO
setContent
(
String
content
)
{
this
.
content
=
content
;
return
this
;
}
public
String
getContentDesc
()
{
return
contentDesc
;
}
public
SmsTemplateVO
setContentDesc
(
String
contentDesc
)
{
this
.
contentDesc
=
contentDesc
;
return
this
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
SmsTemplateVO
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
return
this
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
SmsTemplateVO
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
return
this
;
}
public
Long
getCreatorId
()
{
return
creatorId
;
}
public
SmsTemplateVO
setCreatorId
(
Long
creatorId
)
{
this
.
creatorId
=
creatorId
;
return
this
;
}
public
String
getCreatorName
()
{
return
creatorName
;
}
public
SmsTemplateVO
setCreatorName
(
String
creatorName
)
{
this
.
creatorName
=
creatorName
;
return
this
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
SmsTemplateVO
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
return
this
;
}
public
Long
getChannelTemplateId
()
{
return
channelTemplateId
;
}
public
SmsTemplateVO
setChannelTemplateId
(
Long
channelTemplateId
)
{
this
.
channelTemplateId
=
channelTemplateId
;
return
this
;
}
public
Integer
getChannelType
()
{
return
channelType
;
}
public
SmsTemplateVO
setChannelType
(
Integer
channelType
)
{
this
.
channelType
=
channelType
;
return
this
;
}
public
String
getTemplateId
()
{
return
templateId
;
}
public
SmsTemplateVO
setTemplateId
(
String
templateId
)
{
this
.
templateId
=
templateId
;
return
this
;
}
@Override
public
String
toString
()
{
return
"SmsTemplateVO{"
+
"type="
+
type
+
", name='"
+
name
+
'\''
+
", content='"
+
content
+
'\''
+
", contentDesc='"
+
contentDesc
+
'\''
+
", createTime="
+
createTime
+
", updateTime="
+
updateTime
+
", creatorId="
+
creatorId
+
", creatorName='"
+
creatorName
+
'\''
+
", status="
+
status
+
", channelTemplateId="
+
channelTemplateId
+
", channelType="
+
channelType
+
", templateId='"
+
templateId
+
'\''
+
'}'
;
}
}
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