Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
ec6e11a2
Commit
ec6e11a2
authored
Jun 23, 2021
by
taabe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模板获取接口修改
parent
d139ed22
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
67 additions
and
35 deletions
+67
-35
BaseEntity.java
...a/com/yeejoin/amos/boot/biz/common/entity/BaseEntity.java
+1
-1
TemplateExtendDto.java
...ejoin/amos/boot/module/jcs/api/dto/TemplateExtendDto.java
+22
-0
Template.java
...com/yeejoin/amos/boot/module/jcs/api/entity/Template.java
+0
-2
ITemplateService.java
...in/amos/boot/module/jcs/api/service/ITemplateService.java
+12
-2
AlertSubmittedController.java
...t/module/jcs/biz/controller/AlertSubmittedController.java
+7
-19
AlertSubmittedObjectController.java
...le/jcs/biz/controller/AlertSubmittedObjectController.java
+0
-7
TemplateController.java
...os/boot/module/jcs/biz/controller/TemplateController.java
+5
-2
TemplateServiceImpl.java
...boot/module/jcs/biz/service/impl/TemplateServiceImpl.java
+20
-2
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/entity/BaseEntity.java
View file @
ec6e11a2
...
...
@@ -28,5 +28,5 @@ public class BaseEntity implements Serializable{
* 是否删除
*/
@TableField
(
value
=
"is_delete"
)
private
b
oolean
isDelete
;
private
B
oolean
isDelete
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/dto/TemplateExtendDto.java
0 → 100644
View file @
ec6e11a2
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
dto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 模板表扩展dto
*
* @author tb
* @date 2021-06-17
*/
@Data
@ApiModel
(
value
=
"TemplateExtendDto"
,
description
=
"模板表扩展dto"
)
public
class
TemplateExtendDto
extends
TemplateDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"模板富文本内容"
)
private
String
richContent
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/entity/Template.java
View file @
ec6e11a2
...
...
@@ -20,8 +20,6 @@ import lombok.experimental.Accessors;
@ApiModel
(
value
=
"Template对象"
,
description
=
"模板表"
)
public
class
Template
extends
BaseEntity
{
@ApiModelProperty
(
value
=
"模板类型code"
)
private
String
typeCode
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/ITemplateService.java
View file @
ec6e11a2
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.TemplateExtendDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Template
;
/**
...
...
@@ -12,10 +13,19 @@ import com.yeejoin.amos.boot.module.jcs.api.entity.Template;
public
interface
ITemplateService
extends
IService
<
Template
>
{
/**
* 根据模板类型及模板格式类型获取模板信息
*
* @param type 模板类型
* @param format 模板格式类型(1:富文本,0:其他)
* @return
*/
Template
getByTypeAndFormat
(
String
type
,
String
format
);
/**
* 根据模板类型获取模板信息
*
* @param type
* @param type
模板类型
* @return
*/
Template
getByType
(
String
type
);
Template
ExtendDto
getByType
(
String
type
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertSubmittedController.java
View file @
ec6e11a2
...
...
@@ -68,13 +68,11 @@ public class AlertSubmittedController extends BaseController {
*
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增警情报送记录"
,
notes
=
"新增警情报送记录"
)
public
ResponseModel
<
Object
>
saveAlertSubmitted
(
HttpServletRequest
request
,
@RequestBody
AlertSubmittedDto
alertSubmittedDto
)
{
return
ResponseHelper
.
buildResponse
(
iAlertSubmittedService
.
save
(
alertSubmittedDto
));
}
/**
...
...
@@ -83,14 +81,11 @@ public class AlertSubmittedController extends BaseController {
* @param id
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
DELETE
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据id删除"
,
notes
=
"根据id删除"
)
public
ResponseModel
<
Boolean
>
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
return
ResponseHelper
.
buildResponse
(
iAlertSubmittedService
.
removeById
(
id
));
}
/**
...
...
@@ -98,14 +93,11 @@ public class AlertSubmittedController extends BaseController {
*
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/updateById"
,
method
=
RequestMethod
.
PUT
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"修改警情报送记录"
,
notes
=
"修改警情报送记录"
)
public
ResponseModel
<
Boolean
>
updateByIdAlertSubmitted
(
HttpServletRequest
request
,
@RequestBody
AlertSubmitted
alertSubmitted
){
return
ResponseHelper
.
buildResponse
(
iAlertSubmittedService
.
updateById
(
alertSubmitted
));
}
/**
...
...
@@ -114,15 +106,14 @@ public class AlertSubmittedController extends BaseController {
* @param id
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询"
,
notes
=
"根据id查询"
)
public
ResponseModel
<
AlertSubmitted
>
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
){
return
ResponseHelper
.
buildResponse
(
iAlertSubmittedService
.
getById
(
id
));
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/scheduling/list"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"根据警情id查询融合调度列表"
,
notes
=
"根据警情id查询融合调度列表"
)
public
ResponseModel
<
SchedulingReportingVo
>
listSchedulingByParam
(
@RequestBody
AlertSubmittedDto
queryParam
)
{
...
...
@@ -130,14 +121,12 @@ public class AlertSubmittedController extends BaseController {
return
ResponseHelper
.
buildResponse
(
iAlertSubmittedService
.
listSchedulingByParam
(
queryParam
));
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/reporting/list"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"根据警情id查询警情报送列表"
,
notes
=
"根据警情id查询警情报送列表"
)
public
ResponseModel
<
SchedulingReportingVo
>
listReportingByParam
(
@RequestBody
AlertSubmittedDto
queryParam
)
{
queryParam
.
setSubmissionMethodCode
(
SubmissionMethodEnum
.
SMS
.
getCode
());
return
ResponseHelper
.
buildResponse
(
iAlertSubmittedService
.
listReportingByParam
(
queryParam
));
}
/**
...
...
@@ -145,11 +134,10 @@ public class AlertSubmittedController extends BaseController {
*
* @return
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表分页查询"
,
notes
=
"列表分页查询"
)
public
IPage
<
AlertSubmitted
>
listPage
(
String
pageNum
,
String
pageSize
,
AlertSubmitted
alertSubmitted
)
{
Page
<
AlertSubmitted
>
pageBean
;
QueryWrapper
<
AlertSubmitted
>
alertSubmittedQueryWrapper
=
new
QueryWrapper
<>();
Class
<?
extends
AlertSubmitted
>
aClass
=
alertSubmitted
.
getClass
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertSubmittedObjectController.java
View file @
ec6e11a2
...
...
@@ -56,9 +56,6 @@ public class AlertSubmittedObjectController extends BaseController {
return
iAlertSubmittedObjectService
.
removeById
(
id
);
}
/**
* 修改报送对象
* @return
...
...
@@ -70,8 +67,6 @@ public class AlertSubmittedObjectController extends BaseController {
return
iAlertSubmittedObjectService
.
updateById
(
alertSubmittedObject
);
}
/**
* 根据id查询
* @param id
...
...
@@ -84,8 +79,6 @@ public class AlertSubmittedObjectController extends BaseController {
return
iAlertSubmittedObjectService
.
getById
(
id
);
}
/**
* 列表分页查询
* @return
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/TemplateController.java
View file @
ec6e11a2
...
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.TemplateExtendDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Template
;
import
com.yeejoin.amos.boot.module.jcs.api.service.ITemplateService
;
import
io.swagger.annotations.Api
;
...
...
@@ -14,6 +15,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Arrays
;
...
...
@@ -87,8 +90,8 @@ public class TemplateController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/info/{type}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据模板类型查询"
,
notes
=
"根据模板类型查询"
)
public
Template
getByType
(
@PathVariable
String
type
){
return
iTemplateService
.
getByType
(
type
);
public
ResponseModel
<
TemplateExtendDto
>
getByType
(
@PathVariable
String
type
){
return
ResponseHelper
.
buildResponse
(
iTemplateService
.
getByType
(
type
)
);
}
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/TemplateServiceImpl.java
View file @
ec6e11a2
...
...
@@ -2,12 +2,16 @@ package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.TemplateDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.TemplateExtendDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Template
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.TemplateMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.ITemplateService
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.List
;
/**
* 模板表 服务实现类
*
...
...
@@ -18,7 +22,21 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
public
class
TemplateServiceImpl
extends
BaseService
<
TemplateDto
,
Template
,
TemplateMapper
>
implements
ITemplateService
{
@Override
public
Template
getByType
(
String
type
)
{
return
this
.
baseMapper
.
selectOne
(
new
QueryWrapper
<
Template
>().
eq
(
"type_code"
,
type
));
public
Template
getByTypeAndFormat
(
String
type
,
String
format
)
{
return
this
.
baseMapper
.
selectOne
(
new
QueryWrapper
<
Template
>().
eq
(
"type_code"
,
type
).
eq
(
"format"
,
format
));
}
@Override
public
TemplateExtendDto
getByType
(
String
typeCode
)
{
TemplateExtendDto
templateExtendDto
=
new
TemplateExtendDto
();
List
<
TemplateDto
>
templateDtoList
=
this
.
queryForList
(
null
,
false
,
typeCode
);
templateDtoList
.
forEach
(
templateDto
->
{
if
(
templateDto
.
getFormat
())
{
templateExtendDto
.
setRichContent
(
templateDto
.
getContent
());
}
else
{
templateExtendDto
.
setContent
(
templateDto
.
getContent
());
}
});
return
templateExtendDto
;
}
}
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