浏览代码

优化项目bug

Simon 1 年之前
父节点
当前提交
cda884627f

+ 15 - 11
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TDataDisplayController.java

@@ -243,17 +243,21 @@ public class TDataDisplayController extends BaseController {
     public AjaxResult alarmList(DataAlarmListDto dataAlarmListDto) {
         List<DataAlarmListDto> list = tShouhuanAlarmListService.selectTShouhuanAlarmList(dataAlarmListDto);
         List<MessageAlarmListDto> messageAlarmListDtoList = new ArrayList<>();
-        for (DataAlarmListDto dto : list) {
-            MessageAlarmListDto alarmListDto = new MessageAlarmListDto();
-            alarmListDto.setName(dto.getName());
-            alarmListDto.setAlarm_msg(tDeviceListService.checkMessage(dto.getAlarm_type()));
-            alarmListDto.setTelno(dto.getTel_one());
-            alarmListDto.setGps_long(dto.getGps_long());
-            alarmListDto.setGps_lat(dto.getGps_lat());
-            alarmListDto.setAddress(getCounterLocation(dto.getGps_long() + "," + dto.getGps_lat()));
-            alarmListDto.setAlarm_type(dto.getAlarm_type());
-            alarmListDto.setCreatetime(dto.getCreatetime());
-            messageAlarmListDtoList.add(alarmListDto);
+        if (list != null && !list.isEmpty()) {
+            messageAlarmListDtoList = list.stream().map(
+                    mapper -> {
+                        MessageAlarmListDto alarmListDto = new MessageAlarmListDto();
+                        alarmListDto.setName(mapper.getName());
+                        alarmListDto.setAlarm_msg(tDeviceListService.checkMessage(mapper.getAlarm_type()));
+                        alarmListDto.setTelno(mapper.getTel_one());
+                        alarmListDto.setGps_long(mapper.getGps_long());
+                        alarmListDto.setGps_lat(mapper.getGps_lat());
+                        alarmListDto.setAddress(getCounterLocation(mapper.getGps_long() + "," + mapper.getGps_lat()));
+                        alarmListDto.setAlarm_type(mapper.getAlarm_type());
+                        alarmListDto.setCreatetime(mapper.getCreatetime());
+                        return alarmListDto;
+                    }
+            ).collect(Collectors.toList());
         }
         return success(messageAlarmListDtoList);
     }

+ 13 - 20
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TFallSolveController.java

@@ -31,14 +31,13 @@ import com.ruoyi.common.core.page.TableDataInfo;
 
 /**
  * 跌倒告警Controller
- * 
+ *
  * @author zhengjie
  * @date 2023-09-09
  */
 @RestController
 @RequestMapping("/system/fallsolve")
-public class TFallSolveController extends BaseController
-{
+public class TFallSolveController extends BaseController {
     @Autowired
     private ITFallSolveService tFallSolveService;
 
@@ -47,17 +46,16 @@ public class TFallSolveController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('system:fallsolve:list')")
     @GetMapping("/list")
-    public TableDataInfo list(TFallSolve tFallSolve)
-    {
+    public TableDataInfo list(TFallSolve tFallSolve) {
         startPage();
         List<TFallSolve> list = tFallSolveService.selectTFallSolveList(tFallSolve);
-        for (TFallSolve salve : list){
-            if (StringUtils.isNull(salve.getSolve_status())){
+        for (TFallSolve salve : list) {
+            if (StringUtils.isNull(salve.getSolve_status())) {
                 salve.setSolve_status(0);
             }
-            salve.setAlarmMsg("跌倒告警求助:" + salve.getName() + "于" + DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,salve.getCreatetime()) + "发起跌倒告警求助");
+            salve.setAlarmMsg("跌倒告警求助:" + salve.getName() + "于" + DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, salve.getCreatetime()) + "发起跌倒告警求助");
         }
-        List<TFallSolve> collect=list.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(()->new TreeSet<TFallSolve>(Comparator.comparing(TFallSolve::getAid))), ArrayList::new));
+        List<TFallSolve> collect = list.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<TFallSolve>(Comparator.comparing(TFallSolve::getAid))), ArrayList::new));
         return getDataTable(collect);
     }
 
@@ -67,8 +65,7 @@ public class TFallSolveController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:fallsolve:export')")
     @Log(title = "跌倒告警", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, TFallSolve tFallSolve)
