Commit 5e7fa5ba by weiss

1

1 parent b27a6a91
...@@ -25,9 +25,9 @@ public interface PainDao { ...@@ -25,9 +25,9 @@ public interface PainDao {
List<Pain> findListAsc(int limit); List<Pain> findListAsc(int limit);
List<Pain> findBackIndex(@Param(value = "index") Integer index, @Param(value = "limit") int limit); List<Pain> findBackIndex(@Param(value = "pindex") Integer pindex, @Param(value = "limit") int limit);
void deleteAllByFloor(int floor); void deleteAllByFloor(int floor);
List<Pain> findAllByFloor(int floor); List<Pain> findAllByFloor(@Param(value = "floor") int floor);
} }
...@@ -61,8 +61,8 @@ public class PainService { ...@@ -61,8 +61,8 @@ public class PainService {
return painDao.findListAsc(limit); return painDao.findListAsc(limit);
} }
public List<Pain> findBackIndex(Integer index, int limit) { public List<Pain> findBackIndex(Integer pindex, int limit) {
return painDao.findBackIndex(index, limit); return painDao.findBackIndex(pindex, limit);
} }
public void deleteAllByFloor(int floor) { public void deleteAllByFloor(int floor) {
......
...@@ -98,7 +98,8 @@ public class MassageService { ...@@ -98,7 +98,8 @@ public class MassageService {
//更新群消息 //更新群消息
@Async @Async
public void updateMassageMsgCardToPiPiChat(String chatId){ public void updateMassageMsgCardToPiPiChat(String chatId){
List<Pain> pains = painService.findAll(); List<Pain> pains = painService.findAllReorderByFloor(14);
System.out.println(pains);
String messageId = chatMessageService.findListChatAndType(chatId, 1).get(0).getMessageId(); String messageId = chatMessageService.findListChatAndType(chatId, 1).get(0).getMessageId();
List<List<String>> pushUser = new ArrayList<>(); List<List<String>> pushUser = new ArrayList<>();
for(Pain pain:pains){ for(Pain pain:pains){
......
...@@ -33,6 +33,15 @@ ...@@ -33,6 +33,15 @@
</where> </where>
</select> </select>
<select id="findAllByFloor" parameterType="java.lang.Integer" resultMap="PainResultMap">
select
<include refid="Base_Column_List"/>
from t_pain
<where>
floor = #{floor}
</where>
</select>
<select id="findBackIndex" resultMap="PainResultMap"> <select id="findBackIndex" resultMap="PainResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!