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
906784c3
Commit
906784c3
authored
Nov 10, 2020
by
mobh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合同证件管理功能
parent
9267dab9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
125 additions
and
19 deletions
+125
-19
src/main/java/cn/timer/api/bean/htzz/HtzzAdminZzda.java
+0
-4
src/main/java/cn/timer/api/controller/admin/AdminMsgTemplateController.java
+38
-0
src/main/java/cn/timer/api/controller/htzz/HtzzController.java
+16
-14
src/main/java/cn/timer/api/dao/admin/AdminMsgTemplateMapper.java
+11
-1
src/main/java/cn/timer/api/dto/admin/AdminMsgTemplateDto.java
+37
-0
src/main/resources/mapping/admin/AdminMsgTemplateMapper.xml
+23
-0
No files found.
src/main/java/cn/timer/api/bean/htzz/HtzzAdminZzda.java
View file @
906784c3
...
@@ -96,10 +96,6 @@ public class HtzzAdminZzda extends Model<HtzzAdminZzda> {
...
@@ -96,10 +96,6 @@ public class HtzzAdminZzda extends Model<HtzzAdminZzda> {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
List
<
NotifyPersonDto
>
ids
;
private
List
<
NotifyPersonDto
>
ids
;
// @Transient
// @TableField(exist = false)
// private List<HtzzAssoZztx> Zztx;
@Transient
@Transient
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
HtzzAssoZztx
zztx
;
private
HtzzAssoZztx
zztx
;
...
...
src/main/java/cn/timer/api/controller/admin/AdminMsgTemplateController.java
0 → 100644
View file @
906784c3
package
cn
.
timer
.
api
.
controller
.
admin
;
import
cn.timer.api.bean.admin.AdminMsgTemplate
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.dao.admin.AdminMsgTemplateMapper
;
import
cn.timer.api.dto.admin.AdminMsgTemplateDto
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
javax.transaction.Transactional
;
import
java.util.List
;
@Api
(
tags
=
"消息模板管理"
)
@RestController
@Transactional
@RequestMapping
(
value
=
"/msg"
)
public
class
AdminMsgTemplateController
{
@Resource
private
AdminMsgTemplateMapper
msgTemplateMapper
;
@PostMapping
(
"/listMsgTemplate"
)
@ApiOperation
(
value
=
"列出消息模板"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
listMsgTemplate
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AdminMsgTemplateDto
dto
)
{
dto
.
setOrgCode
(
userBean
.
getOrgCode
());
List
<
AdminMsgTemplate
>
list
=
msgTemplateMapper
.
listMsgTemplate
(
dto
);
return
ResultUtil
.
data
(
list
);
}
}
src/main/java/cn/timer/api/controller/htzz/HtzzController.java
View file @
906784c3
...
@@ -4,6 +4,7 @@ import java.util.ArrayList;
...
@@ -4,6 +4,7 @@ import java.util.ArrayList;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
com.google.common.collect.Lists
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -81,8 +82,9 @@ public class HtzzController {
...
@@ -81,8 +82,9 @@ public class HtzzController {
Logoutput
(
"企业 "
+
orgCode
+
" :短信套餐已过期"
);
Logoutput
(
"企业 "
+
orgCode
+
" :短信套餐已过期"
);
return
ResultUtil
.
error
(
"短信套餐已到期!"
);
return
ResultUtil
.
error
(
"短信套餐已到期!"
);
}
}
if
(
zzda
.
getId
()
==
null
)
{
zzda
.
setTxkgType
(
1
);
//
zzda
.
setTxkgType
(
1
);
//默认开启提醒
}
zzda
.
setLrrid
(
userBean
.
getEmpNum
());
zzda
.
setLrrid
(
userBean
.
getEmpNum
());
zzda
.
setLrsjTime
(
new
Date
());
zzda
.
setLrsjTime
(
new
Date
());
zzda
.
setOrgCode
(
orgCode
);
zzda
.
setOrgCode
(
orgCode
);
...
@@ -95,17 +97,11 @@ public class HtzzController {
...
@@ -95,17 +97,11 @@ public class HtzzController {
/**
/**
* 新增通知关系表,每人一个
* 新增通知关系表,每人一个
*/
*/
// YgglMainEmp emp = null;
List
<
NotifyPersonDto
>
ids
=
zzda
.
getIds
();
//通知人 用户id+手机号码
List
<
NotifyPersonDto
>
ids
=
zzda
.
getIds
();
//通知人 用户id+手机号码
List
<
HtzzAssoHtgx
>
htgxs
=
new
ArrayList
<
HtzzAssoHtgx
>(
ids
.
size
()
);
List
<
HtzzAssoHtgx
>
htgxs
=
Lists
.
newArrayList
(
);
for
(
NotifyPersonDto
pre
:
ids
)
{
for
(
NotifyPersonDto
pre
:
ids
)
{
HtzzAssoHtgx
.
builder
().
build
().
delete
(
new
QueryWrapper
<
HtzzAssoHtgx
>().
lambda
().
eq
(
HtzzAssoHtgx:
:
getOrgCode
,
orgCode
).
eq
(
HtzzAssoHtgx:
:
getTzrid
,
pre
.
getEmpNum
())
HtzzAssoHtgx
.
builder
().
build
().
delete
(
new
QueryWrapper
<
HtzzAssoHtgx
>().
lambda
().
eq
(
HtzzAssoHtgx:
:
getOrgCode
,
orgCode
).
eq
(
HtzzAssoHtgx:
:
getTzrid
,
pre
.
getEmpNum
())
.
eq
(
HtzzAssoHtgx:
:
getPhone
,
pre
.
getPhone
()));
.
eq
(
HtzzAssoHtgx:
:
getPhone
,
pre
.
getPhone
()));
// QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<>();
// queryWrapper.select("name", "phone", "emp_num").eq("emp_num", pre.getUserids()).eq("org_code", orgCode);
// emp = YgglMainEmp.builder().build().selectOne(queryWrapper);
HtzzAssoHtgx
htgx
=
HtzzAssoHtgx
.
builder
().
build
();
HtzzAssoHtgx
htgx
=
HtzzAssoHtgx
.
builder
().
build
();
htgx
.
setHtid
(
zzda
.
getId
());
htgx
.
setHtid
(
zzda
.
getId
());
...
@@ -116,22 +112,28 @@ public class HtzzController {
...
@@ -116,22 +112,28 @@ public class HtzzController {
htgx
.
insert
();
htgx
.
insert
();
htgxs
.
add
(
htgx
);
htgxs
.
add
(
htgx
);
}
}
HtzzAssoZztx
zztx
=
zzda
.
getZztx
();
zztx
.
setZzdaId
(
zzda
.
getId
());
zztx
.
setOrgCode
(
orgCode
);
zztx
.
setLrrid
(
userBean
.
getEmpNum
());
zztx
.
setLrsjTime
(
new
Date
());
zztx
.
insertOrUpdate
();
return
ResultUtil
.
datas
(
zzda
,
htgxs
,
"新增证件成功!"
);
return
ResultUtil
.
datas
(
zzda
,
htgxs
,
"新增证件成功!"
);
}
}
@GetMapping
(
"/modifytx/
id
"
)
@GetMapping
(
"/modifytx/
{id}
"
)
@ApiOperation
(
value
=
"修改提醒数据"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"修改提醒数据"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
modifytx
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
public
Result
<
Object
>
modifytx
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
List
<
NotifyPersonDto
>
tzids
=
new
ArrayList
<
NotifyPersonDto
>();
List
<
NotifyPersonDto
>
tzids
=
new
ArrayList
<
NotifyPersonDto
>();
List
<
HtzzAssoHtgx
>
httxs
=
HtzzAssoHtgx
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
HtzzAssoHtgx
>().
lambda
().
eq
(
HtzzAssoHtgx:
:
getHtid
,
id
));
List
<
HtzzAssoHtgx
>
httxs
=
HtzzAssoHtgx
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
HtzzAssoHtgx
>().
lambda
().
eq
(
HtzzAssoHtgx:
:
getHtid
,
id
));
for
(
HtzzAssoHtgx
gx
:
httxs
)
{
for
(
HtzzAssoHtgx
gx
:
httxs
)
{
NotifyPersonDto
predto
=
NotifyPersonDto
.
builder
().
build
();
NotifyPersonDto
predto
=
NotifyPersonDto
.
builder
().
build
();
predto
.
setEmpName
(
gx
.
getName
());
BeanUtil
.
copyProperties
(
gx
,
predto
);
predto
.
setEmpNum
(
gx
.
getTzrid
());
predto
.
setPhone
(
gx
.
getPhone
());
tzids
.
add
(
predto
);
tzids
.
add
(
predto
);
}
}
...
...
src/main/java/cn/timer/api/dao/admin/AdminMsgTemplateMapper.java
View file @
906784c3
package
cn
.
timer
.
api
.
dao
.
admin
;
package
cn
.
timer
.
api
.
dao
.
admin
;
import
cn.timer.api.dto.admin.AdminMsgTemplateDto
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.bean.admin.AdminMsgTemplate
;
import
cn.timer.api.bean.admin.AdminMsgTemplate
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.List
;
/**
/**
* 消息模板
* 消息模板
...
@@ -13,5 +18,10 @@ import cn.timer.api.bean.admin.AdminMsgTemplate;
...
@@ -13,5 +18,10 @@ import cn.timer.api.bean.admin.AdminMsgTemplate;
*/
*/
@Repository
@Repository
public
interface
AdminMsgTemplateMapper
extends
BaseMapper
<
AdminMsgTemplate
>
{
public
interface
AdminMsgTemplateMapper
extends
BaseMapper
<
AdminMsgTemplate
>
{
/**
* 查询模板
* @param params
* @return
*/
List
<
AdminMsgTemplate
>
listMsgTemplate
(
@Param
(
"params"
)
AdminMsgTemplateDto
params
);
}
}
src/main/java/cn/timer/api/dto/admin/AdminMsgTemplateDto.java
0 → 100644
View file @
906784c3
package
cn
.
timer
.
api
.
dto
.
admin
;
import
cn.timer.api.utils.Page
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
AdminMsgTemplateDto
extends
Page
implements
Serializable
{
@ApiModelProperty
(
value
=
"模板编号 "
,
example
=
"模板ID"
)
private
String
templateNum
;
@ApiModelProperty
(
value
=
"模板名称 "
,
example
=
"模板名称"
)
private
String
templateName
;
@ApiModelProperty
(
value
=
"对应平台模板编号 "
,
example
=
"对应平台模板编号"
)
private
String
platformNum
;
@ApiModelProperty
(
value
=
"平台类型 1 阿里云"
,
example
=
"101"
)
private
Integer
platformType
;
@ApiModelProperty
(
value
=
"类型 1 证照到期提醒"
,
example
=
"101"
)
private
Integer
msgType
;
@ApiModelProperty
(
value
=
"状态 0 启用 1 停用"
,
example
=
"101"
)
private
Integer
state
;
@ApiModelProperty
(
value
=
"企业ID 企业ID"
,
example
=
"101"
)
private
Integer
orgCode
;
}
src/main/resources/mapping/admin/AdminMsgTemplateMapper.xml
View file @
906784c3
...
@@ -28,4 +28,26 @@
...
@@ -28,4 +28,26 @@
addtime,
addtime,
org_code
org_code
</sql>
</sql>
<select
id=
"listMsgTemplate"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM admin_msg_template temp
<where>
<if
test=
"params.templateName != null and params.templateName !=''"
>
and temp.template_name like CONCAT('%',#{params.templateName},'%')
</if>
<if
test=
"params.platformType != null"
>
and temp.platform_type = #{params.platformType}
</if>
<if
test=
"params.msgType != null"
>
and temp.msg_type = #{params.msgType}
</if>
<if
test=
"params.state != null"
>
and temp.state = #{params.state}
</if>
<if
test=
"params.orgCode != null"
>
and temp.org_code = #{params.orgCode}
</if>
</where>
</select>
</mapper>
</mapper>
\ No newline at end of file
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