Browse Source

修改机场回调状态数据

tags/v1.0.0^2
wanjing 1 year ago
parent
commit
06db8f167f
3 changed files with 15 additions and 2 deletions
  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 View File

* @param inspection 巡检任务 * @param inspection 巡检任务
* @return 结果 * @return 结果
*/ */
int update(Inspection inspection);
int update(Inspection inspection);

int updateStatus(Inspection inspection);


int updateByPrimaryKeySelective(Inspection request); int updateByPrimaryKeySelective(Inspection request);



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



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

+ 10
- 0
tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionMapper.xml View File

where id = #{id} where id = #{id}
</update> </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 id="updateByPrimaryKeySelective" parameterType="com.tuoheng.admin.entity.Inspection">
update th_inspection update th_inspection
<set> <set>

Loading…
Cancel
Save