Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
zhangshaowu
/
pipi-helper
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b239fabf
authored
Oct 15, 2022
by
zhaolianjie
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
卡片流程 - 下一位
1 parent
4fa5f249
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
5 deletions
src/main/java/com/pipihelper/project/feishu/controller/FeiShuEventController.java
src/main/java/com/pipihelper/project/feishu/dao/PainDao.java
src/main/java/com/pipihelper/project/feishu/service/PainService.java
src/main/resources/mybatis/PainMapper.xml
src/main/java/com/pipihelper/project/feishu/controller/FeiShuEventController.java
View file @
b239fab
package
com
.
pipihelper
.
project
.
feishu
.
controller
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.common.collect.Lists
;
...
...
@@ -133,8 +134,19 @@ public class FeiShuEventController {
return
getInteractiveCardStr
(
fileName1
,
"已经被抢啦啦啦~"
);
}
else
if
(
"next"
.
equals
(
actionTypeSecond
))
{
// 当前按完,有请下一位
String
endUserId
=
feiShuMsgCardEventDTO
.
getOpen_id
();
Pain
oldPain
=
painService
.
findByOpenId
(
endUserId
);
oldPain
.
setStatus
(
2
);
painService
.
update
(
oldPain
);
List
<
Pain
>
painList
=
painService
.
findBackIndex
(
oldPain
.
getIndex
(),
1
);
if
(
CollectionUtil
.
isNotEmpty
(
painList
))
{
Pain
noticePain
=
CollectionUtil
.
getFirst
(
painList
);
noticePain
.
setStatus
(
1
);
painService
.
update
(
noticePain
);
massageService
.
updateSingleMassageMsgCardWhenBegin
(
noticePain
.
getMessageId
());
}
String
fileName1
=
String
.
format
(
"/templates/massage-singel-msg-card-end.json.json"
);
return
getInteractiveCardStr
(
fileName1
,
"欢迎下次光临~"
);
}
default
:
}
...
...
src/main/java/com/pipihelper/project/feishu/dao/PainDao.java
View file @
b239fab
...
...
@@ -25,5 +25,5 @@ public interface PainDao {
List
<
Pain
>
findListAsc
(
int
limit
);
List
<
Pain
>
findBackIndex
(
@Param
(
value
=
"
openId"
)
String
openId
,
@Param
(
value
=
"limit"
)
int
limit
);
List
<
Pain
>
findBackIndex
(
@Param
(
value
=
"
index"
)
Integer
index
,
@Param
(
value
=
"limit"
)
int
limit
);
}
src/main/java/com/pipihelper/project/feishu/service/PainService.java
View file @
b239fab
...
...
@@ -49,7 +49,7 @@ public class PainService {
return
painDao
.
findListAsc
(
limit
);
}
public
List
<
Pain
>
findBackIndex
(
String
openId
,
int
limit
)
{
return
painDao
.
findBackIndex
(
openId
,
limit
);
public
List
<
Pain
>
findBackIndex
(
Integer
index
,
int
limit
)
{
return
painDao
.
findBackIndex
(
index
,
limit
);
}
}
src/main/resources/mybatis/PainMapper.xml
View file @
b239fab
...
...
@@ -36,6 +36,7 @@
from t_pain
<where>
index >= #{index}
and status = 0
order by index asc
limit #{limit}
</where>
...
...
@@ -46,6 +47,7 @@
<include
refid=
"Base_Column_List"
/>
from t_pain
<where>
status = 0
order by index asc
limit #{limit}
</where>
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment