Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
f4a77c42
Commit
f4a77c42
authored
Nov 13, 2020
by
mobh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消息模板修改
parent
c43f4ff5
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
76 additions
and
19 deletions
+76
-19
src/main/java/cn/timer/api/bean/admin/AdminMsgTemplate.java
+7
-1
src/main/java/cn/timer/api/controller/admin/AdminAssoTxjlbcontroller.java
+0
-3
src/main/java/cn/timer/api/controller/admin/AdminMsgTemplateController.java
+6
-10
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
+16
-2
src/main/java/cn/timer/api/dao/admin/AdminMsgTemplateMapper.java
+7
-1
src/main/java/cn/timer/api/dto/admin/AdminMsgTemplateDto.java
+3
-0
src/main/resources/mapping/admin/AdminMsgTemplateMapper.xml
+37
-2
No files found.
src/main/java/cn/timer/api/bean/admin/AdminMsgTemplate.java
View file @
f4a77c42
...
@@ -5,7 +5,9 @@ import javax.persistence.GeneratedValue;
...
@@ -5,7 +5,9 @@ import javax.persistence.GeneratedValue;
import
javax.persistence.Id
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
com.baomidou.mybatisplus.annotation.FieldStrategy
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
...
@@ -58,7 +60,11 @@ public class AdminMsgTemplate extends Model<AdminMsgTemplate> {
...
@@ -58,7 +60,11 @@ public class AdminMsgTemplate extends Model<AdminMsgTemplate> {
@ApiModelProperty
(
value
=
"生产时间 生产时间"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"生产时间 生产时间"
,
example
=
"101"
)
private
Long
addtime
;
private
Long
addtime
;
@ApiModelProperty
(
value
=
"0 系统默认(公共模板), 1 企业定制"
,
example
=
"0"
)
private
Integer
sysDefault
;
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
@ApiModelProperty
(
value
=
"企业ID 企业ID"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"企业ID 企业ID"
,
example
=
"101"
)
private
Integer
orgCode
;
private
Integer
orgCode
;
...
...
src/main/java/cn/timer/api/controller/admin/AdminAssoTxjlbcontroller.java
View file @
f4a77c42
...
@@ -37,7 +37,6 @@ public class AdminAssoTxjlbcontroller {
...
@@ -37,7 +37,6 @@ public class AdminAssoTxjlbcontroller {
@PostMapping
(
"/noreading"
)
@PostMapping
(
"/noreading"
)
@ApiOperation
(
value
=
"未读数量"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"未读数量"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
noreading
(
@CurrentUser
UserBean
userBean
,
@RequestBody
QueryNoReadingDto
ws
)
{
public
Result
<
Object
>
noreading
(
@CurrentUser
UserBean
userBean
,
@RequestBody
QueryNoReadingDto
ws
)
{
ws
.
setOrgCode
(
userBean
.
getOrgCode
());
Integer
wds
=
AdminAssoTxjlb
.
builder
().
build
()
Integer
wds
=
AdminAssoTxjlb
.
builder
().
build
()
.
selectCount
(
new
QueryWrapper
<
AdminAssoTxjlb
>().
lambda
().
eq
(
AdminAssoTxjlb:
:
getEmpNum
,
ws
.
getEmpNum
())
.
selectCount
(
new
QueryWrapper
<
AdminAssoTxjlb
>().
lambda
().
eq
(
AdminAssoTxjlb:
:
getEmpNum
,
ws
.
getEmpNum
())
.
eq
(
AdminAssoTxjlb:
:
getOrgCode
,
ws
.
getOrgCode
()).
eq
(
AdminAssoTxjlb:
:
getTxstate
,
0
));
.
eq
(
AdminAssoTxjlb:
:
getOrgCode
,
ws
.
getOrgCode
()).
eq
(
AdminAssoTxjlb:
:
getTxstate
,
0
));
...
@@ -48,7 +47,6 @@ public class AdminAssoTxjlbcontroller {
...
@@ -48,7 +47,6 @@ public class AdminAssoTxjlbcontroller {
@PostMapping
(
"/datanotread"
)
@PostMapping
(
"/datanotread"
)
@ApiOperation
(
value
=
"未读数据"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"未读数据"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
datanotread
(
@CurrentUser
UserBean
userBean
,
@RequestBody
QueryNoReadingDto
ws
)
{
public
Result
<
Object
>
datanotread
(
@CurrentUser
UserBean
userBean
,
@RequestBody
QueryNoReadingDto
ws
)
{
ws
.
setOrgCode
(
userBean
.
getOrgCode
());
List
<
AdminAssoTxjlb
>
wds
=
AdminAssoTxjlb
.
builder
().
build
()
List
<
AdminAssoTxjlb
>
wds
=
AdminAssoTxjlb
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
AdminAssoTxjlb
>().
lambda
().
eq
(
AdminAssoTxjlb:
:
getEmpNum
,
ws
.
getEmpNum
())
.
selectList
(
new
QueryWrapper
<
AdminAssoTxjlb
>().
lambda
().
eq
(
AdminAssoTxjlb:
:
getEmpNum
,
ws
.
getEmpNum
())
.
eq
(
AdminAssoTxjlb:
:
getOrgCode
,
ws
.
getOrgCode
()).
eq
(
AdminAssoTxjlb:
:
getTxstate
,
0
));
.
eq
(
AdminAssoTxjlb:
:
getOrgCode
,
ws
.
getOrgCode
()).
eq
(
AdminAssoTxjlb:
:
getTxstate
,
0
));
...
@@ -77,7 +75,6 @@ public class AdminAssoTxjlbcontroller {
...
@@ -77,7 +75,6 @@ public class AdminAssoTxjlbcontroller {
@PostMapping
(
"/pageTxjlb"
)
@PostMapping
(
"/pageTxjlb"
)
@ApiOperation
(
value
=
"分页查询消息记录"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"分页查询消息记录"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
pageTxjlb
(
@CurrentUser
UserBean
userBean
,
@RequestBody
QueryNoReadingDto
search
)
{
public
Result
<
Object
>
pageTxjlb
(
@CurrentUser
UserBean
userBean
,
@RequestBody
QueryNoReadingDto
search
)
{
search
.
setOrgCode
(
userBean
.
getOrgCode
());
Page
<
AdminAssoTxjlb
>
page
=
new
Page
<>(
Page
<
AdminAssoTxjlb
>
page
=
new
Page
<>(
search
.
getCurrentPage
()
==
null
?
1
:
search
.
getCurrentPage
(),
search
.
getCurrentPage
()
==
null
?
1
:
search
.
getCurrentPage
(),
search
.
getTotalPage
()
==
null
?
10
:
search
.
getTotalPage
());
search
.
getTotalPage
()
==
null
?
10
:
search
.
getTotalPage
());
...
...
src/main/java/cn/timer/api/controller/admin/AdminMsgTemplateController.java
View file @
f4a77c42
...
@@ -30,7 +30,7 @@ public class AdminMsgTemplateController {
...
@@ -30,7 +30,7 @@ public class AdminMsgTemplateController {
private
AdminMsgTemplateMapper
msgTemplateMapper
;
private
AdminMsgTemplateMapper
msgTemplateMapper
;
@PostMapping
(
"/listMsgTemplate"
)
@PostMapping
(
"/listMsgTemplate"
)
@ApiOperation
(
value
=
"列出消息模板"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"列出
企业可选择的
消息模板"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
listMsgTemplate
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AdminMsgTemplateDto
search
)
{
public
Result
<
Object
>
listMsgTemplate
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AdminMsgTemplateDto
search
)
{
search
.
setOrgCode
(
userBean
.
getOrgCode
());
search
.
setOrgCode
(
userBean
.
getOrgCode
());
List
<
AdminMsgTemplate
>
list
=
msgTemplateMapper
.
listMsgTemplate
(
search
);
List
<
AdminMsgTemplate
>
list
=
msgTemplateMapper
.
listMsgTemplate
(
search
);
...
@@ -40,7 +40,6 @@ public class AdminMsgTemplateController {
...
@@ -40,7 +40,6 @@ public class AdminMsgTemplateController {
@PostMapping
(
"/pageMsgTemplate"
)
@PostMapping
(
"/pageMsgTemplate"
)
@ApiOperation
(
value
=
"消息模板分页查询"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"消息模板分页查询"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
pageMsgTemplate
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AdminMsgTemplateDto
search
)
{
public
Result
<
Object
>
pageMsgTemplate
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AdminMsgTemplateDto
search
)
{
search
.
setOrgCode
(
userBean
.
getOrgCode
());
Page
<
FixedSalaryStaffDto
>
page
=
new
Page
<
FixedSalaryStaffDto
>(
Page
<
FixedSalaryStaffDto
>
page
=
new
Page
<
FixedSalaryStaffDto
>(
search
.
getCurrentPage
()
==
null
?
1
:
search
.
getCurrentPage
(),
search
.
getCurrentPage
()
==
null
?
1
:
search
.
getCurrentPage
(),
search
.
getTotalPage
()
==
null
?
10
:
search
.
getTotalPage
());
search
.
getTotalPage
()
==
null
?
10
:
search
.
getTotalPage
());
...
@@ -67,20 +66,17 @@ public class AdminMsgTemplateController {
...
@@ -67,20 +66,17 @@ public class AdminMsgTemplateController {
@PostMapping
(
"/editMsgTemplate"
)
@PostMapping
(
"/editMsgTemplate"
)
@ApiOperation
(
value
=
"新增/编辑消息模板"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"新增/编辑消息模板"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
editMsgTemplate
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AdminMsgTemplate
temp
)
{
public
Result
<
Object
>
editMsgTemplate
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AdminMsgTemplate
temp
)
{
AdminMsgTemplate
exits
=
AdminMsgTemplate
.
builder
().
build
().
selectOne
(
AdminMsgTemplateDto
search
=
new
AdminMsgTemplateDto
();
new
LambdaQueryWrapper
<
AdminMsgTemplate
>().
eq
(
AdminMsgTemplate:
:
getOrgCode
,
userBean
.
getOrgCode
())
search
.
setPlatformNum
(
temp
.
getPlatformNum
());
.
eq
(
AdminMsgTemplate:
:
getPlatformNum
,
temp
.
getPlatformNum
())
search
.
setPlatformType
(
temp
.
getPlatformType
());
.
eq
(
AdminMsgTemplate:
:
getPlatformType
,
temp
.
getPlatformType
())
search
.
setState
(
0
);
.
eq
(
AdminMsgTemplate:
:
getState
,
0
)
AdminMsgTemplate
exits
=
msgTemplateMapper
.
getByParams
(
search
);
);
if
(
Objects
.
nonNull
(
exits
))
{
if
(
Objects
.
nonNull
(
exits
))
{
if
(
Objects
.
isNull
(
temp
.
getId
())
||
if
(
Objects
.
isNull
(
temp
.
getId
())
||
(
Objects
.
nonNull
(
temp
.
getId
())
&&
!
temp
.
getId
().
equals
(
exits
.
getId
())))
{
(
Objects
.
nonNull
(
temp
.
getId
())
&&
!
temp
.
getId
().
equals
(
exits
.
getId
())))
{
return
ResultUtil
.
error
(
"对应平台编号已经存在!"
);
return
ResultUtil
.
error
(
"对应平台编号已经存在!"
);
}
}
}
}
temp
.
setOrgCode
(
userBean
.
getOrgCode
());
temp
.
setAddtime
(
new
Date
().
getTime
());
temp
.
setAddtime
(
new
Date
().
getTime
());
if
(
Objects
.
isNull
(
temp
.
getId
()))
{
if
(
Objects
.
isNull
(
temp
.
getId
()))
{
msgTemplateMapper
.
insert
(
temp
);
msgTemplateMapper
.
insert
(
temp
);
...
...
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
View file @
f4a77c42
...
@@ -246,13 +246,13 @@ public class QyzxController {
...
@@ -246,13 +246,13 @@ public class QyzxController {
*/
*/
/**
/**
* 企业列表
*
当前用户
企业列表
*
*
* @param
* @param
* @return
* @return
*/
*/
@GetMapping
(
value
=
"/entlist"
)
@GetMapping
(
value
=
"/entlist"
)
@ApiOperation
(
value
=
"企业列表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"
当前用户
企业列表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
QyzxEntInfoM
>>
entlist1
(
@CurrentUser
UserBean
userBean
)
{
public
Result
<
List
<
QyzxEntInfoM
>>
entlist1
(
@CurrentUser
UserBean
userBean
)
{
List
<
Object
>
orgCodes
=
qyzxEmpEntAssoMapper
.
selectObjs
(
new
QueryWrapper
<
QyzxEmpEntAsso
>().
lambda
()
List
<
Object
>
orgCodes
=
qyzxEmpEntAssoMapper
.
selectObjs
(
new
QueryWrapper
<
QyzxEmpEntAsso
>().
lambda
()
...
@@ -263,6 +263,20 @@ public class QyzxController {
...
@@ -263,6 +263,20 @@ public class QyzxController {
}
}
/**
/**
* 所有企业列表
*
* @param
* @return
*/
@GetMapping
(
value
=
"/entlistAll"
)
@ApiOperation
(
value
=
"所有企业列表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
QyzxEntInfoM
>>
entlistAll
(
@CurrentUser
UserBean
userBean
)
{
List
<
QyzxEntInfoM
>
qyzxEntInfoMs
=
new
LambdaQueryChainWrapper
<
QyzxEntInfoM
>(
qyzxEntInfoMMapper
)
.
list
();
return
ResultUtil
.
data
(
qyzxEntInfoMs
,
"获取企业信息成功"
);
}
/**
* 切换企业
* 切换企业
*
*
* @param org_num
* @param org_num
...
...
src/main/java/cn/timer/api/dao/admin/AdminMsgTemplateMapper.java
View file @
f4a77c42
...
@@ -18,7 +18,13 @@ import java.util.List;
...
@@ -18,7 +18,13 @@ import java.util.List;
@Repository
@Repository
public
interface
AdminMsgTemplateMapper
extends
BaseMapper
<
AdminMsgTemplate
>
{
public
interface
AdminMsgTemplateMapper
extends
BaseMapper
<
AdminMsgTemplate
>
{
/**
/**
* 查询模板
* 根据参数获取模板
* @param param
* @return
*/
AdminMsgTemplate
getByParams
(
@Param
(
"param"
)
AdminMsgTemplateDto
param
);
/**
* 列出企业可选择的消息模板
* @param param
* @param param
* @return
* @return
*/
*/
...
...
src/main/java/cn/timer/api/dto/admin/AdminMsgTemplateDto.java
View file @
f4a77c42
...
@@ -28,6 +28,9 @@ public class AdminMsgTemplateDto extends Page implements Serializable {
...
@@ -28,6 +28,9 @@ public class AdminMsgTemplateDto extends Page implements Serializable {
@ApiModelProperty
(
value
=
"状态 0 启用 1 停用"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"状态 0 启用 1 停用"
,
example
=
"101"
)
private
Integer
state
;
private
Integer
state
;
@ApiModelProperty
(
value
=
"0 系统默认(公共模板), 1 企业定制"
,
example
=
"0"
)
private
Integer
sysDefault
;
@ApiModelProperty
(
value
=
"企业ID 企业ID"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"企业ID 企业ID"
,
example
=
"101"
)
private
Integer
orgCode
;
private
Integer
orgCode
;
}
}
src/main/resources/mapping/admin/AdminMsgTemplateMapper.xml
View file @
f4a77c42
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
<result
column=
"msg_type"
property=
"msgType"
/>
<result
column=
"msg_type"
property=
"msgType"
/>
<result
column=
"state"
property=
"state"
/>
<result
column=
"state"
property=
"state"
/>
<result
column=
"addtime"
property=
"addtime"
/>
<result
column=
"addtime"
property=
"addtime"
/>
<result
column=
"sys_default"
property=
"sysDefault"
/>
<result
column=
"org_code"
property=
"orgCode"
/>
<result
column=
"org_code"
property=
"orgCode"
/>
</resultMap>
</resultMap>
...
@@ -24,10 +25,11 @@
...
@@ -24,10 +25,11 @@
msg_type,
msg_type,
state,
state,
addtime,
addtime,
sys_default,
org_code
org_code
</sql>
</sql>
<select
id=
"
listMsgTemplate
"
resultMap=
"BaseResultMap"
>
<select
id=
"
getByParams
"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM admin_msg_template temp
FROM admin_msg_template temp
<where>
<where>
...
@@ -35,7 +37,7 @@
...
@@ -35,7 +37,7 @@
and temp.template_name like CONCAT('%',#{param.templateName},'%')
and temp.template_name like CONCAT('%',#{param.templateName},'%')
</if>
</if>
<if
test=
"param.platformType != null"
>
<if
test=
"param.platformType != null"
>
and temp.platform_type = #{param.platformType}
and temp.platform_type = #{param.platformType}
</if>
</if>
<if
test=
"param.msgType != null"
>
<if
test=
"param.msgType != null"
>
and temp.msg_type = #{param.msgType}
and temp.msg_type = #{param.msgType}
...
@@ -43,12 +45,42 @@
...
@@ -43,12 +45,42 @@
<if
test=
"param.state != null"
>
<if
test=
"param.state != null"
>
and temp.state = #{param.state}
and temp.state = #{param.state}
</if>
</if>
<if
test=
"param.sysDefault != null"
>
and temp.sys_default = #{param.sysDefault}
</if>
<if
test=
"param.orgCode != null"
>
<if
test=
"param.orgCode != null"
>
and temp.org_code = #{param.orgCode}
and temp.org_code = #{param.orgCode}
</if>
</if>
</where>
</where>
</select>
</select>
<!-- 列出企业可选择的消息模板 -->
<sql
id=
"listMsgTemplateCondition"
>
<if
test=
"param.templateName != null and param.templateName !=''"
>
and temp.template_name like CONCAT('%',#{param.templateName},'%')
</if>
<if
test=
"param.platformType != null"
>
and temp.platform_type = #{param.platformType}
</if>
<if
test=
"param.msgType != null"
>
and temp.msg_type = #{param.msgType}
</if>
<if
test=
"param.state != null"
>
and temp.state = #{param.state}
</if>
</sql>
<select
id=
"listMsgTemplate"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM admin_msg_template temp
WHERE temp.sys_default = 0
<include
refid=
"listMsgTemplateCondition"
/>
UNION ALL
SELECT
<include
refid=
"Base_Column_List"
/>
FROM admin_msg_template temp
WHERE temp.sys_default = 1 AND temp.org_code = #{param.orgCode}
<include
refid=
"listMsgTemplateCondition"
/>
</select>
<!-- 分页查询 -->
<!-- 分页查询 -->
<sql
id=
"pageMsgTemplateCondition"
>
<sql
id=
"pageMsgTemplateCondition"
>
<where>
<where>
...
@@ -64,6 +96,9 @@
...
@@ -64,6 +96,9 @@
<if
test=
"param.state != null"
>
<if
test=
"param.state != null"
>
and temp.state = #{param.state}
and temp.state = #{param.state}
</if>
</if>
<if
test=
"param.sysDefault != null"
>
and temp.sys_default = #{param.sysDefault}
</if>
<if
test=
"param.orgCode != null"
>
<if
test=
"param.orgCode != null"
>
and temp.org_code = #{param.orgCode}
and temp.org_code = #{param.orgCode}
</if>
</if>
...
...
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