Browse Source

Merge branch 'hotfix-20230911-updatetaskbug' into temp-pre

lixuesong 1 year ago
parent
commit
8fb325f10b

+ 7 - 2
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/controller/ApiController.java

@@ -3350,8 +3350,10 @@ public class ApiController {
 	 */
 	@ApiOperation(value = "分页查询", notes = "分页查询")
 	@GetMapping("/getH5To")
+	@SysLog("更新任务截图")
 	public R getH5To(String taskId) {
 		WmTask wmTask = wmTaskService.getById(taskId);
+		log.info("更新任务截图任务原数据:{}", wmTask);
 		if (null != wmTask) {
 			BufferedImage bufferedImage = null;
 			try {
@@ -3375,8 +3377,11 @@ public class ApiController {
 			}
 			InputStream inputStream = new ByteArrayInputStream(bs.toByteArray());
 			String path = sysFileService.uploadImgByByte(inputStream);
-			wmTask.setTaskInfoImg(path);
-			wmTaskService.updateById(wmTask);
+//			wmTask.setTaskInfoImg(path);
+			WmTask updateTask = new WmTask();
+			updateTask.setId(wmTask.getId());
+			updateTask.setTaskInfoImg(path);
+			wmTaskService.updateById(updateTask);
 		}
 		return R.ok();
 	}