hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/controller/RegionInspectionController.java
@@ -20,16 +20,31 @@ @Autowired private RegionInspectionService regionInspectionService; /** * 增加或修改 * @param regionInspectionEntity * @return */ @PostMapping("insertAndUpdate") BasicResult insert(@RequestBody RegionInspectionEntity regionInspectionEntity){ return regionInspectionService.insert(regionInspectionEntity); } /** * 删除 * @param id * @return */ @GetMapping("delete") BasicResult delete(@RequestParam String id){ return regionInspectionService.delete(id); } /** * 查询分页列表 * @param map * @return */ @PostMapping("selectPageList") BasicResult selectPageList(@RequestBody Map map){ return regionInspectionService.selectPageList(map); hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionInspection/service/impl/RegionInspectionServiceImpl.java
@@ -12,6 +12,7 @@ import com.thhy.secure.modules.biz.regionInspection.entity.RegionInspectionUserEntity; import com.thhy.secure.modules.biz.regionInspection.mapper.RegionInspectionMapper; import com.thhy.secure.modules.biz.regionInspection.service.RegionInspectionService; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -44,7 +45,7 @@ //默认给uuid String regionInspectId = UUIDUtils.create(); //修改区域巡检判断 if (!"".equals(regionInspectionEntity.getId())){ if (StringUtils.isNotBlank(regionInspectionEntity.getId())){ regionInspectId = regionInspectionEntity.getId(); //根据区域巡检id删除中间表 regionInspectionEntity.setUpdateTime(new Date()); hd/pipe/secure/src/main/resources/mapping/RegionInspectionMapper.xml
@@ -57,27 +57,29 @@ </if> </trim> on duplicate key update <if test="task != null"> task = #{task,jdbcType=VARCHAR}, </if> <if test="standard != null"> standard = #{standard,jdbcType=VARCHAR}, </if> <if test="createUser != null"> createUser = #{createUser,jdbcType=VARCHAR}, </if> <if test="createTime != null"> createTime = #{createTime,jdbcType=TIMESTAMP}, </if> <if test="updateUser != null"> updateUser = #{updateUser,jdbcType=VARCHAR}, </if> <if test="updateTime != null"> updateTime = #{updateTime,jdbcType=TIMESTAMP}, </if> <if test="companyId != null"> companyId = #{companyId,jdbcType=VARCHAR}, </if> <trim suffixOverrides=","> <if test="task != null"> task = #{task,jdbcType=VARCHAR}, </if> <if test="standard != null"> standard = #{standard,jdbcType=VARCHAR}, </if> <if test="createUser != null"> createUser = #{createUser,jdbcType=VARCHAR}, </if> <if test="createTime != null"> createTime = #{createTime,jdbcType=TIMESTAMP}, </if> <if test="updateUser != null"> updateUser = #{updateUser,jdbcType=VARCHAR}, </if> <if test="updateTime != null"> updateTime = #{updateTime,jdbcType=TIMESTAMP}, </if> <if test="companyId != null"> companyId = #{companyId,jdbcType=VARCHAR}, </if> </trim> </insert>