修改任务与图库相关接口

develop
username 2 weeks ago
parent 96c8a1d506
commit 60f4dec2af

@ -1,20 +1,31 @@
package com.bs.ct.controller;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Random;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse;
import com.bs.cm.domain.CmAttach;
import com.bs.cm.service.ICmAttachService;
import com.bs.common.config.BsConfig;
import com.bs.common.core.domain.entity.SysDept;
import com.bs.common.core.domain.model.LoginUser;
import com.bs.common.utils.file.FileUploadUtils;
import com.bs.common.utils.file.FileUtils;
import com.bs.ct.domain.CtTaskFeedback;
import com.bs.ct.domain.*;
import com.bs.ct.service.*;
import com.bs.ct.utils.OperateImageUtils;
import com.bs.ct.utils.UUIDUtils;
import com.bs.framework.config.ServerConfig;
import com.bs.system.service.ISysDeptService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -33,8 +44,6 @@ import com.bs.common.enums.BusinessType;
import com.bs.common.utils.poi.ExcelUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import cn.hutool.core.lang.Validator;
import com.bs.ct.domain.CtGalleryImages;
import com.bs.ct.service.ICtGalleryImagesService;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
@ -49,12 +58,28 @@ import javax.annotation.Resource;
@RestController
@RequestMapping("/gallery/images")
public class CtGalleryImagesController extends BaseController {
@Value("${bs.profile}")
private String profile;
@Resource
private ICtGalleryImagesService ctGalleryImagesService;
@Autowired
private ServerConfig serverConfig;
@Autowired
private ICmAttachService cmAttachService;
@Resource
private ICtTaskTagService ctTaskTagService;
@Resource
private ICtGalleryImagesTagService ctGalleryImagesTagService;
@Resource
private ICtTagService ctTagService;
@Autowired
private ISysDeptService deptService;
@Resource
private ICtTaskBranchService ctTaskBranchService;
@Resource
private ICtTaskInfoService ctTaskInfoService;
@Resource
private ICtImagesFeedbackRefService ctImagesFeedbackRefService;
/**
*
*/
@ -71,6 +96,9 @@ public class CtGalleryImagesController extends BaseController {
private void setFile(List<CtGalleryImages> list) {
for (CtGalleryImages ctGalleryImages : list) {
List<CtGalleryImagesTag> galleryImagesTags = ctGalleryImagesTagService.list(new LambdaQueryWrapper<CtGalleryImagesTag>()
.eq(CtGalleryImagesTag::getImageId, ctGalleryImages.getId()));
ctGalleryImages.setImagesTags(galleryImagesTags);
List<CmAttach> cmAttachList = cmAttachService.list(new LambdaQueryWrapper<CmAttach>().eq(CmAttach::getFileId,ctGalleryImages.getFileId()));
ctGalleryImages.setFile(cmAttachList);
}
@ -84,16 +112,104 @@ public class CtGalleryImagesController extends BaseController {
public AjaxResult list(CtGalleryImages ctGalleryImages) {
LambdaQueryWrapper<CtGalleryImages> queryWrapper = new LambdaQueryWrapper();
condition(queryWrapper,ctGalleryImages);
if (null != ctGalleryImages.getFeedbackId()) {
List<CtImagesFeedbackRef> ctImagesFeedbackRefs = ctImagesFeedbackRefService.list(new LambdaQueryWrapper<CtImagesFeedbackRef>()
.eq(CtImagesFeedbackRef::getFeedbackId, ctGalleryImages.getFeedbackId()));
List<Long> imageIds = ctImagesFeedbackRefs.stream()
.map(CtImagesFeedbackRef::getImageId)
.collect(Collectors.toList());
if (null != imageIds && imageIds.size() > 0) {
List<CtGalleryImages> galleryImages = ctGalleryImagesService.list(new LambdaQueryWrapper<CtGalleryImages>()
.in(CtGalleryImages::getId, imageIds));
return success(galleryImages);
} else {
return null;
}
}
List<CtGalleryImages> list = ctGalleryImagesService.list(queryWrapper);
return success(list);
}
/**
*
*/
@ApiOperation("生成图片")
@Log(title = "生成图片", businessType = BusinessType.UPDATE)
@PostMapping("/generateImage")
public AjaxResult generateImage(@RequestBody CtGalleryImages ctGalleryImages) {
List<Long> imagesIds = ctGalleryImages.getIds();
String imageType = ctGalleryImages.getImageType(); // 假设 CtGalleryImages 有一个 imageType 字段用于指定生成图片的类型
List<CtGalleryImages> list = ctGalleryImagesService.list(new LambdaQueryWrapper<CtGalleryImages>()
.in(CtGalleryImages::getId, imagesIds));
BufferedImage[] imgs = new BufferedImage[list.size()];
int index = 0;
for (CtGalleryImages galleryImages : list) {
String attachUrl = galleryImages.getImagePath().replace("/profile", "");
String filePath = profile + attachUrl;
try {
imgs[index++] = OperateImageUtils.getBufferedImage(filePath);
} catch (IOException e) {
e.printStackTrace();
return AjaxResult.error("读取图片失败: " + filePath);
}
}
BufferedImage destImg = null;
String outputFileName = null;
try {
switch (imageType) {
case "nineGrid":
if (imgs.length >= 9) {
destImg = OperateImageUtils.mergeImageToGrid(3, 3, imgs);
outputFileName = UUIDUtils.generatorUUID() + "nineGrid.jpg";
} else {
return AjaxResult.error("生成九宫格图片需要至少9张图片");
}
break;
case "fourGrid":
if (imgs.length >= 4) {
BufferedImage[] fourImgs = new BufferedImage[4];
System.arraycopy(imgs, 0, fourImgs, 0, 4);
destImg = OperateImageUtils.mergeImageToGrid(2, 2, fourImgs);
outputFileName = UUIDUtils.generatorUUID() + "fourGrid.jpg";
} else {
return AjaxResult.error("生成四宫格图片需要至少4张图片");
}
break;
case "horizontalMerge":
if (imgs.length >= 2) {
destImg = OperateImageUtils.mergeImage(true, imgs);
outputFileName = UUIDUtils.generatorUUID() + "horizontalMerge.jpg";
} else {
return AjaxResult.error("水平合并需要至少2张图片");
}
break;
case "verticalMerge":
if (imgs.length >= 2) {
destImg = OperateImageUtils.mergeImage(false, imgs);
outputFileName = UUIDUtils.generatorUUID() + "verticalMerge.jpg";
} else {
return AjaxResult.error("垂直合并需要至少2张图片");
}
break;
default:
return AjaxResult.error("不支持的图片类型: " + imageType);
}
} catch (IOException e) {
e.printStackTrace();
}
if (destImg != null) {
OperateImageUtils.saveImage(destImg, profile , outputFileName, "jpg");
return AjaxResult.success("图片生成成功");
}
return AjaxResult.error("图片生成失败");
}
//
/**
*
*/
@PostMapping("/upload")
public AjaxResult uploadFile(MultipartFile file, String fileId, Long cataId, String imageTitle, Date photoTime, Date uploadTime,
String isOpen,String keyWords,String remarks
String isOpen, String keyWords, String remarks, Long tagId, ArrayList<Long> ctTags, Long feedbackId
) throws Exception
{
try
@ -130,11 +246,41 @@ public class CtGalleryImagesController extends BaseController {
Long id = cmAttach.getId();
AjaxResult ajax = AjaxResult.success();
ajax.put("cmAttach", cmAttach);
CtTaskTag taskTag = null;
if (null != tagId) {
taskTag = ctTaskTagService.getById(tagId);
ctGalleryImages.setCataId(taskTag.getSaveDir());
}
ctGalleryImages.setImageName(originalFilename);
ctGalleryImages.setImagePath(fileName);
ctGalleryImages.setImageSize(BigDecimal.valueOf(file.getSize()));
ctGalleryImages.setFileId(newId);
boolean saveImage = ctGalleryImagesService.save(ctGalleryImages);
if (saveImage) {
ajax.put("imageId",ctGalleryImages.getId());
if (null != taskTag) {
CtGalleryImagesTag ctGalleryImagesTag = new CtGalleryImagesTag();
ctGalleryImagesTag.setImageId(ctGalleryImages.getId());
ctGalleryImagesTag.setTagType(taskTag.getTagType());
ctGalleryImagesTag.setTagName(taskTag.getTagName());
ctGalleryImagesTagService.save(ctGalleryImagesTag);
}
if (null != ctTags) {
for (Long ctTagId : ctTags) {
CtTag ctTag = ctTagService.getById(ctTagId);
CtGalleryImagesTag ctGalleryImagesTag = new CtGalleryImagesTag();
ctGalleryImagesTag.setImageId(ctGalleryImages.getId());
ctGalleryImagesTag.setTagType(ctTag.getTagType());
ctGalleryImagesTag.setTagName(ctTag.getTagName());
ctGalleryImagesTag.setIsPhoto(ctTag.getIsPhoto());
ctGalleryImagesTag.setTagDesc(ctTag.getTagDesc());
ctGalleryImagesTag.setPhotoNum(ctTag.getPhotoNum());
ctGalleryImagesTag.setSaveDir(ctTag.getSaveDir());
ctGalleryImagesTag.setFileId(ctTag.getFileId());
ctGalleryImagesTagService.save(ctGalleryImagesTag);
}
}
}
return ajax;
}
return null;
@ -145,6 +291,91 @@ public class CtGalleryImagesController extends BaseController {
}
}
/**
*
*/
@ApiOperation("添加图片标签")
@Log(title = "添加图片标签", businessType = BusinessType.UPDATE)
@PostMapping("/saveByTag")
public AjaxResult saveByTag(@RequestBody CtGalleryImages ctGalleryImages) {
ctGalleryImages.getTaskTagId();
CtTaskTag ctTaskTag = ctTaskTagService.getById(ctGalleryImages.getTaskTagId());
List<Long> ids = ctGalleryImages.getIds();
for (Long id : ids) {
CtGalleryImagesTag ctGalleryImagesTag = new CtGalleryImagesTag();
ctGalleryImagesTag.setImageId(id);
ctGalleryImagesTag.setTagType(ctTaskTag.getTagType());
ctGalleryImagesTag.setTagName(ctTaskTag.getTagName());
List<CtGalleryImagesTag> ctGalleryImagesTags = ctGalleryImagesTagService.list(new LambdaQueryWrapper<CtGalleryImagesTag>()
.eq(CtGalleryImagesTag::getImageId, id)
.eq(CtGalleryImagesTag::getTagType, ctTaskTag.getTagType())
.eq(CtGalleryImagesTag::getTagName, ctTaskTag.getTagName()));
if (null == ctGalleryImagesTags || ctGalleryImagesTags.size() == 0) {
ctGalleryImagesTagService.save(ctGalleryImagesTag);
}
}
return toAjax(true);
}
/**
*
*/
@ApiOperation("生成任务")
@Log(title = "生成任务", businessType = BusinessType.UPDATE)
@PostMapping("/generateTasks")
public AjaxResult generateTasks(@RequestBody CtGalleryImages ctGalleryImages) {
List<Long> imagesIds = ctGalleryImages.getIds();
List<CtGalleryImagesTag> list = ctGalleryImagesTagService.list(new LambdaQueryWrapper<CtGalleryImagesTag>()
.in(CtGalleryImagesTag::getImageId, imagesIds));
CtTaskInfo ctTaskInfo = new CtTaskInfo();
Long newId = System.currentTimeMillis() + new Random().nextInt(1000);
ctTaskInfo.setId(newId);
List<CtTaskBranch> branchList = ctTaskInfo.getBranchList();
for (CtTaskBranch sdTaskOtherBranch : branchList) {
sdTaskOtherBranch.setTaskId(ctTaskInfo.getId());
sdTaskOtherBranch.setType("机构");
ctTaskBranchService.saveOrUpdate(sdTaskOtherBranch);
}
//设置发起单位与部门
LoginUser loginUser = getLoginUser();
Long deptId = loginUser.getDeptId();
if (null != deptId) {
ctTaskInfo.setDeptId(deptId);
SysDept sysDept = deptService.selectDeptById(deptId);
Long parentId = sysDept.getParentId();
SysDept parentDept = deptService.selectDeptById(parentId);
if (null != parentDept) {
ctTaskInfo.setBranchCode(String.valueOf(parentDept.getDeptId()));
ctTaskInfo.setBranchName(parentDept.getDeptName());
}
}
if ("1".equals(ctTaskInfo.getStatus())) {
ctTaskInfo.setTaskDate(new Date());
}
boolean save = ctTaskInfoService.save(ctTaskInfo);
if (save) {
List<CtTaskTag> tasgs = ctTaskInfo.getTags();
if (null != tasgs && tasgs.size() > 0) {
if (null != list && list.size() > 0) {
for (CtGalleryImagesTag image : list) {
CtTaskTag taskTag = new CtTaskTag();
taskTag.setTaskId(ctTaskInfo.getId());
taskTag.setTagName(image.getTagName());
taskTag.setTagType(image.getTagType());
taskTag.setIsPhoto(image.getIsPhoto());
taskTag.setTagDesc(image.getTagDesc());
taskTag.setPhotoNum(image.getPhotoNum());
taskTag.setSaveDir(image.getSaveDir());
taskTag.setFileId(image.getFileId());
ctTaskTagService.save(taskTag);
}
}
}
}
return success(ctTaskInfo);
}
/**
*

@ -0,0 +1,166 @@
package com.bs.ct.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.bs.ct.service.ICtGalleryImagesService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.bs.common.annotation.Log;
import com.bs.common.core.controller.BaseController;
import com.bs.common.core.domain.AjaxResult;
import com.bs.common.core.page.TableDataInfo;
import com.bs.common.enums.BusinessType;
import com.bs.common.utils.poi.ExcelUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.apache.commons.lang3.StringUtils;
import com.bs.ct.domain.CtImagesFeedbackRef;
import com.bs.ct.service.ICtImagesFeedbackRefService;
import javax.annotation.Resource;
/**
* Controller
*
* @author bs
* @date 2025-04-20
*/
@Api(tags = "图片任务反馈关联")
@RestController
@RequestMapping("/images/ref")
public class CtImagesFeedbackRefController extends BaseController {
@Resource
private ICtImagesFeedbackRefService ctImagesFeedbackRefService;
@Resource
private ICtGalleryImagesService ctGalleryImagesService;
/**
*
*/
@ApiOperation("分页查询图片任务反馈关联列表")
@GetMapping("/pageList")
public TableDataInfo pageList(CtImagesFeedbackRef ctImagesFeedbackRef) {
startPage();
LambdaQueryWrapper<CtImagesFeedbackRef> queryWrapper = new LambdaQueryWrapper();
condition(queryWrapper,ctImagesFeedbackRef);
List<CtImagesFeedbackRef> list = ctImagesFeedbackRefService.list(queryWrapper);
return getDataTable(list);
}
/**
*
*/
@ApiOperation("查询图片任务反馈关联列表")
@GetMapping("/list")
public AjaxResult list(CtImagesFeedbackRef ctImagesFeedbackRef) {
LambdaQueryWrapper<CtImagesFeedbackRef> queryWrapper = new LambdaQueryWrapper();
condition(queryWrapper,ctImagesFeedbackRef);
List<CtImagesFeedbackRef> list = ctImagesFeedbackRefService.list(queryWrapper);
return success(list);
}
/**
*
*/
@ApiOperation("导出图片任务反馈关联列表")
@Log(title = "图片任务反馈关联导出", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, CtImagesFeedbackRef ctImagesFeedbackRef) {
LambdaQueryWrapper<CtImagesFeedbackRef> queryWrapper = new LambdaQueryWrapper();
condition(queryWrapper,ctImagesFeedbackRef);
List<CtImagesFeedbackRef> list = ctImagesFeedbackRefService.list(queryWrapper);
ExcelUtil<CtImagesFeedbackRef> util = new ExcelUtil<CtImagesFeedbackRef>(CtImagesFeedbackRef. class);
util.exportExcel(response, list, "图片任务反馈关联数据");
}
/**
*
*/
@ApiOperation("获取图片任务反馈关联详细信息")
@GetMapping(value = "/{imageId}")
public AjaxResult getInfo(@PathVariable("imageId") Long imageId) {
return success(ctImagesFeedbackRefService.getById(imageId));
}
/**
*
*/
@ApiOperation("新增图片任务反馈关联")
@Log(title = "图片任务反馈关联新增", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody CtImagesFeedbackRef ctImagesFeedbackRef) {
return toAjax(ctImagesFeedbackRefService.save(ctImagesFeedbackRef));
}
/**
*
*/
@ApiOperation("修改图片任务反馈关联")
@Log(title = "图片任务反馈关联修改", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody CtImagesFeedbackRef ctImagesFeedbackRef) {
return toAjax(ctImagesFeedbackRefService.updateById(ctImagesFeedbackRef));
}
/**
*
*/
@ApiOperation("删除图片任务反馈关联")
@Log(title = "图片任务反馈关联删除", businessType = BusinessType.DELETE)
@DeleteMapping("/{imageIds}")
public AjaxResult remove(@PathVariable List<Long> imageIds) {
return toAjax(ctImagesFeedbackRefService.removeBatchByIds(imageIds));
}
/**
*
*/
private void condition (LambdaQueryWrapper<CtImagesFeedbackRef> queryWrapper,CtImagesFeedbackRef ctImagesFeedbackRef){
//图片id
if(null != (ctImagesFeedbackRef.getImageId())){
queryWrapper.eq(CtImagesFeedbackRef::getImageId,ctImagesFeedbackRef.getImageId());
}
//任务反馈id
if(null != (ctImagesFeedbackRef.getFeedbackId())){
queryWrapper.eq(CtImagesFeedbackRef::getFeedbackId,ctImagesFeedbackRef.getFeedbackId());
}
//创建人
if(null != (ctImagesFeedbackRef.getCreateBy())){
queryWrapper.eq(CtImagesFeedbackRef::getCreateBy,ctImagesFeedbackRef.getCreateBy());
}
//创建时间
if(null != (ctImagesFeedbackRef.getCreateTime())){
queryWrapper.eq(CtImagesFeedbackRef::getCreateTime,ctImagesFeedbackRef.getCreateTime());
}
//修改人
if(null != (ctImagesFeedbackRef.getUpdateBy())){
queryWrapper.eq(CtImagesFeedbackRef::getUpdateBy,ctImagesFeedbackRef.getUpdateBy());
}
//修改时间
if(null != (ctImagesFeedbackRef.getUpdateTime())){
queryWrapper.eq(CtImagesFeedbackRef::getUpdateTime,ctImagesFeedbackRef.getUpdateTime());
}
//租户ID
if(StringUtils.isNotEmpty(ctImagesFeedbackRef.getTenantId())){
queryWrapper.eq(CtImagesFeedbackRef::getTenantId,ctImagesFeedbackRef.getTenantId());
}
}
}

@ -15,8 +15,10 @@ import com.bs.common.core.domain.entity.SysUser;
import com.bs.common.exception.UtilException;
import com.bs.ct.domain.CtTaskFeedback;
import com.bs.ct.domain.CtTaskInfo;
import com.bs.ct.domain.CtTaskTag;
import com.bs.ct.service.ICtTaskFeedbackService;
import com.bs.ct.service.ICtTaskInfoService;
import com.bs.ct.service.ICtTaskTagService;
import com.bs.ct.vo.CtTaskBranchVO;
import com.bs.ct.vo.MyTaskVO;
import com.bs.system.service.ISysDeptService;
@ -69,6 +71,8 @@ public class CtTaskBranchController extends BaseController {
private ICtTaskFeedbackService ctTaskFeedbackService;
@Resource
private ICmAttachService cmAttachService;
@Resource
private ICtTaskTagService ctTaskTagService;
/**
*
*/
@ -112,12 +116,14 @@ public class CtTaskBranchController extends BaseController {
.skip(start) // 跳过前4条数据
.limit(pageSize) // 最多取6条数据
.collect(Collectors.toList());
setTag(result);
TableDataInfo data = getDataTable(result);
data.setTotal(ctTaskBranches.size());
return data;
}
private List<CtTaskBranch> filterCtTaskBranchList(List<CtTaskBranch> list, CtTaskBranch filterParams) {
List<CtTaskBranch> filteredList = new ArrayList<>(list);
if (filterParams.getTaskType() != null && !filterParams.getTaskType().isEmpty()) {
@ -215,11 +221,20 @@ public class CtTaskBranchController extends BaseController {
.skip(start) // 跳过前4条数据
.limit(pageSize) // 最多取6条数据
.collect(Collectors.toList());
setTag(result);
TableDataInfo data = getDataTable(result);
data.setTotal(ctTaskBranches.size());
return data;
}
private void setTag(List<CtTaskBranch> result) {
for (CtTaskBranch branch : result) {
Long taskId = branch.getTaskId();
List<CtTaskTag> ctTaskTags = ctTaskTagService.list(new LambdaQueryWrapper<CtTaskTag>().eq(CtTaskTag::getTaskId, taskId));
branch.setCtTaskTags(ctTaskTags);
}
}
/**
*
*/
@ -270,6 +285,8 @@ public class CtTaskBranchController extends BaseController {
taskOtherBranch.setTaskDate(byId.getTaskDate());
taskOtherBranch.setSdTaskOther(byId);
}
List<CtTaskFeedback> feedbackListByCreateTime = ctTaskFeedbackService.list(new LambdaQueryWrapper<CtTaskFeedback>()
.eq(CtTaskFeedback::getTaskBranchId, taskOtherBranch.getId())
.ne(CtTaskFeedback::getStatus, 0)

@ -1,15 +1,14 @@
package com.bs.ct.controller;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.*;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse;
import com.bs.cm.domain.CmAttach;
import com.bs.cm.service.ICmAttachService;
import com.bs.common.core.domain.entity.SysUser;
import com.bs.ct.domain.CtTaskInfo;
import com.bs.ct.service.ICtTaskInfoService;
import com.bs.ct.domain.*;
import com.bs.ct.service.*;
import com.bs.system.service.ISysUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -31,8 +30,7 @@ import com.bs.common.enums.BusinessType;
import com.bs.common.utils.poi.ExcelUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import cn.hutool.core.lang.Validator;
import com.bs.ct.domain.CtTaskFeedback;
import com.bs.ct.service.ICtTaskFeedbackService;
import javax.annotation.Resource;
/**
@ -53,6 +51,12 @@ public class CtTaskFeedbackController extends BaseController {
private ISysUserService userService;
@Resource
private ICmAttachService cmAttachService;
@Resource
private ICtTaskTagService ctTaskTagService;
@Resource
private ICtImagesFeedbackRefService ctImagesFeedbackRefService;
@Resource
private ICtGalleryImagesService ctGalleryImagesService;
/**
*
*/
@ -68,10 +72,22 @@ public class CtTaskFeedbackController extends BaseController {
private void setFile(List<CtTaskFeedback> list) {
for (CtTaskFeedback ctFeedback : list) {
List<CmAttach> cmAttachList = cmAttachService.list(new LambdaQueryWrapper<CmAttach>().eq(CmAttach::getFileId,ctFeedback.getFileId()));
List<CtImagesFeedbackRef> ctImagesFeedbackRefs = ctImagesFeedbackRefService.list(new LambdaQueryWrapper<CtImagesFeedbackRef>()
.eq(CtImagesFeedbackRef::getFeedbackId, ctFeedback.getId()));
if (null != ctImagesFeedbackRefs && ctImagesFeedbackRefs.size() > 0) {
List<Long> imageIds = ctImagesFeedbackRefs.stream()
.map(CtImagesFeedbackRef::getImageId) // 提取 imageId
.collect(Collectors.toList());
List<CtGalleryImages> galleryImages = ctGalleryImagesService.list(new LambdaQueryWrapper<CtGalleryImages>()
.in(CtGalleryImages::getId, imageIds));
List<Long> fileIds = galleryImages.stream()
.map(CtGalleryImages::getFileId)
.collect(Collectors.toList());
List<CmAttach> cmAttachList = cmAttachService.list(new LambdaQueryWrapper<CmAttach>().in(CmAttach::getFileId,fileIds));
ctFeedback.setFile(cmAttachList);
}
}
}
/**
*
@ -80,12 +96,45 @@ public class CtTaskFeedbackController extends BaseController {
@GetMapping("/list")
public AjaxResult list(CtTaskFeedback ctTaskFeedback) {
LambdaQueryWrapper<CtTaskFeedback> queryWrapper = new LambdaQueryWrapper();
if (-1 == ctTaskFeedback.getTaskTagId()) {
queryWrapper.eq(CtTaskFeedback::getTaskId, ctTaskFeedback.getTaskId())
.eq(CtTaskFeedback::getTaskBranchId,ctTaskFeedback.getTaskBranchId())
.isNull(CtTaskFeedback::getTaskTagId);
} else {
condition(queryWrapper,ctTaskFeedback);
}
List<CtTaskFeedback> list = ctTaskFeedbackService.list(queryWrapper);
setFile(list);
return success(list);
}
/**
*
*/
@ApiOperation("通过标签查询任务反馈列表")
@GetMapping("/listByTag")
public AjaxResult listByTag(CtTaskFeedback ctTaskFeedback) {
Map<String, Object> map = new HashMap<>();
List<CtTaskTag> ctTaskTags = ctTaskTagService.list(new LambdaQueryWrapper<CtTaskTag>().eq(CtTaskTag::getTaskId, ctTaskFeedback.getTaskId()));
List<CtTaskFeedback> ctTaskFeedbacks = ctTaskFeedbackService.list(new LambdaQueryWrapper<CtTaskFeedback>()
.eq(CtTaskFeedback::getTaskId, ctTaskFeedback.getTaskId())
.eq(CtTaskFeedback::getTaskBranchId,ctTaskFeedback.getTaskBranchId())
.isNull(CtTaskFeedback::getTaskTagId));
for (CtTaskTag taskTag : ctTaskTags) {
LambdaQueryWrapper<CtTaskFeedback> queryWrapper = new LambdaQueryWrapper();
queryWrapper.eq(CtTaskFeedback::getTaskTagId,taskTag.getId());
queryWrapper.eq(CtTaskFeedback::getTaskBranchId,ctTaskFeedback.getTaskBranchId());
List<CtTaskFeedback> list = ctTaskFeedbackService.list(queryWrapper);
setFile(list);
taskTag.setCtTaskFeedbacks(list);
}
map.put("ctTaskTags",ctTaskTags);
map.put("ctTaskFeedbacks",ctTaskFeedbacks);
return success(map);
}
/**
*
*/
@ -117,7 +166,23 @@ public class CtTaskFeedbackController extends BaseController {
@PostMapping
public AjaxResult add(@RequestBody CtTaskFeedback ctTaskFeedback) {
updateFile(ctTaskFeedback);
return toAjax(ctTaskFeedbackService.save(ctTaskFeedback));
boolean save = ctTaskFeedbackService.save(ctTaskFeedback);
if (save) {
saveRef(ctTaskFeedback);
}
return toAjax(true);
}
private void saveRef(CtTaskFeedback ctTaskFeedback) {
List<Long> imageIds = ctTaskFeedback.getImageIds();
if (null != imageIds && imageIds.size() > 0) {
for (Long imageId : imageIds) {
CtImagesFeedbackRef ctImagesFeedbackRef = new CtImagesFeedbackRef();
ctImagesFeedbackRef.setFeedbackId(ctTaskFeedback.getId());
ctImagesFeedbackRef.setImageId(imageId);
ctImagesFeedbackRefService.save(ctImagesFeedbackRef);
}
}
}
private void updateFile(CtTaskFeedback ctTaskFeedback) {
@ -140,6 +205,7 @@ public class CtTaskFeedbackController extends BaseController {
@PutMapping
public AjaxResult edit(@RequestBody CtTaskFeedback ctTaskFeedback) {
updateFile(ctTaskFeedback);
saveRef(ctTaskFeedback);
return toAjax(ctTaskFeedbackService.updateById(ctTaskFeedback));
}
@ -169,6 +235,11 @@ public class CtTaskFeedbackController extends BaseController {
queryWrapper.eq(CtTaskFeedback::getTaskId,ctTaskFeedback.getTaskId());
}
//任务id
if(Validator.isNotEmpty(ctTaskFeedback.getTaskTagId())){
queryWrapper.eq(CtTaskFeedback::getTaskTagId,ctTaskFeedback.getTaskTagId());
}
//机构任务id
if(Validator.isNotEmpty(ctTaskFeedback.getTaskBranchId())){
queryWrapper.eq(CtTaskFeedback::getTaskBranchId,ctTaskFeedback.getTaskBranchId());

@ -11,11 +11,10 @@ import com.bs.cm.domain.CmAttach;
import com.bs.cm.service.ICmAttachService;
import com.bs.common.core.domain.entity.SysDept;
import com.bs.common.core.domain.model.LoginUser;
import com.bs.ct.domain.CtTaskBranch;
import com.bs.ct.domain.CtTaskFeedback;
import com.bs.ct.domain.CtTaskTemplate;
import com.bs.ct.domain.*;
import com.bs.ct.service.ICtTaskBranchService;
import com.bs.ct.service.ICtTaskFeedbackService;
import com.bs.ct.service.ICtTaskTagService;
import com.bs.system.service.ISysDeptService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -37,7 +36,6 @@ import com.bs.common.enums.BusinessType;
import com.bs.common.utils.poi.ExcelUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import cn.hutool.core.lang.Validator;
import com.bs.ct.domain.CtTaskInfo;
import com.bs.ct.service.ICtTaskInfoService;
import javax.annotation.Resource;
@ -61,6 +59,9 @@ public class CtTaskInfoController extends BaseController {
private ICmAttachService cmAttachService;
@Resource
private ICtTaskFeedbackService ctTaskFeedbackService;
@Resource
private ICtTaskTagService ctTaskTagService;
/**
*
*/
@ -335,7 +336,17 @@ public class CtTaskInfoController extends BaseController {
if ("1".equals(ctTaskInfo.getStatus())) {
ctTaskInfo.setTaskDate(new Date());
}
return toAjax(ctTaskInfoService.save(ctTaskInfo));
boolean save = ctTaskInfoService.save(ctTaskInfo);
if (save) {
List<CtTaskTag> tasgs = ctTaskInfo.getTags();
if (null != tasgs && tasgs.size() > 0) {
for (CtTaskTag taskTag : tasgs){
taskTag.setTaskId(ctTaskInfo.getId());
}
ctTaskTagService.saveBatch(tasgs);
}
}
return toAjax(true);
}
/**
@ -363,6 +374,13 @@ public class CtTaskInfoController extends BaseController {
ctTaskInfo.setTaskDate(new Date());
ctTaskInfo.setTaskInitiator(loginUser.getUsername());
}
List<CtTaskTag> tasgs = ctTaskInfo.getTags();
if (null != tasgs && tasgs.size() > 0) {
for (CtTaskTag taskTag : tasgs) {
taskTag.setTaskId(ctTaskInfo.getId());
}
ctTaskTagService.saveOrUpdateBatch(tasgs);
}
return toAjax(ctTaskInfoService.updateById(ctTaskInfo));
}

@ -89,6 +89,17 @@ public class CtTaskTemplateController extends BaseController {
.skip(start) // 跳过前4条数据
.limit(pageSize) // 最多取6条数据
.collect(Collectors.toList());
for (CtTaskTemplate taskTemplate : result) {
List<CtTaskTemplateTag> listTag = ctTaskTemplateTagService.list(new LambdaQueryWrapper<CtTaskTemplateTag>()
.eq(CtTaskTemplateTag::getTemplateId,taskTemplate.getId()));
for (CtTaskTemplateTag ctTaskTemplateTag : listTag) {
List<CmAttach> cmAttaches = cmAttachService.list(new LambdaQueryWrapper<CmAttach>().eq(CmAttach::getFileId, ctTaskTemplateTag.getFileId()));
if (null != cmAttaches && cmAttaches.size() > 0) {
ctTaskTemplateTag.setFiles(cmAttaches);
}
}
taskTemplate.setTags(listTag);
}
TableDataInfo data = getDataTable(result);
data.setTotal(ctTaskTemplates.size());
return data;

@ -109,5 +109,18 @@ public class CtGalleryImages extends BaseEntity{
@TableField(exist = false)
private List<CmAttach> file;
@TableField(exist = false)
private List<Long> ids;
@TableField(exist = false)
private Long taskTagId;
@TableField(exist = false)
private List<CtGalleryImagesTag> imagesTags;
@TableField(exist = false)
private Long feedbackId;
@TableField(exist = false)
private String imageType;
}

@ -47,6 +47,36 @@ public class CtGalleryImagesTag extends BaseEntity{
@ApiModelProperty(value = "标签名称")
private String tagName;
/** 标签说明 */
@Excel(name = "标签说明")
@ApiModelProperty(value = "标签说明")
private String tagDesc;
/** 是否需要拍照 */
@Excel(name = "是否需要拍照")
@ApiModelProperty(value = "是否需要拍照")
private String isPhoto;
/** 拍照数量要求 */
@Excel(name = "拍照数量要求")
@ApiModelProperty(value = "拍照数量要求")
private Long photoNum;
/** 照片存放目录 */
@Excel(name = "照片存放目录")
@ApiModelProperty(value = "照片存放目录")
private Long saveDir;
/** 附件id */
@Excel(name = "附件id")
@ApiModelProperty(value = "附件id")
private Long fileId;
/** 备注 */
@Excel(name = "备注")

@ -0,0 +1,42 @@
package com.bs.ct.domain;
import com.bs.common.annotation.Excel;
import com.bs.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
/**
* ct_images_feedback_ref
*
* @author bs
* @date 2025-04-20
*/
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ct_images_feedback_ref")
@Data
public class CtImagesFeedbackRef extends BaseEntity{
private static final long serialVersionUID = 1L;
/** 图片id */
@Excel(name = "图片id")
@ApiModelProperty(value = "图片id")
private Long imageId;
/** 任务反馈id */
@Excel(name = "任务反馈id")
@ApiModelProperty(value = "任务反馈id")
private Long feedbackId;
}

@ -205,4 +205,7 @@ public class CtTaskBranch extends BaseEntity{
@TableField(exist = false)
private Integer pageSize;
@TableField(exist = false)
private List<CtTaskTag> ctTaskTags;
}

@ -40,12 +40,24 @@ public class CtTaskFeedback extends BaseEntity{
@ApiModelProperty(value = "任务id")
private Long taskId;
/** 任务标签id */
@Excel(name = "任务标签id")
@ApiModelProperty(value = "任务标签id")
private Long taskTagId;
/** 任务id */
@Excel(name = "任务id")
@TableField(exist = false)
private List<Long> taskIds;
/** 图片id */
@Excel(name = "图片id")
@TableField(exist = false)
private List<Long> imageIds;
/** 机构任务id */
@Excel(name = "机构任务id")

@ -175,4 +175,9 @@ public class CtTaskInfo extends BaseEntity{
@TableField(exist = false)
private CtTaskFeedback sdTaskOtherFeedbackByFeedback;
@TableField(exist = false)
private List<CtTaskTag> tags;
}

@ -1,5 +1,6 @@
package com.bs.ct.domain;
import com.bs.cm.domain.CmAttach;
import com.bs.common.annotation.Excel;
import com.bs.common.core.domain.BaseEntity;
import lombok.Data;
@ -11,6 +12,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
/**
* ct_task_tag
*
@ -82,7 +85,8 @@ public class CtTaskTag extends BaseEntity{
@ApiModelProperty(value = "备注")
private String remarks;
@TableField(exist = false)
private List<CtTaskFeedback> ctTaskFeedbacks;
}

@ -0,0 +1,14 @@
package com.bs.ct.mapper;
import com.bs.common.mybatis.mapper.BaseMapperX;
import com.bs.ct.domain.CtImagesFeedbackRef;
/**
* Mapper
*
* @author bs
* @date 2025-04-20
*/
public interface CtImagesFeedbackRefMapper extends BaseMapperX<CtImagesFeedbackRef> {
}

@ -0,0 +1,14 @@
package com.bs.ct.service;
import com.github.yulichang.base.MPJBaseService;
import com.bs.ct.domain.CtImagesFeedbackRef;
/**
* Service
*
* @author bs
* @date 2025-04-20
*/
public interface ICtImagesFeedbackRefService extends MPJBaseService<CtImagesFeedbackRef>{
}

@ -0,0 +1,19 @@
package com.bs.ct.service.impl;
import com.bs.ct.mapper.CtImagesFeedbackRefMapper;
import com.bs.ct.domain.CtImagesFeedbackRef;
import com.bs.ct.service.ICtImagesFeedbackRefService;
import com.github.yulichang.base.MPJBaseServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* Service
*
* @author bs
* @date 2025-04-20
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class CtImagesFeedbackRefServiceImpl extends MPJBaseServiceImpl<CtImagesFeedbackRefMapper, CtImagesFeedbackRef> implements ICtImagesFeedbackRefService {
}

@ -0,0 +1,252 @@
package com.bs.ct.utils;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
/**
* @author oucq
* @version Aug 3, 2016 6:13:55 PM
*
*
*/
public class OperateImageUtils {
/**
* @param fileUrl
*
* @return
* @throws IOException
* IO
*/
public static BufferedImage getBufferedImage(String fileUrl) throws IOException {
File f = new File(fileUrl);
return ImageIO.read(f);
}
/**
* @param savedImg
*
* @param saveDir
*
* @param fileName
* "beauty.jpg"
* @param format
* jpgpngbmp
* @return
*/
public static boolean saveImage(BufferedImage savedImg, String saveDir, String fileName, String format) {
boolean flag = false;
// 先检查保存的图片格式是否正确
String[] legalFormats = { "jpg", "JPG", "png", "PNG", "bmp", "BMP" };
int i = 0;
for (i = 0; i < legalFormats.length; i++) {
if (format.equals(legalFormats[i])) {
break;
}
}
if (i == legalFormats.length) { // 图片格式不支持
System.out.println("不是保存所支持的图片格式!");
return false;
}
// 再检查文件后缀和保存的格式是否一致
String postfix = fileName.substring(fileName.lastIndexOf('.') + 1);
if (!postfix.equalsIgnoreCase(format)) {
System.out.println("待保存文件后缀和保存的格式不一致!");
return false;
}
String fileUrl = saveDir + fileName;
File file = new File(fileUrl);
try {
flag = ImageIO.write(savedImg, format, file);
} catch (IOException e) {
e.printStackTrace();
}
return flag;
}
/**
*
* mergeImage
*
* @param img1
*
* @param img2
*
* @param isHorizontal
* truefalse
* @return BufferedImage
* @throws IOException
*/
public static BufferedImage mergeImage(boolean isHorizontal, BufferedImage img1, BufferedImage img2)
throws IOException {
int w1 = img1.getWidth();
int h1 = img1.getHeight();
int w2 = img2.getWidth();
int h2 = img2.getHeight();
// 从图片中读取RGB
int[] ImageArrayOne = new int[w1 * h1];
ImageArrayOne = img1.getRGB(0, 0, w1, h1, ImageArrayOne, 0, w1); // 逐行扫描图像中各个像素的RGB到数组中
int[] ImageArrayTwo = new int[w2 * h2];
ImageArrayTwo = img2.getRGB(0, 0, w2, h2, ImageArrayTwo, 0, w2);
// 生成新图片
BufferedImage DestImage = null;
if (isHorizontal) { // 水平方向合并
DestImage = new BufferedImage(w1 + w2, h1, BufferedImage.TYPE_INT_RGB);
DestImage.setRGB(0, 0, w1, h1, ImageArrayOne, 0, w1); // 设置上半部分或左半部分的RGB
DestImage.setRGB(w1, 0, w2, h2, ImageArrayTwo, 0, w2);
} else { // 垂直方向合并
DestImage = new BufferedImage(w1, h1 + h2, BufferedImage.TYPE_INT_RGB);
DestImage.setRGB(0, 0, w1, h1, ImageArrayOne, 0, w1); // 设置上半部分或左半部分的RGB
DestImage.setRGB(0, h1, w2, h2, ImageArrayTwo, 0, w2); // 设置下半部分的RGB
}
return DestImage;
}
/**
* @param isHorizontal truefasle
* @param imgs
* @return
* @throws IOException
*/
public static BufferedImage mergeImage(boolean isHorizontal, BufferedImage... imgs) throws IOException {
// 生成新图片
BufferedImage DestImage = null;
// 计算新图片的长和高
int allw = 0, allh = 0, allwMax = 0, allhMax = 0;
for (BufferedImage img : imgs) {
allw += img.getWidth();
allh += img.getHeight();
if (img.getWidth() > allwMax) {
allwMax = img.getWidth();
}
;
if (img.getHeight() > allhMax) {
allhMax = img.getHeight();
}
;
}
// 创建新图片
if (isHorizontal) {
DestImage = new BufferedImage(allw, allhMax, BufferedImage.TYPE_INT_RGB);
} else {
DestImage = new BufferedImage(allwMax, allh, BufferedImage.TYPE_INT_RGB);
}
// 合并所有子图片到新图片
int wx = 0, wy = 0;
for (int i = 0; i < imgs.length; i++) {
BufferedImage img = imgs[i];
int w1 = img.getWidth();
int h1 = img.getHeight();
// 从图片中读取RGB
int[] ImageArrayOne = new int[w1 * h1];
ImageArrayOne = img.getRGB(0, 0, w1, h1, ImageArrayOne, 0, w1); // 逐行扫描图像中各个像素的RGB到数组中
if (isHorizontal) { // 水平方向合并
DestImage.setRGB(wx, 0, w1, h1, ImageArrayOne, 0, w1); // 设置上半部分或左半部分的RGB
} else { // 垂直方向合并
DestImage.setRGB(0, wy, w1, h1, ImageArrayOne, 0, w1); // 设置上半部分或左半部分的RGB
}
wx += w1;
wy += h1;
}
return DestImage;
}
/**
*
* @param rows
* @param cols
* @param imgs
* @return BufferedImage
* @throws IOException
*/
public static BufferedImage mergeImageToGrid(int rows, int cols, BufferedImage... imgs) throws IOException {
if (imgs.length < rows * cols) {
throw new IllegalArgumentException("图片数量不足,无法组成指定的网格");
}
// 计算新图片的宽度和高度
int maxWidth = 0;
int maxHeight = 0;
for (BufferedImage img : imgs) {
maxWidth = Math.max(maxWidth, img.getWidth());
maxHeight = Math.max(maxHeight, img.getHeight());
}
int newWidth = maxWidth * cols;
int newHeight = maxHeight * rows;
// 创建新图片
BufferedImage destImage = new BufferedImage(newWidth, newHeight, BufferedImage.TYPE_INT_RGB);
// 合并图片到新图片
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
int index = i * cols + j;
BufferedImage img = imgs[index];
int x = j * maxWidth;
int y = i * maxHeight;
int[] imageArray = new int[img.getWidth() * img.getHeight()];
imageArray = img.getRGB(0, 0, img.getWidth(), img.getHeight(), imageArray, 0, img.getWidth());
destImage.setRGB(x, y, img.getWidth(), img.getHeight(), imageArray, 0, img.getWidth());
}
}
return destImage;
}
public static void main(String[] args) {
try {
// 读取待合并的文件
BufferedImage[] imgs = new BufferedImage[9];
for (int i = 0; i < 9; i++) {
imgs[i] = getBufferedImage("D:\\edge下载\\下载\\1_2019年-2024年数据\\" + (i + 1) + ".jpg");
}
// 合并成九宫格
BufferedImage destImg = mergeImageToGrid(3, 3, imgs);
saveImage(destImg, "D:\\edge下载\\下载\\1_2019年-2024年数据\\", "nineGrid.jpg", "jpg");
System.out.println("九宫格合并完毕!");
// 合并成四宫格
BufferedImage[] fourImgs = new BufferedImage[4];
System.arraycopy(imgs, 0, fourImgs, 0, 4);
destImg = mergeImageToGrid(2, 2, fourImgs);
saveImage(destImg, "D:\\edge下载\\下载\\1_2019年-2024年数据\\", "fourGrid.jpg", "jpg");
System.out.println("四宫格合并完毕!");
// 测试水平合并
BufferedImage horizontalMergedImg = mergeImage(true, imgs[0], imgs[1]);
saveImage(horizontalMergedImg, "D:\\edge下载\\下载\\1_2019年-2024年数据\\", "horizontalMerge.jpg", "jpg");
System.out.println("水平合并完毕!");
// 测试垂直合并
BufferedImage verticalMergedImg = mergeImage(false, imgs[0], imgs[1]);
saveImage(verticalMergedImg, "D:\\edge下载\\下载\\1_2019年-2024年数据\\", "verticalMerge.jpg", "jpg");
System.out.println("垂直合并完毕!");
// 测试多张图片水平合并
BufferedImage multiHorizontalMergedImg = mergeImage(true, imgs[0], imgs[1], imgs[2]);
saveImage(multiHorizontalMergedImg, "D:\\edge下载\\下载\\1_2019年-2024年数据\\", "multiHorizontalMerge.jpg", "jpg");
System.out.println("多张图片水平合并完毕!");
// 测试多张图片垂直合并
BufferedImage multiVerticalMergedImg = mergeImage(false, imgs[0], imgs[1], imgs[2]);
saveImage(multiVerticalMergedImg, "D:\\edge下载\\下载\\1_2019年-2024年数据\\", "multiVerticalMerge.jpg", "jpg");
System.out.println("多张图片垂直合并完毕!");
} catch (IOException e) {
e.printStackTrace();
}
}
}

@ -274,14 +274,24 @@ public class CommonController
}
List<CmAttach> list = cmAttachService.list(new LambdaQueryWrapper<CmAttach>()
.eq(CmAttach::getFileId, attachVo.getFileId()));
List<CtGalleryImages> ctGalleryImages = ctGalleryImagesService.list(new LambdaQueryWrapper<CtGalleryImages>()
.eq(CtGalleryImages::getFileId, attachVo.getFileId()));
if (null != list && list.size() > 0) {
for (CmAttach cmAttach : list) {
cmAttach.setOldName(attachVo.getOldName());
String attachUrlNew = newAttachUrl.replace("/uploadPath", "/profile");
System.out.println(newAttachUrl);
String attachUrlNew = "/profile" + newAttachUrl;
cmAttach.setAttachFileUrl(attachUrlNew);
}
cmAttachService.updateBatchById(list);
}
if (null != ctGalleryImages && ctGalleryImages.size() > 0) {
for (CtGalleryImages ctGalleryImage : ctGalleryImages) {
String attachUrlNew = "/profile" + newAttachUrl;
ctGalleryImage.setImagePath(attachUrlNew);
}
ctGalleryImagesService.updateBatchById(ctGalleryImages);
}
return AjaxResult.success();
}

@ -0,0 +1,7 @@
<?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">
<mapper namespace="com.bs.ct.mapper.CtImagesFeedbackRefMapper">
</mapper>
Loading…
Cancel
Save