-    {
+    public void export(HttpServletResponse response, TFallSolve tFallSolve) {
         List<TFallSolve> list = tFallSolveService.selectTFallSolveList(tFallSolve);
         ExcelUtil<TFallSolve> util = new ExcelUtil<TFallSolve>(TFallSolve.class);
         util.exportExcel(response, list, "跌倒告警数据");
@@ -79,8 +76,7 @@ public class TFallSolveController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('system:fallsolve:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Integer id)
-    {
+    public AjaxResult getInfo(@PathVariable("id") Integer id) {
         return success(tFallSolveService.selectTFallSolveById(id));
     }
 
@@ -90,8 +86,7 @@ public class TFallSolveController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:fallsolve:add')")
     @Log(title = "跌倒告警", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody TFallSolve tFallSolve)
-    {
+    public AjaxResult add(@RequestBody TFallSolve tFallSolve) {
         return toAjax(tFallSolveService.insertTFallSolve(tFallSolve));
     }
 
@@ -101,8 +96,7 @@ public class TFallSolveController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:fallsolve:edit')")
     @Log(title = "跌倒告警", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody TFallSolve tFallSolve)
-    {
+    public AjaxResult edit(@RequestBody TFallSolve tFallSolve) {
         return toAjax(tFallSolveService.updateTFallSolve(tFallSolve));
     }
 
@@ -111,9 +105,8 @@ public class TFallSolveController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('system:fallsolve:remove')")
     @Log(title = "跌倒告警", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Integer[] ids)
-    {
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Integer[] ids) {
         return toAjax(tFallSolveService.deleteTFallSolveByIds(ids));
     }
 }

+ 4 - 4
ruoyi-admin/src/main/resources/application-test.yml

@@ -9,9 +9,9 @@ spring:
         druid:
             # 主库数据源
             master:
-                url: jdbc:mysql://192.168.56.10/yyky?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                username: root
-                password: root
+                url: jdbc:mysql://43.138.30.29:3306/yyky?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: yyky
+                password: yiyikangyang
             # 从库数据源
             slave:
                 # 从数据源开关/默认关闭
@@ -74,7 +74,7 @@ spring:
         # 密码
         password: redis
         # 连接超时时间
-        timeout: 10s
+        timeout: 1440s
         lettuce:
             pool:
                 # 连接池中的最小空闲连接

+ 2 - 8
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TFacilityMapper.java

@@ -59,14 +59,6 @@ public interface TFacilityMapper {
      */
     public int updateTFacility(TFacility tFacility);
 
-    /**
-     * 修改手环设备
-     *
-     * @param tFacility 手环设备
-     * @return 结果
-     */
-    public int updateTFacilityByDeviceCode(TFacility tFacility);
-
     /**
      * 删除手环设备
      *
@@ -82,4 +74,6 @@ public interface TFacilityMapper {
      * @return 结果
      */
     public int deleteTFacilityByIds(Long[] ids);
+
+    public int deleteTFacilityByCode(String deviceCode);
 }

+ 10 - 10
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TFallSolveMapper.java

@@ -1,19 +1,19 @@
 package com.ruoyi.system.mapper;
 
 import java.util.List;
+
 import com.ruoyi.system.domain.TFallSolve;
 
 /**
  * 跌倒告警Mapper接口
- * 
+ *
  * @author zhengjie
  * @date 2023-09-09
  */
-public interface TFallSolveMapper 
-{
+public interface TFallSolveMapper {
     /**
      * 查询跌倒告警
-     * 
+     *
      * @param id 跌倒告警主键
      * @return 跌倒告警
      */
@@ -25,11 +25,11 @@ public interface TFallSolveMapper
      * @param aid 跌倒告警主键
      * @return 跌倒告警
      */
-    public TFallSolve selectTFallSolveByAid(Integer aid);
+    public List<TFallSolve> selectTFallSolveByAid(Integer aid);
 
     /**
      * 查询跌倒告警列表
-     * 
+     *
      * @param tFallSolve 跌倒告警
      * @return 跌倒告警集合
      */
@@ -37,7 +37,7 @@ public interface TFallSolveMapper
 
     /**
      * 新增跌倒告警
-     * 
+     *
      * @param tFallSolve 跌倒告警
      * @return 结果
      */
@@ -45,7 +45,7 @@ public interface TFallSolveMapper
 
     /**
      * 修改跌倒告警
-     * 
+     *
      * @param tFallSolve 跌倒告警
      * @return 结果
      */
@@ -53,7 +53,7 @@ public interface TFallSolveMapper
 
     /**
      * 删除跌倒告警
-     * 
+     *
      * @param id 跌倒告警主键
      * @return 结果
      */
@@ -61,7 +61,7 @@ public interface TFallSolveMapper
 
     /**
      * 批量删除跌倒告警
-     * 
+     *
      * @param ids 需要删除的数据主键集合
      * @return 结果
      */

+ 10 - 10
ruoyi-system/src/main/java/com/ruoyi/system/service/ITFallSolveService.java

@@ -1,19 +1,19 @@
 package com.ruoyi.system.service;
 
 import java.util.List;
+
 import com.ruoyi.system.domain.TFallSolve;
 
 /**
  * 跌倒告警Service接口
- * 
+ *
  * @author zhengjie
  * @date 2023-09-09
  */
-public interface ITFallSolveService 
-{
+public interface ITFallSolveService {
     /**
      * 查询跌倒告警
-     * 
+     *
      * @param id 跌倒告警主键
      * @return 跌倒告警
      */
@@ -25,11 +25,11 @@ public interface ITFallSolveService
      * @param aid 跌倒告警主键
      * @return 跌倒告警
      */
-    public TFallSolve selectTFallSolveByAid(Integer aid);
+    public List<TFallSolve> selectTFallSolveByAid(Integer aid);
 
     /**
      * 查询跌倒告警列表
-     * 
+     *
      * @param tFallSolve 跌倒告警
      * @return 跌倒告警集合
      */
@@ -37,7 +37,7 @@ public interface ITFallSolveService
 
     /**
      * 新增跌倒告警
-     * 
+     *
      * @param tFallSolve 跌倒告警
      * @return 结果
      */
@@ -45,7 +45,7 @@ public interface ITFallSolveService
 
     /**
      * 修改跌倒告警
-     * 
+     *
      * @param tFallSolve 跌倒告警
      * @return 结果
      */
@@ -53,7 +53,7 @@ public interface ITFallSolveService
 
     /**
      * 批量删除跌倒告警
-     * 
+     *
      * @param ids 需要删除的跌倒告警主键集合
      * @return 结果
      */
@@ -61,7 +61,7 @@ public interface ITFallSolveService
 
     /**
      * 删除跌倒告警信息
-     * 
+     *
      * @param id 跌倒告警主键
      * @return 结果
      */

+ 2 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TDeviceListServiceImpl.java

@@ -254,7 +254,8 @@ public class TDeviceListServiceImpl implements ITDeviceListService {
         if (tDeviceList.getSerialNumber() != null && !StringUtils.isEmpty(tDeviceList.getSerialNumber())) {
             tFacility.setIccid(tDeviceList.getSerialNumber());
         }
-        tFacilityMapper.updateTFacilityByDeviceCode(tFacility);
+        tFacilityMapper.deleteTFacilityByCode(tFacility.getCode());
+        tFacilityMapper.insertTFacility(tFacility);
         return rows;
     }
 

+ 22 - 25
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TFallSolveServiceImpl.java

@@ -1,6 +1,7 @@
 package com.ruoyi.system.service.impl;
 
 import java.util.List;
+
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -11,95 +12,91 @@ import com.ruoyi.system.service.ITFallSolveService;
 
 /**
  * 跌倒告警Service业务层处理
- * 
+ *
  * @author zhengjie
  * @date 2023-09-09
  */
 @Service
-public class TFallSolveServiceImpl implements ITFallSolveService 
-{
+public class TFallSolveServiceImpl implements ITFallSolveService {
     @Autowired
     private TFallSolveMapper tFallSolveMapper;
 
     /**
      * 查询跌倒告警
-     * 
+     *
      * @param id 跌倒告警主键
      * @return 跌倒告警
      */
     @Override
-    public TFallSolve selectTFallSolveById(Integer id)
-    {
+    public TFallSolve selectTFallSolveById(Integer id) {
         return tFallSolveMapper.selectTFallSolveById(id);
     }
 
     @Override
-    public TFallSolve selectTFallSolveByAid(Integer aid) {
+    public List<TFallSolve> selectTFallSolveByAid(Integer aid) {
         return tFallSolveMapper.selectTFallSolveByAid(aid);
     }
 
     /**
      * 查询跌倒告警列表
-     * 
+     *
      * @param tFallSolve 跌倒告警
      * @return 跌倒告警
      */
     @Override
-    public List<TFallSolve> selectTFallSolveList(TFallSolve tFallSolve)
-    {
+    public List<TFallSolve> selectTFallSolveList(TFallSolve tFallSolve) {
         return tFallSolveMapper.selectTFallSolveList(tFallSolve);
     }
 
     /**
      * 新增跌倒告警
-     * 
+     *
      * @param tFallSolve 跌倒告警
      * @return 结果
      */
     @Override
-    public int insertTFallSolve(TFallSolve tFallSolve)
-    {
-        if (StringUtils.isNull(this.selectTFallSolveByAid(tFallSolve.getAid()))){
+    public int insertTFallSolve(TFallSolve tFallSolve) {
+        //TODO 还有问题
+        List<TFallSolve> tFallSolves = this.selectTFallSolveByAid(tFallSolve.getAid());
+        if (tFallSolves != null && !tFallSolves.isEmpty()) {
+            tFallSolve.setUpdateTime(DateUtils.getNowDate());
+            return tFallSolveMapper.updateTFallSolve(tFallSolve);
+        } else {
             tFallSolve.setCreateTime(DateUtils.getNowDate());
             return tFallSolveMapper.insertTFallSolve(tFallSolve);
-        }else{
-            return tFallSolveMapper.updateTFallSolve(tFallSolve);
         }
     }
 
     /**
      * 修改跌倒告警
-     * 
+     *
      * @param tFallSolve 跌倒告警
      * @return 结果
      */
     @Override
-    public int updateTFallSolve(TFallSolve tFallSolve)
-    {
+    public int updateTFallSolve(TFallSolve tFallSolve) {
         return tFallSolveMapper.updateTFallSolve(tFallSolve);
     }
 
     /**
      * 批量删除跌倒告警
-     * 
+     *
      * @param ids 需要删除的跌倒告警主键
      * @return 结果
      */
     @Override
-    public int deleteTFallSolveByIds(Integer[] ids)
-    {
+    public int deleteTFallSolveByIds(Integer[] ids) {
         return tFallSolveMapper.deleteTFallSolveByIds(ids);
     }
 
     /**
      * 删除跌倒告警信息
-     * 
+     *
      * @param id 跌倒告警主键
      * @return 结果
      */
     @Override
-    public int deleteTFallSolveById(Integer id)
-    {
+    public int deleteTFallSolveById(Integer id) {
         return tFallSolveMapper.deleteTFallSolveById(id);
     }
 }

+ 3 - 13
ruoyi-system/src/main/resources/mapper/system/TFacilityMapper.xml

@@ -85,19 +85,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </trim>
         where id = #{id}
     </update>
-    <update id="updateTFacilityByDeviceCode" parameterType="TFacility">
-        update t_facility
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="kind != null">kind = #{kind},</if>
-            <if test="telno != null">telno = #{telno},</if>
-            <if test="comCode != null">com_code = #{comCode},</if>
-            <if test="createTime != null">createtime = #{createTime},</if>
-            <if test="status != null">status = #{status},</if>
-            <if test="iccid != null">iccid = #{iccid},</if>
-            <if test="puk != null">puk = #{puk},</if>
-        </trim>
-        where code = #{code}
-    </update>
 
     <delete id="deleteTFacilityById" parameterType="Long">
         delete from t_facility where id = #{id}
@@ -109,4 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </delete>
+    <delete id="deleteTFacilityByCode" parameterType="String">
+        delete from t_facility where `code` = #{deviceCode}
+    </delete>
 </mapper>

+ 45 - 32
ruoyi-system/src/main/resources/mapper/system/TFallSolveMapper.xml

@@ -1,54 +1,65 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.system.mapper.TFallSolveMapper">
-    
+
     <resultMap type="TFallSolve" id="TFallSolveResult">
-        <result property="id"    column="id"    />
-        <result property="aid"    column="aid"    />
-        <result property="uid"    column="uid"    />
-        <result property="userid"    column="userid"    />
-        <result property="deviceIdCode"    column="device_id_code"    />
-        <result property="alarmMsg"    column="alarm_msg"    />
-        <result property="solve_status"    column="solve_status"    />
-        <result property="serviceUserid"    column="service_userid"    />
-        <result property="msg"    column="msg"    />
-        <result property="createtime"    column="createtime"    />
-        <result property="name"    column="name"    />
-        <result property="tel_one"    column="tel_one"    />
-        <result property="device_model"    column="device_model"    />
-        <result property="device_id_code"    column="device_id_code"    />
-        <result property="alarm_type"    column="alarm_type"    />
-        <result property="address_desc"    column="address_desc"    />
-        <result property="store_name"    column="store_name"    />
-        <result property="gps_long"    column="gps_long"    />
-        <result property="gps_lat"    column="gps_lat"    />
+        <result property="id" column="id"/>
+        <result property="aid" column="aid"/>
+        <result property="uid" column="uid"/>
+        <result property="userid" column="userid"/>
+        <result property="deviceIdCode" column="device_id_code"/>
+        <result property="alarmMsg" column="alarm_msg"/>
+        <result property="solve_status" column="solve_status"/>
+        <result property="serviceUserid" column="service_userid"/>
+        <result property="msg" column="msg"/>
+        <result property="createtime" column="createtime"/>
+        <result property="name" column="name"/>
+        <result property="tel_one" column="tel_one"/>
+        <result property="device_model" column="device_model"/>
+        <result property="device_id_code" column="device_id_code"/>
+        <result property="alarm_type" column="alarm_type"/>
+        <result property="address_desc" column="address_desc"/>
+        <result property="store_name" column="store_name"/>
+        <result property="gps_long" column="gps_long"/>
+        <result property="gps_lat" column="gps_lat"/>
     </resultMap>
 
     <sql id="selectTFallSolveVo">
-        select id, userid, device_id_code, alarm_msg, solve_status, service_userid, msg, createtime, alarmid from t_fall_solve
+        select id,
+               userid,
+               device_id_code,
+               alarm_msg,
+               solve_status,
+               service_userid,
+               msg,
+               createtime,
+               alarmid
+        from t_fall_solve
     </sql>
 
     <select id="selectTFallSolveList" parameterType="TFallSolve" resultMap="TFallSolveResult">
-        SELECT a.id as uid, d.id as aid,a.name,a.tel_one,b.store_name,c.device_model,d.device_id_code,d.alarm_type,d.createtime,e.address_desc,d.gps_long,d.gps_lat,f.id,f.userid,f.alarm_msg,f.solve_status,f.msg FROM `t_user_profile` a
+        SELECT a.id as uid, d.id as
+        aid,a.name,a.tel_one,b.store_name,c.device_model,d.device_id_code,d.alarm_type,d.createtime,e.address_desc,d.gps_long,d.gps_lat,f.id,f.userid,f.alarm_msg,f.solve_status,f.msg
+        FROM `t_user_profile` a
         left join t_service_manage b on a.serviceid=b.id
         left join t_device_list c on a.id=c.userid
         left join t_shouhuan_alarm_list d on d.device_id_code=c.device_id
         left join t_shouhuan_info e on e.id=d.shinfo_id
         left join t_sos_solve f on f.alarmid=d.id
         <where>
-            <if test="name != null  and name != ''"> and a.name = #{name}</if>
-            <if test="solve_status != null"> and f.solve_status = #{solve_status}</if>
+            <if test="name != null  and name != ''">and a.name = #{name}</if>
+            <if test="solve_status != null">and f.solve_status = #{solve_status}</if>
             and d.alarm_type=21
         </where>
     </select>
-    
+
     <select id="selectTFallSolveById" parameterType="Integer" resultMap="TFallSolveResult">
         <include refid="selectTFallSolveVo"/>
         where id = #{id}
     </select>
-    <select id="selectTFallSolveByAid"  resultMap="TFallSolveResult">
+    <select id="selectTFallSolveByAid" parameterType="Integer" resultMap="TFallSolveResult">
         <include refid="selectTFallSolveVo"/>
         where alarmid = #{aid}
     </select>
@@ -64,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="msg != null">msg,</if>
             <if test="createTime != null">createtime,</if>
             <if test="aid != null">alarmid,</if>
-         </trim>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="uid != null">#{uid},</if>
             <if test="deviceIdCode != null">#{deviceIdCode},</if>
@@ -74,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="msg != null">#{msg},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="aid != null">#{aid},</if>
-         </trim>
+        </trim>
     </insert>
 
     <update id="updateTFallSolve" parameterType="TFallSolve">
@@ -93,11 +104,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </update>
 
     <delete id="deleteTFallSolveById" parameterType="Integer">
-        delete from t_fall_solve where id = #{id}
+        delete
+        from t_fall_solve
+        where id = #{id}
     </delete>
 
     <delete id="deleteTFallSolveByIds" parameterType="String">
-        delete from t_fall_solve where id in 
+        delete from t_fall_solve where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>