新增详情接口,优化代码逻辑

This commit is contained in:
马三炮 2025-04-07 17:52:27 +08:00
parent 275c54cc7d
commit 5485b7bf5e
22 changed files with 158 additions and 35 deletions

View File

@ -6,6 +6,7 @@ import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.socket.config.annotation.EnableWebSocket;
/**
@ -17,6 +18,7 @@ import org.springframework.web.socket.config.annotation.EnableWebSocket;
@EnableFormValidator
@EnableWebSocket
@MapperScan("com.bonus.imgTool.*.mapper,com.bonus.imgTool.*.dao")
@EnableTransactionManagement
public class ImgToolApplication {
public static void main(String[] args) {

View File

@ -46,7 +46,7 @@ public class CoordinatePhotoController {
*/
@PostMapping(value = "/deleteCoordinatePhoto")
@DecryptAndVerify(decryptedClass = CoordinatePhotoReqVo.class)
@LogAnnotation(operModul = "协调照片--删除", operation = "查询照片", operDesc = "系统级事件",operType="查询")
@LogAnnotation(operModul = "协调照片--删除", operation = "查询照片", operDesc = "系统级事件",operType="删除")
public ServerResponse deleteCoordinatePhoto(EncryptedReq<CoordinatePhotoReqVo> data) {
return coordinatePhotoService.deleteCoordinatePhoto(data.getData());
}
@ -58,7 +58,7 @@ public class CoordinatePhotoController {
*/
@PostMapping(value = "/addCoordinatePhoto")
@DecryptAndVerify(decryptedClass = CoordinatePhotoVo.class)
@LogAnnotation(operModul = "协调照片--新增", operation = "查询照片", operDesc = "系统级事件",operType="查询")
@LogAnnotation(operModul = "协调照片--新增", operation = "查询照片", operDesc = "系统级事件",operType="新增")
public ServerResponse addCoordinatePhoto(EncryptedReq<CoordinatePhotoVo> data) {
return coordinatePhotoService.addCoordinatePhoto(data.getData());
}
@ -70,8 +70,20 @@ public class CoordinatePhotoController {
*/
@PostMapping(value = "/updateCoordinatePhoto")
@DecryptAndVerify(decryptedClass = CoordinatePhotoVo.class)
@LogAnnotation(operModul = "协调照片--修改", operation = "查询照片", operDesc = "系统级事件",operType="查询")
@LogAnnotation(operModul = "协调照片--修改", operation = "查询照片", operDesc = "系统级事件",operType="修改")
public ServerResponse updateCoordinatePhoto(EncryptedReq<CoordinatePhotoVo> data) {
return coordinatePhotoService.updateCoordinatePhoto(data.getData());
}
/**
* 协调照片--详情
* @param data
* @return
*/
@PostMapping(value = "/getCoordinatePhotoById")
@DecryptAndVerify(decryptedClass = CoordinatePhotoReqVo.class)
@LogAnnotation(operModul = "协调照片--详情", operation = "查询照片", operDesc = "系统级事件",operType="详情")
public ServerResponse getCoordinatePhotoById(EncryptedReq<CoordinatePhotoReqVo> data) {
return coordinatePhotoService.getCoordinatePhotoById(data.getData());
}
}

View File

@ -46,7 +46,7 @@ public class ImportantMatterController {
*/
@PostMapping(value = "/deleteImportantMatter")
@DecryptAndVerify(decryptedClass = ImportantMatterReqVo.class)
@LogAnnotation(operModul = "重要事项及宣传照片--删除", operation = "查询照片", operDesc = "系统级事件",operType="查询")
@LogAnnotation(operModul = "重要事项及宣传照片--删除", operation = "查询照片", operDesc = "系统级事件",operType="删除")
public ServerResponse deleteImportantMatter(EncryptedReq<ImportantMatterReqVo> data) {
return importantMatterService.deleteImportantMatter(data.getData());
}
@ -58,7 +58,7 @@ public class ImportantMatterController {
*/
@PostMapping(value = "/addImportantMatter")
@DecryptAndVerify(decryptedClass = ImportantMatterVo.class)
@LogAnnotation(operModul = "重要事项及宣传照片--新增", operation = "查询照片", operDesc = "系统级事件",operType="查询")
@LogAnnotation(operModul = "重要事项及宣传照片--新增", operation = "查询照片", operDesc = "系统级事件",operType="新增")
public ServerResponse addImportantMatter(EncryptedReq<ImportantMatterVo> data) {
return importantMatterService.addImportantMatter(data.getData());
}
@ -70,8 +70,20 @@ public class ImportantMatterController {
*/
@PostMapping(value = "/updateImportantMatter")
@DecryptAndVerify(decryptedClass = ImportantMatterVo.class)
@LogAnnotation(operModul = "重要事项及宣传照片--修改", operation = "查询照片", operDesc = "系统级事件",operType="查询")
@LogAnnotation(operModul = "重要事项及宣传照片--修改", operation = "查询照片", operDesc = "系统级事件",operType="修改")
public ServerResponse updateImportantMatter(EncryptedReq<ImportantMatterVo> data) {
return importantMatterService.updateImportantMatter(data.getData());
}
/**
* 重要事项及宣传照片--详情
* @param data
* @return
*/
@PostMapping(value = "/getImportantMatterById")
@DecryptAndVerify(decryptedClass = ImportantMatterReqVo.class)
@LogAnnotation(operModul = "重要事项及宣传照片--详情", operation = "查询照片", operDesc = "系统级事件",operType="详情")
public ServerResponse getImportantMatterById(EncryptedReq<ImportantMatterReqVo> data) {
return importantMatterService.getImportantMatterById(data.getData());
}
}

View File

@ -45,7 +45,7 @@ public class SafetyMeasuresController {
*/
@PostMapping(value = "/deleteSafetyMeasures")
@DecryptAndVerify(decryptedClass = SafetyMeasuresReqVo.class)
@LogAnnotation(operModul = "安全措施落实-删除", operation = "查询照片", operDesc = "系统级事件",operType="查询")
@LogAnnotation(operModul = "安全措施落实-删除", operation = "查询照片", operDesc = "系统级事件",operType="删除")
public ServerResponse deleteSafetyMeasures(EncryptedReq<SafetyMeasuresReqVo> data) {
return safetyMeasuresService.deleteSafetyMeasures(data.getData());
}
@ -57,7 +57,7 @@ public class SafetyMeasuresController {
*/
@PostMapping(value = "/addSafetyMeasures")
@DecryptAndVerify(decryptedClass = SafetyMeasuresVo.class)
@LogAnnotation(operModul = "安全措施落实-新增", operation = "查询照片", operDesc = "系统级事件",operType="查询")
@LogAnnotation(operModul = "安全措施落实-新增", operation = "查询照片", operDesc = "系统级事件",operType="新增")
public ServerResponse addSafetyMeasures(EncryptedReq<SafetyMeasuresVo> data) {
return safetyMeasuresService.addSafetyMeasures(data.getData());
}
@ -68,8 +68,20 @@ public class SafetyMeasuresController {
*/
@PostMapping(value = "/updateSafetyMeasures")
@DecryptAndVerify(decryptedClass = SafetyMeasuresVo.class)
@LogAnnotation(operModul = "安全措施落实-修改", operation = "查询照片", operDesc = "系统级事件",operType="查询")
@LogAnnotation(operModul = "安全措施落实-修改", operation = "查询照片", operDesc = "系统级事件",operType="修改")
public ServerResponse updateSafetyMeasures(EncryptedReq<SafetyMeasuresVo> data) {
return safetyMeasuresService.updateSafetyMeasures(data.getData());
}
/**
* 安全措施落实详情
* @param data
* @return
*/
@PostMapping(value = "/getSafetyMeasuresById")
@DecryptAndVerify(decryptedClass = SafetyMeasuresReqVo.class)
@LogAnnotation(operModul = "安全措施落实-详情", operation = "查询照片", operDesc = "系统级事件",operType="详情")
public ServerResponse getSafetyMeasuresById(EncryptedReq<SafetyMeasuresReqVo> data) {
return safetyMeasuresService.getSafetyMeasuresById(data.getData());
}
}

View File

@ -47,7 +47,7 @@ public class ImportantMatterVo {
/**
* 时间
*/
private Date time;
private String time;
/**
* 标题

View File

@ -52,7 +52,7 @@ public class SafetyMeasuresVo {
/**
* 检查时间
*/
private Date checkDate;
private String checkDate;
/**
* 检查地点

View File

@ -13,4 +13,6 @@ public interface CoordinatePhotoMapper {
void addCoordinatePhoto(CoordinatePhotoVo data);
void updateCoordinatePhoto(CoordinatePhotoVo data);
CoordinatePhotoVo getCoordinatePhotoById(Long id);
}

View File

@ -16,4 +16,6 @@ public interface ImportantMatterMapper {
void addImportantMatter(ImportantMatterVo data);
void updateImportantMatter(ImportantMatterVo data);
ImportantMatterVo getImportantMatterById(Long id);
}

View File

@ -14,4 +14,6 @@ public interface SafetyMeasuresMapper {
void addSafetyMeasures(SafetyMeasuresVo data);
void updateSafetyMeasures(SafetyMeasuresVo data);
SafetyMeasuresVo getSafetyMeasuresById(Long id);
}

View File

@ -12,4 +12,6 @@ public interface CoordinatePhotoService {
ServerResponse addCoordinatePhoto(CoordinatePhotoVo data);
ServerResponse updateCoordinatePhoto(CoordinatePhotoVo data);
ServerResponse getCoordinatePhotoById(CoordinatePhotoReqVo data);
}

View File

@ -12,4 +12,6 @@ public interface ImportantMatterService {
ServerResponse addImportantMatter(ImportantMatterVo data);
ServerResponse updateImportantMatter(ImportantMatterVo data);
ServerResponse getImportantMatterById(ImportantMatterReqVo data);
}

View File

@ -12,4 +12,6 @@ public interface SafetyMeasuresService {
ServerResponse addSafetyMeasures(SafetyMeasuresVo data);
ServerResponse updateSafetyMeasures(SafetyMeasuresVo data);
ServerResponse getSafetyMeasuresById(SafetyMeasuresReqVo data);
}

View File

@ -17,6 +17,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import javax.annotation.Resource;
import java.util.Date;
@ -24,7 +25,6 @@ import java.util.List;
@Service
@Slf4j
@Transactional
public class CoordinatePhotoServiceImpl implements CoordinatePhotoService {
@Resource
@ -49,7 +49,7 @@ public class CoordinatePhotoServiceImpl implements CoordinatePhotoService {
List<CoordinatePhotoVo> list = coordinatePhotoMapper.getCoordinatePhotoList(data);
//获取图片信息
for (CoordinatePhotoVo coordinatePhotoVo : list) {
List<SysFileResourceVo> sysFileResourceList = sysFileResourceService.getSysFileResourceList(coordinatePhotoVo.getId());
List<SysFileResourceVo> sysFileResourceList = sysFileResourceService.getSysFileResourceList(coordinatePhotoVo.getId(),"4");
coordinatePhotoVo.setSysFileResourceList(sysFileResourceList);
}
PageInfo<CoordinatePhotoVo> pageInfo = new PageInfo<>(list);
@ -66,6 +66,7 @@ public class CoordinatePhotoServiceImpl implements CoordinatePhotoService {
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public ServerResponse deleteCoordinatePhoto(CoordinatePhotoReqVo data) {
try {
coordinatePhotoMapper.deleteCoordinatePhoto(data);
@ -74,6 +75,7 @@ public class CoordinatePhotoServiceImpl implements CoordinatePhotoService {
return ServerResponse.createSuccess();
} catch (Exception e) {
log.error(e.toString(), e);
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return ServerResponse.createErroe("删除失败");
}
}
@ -84,6 +86,7 @@ public class CoordinatePhotoServiceImpl implements CoordinatePhotoService {
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public ServerResponse addCoordinatePhoto(CoordinatePhotoVo data) {
try {
Long CreateUserId = UserUtil.getLoginUser() != null ? UserUtil.getLoginUser().getId() : 0;
@ -102,9 +105,11 @@ public class CoordinatePhotoServiceImpl implements CoordinatePhotoService {
//存入综合查询
ComprehensiveQueryVo comprehensiveQueryVo = new ComprehensiveQueryVo();
BeanUtils.copyProperties(data,comprehensiveQueryVo);
comprehensiveQueryVo.setUploadType("4");
synthesisQueryService.addComprehensiveQuery(comprehensiveQueryVo);
} catch (Exception e) {
log.error(e.toString(), e);
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return ServerResponse.createErroe("删除失败");
}
return ServerResponse.createSuccess();
@ -116,6 +121,7 @@ public class CoordinatePhotoServiceImpl implements CoordinatePhotoService {
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public ServerResponse updateCoordinatePhoto(CoordinatePhotoVo data) {
try {
Long CreateUserId = UserUtil.getLoginUser() != null ? UserUtil.getLoginUser().getId() : 0;
@ -136,10 +142,24 @@ public class CoordinatePhotoServiceImpl implements CoordinatePhotoService {
synthesisQueryService.updateComprehensiveQuery(comprehensiveQueryVo);
} catch (Exception e) {
log.error(e.toString(), e);
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return ServerResponse.createErroe("修改失败");
}
return ServerResponse.createSuccess();
}
@Override
public ServerResponse getCoordinatePhotoById(CoordinatePhotoReqVo data) {
try {
CoordinatePhotoVo coordinatePhotoVo = coordinatePhotoMapper.getCoordinatePhotoById(data.getId());
List<SysFileResourceVo> sysFileResourceList = sysFileResourceService.getSysFileResourceList(coordinatePhotoVo.getId(),"4");
coordinatePhotoVo.setSysFileResourceList(sysFileResourceList);
return ServerResponse.createSuccess(coordinatePhotoVo);
} catch (Exception e) {
log.error(e.toString(), e);
return ServerResponse.createErroe("查询失败");
}
}
}

View File

@ -23,7 +23,6 @@ import java.util.List;
@Service
@Slf4j
@Transactional
public class ImportantMatterServiceImpl implements ImportantMatterService {
@Resource
@ -47,7 +46,7 @@ public class ImportantMatterServiceImpl implements ImportantMatterService {
List<ImportantMatterVo> list = importantMatterMapper.getImportantMatterList(data);
//获取图片信息
for (ImportantMatterVo importantMatterVo : list) {
List<SysFileResourceVo> sysFileResourceList = sysFileResourceService.getSysFileResourceList(importantMatterVo.getId());
List<SysFileResourceVo> sysFileResourceList = sysFileResourceService.getSysFileResourceList(importantMatterVo.getId(),"5");
importantMatterVo.setSysFileResourceList(sysFileResourceList);
}
PageInfo<ImportantMatterVo> pageInfo = new PageInfo<>(list);
@ -64,6 +63,7 @@ public class ImportantMatterServiceImpl implements ImportantMatterService {
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public ServerResponse deleteImportantMatter(ImportantMatterReqVo data) {
try {
importantMatterMapper.deleteImportantMatter(data);
@ -82,6 +82,7 @@ public class ImportantMatterServiceImpl implements ImportantMatterService {
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public ServerResponse addImportantMatter(ImportantMatterVo data) {
try {
Long CreateUserId = UserUtil.getLoginUser() != null ? UserUtil.getLoginUser().getId() : 0;
@ -99,6 +100,7 @@ public class ImportantMatterServiceImpl implements ImportantMatterService {
//存入综合查询
ComprehensiveQueryVo comprehensiveQueryVo = new ComprehensiveQueryVo();
BeanUtils.copyProperties(data,comprehensiveQueryVo);
comprehensiveQueryVo.setUploadType("5");
synthesisQueryService.addComprehensiveQuery(comprehensiveQueryVo);
} catch (Exception e) {
log.error(e.toString(), e);
@ -113,6 +115,7 @@ public class ImportantMatterServiceImpl implements ImportantMatterService {
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public ServerResponse updateImportantMatter(ImportantMatterVo data) {
try {
Long CreateUserId = UserUtil.getLoginUser() != null ? UserUtil.getLoginUser().getId() : 0;
@ -138,4 +141,23 @@ public class ImportantMatterServiceImpl implements ImportantMatterService {
}
return ServerResponse.createSuccess();
}
/**
* 重要事项及宣传照片--详情
* @param data
* @return
*/
@Override
public ServerResponse getImportantMatterById(ImportantMatterReqVo data) {
try {
ImportantMatterVo importantMatterVo = importantMatterMapper.getImportantMatterById(data.getId());
//获取图片信息
List<SysFileResourceVo> sysFileResourceList = sysFileResourceService.getSysFileResourceList(importantMatterVo.getId(),"5");
importantMatterVo.setSysFileResourceList(sysFileResourceList);
return ServerResponse.createSuccess(importantMatterVo);
} catch (Exception e) {
log.error(e.toString(), e);
return ServerResponse.createErroe("查询失败");
}
}
}

View File

@ -17,6 +17,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import javax.annotation.Resource;
import java.util.Date;
@ -24,7 +25,6 @@ import java.util.List;
@Slf4j
@Service
@Transactional
public class SafetyMeasuresServiceImpl implements SafetyMeasuresService {
@Resource
@ -48,7 +48,7 @@ public class SafetyMeasuresServiceImpl implements SafetyMeasuresService {
List<SafetyMeasuresVo> list = safetyMeasuresMapper.getSafetyMeasuresList(data);
//获取图片信息
for (SafetyMeasuresVo safetyMeasuresVo : list) {
List<SysFileResourceVo> sysFileResourceList = sysFileResourceService.getSysFileResourceList(safetyMeasuresVo.getId());
List<SysFileResourceVo> sysFileResourceList = sysFileResourceService.getSysFileResourceList(safetyMeasuresVo.getId(),"3");
safetyMeasuresVo.setSysFileResourceList(sysFileResourceList);
}
PageInfo<SafetyMeasuresVo> pageInfo = new PageInfo<>(list);
@ -65,6 +65,7 @@ public class SafetyMeasuresServiceImpl implements SafetyMeasuresService {
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public ServerResponse deleteSafetyMeasures(SafetyMeasuresReqVo data) {
try {
safetyMeasuresMapper.deleteSafetyMeasures(data);
@ -73,6 +74,7 @@ public class SafetyMeasuresServiceImpl implements SafetyMeasuresService {
return ServerResponse.createSuccess();
} catch (Exception e) {
log.error(e.toString(), e);
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return ServerResponse.createErroe("删除失败");
}
}
@ -83,6 +85,7 @@ public class SafetyMeasuresServiceImpl implements SafetyMeasuresService {
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public ServerResponse addSafetyMeasures(SafetyMeasuresVo data) {
try {
Long CreateUserId = UserUtil.getLoginUser() != null ? UserUtil.getLoginUser().getId() : 0;
@ -102,12 +105,14 @@ public class SafetyMeasuresServiceImpl implements SafetyMeasuresService {
//存入综合查询
ComprehensiveQueryVo comprehensiveQueryVo = new ComprehensiveQueryVo();
BeanUtils.copyProperties(data,comprehensiveQueryVo);
comprehensiveQueryVo.setUploadType("3");
synthesisQueryService.addComprehensiveQuery(comprehensiveQueryVo);
} catch (Exception e) {
log.error(e.toString(), e);
return ServerResponse.createErroe("删除失败");
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return ServerResponse.createErroe("新增失败");
}
return ServerResponse.createSuccess();
return ServerResponse.createSuccess("新增成功");
}
/**
@ -116,6 +121,7 @@ public class SafetyMeasuresServiceImpl implements SafetyMeasuresService {
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public ServerResponse updateSafetyMeasures(SafetyMeasuresVo data) {
try {
Long CreateUserId = UserUtil.getLoginUser() != null ? UserUtil.getLoginUser().getId() : 0;
@ -139,8 +145,22 @@ public class SafetyMeasuresServiceImpl implements SafetyMeasuresService {
synthesisQueryService.updateComprehensiveQuery(comprehensiveQueryVo);
} catch (Exception e) {
log.error(e.toString(), e);
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return ServerResponse.createErroe("修改失败");
}
return ServerResponse.createSuccess();
return ServerResponse.createSuccess("修改成功");
}
@Override
public ServerResponse getSafetyMeasuresById(SafetyMeasuresReqVo data) {
try {
SafetyMeasuresVo safetyMeasuresVo = safetyMeasuresMapper.getSafetyMeasuresById(data.getId());
List<SysFileResourceVo> sysFileResourceList = sysFileResourceService.getSysFileResourceList(safetyMeasuresVo.getId(),"3");
safetyMeasuresVo.setSysFileResourceList(sysFileResourceList);
return ServerResponse.createSuccess(safetyMeasuresVo);
} catch (Exception e) {
log.error(e.toString(), e);
return ServerResponse.createErroe("查询失败");
}
}
}

View File

@ -10,7 +10,7 @@ public interface SysFileResourceDao {
void deleteFileResource(Long id);
List<SysFileResourceVo> getSysFileResourceList(Long id);
List<SysFileResourceVo> getSysFileResourceList(Long id, String uploadType);
void addSysFileResource(SysFileResourceVo sysFileResourceVo);
}

View File

@ -6,7 +6,7 @@ import com.bonus.imgTool.system.vo.SysFileResourceVo;
import java.util.List;
public interface SysFileResourceService {
List<SysFileResourceVo> getSysFileResourceList(Long id);
List<SysFileResourceVo> getSysFileResourceList(Long id, String uploadType);
void deleteFileResource(Long id);

View File

@ -20,8 +20,8 @@ public class SysFileResourceServiceImpl implements SysFileResourceService {
private SysFileResourceDao sysFileResourceDao;
@Override
public List<SysFileResourceVo> getSysFileResourceList(Long id) {
return sysFileResourceDao.getSysFileResourceList(id);
public List<SysFileResourceVo> getSysFileResourceList(Long id, String uploadType) {
return sysFileResourceDao.getSysFileResourceList(id, uploadType);
}
@Override

View File

@ -79,10 +79,14 @@
<if test="gxId != '' and gxId != null"> and gx_id = #{gxId}</if>
<if test="keyWord != null and keyWord != ''">
and (
check_user_name like concat('%', #{keyWord}, '%') or
check_desc like concat('%', #{keyWord}, '%') or
check_place like concat('%', #{keyWord}, '%') or
build_before_desc like concat('%', #{keyWord}, '%') or
build_under_desc like concat('%', #{keyWord}, '%') or
build_after_desc like concat('%', #{keyWord}, '%')
)
</if>
</select>
<select id="getCoordinatePhotoById" resultType="com.bonus.imgTool.imageUpload.dto.CoordinatePhotoVo">
select * from tb_coordinate_photo
where id = #{id} and is_active = '1'
</select>
</mapper>

View File

@ -76,10 +76,13 @@
<if test="gxId != '' and gxId != null"> and gx_id = #{gxId}</if>
<if test="keyWord != null and keyWord != ''">
and (
check_user_name like concat('%', #{keyWord}, '%') or
check_desc like concat('%', #{keyWord}, '%') or
check_place like concat('%', #{keyWord}, '%') or
title like concat('%', #{keyWord}, '%') or
content like concat('%', #{keyWord}, '%')
)
</if>
</select>
<select id="getImportantMatterById" resultType="com.bonus.imgTool.imageUpload.dto.ImportantMatterVo">
select * from tb_main_matter_publicize_photo
where id =#{id} and is_active = '1'
</select>
</mapper>

View File

@ -18,7 +18,7 @@
<if test="createUserId != null">create_user_id,</if>
<if test="createTime != null">create_time,</if>
<if test="createUserName != null">create_user_name,</if>
<if test="updateUserid != null">update_user_id,</if>
<if test="updateUserId != null">update_user_id,</if>
<if test="updateUserName != null">update_user_name,</if>
<if test="updateTime != null">update_time,</if>
<if test="dataSource != null">data_source,</if>
@ -38,7 +38,7 @@
<if test="createUserId != null">#{createUserId},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createUserName != null">#{createUserName},</if>
<if test="updateUserid != null">#{updateUserid},</if>
<if test="updateUserId != null">#{updateUserid},</if>
<if test="updateUserName != null">#{updateUserName},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="dataSource != null">#{dataSource},</if>
@ -82,9 +82,13 @@
and (
check_user_name like concat('%', #{keyWord}, '%') or
check_desc like concat('%', #{keyWord}, '%') or
check_place like concat('%', #{keyWord}, '%') or
check_place like concat('%', #{keyWord}, '%')
)
</if>
</select>
<select id="getSafetyMeasuresById" resultType="com.bonus.imgTool.imageUpload.dto.SafetyMeasuresVo">
select * from tb_safety_measure
where id =#{id} and is_active = '1'
</select>
</mapper>

View File

@ -29,7 +29,7 @@
<if test="compressFilePath != null and compressFilePath != ''">#{compressFilePath},</if>
<if test="watermarkFilePath != null and watermarkFilePath != ''">#{watermarkFilePath},</if>
<if test="fileType != null">#{fileType},</if>
<if test="sourceId != null and checkDate != ''">#{sourceId},</if>
<if test="sourceId != null and sourceId != ''">#{sourceId},</if>
<if test="uploadType != null">#{uploadType},</if>
<if test="sourceType != null">#{sourceType},</if>
<if test="sourceTypeName != null">#{sourceTypeName},</if>
@ -45,7 +45,7 @@
where source_id = #{id}
</delete>
<select id="getSysFileResourceList" resultType="com.bonus.imgTool.system.vo.SysFileResourceVo">
select * from sys_file_resource where source_id = #{id} and is_active ='1'
select * from sys_file_resource where source_id = #{id} and upload_type =#{uploadType} and is_active ='1'
</select>
</mapper>