Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
2df0836b
Commit
2df0836b
authored
Jun 01, 2023
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目订单提醒实现
parent
f9764b67
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
437 additions
and
168 deletions
+437
-168
MsgInfo.java
.../main/java/com/yifu/cloud/plus/v1/msg/entity/MsgInfo.java
+65
-25
MesConstants.java
...ava/com/yifu/cloud/plus/v1/msg/constant/MesConstants.java
+22
-0
MsgInfoController.java
.../yifu/cloud/plus/v1/msg/controller/MsgInfoController.java
+52
-25
MsgInfoMapper.java
...java/com/yifu/cloud/plus/v1/msg/mapper/MsgInfoMapper.java
+15
-10
MsgInfoService.java
...va/com/yifu/cloud/plus/v1/msg/service/MsgInfoService.java
+44
-0
MsgService.java
...n/java/com/yifu/cloud/plus/v1/msg/service/MsgService.java
+0
-18
MsgInfoServiceImpl.java
...fu/cloud/plus/v1/msg/service/impl/MsgInfoServiceImpl.java
+121
-0
application.yml
yifu-msg/yifu-msg-biz/src/main/resources/application.yml
+4
-1
MsgInfoMapper.xml
.../yifu-msg-biz/src/main/resources/mapper/MsgInfoMapper.xml
+114
-0
MsgMapper.xml
...-msg/yifu-msg-biz/src/main/resources/mapper/MsgMapper.xml
+0
-89
No files found.
yifu-msg/yifu-msg-api/src/main/java/com/yifu/cloud/plus/v1/msg/entity/MsgInfo.java
View file @
2df0836b
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
msg
.
entity
;
import
cn.hutool.core.date.DateTime
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.HeadFontStyle
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.hibernate.validator.constraints.Length
;
/**
* @Author fxj
* @Date 2023/5/30
* @Description
* @Version 1.0
* @author fxj
* @date 2023-06-01 10:41:25
*/
@Data
@TableName
(
"msg_info"
)
@EqualsAndHashCode
()
@Schema
(
description
=
"EKP消息提醒"
)
public
class
MsgInfo
{
@EqualsAndHashCode
(
callSuper
=
true
)
@Schema
(
description
=
"EKP 消息提醒"
)
public
class
MsgInfo
extends
BaseEntity
{
/**
* id
*
*
/
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ExcelProperty
(
"id"
)
@Schema
(
description
=
"id"
)
private
String
id
;
/**
*
创建时间
*
*/
private
DateTime
createTime
;
/**
* 订单ID
**/
*
orderId
*/
@ExcelAttribute
(
name
=
"orderId"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"orderId不能超过50个字符"
)
@ExcelProperty
(
"orderId"
)
@Schema
(
description
=
"orderId"
)
private
String
orderId
;
/**
* url
**/
* 订单号
*/
@ExcelAttribute
(
name
=
"订单号"
,
maxLength
=
200
)
@Length
(
max
=
200
,
message
=
"订单号不能超过200个字符"
)
@ExcelProperty
(
"订单号"
)
@Schema
(
description
=
"订单号"
)
private
String
url
;
/**
* 订单号
**/
* 提交人
*/
@ExcelAttribute
(
name
=
"提交人"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"提交人不能超过50个字符"
)
@ExcelProperty
(
"提交人"
)
@Schema
(
description
=
"提交人"
)
private
String
orderNo
;
/**
* 通知类型: 0 接单 1 超时 2变更
**/
* 0 接单 1 超时 2变更
*/
@ExcelAttribute
(
name
=
"0 接单 1 超时 2变更"
,
maxLength
=
1
)
@Length
(
max
=
1
,
message
=
"0 接单 1 超时 2变更不能超过1个字符"
)
@ExcelProperty
(
"0 接单 1 超时 2变更"
)
@Schema
(
description
=
"0 接单 1 超时 2变更"
)
private
String
alertType
;
/**
* 是否已读 0 是 1 否
**/
* 0 未阅 1 已阅
*/
@ExcelAttribute
(
name
=
"0 未阅 1 已阅"
,
maxLength
=
1
)
@Length
(
max
=
1
,
message
=
"0 未阅 1 已阅不能超过1个字符"
)
@ExcelProperty
(
"0 未阅 1 已阅"
)
@Schema
(
description
=
"0 未阅 1 已阅"
)
private
String
read
;
/**
* 通知人
**/
* 提醒人
*/
@ExcelAttribute
(
name
=
"提醒人"
,
maxLength
=
1
)
@Length
(
max
=
1
,
message
=
"提醒人不能超过1个字符"
)
@ExcelProperty
(
"提醒人"
)
@Schema
(
description
=
"提醒人"
)
private
String
alertUser
;
}
yifu-msg/yifu-msg-
api
/src/main/java/com/yifu/cloud/plus/v1/msg/constant/MesConstants.java
→
yifu-msg/yifu-msg-
biz
/src/main/java/com/yifu/cloud/plus/v1/msg/constant/MesConstants.java
View file @
2df0836b
package
com
.
yifu
.
cloud
.
plus
.
v1
.
msg
.
constant
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.context.annotation.PropertySource
;
import
org.springframework.stereotype.Component
;
/**
* @Author fxj
* @Date 2022/6/21
* @Description
* @Version 1.0
*/
@Component
@PropertySource
(
"classpath:application.yml"
)
@ConfigurationProperties
(
value
=
"ekp"
,
ignoreInvalidFields
=
false
)
public
interface
MesConstants
{
/**
* 項目订单URL
**/
String
ORDER_URL_PATH
=
"http://36.7.147.19:28080/sys/modeling/main/modelingAppView.do?method=modelView&listviewId=185943766d6e9ff50d8fea1414eaf460&fdId=
"
;
String
orderUrl
=
"
"
;
}
yifu-msg/yifu-msg-biz/src/main/java/com/yifu/cloud/plus/v1/msg/controller/MsgController.java
→
yifu-msg/yifu-msg-biz/src/main/java/com/yifu/cloud/plus/v1/msg/controller/Msg
Info
Controller.java
View file @
2df0836b
...
...
@@ -17,48 +17,75 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
msg
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yifu.cloud.plus.v1.msg.service.MsgService
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.msg.entity.MsgInfo
;
import
com.yifu.cloud.plus.v1.msg.service.MsgInfoService
;
import
com.yifu.cloud.plus.v1.msg.vo.EkpAlertVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.GetMapping
;
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
java.io.UnsupportedEncodingException
;
import
java.net.URLDecoder
;
import
java.util.List
;
/**
* @Author fxj
* @Description EKP 消息生成及查询
* @Date 16:21 2023/5/30
* @Param
* @return
**/
*
*
* @author fxj
* @date 2023-06-01 10:41:25
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/m
ail
"
)
@RequestMapping
(
"/m
sg
"
)
@Tag
(
name
=
"消息生成及查询"
)
public
class
MsgController
{
private
MsgService
msgService
;
public
class
MsgInfoController
{
private
final
MsgInfoService
msgInfoService
;
/**
* 简单分页查询
* @param page 分页对象
* @param msgInfo
* @return
*/
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
MsgInfo
>>
getMsgInfoPage
(
Page
<
MsgInfo
>
page
,
MsgInfo
msgInfo
)
{
return
new
R
<>(
msgInfoService
.
getMsgInfoPage
(
page
,
msgInfo
));
}
/**
* @Author fxj
* @Description 触发消息提醒--EKP调用接口
* @Date 10:52 2023/6/1
* @Param
* @return
**/
@Operation
(
summary
=
"触发消息提醒--EKP调用接口"
,
description
=
"触发消息提醒--EKP调用接口"
)
@SysLog
(
"触发消息提醒--EKP调用接口"
)
@PostMapping
(
"/createMsg"
)
public
R
<
Boolean
>
createMsg
(
@RequestBody
String
jsonStr
)
{
try
{
jsonStr
=
URLDecoder
.
decode
(
jsonStr
,
CommonConstants
.
UTF8
).
replace
(
"="
,
""
);
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
}
List
<
EkpAlertVo
>
list
=
JSONObject
.
parseArray
(
jsonStr
,
EkpAlertVo
.
class
);
return
msgService
.
createMsg
(
list
);
public
R
<
Boolean
>
createMsg
(
EkpAlertVo
vo
)
{
return
msgInfoService
.
createMsg
(
vo
);
}
/**
* @Author fxj
* @Description 每29分钟刷新 超时待办提醒
* @Date 20:05 2023/5/30
* @Param
* @return
**/
@Operation
(
summary
=
"每29分钟刷新 超时待办提醒"
,
description
=
"每29分钟刷新 超时待办提醒"
)
@Inner
@PostMapping
(
"/inner/updateOverTimeMsg"
)
public
void
everyMonthUpdateSalaryStatus
()
{
msgInfoService
.
updateOverTimeMsg
();
}
}
yifu-msg/yifu-msg-biz/src/main/java/com/yifu/cloud/plus/v1/msg/mapper/MsgMapper.java
→
yifu-msg/yifu-msg-biz/src/main/java/com/yifu/cloud/plus/v1/msg/mapper/Msg
Info
Mapper.java
View file @
2df0836b
...
...
@@ -21,22 +21,27 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.msg.entity.MsgInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* @Author fxj
* @Description EKP 消息表
* @Date 16:20 2023/5/30
* @Param
* @return
**/
*
*
* @author fxj
* @date 2023-06-01 10:41:25
*/
@Mapper
public
interface
MsgMapper
extends
BaseMapper
<
MsgInfo
>
{
IPage
<
MsgInfo
>
getmsgInfoPage
(
Page
<
MsgInfo
>
page
,
@Param
(
"msgInfo"
)
MsgInfo
msgInfo
);
public
interface
MsgInfoMapper
extends
BaseMapper
<
MsgInfo
>
{
/**
* 简单分页查询
* @param msgInfo
* @return
*/
IPage
<
MsgInfo
>
getMsgInfoPage
(
Page
<
MsgInfo
>
page
,
@Param
(
"msgInfo"
)
MsgInfo
msgInfo
);
/*MsgInfo getMsgByOrderId(@Param("orderId")String orderId);
MsgInfo
getMsgByOrderId
(
@Param
(
"orderId"
)
String
orderId
);
List<MsgInfo> getMsgByTask();*/
}
yifu-msg/yifu-msg-biz/src/main/java/com/yifu/cloud/plus/v1/msg/service/MsgInfoService.java
0 → 100644
View file @
2df0836b
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
msg
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.msg.entity.MsgInfo
;
import
com.yifu.cloud.plus.v1.msg.vo.EkpAlertVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
/**
*
*
* @author fxj
* @date 2023-06-01 10:41:25
*/
public
interface
MsgInfoService
extends
IService
<
MsgInfo
>
{
/**
* 简单分页查询
* @param msgInfo
* @return
*/
IPage
<
MsgInfo
>
getMsgInfoPage
(
Page
<
MsgInfo
>
page
,
MsgInfo
msgInfo
);
R
<
Boolean
>
createMsg
(
EkpAlertVo
vo
);
void
updateOverTimeMsg
();
}
yifu-msg/yifu-msg-biz/src/main/java/com/yifu/cloud/plus/v1/msg/service/MsgService.java
deleted
100644 → 0
View file @
f9764b67
package
com
.
yifu
.
cloud
.
plus
.
v1
.
msg
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.msg.entity.MsgInfo
;
import
com.yifu.cloud.plus.v1.msg.vo.EkpAlertVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
java.util.List
;
/**
* @Author fxj
* @Date 2023/5/30
* @Description
* @Version 1.0
*/
public
interface
MsgService
extends
IService
<
MsgInfo
>
{
R
<
Boolean
>
createMsg
(
List
<
EkpAlertVo
>
list
);
}
yifu-msg/yifu-msg-biz/src/main/java/com/yifu/cloud/plus/v1/msg/service/impl/MsgImpl.java
→
yifu-msg/yifu-msg-biz/src/main/java/com/yifu/cloud/plus/v1/msg/service/impl/MsgI
nfoServiceI
mpl.java
View file @
2df0836b
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
msg
.
service
.
impl
;
import
cn.hutool.core.date.DateTime
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.msg.constant.MesConstants
;
import
com.yifu.cloud.plus.v1.msg.entity.MsgInfo
;
import
com.yifu.cloud.plus.v1.msg.mapper.MsgMapper
;
import
com.yifu.cloud.plus.v1.msg.service.MsgService
;
import
com.yifu.cloud.plus.v1.msg.mapper.Msg
Info
Mapper
;
import
com.yifu.cloud.plus.v1.msg.service.Msg
Info
Service
;
import
com.yifu.cloud.plus.v1.msg.vo.EkpAlertVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
lombok.
RequiredArgsConstructor
;
import
lombok.
extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
*
@Author fxj
*
@Date 2023/5/30
* @
Description
* @
Version 1.0
*
*
* @
author fxj
* @
date 2023-06-01 10:41:25
*/
@
RequiredArgsConstructor
@
Log4j2
@Service
public
class
MsgImpl
extends
ServiceImpl
<
MsgMapper
,
MsgInfo
>
implements
MsgService
{
public
class
MsgInfoServiceImpl
extends
ServiceImpl
<
MsgInfoMapper
,
MsgInfo
>
implements
MsgInfoService
{
/**
* 简单分页查询
* @param msgInfo
* @return
*/
@Override
public
IPage
<
MsgInfo
>
getMsgInfoPage
(
Page
<
MsgInfo
>
page
,
MsgInfo
msgInfo
){
return
baseMapper
.
getMsgInfoPage
(
page
,
msgInfo
);
}
/**
* @Author fxj
* @Description 生成 待办 变更 提醒数据
* @Date 19:36 2023/5/30
* @Param
* @return
**/
@Override
public
R
<
Boolean
>
createMsg
(
List
<
EkpAlertVo
>
list
)
{
if
(
Common
.
isNotNull
(
list
)){
EkpAlertVo
vo
=
list
.
get
(
CommonConstants
.
ZERO_INT
);
public
R
<
Boolean
>
createMsg
(
EkpAlertVo
vo
)
{
if
(
Common
.
isNotNull
(
vo
)){
if
(
Common
.
isEmpty
(
vo
.
getItem
())
||
Common
.
isEmpty
(
vo
.
getType
())
||
Common
.
isEmpty
(
vo
.
getOrderId
())
...
...
@@ -39,27 +74,48 @@ public class MsgImpl extends ServiceImpl<MsgMapper, MsgInfo> implements MsgServi
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
vo
.
getItem
())){
// 接单提醒
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
vo
.
getType
())){
save
=
baseMapper
.
getMsgByOrderId
(
vo
.
getOrderId
());
//
save = baseMapper.getMsgByOrderId(vo.getOrderId());
if
(
Common
.
isNotNull
(
save
)){
save
.
setCreateTime
(
DateTime
.
now
());
save
.
setUrl
(
MesConstants
.
ORDER_URL_PATH
+
vo
.
getOrderId
());
save
.
setCreateTime
(
Local
DateTime
.
now
());
save
.
setUrl
(
MesConstants
.
orderUrl
+
vo
.
getOrderId
());
baseMapper
.
insert
(
save
);
}
}
// 变更提醒
if
(
CommonConstants
.
TWO_STRING
.
equals
(
vo
.
getType
())){
save
=
baseMapper
.
getMsgByOrderId
(
vo
.
getOrderId
());
//
save = baseMapper.getMsgByOrderId(vo.getOrderId());
if
(
Common
.
isNotNull
(
save
)){
save
.
setCreateTime
(
DateTime
.
now
());
save
.
setUrl
(
MesConstants
.
ORDER_URL_PATH
+
save
.
getOrderId
());
save
.
setCreateTime
(
Local
DateTime
.
now
());
save
.
setUrl
(
MesConstants
.
orderUrl
+
save
.
getOrderId
());
save
.
setAlertType
(
CommonConstants
.
TWO_STRING
);
baseMapper
.
insert
(
save
);
}
}
}
return
R
.
ok
();
}
else
{
return
R
.
failed
(
CommonConstants
.
PARAM_INFO_ERROR
);
}
return
null
;
}
/**
* @Author fxj
* @Description 定时刷新待办任务
* @Date 20:07 2023/5/30
* @Param
* @return
**/
@Override
public
void
updateOverTimeMsg
()
{
List
<
MsgInfo
>
msgInfos
=
null
;
//= baseMapper.getMsgByTask();
if
(
Common
.
isNotNull
(
msgInfos
)){
//1.先删除
baseMapper
.
delete
(
Wrappers
.<
MsgInfo
>
query
().
lambda
().
eq
(
MsgInfo:
:
getAlertType
,
CommonConstants
.
ONE_STRING
));
//2. 重新生成
for
(
MsgInfo
ms:
msgInfos
){
ms
.
setCreateTime
(
LocalDateTime
.
now
());
ms
.
setUrl
(
MesConstants
.
orderUrl
+
ms
.
getOrderId
());
}
this
.
saveBatch
(
msgInfos
);
}
}
}
yifu-msg/yifu-msg-biz/src/main/resources/application.yml
View file @
2df0836b
...
...
@@ -62,4 +62,7 @@ springdoc:
#分组名
-
group
:
mail
#按包路径匹配
packagesToScan
:
com.yifu.cloud.plus.v1.msg.controller
\ No newline at end of file
packagesToScan
:
com.yifu.cloud.plus.v1.msg.controller
ekp
:
orderUrl
:
http://36.7.147.19:28080/sys/modeling/main/modelingAppView.do?method=modelView&listviewId=185943766d6e9ff50d8fea1414eaf460&fdId=
\ No newline at end of file
yifu-msg/yifu-msg-biz/src/main/resources/mapper/MsgInfoMapper.xml
0 → 100644
View file @
2df0836b
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.msg.mapper.MsgInfoMapper"
>
<resultMap
id=
"msgInfoMap"
type=
"com.yifu.cloud.plus.v1.msg.entity.MsgInfo"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"orderId"
column=
"ORDER_ID"
/>
<result
property=
"url"
column=
"URL"
/>
<result
property=
"orderNo"
column=
"ORDER_NO"
/>
<result
property=
"alertType"
column=
"ALERT_TYPE"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"read"
column=
"READ"
/>
<result
property=
"alertUser"
column=
"ALERT_USER"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
a.ORDER_ID,
a.URL,
a.ORDER_NO,
a.ALERT_TYPE,
a.CREATE_TIME,
a.READ,
a.ALERT_USER
</sql>
<sql
id=
"msgInfo_where"
>
<if
test=
"msgInfo != null"
>
<if
test=
"msgInfo.id != null and msgInfo.id.trim() != ''"
>
AND a.ID = #{msgInfo.id}
</if>
<if
test=
"msgInfo.orderId != null and msgInfo.orderId.trim() != ''"
>
AND a.ORDER_ID = #{msgInfo.orderId}
</if>
<if
test=
"msgInfo.url != null and msgInfo.url.trim() != ''"
>
AND a.URL = #{msgInfo.url}
</if>
<if
test=
"msgInfo.orderNo != null and msgInfo.orderNo.trim() != ''"
>
AND a.ORDER_NO = #{msgInfo.orderNo}
</if>
<if
test=
"msgInfo.alertType != null and msgInfo.alertType.trim() != ''"
>
AND a.ALERT_TYPE = #{msgInfo.alertType}
</if>
<if
test=
"msgInfo.createTime != null"
>
AND a.CREATE_TIME = #{msgInfo.createTime}
</if>
<if
test=
"msgInfo.read != null and msgInfo.read.trim() != ''"
>
AND a.READ = #{msgInfo.read}
</if>
<if
test=
"msgInfo.alertUser != null and msgInfo.alertUser.trim() != ''"
>
AND a.ALERT_USER = #{msgInfo.alertUser}
</if>
</if>
</sql>
<!--msgInfo简单分页查询-->
<select
id=
"getMsgInfoPage"
resultMap=
"msgInfoMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM msg_info a
<where>
1=1
<include
refid=
"msgInfo_where"
/>
</where>
</select>
<!--
<select id="getMsgByOrderId" resultType="com.yifu.cloud.plus.v1.msg.entity.MsgInfo">
SELECT
p.fd_name alertUser,
a.fd_3ac901c5184274 orderNo,
a.fd_id orderId,
'0' as alertType
FROM
ekp_ea33075576149bb8a4f5 a
LEFT JOIN sys_org_element p on a.fd_3b0aff6781fa86 = p.fd_id
WHERE
a.ORDER_ID = #{orderId} limit 1
</select>
<select id="getMsgByTask" resultType="com.yifu.cloud.plus.v1.msg.entity.MsgInfo">
select
o.fd_name alertUser,
b1.fd_3ac901c5184274 orderNo,
b1.fd_id orderId,
'1' as alertType
FROM lbpm_workitem a
LEFT JOIN lbpm_node e on e.fd_id= a.fd_node_id
LEFT JOIN lbpm_process p on p.fd_id=e.fd_process_id
LEFT JOIN ekp_ea33075576149bb8a4f5 b1 on p.fd_model_id=b1.fd_id
LEFT JOIN sys_org_element o on o.fd_id=fd_expected_id
where
e.fd_fact_node_id='N5' and b1.fd_id is not null;
and DATE_ADD(NOW(),INTERVAL 30 MINUTE) > IF(b1.fd_3b779ba2168eea=1,DATE_ADD(a.fd_start_date,INTERVAL 3 HOUR),IF(b1.fd_3b779ba2168eea=4,DATE_ADD(a.fd_start_date,INTERVAL 5 HOUR),DATE_ADD(a.fd_start_date,INTERVAL 8 HOUR)))
</select>-->
</mapper>
yifu-msg/yifu-msg-biz/src/main/resources/mapper/MsgMapper.xml
deleted
100644 → 0
View file @
f9764b67
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.msg.mapper.MsgMapper"
>
<resultMap
id=
"msgInfoMap"
type=
"com.yifu.cloud.plus.v1.msg.entity.MsgInfo"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"orderId"
column=
"ORDER_ID"
/>
<result
property=
"url"
column=
"URL"
/>
<result
property=
"orderNo"
column=
"ORDER_NO"
/>
<result
property=
"alertType"
column=
"ALERT_TYPE"
/>
<result
property=
"read"
column=
"READ"
/>
<result
property=
"alertUser"
column=
"ALERT_USER"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
a.CREATE_TIME,
a.ORDER_ID,
a.URL,
a.ORDER_NO,
a.ALERT_TYPE,
a.READ,
a.ALERT_USER
</sql>
<sql
id=
"msgInfo_where"
>
<if
test=
"msgInfo != null"
>
<if
test=
"msgInfo.id != null and msgInfo.id.trim() != ''"
>
AND a.ID = #{msgInfo.id}
</if>
<if
test=
"msgInfo.orderId != null and msgInfo.orderId.trim() != ''"
>
AND a.ORDER_ID = #{msgInfo.orderId}
</if>
<if
test=
"msgInfo.alertType != null and msgInfo.alertType.trim() != ''"
>
AND a.ALERT_TYPE = #{msgInfo.alertType}
</if>
<if
test=
"msgInfo.read != null and msgInfo.read.trim() != ''"
>
AND a.READ = #{msgInfo.read}
</if>
<if
test=
"msgInfo.alertUser != null and msgInfo.alertUser.trim() != ''"
>
AND a.ALERT_USER = #{msgInfo.alertUser}
</if>
</if>
</sql>
<!--msgInfo简单分页查询-->
<select
id=
"getmsgInfoPage"
resultMap=
"msgInfoMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM msg_info a
<where>
1=1
<include
refid=
"msgInfo_where"
/>
</where>
order by a.CREATE_TIME desc
</select>
<select
id=
"getMsgByOrderId"
resultType=
"com.yifu.cloud.plus.v1.msg.entity.MsgInfo"
>
SELECT
p.fd_name alertUser,
a.fd_3ac901c5184274 orderNo,
a.fd_id orderId,
'0' as alertType
FROM
ekp_ea33075576149bb8a4f5 a
LEFT JOIN sys_org_element p on a.fd_3b0aff6781fa86 = p.fd_id
WHERE
a.ORDER_ID = #{orderId} limit 1
</select>
</mapper>
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