Procházet zdrojové kódy

修改机场回调状态数据

tags/v1.0.0^2
wanjing před 1 rokem
rodič
revize
06db8f167f
3 změnil soubory, kde provedl 15 přidání a 2 odebrání
  1. +3
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mapper/InspectionMapper.java
  2. +2
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/status/UpdateFlightStatusService.java
  3. +10
    -0
      tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionMapper.xml

+ 3
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mapper/InspectionMapper.java Zobrazit soubor

@@ -47,7 +47,9 @@ public interface InspectionMapper extends BaseMapper<Inspection> {
* @param inspection 巡检任务
* @return 结果
*/
int update(Inspection inspection);
int update(Inspection inspection);

int updateStatus(Inspection inspection);

int updateByPrimaryKeySelective(Inspection request);


+ 2
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/status/UpdateFlightStatusService.java Zobrazit soubor

@@ -66,8 +66,9 @@ public class UpdateFlightStatusService {

log.info("修改inspection status 开始");
inspectionUpdate.setStatus(InspectionStatusEnum.IN_FLIGHT.getCode());
inspectionUpdate.setUpdateTime(DateUtils.now());
log.info("inspectionUpdate:{}", inspectionUpdate);
Integer count = inspectionMapper.updateById(inspectionUpdate);
Integer count = inspectionMapper.updateStatus(inspectionUpdate);
if (count <= 0) {
log.info("修改inspection status 失败");
} else {

+ 10
- 0
tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionMapper.xml Zobrazit soubor

@@ -188,6 +188,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</update>

<update id="updateStatus" parameterType="com.tuoheng.admin.entity.Inspection">
update th_inspection
<trim prefix="SET" suffixOverrides=",">
<if test="status != null"> status = #{status}, </if>
<if test="updateUser != null and updateUser != ''"> update_user = #{updateUser},</if>
<if test="updateTime != null and updateTime != ''"> update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>

<update id="updateByPrimaryKeySelective" parameterType="com.tuoheng.admin.entity.Inspection">
update th_inspection
<set>

Načítá se…
Zrušit
Uložit