Browse Source

图稿库的新增,修改,删除功能添加

xiaomi 1 year ago
parent
commit
ddd95f4dcf

+ 684 - 0
sd-business/src/main/java/com/sd/business/a-json/ArtworkLibraryApi.json

@@ -0,0 +1,684 @@
+{
+  "openapi": "3.0.1",
+  "tags": [
+    {
+      "name": "图稿库"
+    }
+  ],
+  "paths": {
+    "/artworkLibrary/list": {
+      "post": {
+        "summary": "列表",
+        "tags": [
+          "图稿库"
+        ],
+        "requestBody": {
+          "content": {
+            "application/json": {
+              "schema": {
+                "type": null,
+                "required": null,
+                "title": null,
+                "properties": null,
+                "items": null
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "成功",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "type": "object",
+                  "required": [
+                    "code",
+                    "success",
+                    "msg",
+                    "data"
+                  ],
+                  "title": null,
+                  "properties": {
+                    "code": {
+                      "type": "Integer",
+                      "required": null,
+                      "title": null,
+                      "properties": null,
+                      "items": null
+                    },
+                    "success": {
+                      "type": "boolean",
+                      "required": null,
+                      "title": null,
+                      "properties": null,
+                      "items": null
+                    },
+                    "msg": {
+                      "type": "string",
+                      "required": null,
+                      "title": null,
+                      "properties": null,
+                      "items": null
+                    },
+                    "data": {
+                      "type": "array",
+                      "required": null,
+                      "title": null,
+                      "properties": null,
+                      "items": {
+                        "type": "object",
+                        "required": null,
+                        "title": null,
+                        "properties": {
+                          "id": {
+                            "type": "integer",
+                            "required": null,
+                            "title": "id",
+                            "properties": null,
+                            "items": null
+                          },
+                          "artworkName": {
+                            "type": "string",
+                            "required": null,
+                            "title": "图稿名称",
+                            "properties": null,
+                            "items": null
+                          },
+                          "artworkUploadImgUrl": {
+                            "type": "string",
+                            "required": null,
+                            "title": "图稿图片地址",
+                            "properties": null,
+                            "items": null
+                          },
+                          "artworkUploadFileUrl": {
+                            "type": "string",
+                            "required": null,
+                            "title": "图稿文件地址",
+                            "properties": null,
+                            "items": null
+                          },
+                          "createTime": {
+                            "type": "string",
+                            "required": null,
+                            "title": "创建时间",
+                            "properties": null,
+                            "items": null
+                          },
+                          "updateTime": {
+                            "type": "string",
+                            "required": null,
+                            "title": "修改时间",
+                            "properties": null,
+                            "items": null
+                          }
+                        },
+                        "items": null
+                      }
+                    }
+                  },
+                  "items": null
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/artworkLibrary/page": {
+      "post": {
+        "summary": "分页",
+        "tags": [
+          "图稿库"
+        ],
+        "requestBody": {
+          "content": {
+            "application/json": {
+              "schema": {
+                "type": "object",
+                "required": [
+                  "pageNum",
+                  "pageSize"
+                ],
+                "title": null,
+                "properties": {
+                  "pageNum": {
+                    "type": "integer",
+                    "required": null,
+                    "title": "页数",
+                    "properties": null,
+                    "items": null
+                  },
+                  "pageSize": {
+                    "type": "integer",
+                    "required": null,
+                    "title": "每页大小",
+                    "properties": null,
+                    "items": null
+                  }
+                },
+                "items": null
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "成功",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "type": "object",
+                  "required": [
+                    "code",
+                    "success",
+                    "msg",
+                    "data"
+                  ],
+                  "title": null,
+                  "properties": {
+                    "code": {
+                      "type": "Integer",
+                      "required": null,
+                      "title": null,
+                      "properties": null,
+                      "items": null
+                    },
+                    "success": {
+                      "type": "boolean",
+                      "required": null,
+                      "title": null,
+                      "properties": null,
+                      "items": null
+                    },
+                    "msg": {
+                      "type": "string",
+                      "required": null,
+                      "title": null,
+                      "properties": null,
+                      "items": null
+                    },
+                    "data": {
+                      "type": "object",
+                      "required": [
+                        "rows",
+                        "total"
+                      ],
+                      "title": null,
+                      "properties": {
+                        "rows": {
+                          "type": "array",
+                          "required": null,
+                          "title": "分页数据",
+                          "properties": null,
+                          "items": {
+                            "type": "object",
+                            "required": null,
+                            "title": null,
+                            "properties": {
+                              "id": {
+                                "type": "integer",
+                                "required": null,
+                                "title": "id",
+                                "properties": null,
+                                "items": null
+                              },
+                              "artworkName": {
+                                "type": "string",
+                                "required": null,
+                                "title": "图稿名称",
+                                "properties": null,
+                                "items": null
+                              },
+                              "artworkUploadImgUrl": {
+                                "type": "string",
+                                "required": null,
+                                "title": "图稿图片地址",
+                                "properties": null,
+                                "items": null
+                              },
+                              "artworkUploadFileUrl": {
+                                "type": "string",
+                                "required": null,
+                                "title": "图稿文件地址",
+                                "properties": null,
+                                "items": null
+                              },
+                              "createTime": {
+                                "type": "string",
+                                "required": null,
+                                "title": "创建时间",
+                                "properties": null,
+                                "items": null
+                              },
+                              "updateTime": {
+                                "type": "string",
+                                "required": null,
+                                "title": "修改时间",
+                                "properties": null,
+                                "items": null
+                              }
+                            },
+                            "items": null
+                          }
+                        },
+                        "total": {
+                          "type": "integer",
+                          "required": null,
+                          "title": "总条数",
+                          "properties": null,
+                          "items": null
+                        }
+                      },
+                      "items": null
+                    }
+                  },
+                  "items": null
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/artworkLibrary/detail": {
+      "post": {
+        "summary": "明细",
+        "tags": [
+          "图稿库"
+        ],
+        "requestBody": {
+          "content": {
+            "application/json": {
+              "schema": {
+                "type": "object",
+                "required": [
+                  "id"
+                ],
+                "title": null,
+                "properties": {
+                  "id": {
+                    "type": "integer",
+                    "required": null,
+                    "title": "图稿库id",
+                    "properties": null,
+                    "items": null
+                  }
+                },
+                "items": null
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "成功",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "type": "object",
+                  "required": [
+                    "code",
+                    "success",
+                    "msg",
+                    "data"
+                  ],
+                  "title": null,
+                  "properties": {
+                    "code": {
+                      "type": "Integer",
+                      "required": null,
+                      "title": null,
+                      "properties": null,
+                      "items": null
+                    },
+                    "success": {
+                      "type": "boolean",
+                      "required": null,
+                      "title": null,
+                      "properties": null,
+                      "items": null
+                    },
+                    "msg": {
+                      "type": "string",
+                      "required": null,
+                      "title": null,
+                      "properties": null,
+                      "items": null
+                    },
+                    "data": {
+                      "type": "object",
+                      "required": null,
+                      "title": null,
+                      "properties": {
+                        "id": {
+                          "type": "integer",
+                          "required": null,
+                          "title": "id",
+                          "properties": null,
+                          "items": null
+                        },
+                        "artworkName": {
+                          "type": "string",
+                          "required": null,
+                          "title": "图稿名称",
+                          "properties": null,
+                          "items": null
+                        },
+                        "artworkUploadImgUrl": {
+                          "type": "string",
+                          "required": null,
+                          "title": "图稿图片地址",
+                          "properties": null,
+                          "items": null
+                        },
+                        "artworkUploadFileUrl": {
+                          "type": "string",
+                          "required": null,
+                          "title": "图稿文件地址",
+                          "properties": null,
+                          "items": null
+                        },
+                        "createTime": {
+                          "type": "string",
+                          "required": null,
+                          "title": "创建时间",
+                          "properties": null,
+                          "items": null
+                        },
+                        "updateTime": {
+                          "type": "string",
+                          "required": null,
+                          "title": "修改时间",
+                          "properties": null,
+                          "items": null
+                        }
+                      },
+                      "items": null
+                    }
+                  },
+                  "items": null
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/artworkLibrary/add": {
+      "post": {
+        "summary": "新增",
+        "tags": [
+          "图稿库"
+        ],
+        "requestBody": {
+          "content": {
+            "application/json": {
+              "schema": {
+                "type": "object",
+                "required": null,
+                "title": null,
+                "properties": {
+                  "artworkName": {
+                    "type": "string",
+                    "required": null,
+                    "title": "图稿名称",
+                    "properties": null,
+                    "items": null
+                  },
+                  "artworkUploadImgUrl": {
+                    "type": "string",
+                    "required": null,
+                    "title": "图稿图片地址",
+                    "properties": null,
+                    "items": null
+                  },
+                  "artworkUploadFileUrl": {
+                    "type": "string",
+                    "required": null,
+                    "title": "图稿文件地址",
+                    "properties": null,
+                    "items": null
+                  }
+                },
+                "items": null
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "成功",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "type": "object",
+                  "required": [
+                    "code",
+                    "success",
+                    "msg",
+                    "data"
+                  ],
+                  "title": null,
+                  "properties": {
+                    "code": {
+                      "type": "Integer",
+                      "required": null,
+                      "title": null,
+                      "properties": null,
+                      "items": null
+                    },
+                    "success": {
+                      "type": "boolean",
+                      "required": null,
+                      "title": null,
+                      "properties": null,
+                      "items": null
+                    },
+                    "msg": {
+                      "type": "string",
+                      "required": null,
+                      "title": null,
+                      "properties": null,
+                      "items": null
+                    },
+                    "data": {
+                      "type": null,
+                      "required": null,
+                      "title": null,
+                      "properties": null,
+                      "items": null
+                    }
+                  },
+                  "items": null
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/artworkLibrary/edit": {
+      "post": {
+        "summary": "编辑",
+        "tags": [
+          "图稿库"
+        ],
+        "requestBody": {
+          "content": {
+            "application/json": {
+              "schema": {
+                "type": "object",
+                "required": null,
+                "title": null,
+                "properties": {
+                  "id": {
+                    "type": "integer",
+                    "required": null,
+                    "title": "id",
+                    "properties": null,
+                    "items": null
+                  },
+                  "artworkName": {
+                    "type": "string",
+                    "required": null,
+                    "title": "图稿名称",
+                    "properties": null,
+                    "items": null
+                  },
+                  "artworkUploadImgUrl": {
+                    "type": "string",
+                    "required": null,
+                    "title": "图稿图片地址",
+                    "properties": null,
+                    "items": null
+                  },
+                  "artworkUploadFileUrl": {
+                    "type": "string",
+                    "required": null,
+                    "title": "图稿文件地址",
+                    "properties": null,
+                    "items": null
+                  }
+                },
+                "items": null
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "成功",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "type": "object",
+                  "required": [
+                    "code",
+                    "success",
+                    "msg",
+                    "data"
+                  ],
+                  "title": null,
+                  "properties": {
+                    "code": {
+                      "type": "Integer",
+                      "required": null,
+                      "title": null,
+                      "properties": null,
+                      "items": null
+                    },
+                    "success": {
+                      "type": "boolean",
+                      "required": null,
+                      "title": null,
+                      "properties": null,
+                      "items": null
+                    },
+                    "msg": {
+                      "type": "string",
+                      "required": null,
+                      "title": null,
+                      "properties": null,
+                      "items": null
+                    },
+                    "data": {
+                      "type": null,
+                      "required": null,
+                      "title": null,
+                      "properties": null,
+                      "items": null
+                    }
+                  },
+                  "items": null
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/artworkLibrary/delete": {
+      "post": {
+        "summary": "删除",
+        "tags": [
+          "图稿库"
+        ],
+        "requestBody": {
+          "content": {
+            "application/json": {
+              "schema": {
+                "type": "object",
+                "required": [
+                  "id"
+                ],
+                "title": null,
+                "properties": {
+                  "id": {
+                    "type": "integer",
+                    "required": null,
+                    "title": "图稿库id",
+                    "properties": null,
+                    "items": null
+                  }
+                },
+                "items": null
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "成功",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "type": "object",
+                  "required": [
+                    "code",
+                    "success",
+                    "msg",
+                    "data"
+                  ],
+                  "title": null,
+                  "properties": {
+                    "code": {
+                      "type": "Integer",
+                      "required": null,
+                      "title": null,
+                      "properties": null,
+                      "items": null
+                    },
+                    "success": {
+                      "type": "boolean",
+                      "required": null,
+                      "title": null,
+                      "properties": null,
+                      "items": null
+                    },
+                    "msg": {
+                      "type": "string",
+                      "required": null,
+                      "title": null,
+                      "properties": null,
+                      "items": null
+                    },
+                    "data": {
+                      "type": null,
+                      "required": null,
+                      "title": null,
+                      "properties": null,
+                      "items": null
+                    }
+                  },
+                  "items": null
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+}

+ 4 - 4
sd-business/src/main/java/com/sd/business/controller/artwork/ArtworkLibraryController.java

@@ -16,8 +16,8 @@ import java.util.List;
  * 图稿库 前端控制器
  * </p>
  *
- * @author dk
- * @since 2023-08-01
+ * @author
+ * @since 2023-08-02
  */
 @RestController
 @RequestMapping("/artworkLibrary")
@@ -54,7 +54,7 @@ public class ArtworkLibraryController {
      * 图稿库新增
      */
     @PostMapping("/add")
-    public void add(@RequestBody List<ArtworkLibraryDto> artworkLibraryDto) {
+    public void add(@RequestBody ArtworkLibraryDto artworkLibraryDto) {
         artworkLibraryService.add(artworkLibraryDto);
     }
 
@@ -62,7 +62,7 @@ public class ArtworkLibraryController {
      * 图稿库编辑
      */
     @PostMapping("/edit")
-    public void edit(@RequestBody List<ArtworkLibraryDto> artworkLibraryDto) {
+    public void edit(@RequestBody ArtworkLibraryDto artworkLibraryDto) {
         artworkLibraryService.edit(artworkLibraryDto);
     }
 

+ 3 - 3
sd-business/src/main/java/com/sd/business/entity/artwork/dto/ArtworkLibraryDto.java

@@ -7,15 +7,15 @@ import lombok.Setter;
 /**
  * 图稿库新增编辑入参实体
  *
- * @author dk
- * @since 2023-08-01
+ * @author
+ * @since 2023-08-02
  */
 @Getter
 @Setter
 public class ArtworkLibraryDto extends ArtworkLibrary {
 
     /**
-     * 图id
+     * 图稿id
      */
     private Long artworkId;
 }

+ 2 - 2
sd-business/src/main/java/com/sd/business/entity/artwork/dto/ArtworkLibrarySelectDto.java

@@ -7,8 +7,8 @@ import lombok.Setter;
 /**
  * 图稿库列表查询入参实体
  *
- * @author dk
- * @since 2023-08-01
+ * @author
+ * @since 2023-08-02
  */
 @Getter
 @Setter

+ 11 - 8
sd-business/src/main/java/com/sd/business/entity/artwork/po/ArtworkLibrary.java

@@ -1,7 +1,10 @@
 package com.sd.business.entity.artwork.po;
 
-import com.ruoyi.common.core.domain.BaseIdPo;
+import com.ruoyi.common.core.domain.BasePo;
 import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.util.Date;
+
 import lombok.Getter;
 import lombok.Setter;
 
@@ -10,13 +13,13 @@ import lombok.Setter;
  * 图稿库
  * </p>
  *
- * @author dk
- * @since 2023-08-01
+ * @author
+ * @since 2023-08-02
  */
 @Getter
 @Setter
 @TableName("artwork_library")
-public class ArtworkLibrary extends BaseIdPo {
+public class ArtworkLibrary extends BasePo {
 
     /**
      * 图稿名称
@@ -24,13 +27,13 @@ public class ArtworkLibrary extends BaseIdPo {
     private String artworkName;
 
     /**
-     * 图稿上传地址
+     * 图稿图片地址
      */
-    private String artworkUploadUrl;
+    private String artworkUploadImgUrl;
 
     /**
-     * 地址类型(0图片  1文件)
+     * 图稿文件地址
      */
-    private Long artworkTepy;
+    private String artworkUploadFileUrl;
 
 }

+ 2 - 2
sd-business/src/main/java/com/sd/business/entity/artwork/vo/ArtworkLibraryVo.java

@@ -7,8 +7,8 @@ import lombok.Setter;
 /**
  * 图稿库列表查询返回值实体
  *
- * @author dk
- * @since 2023-08-01
+ * @author
+ * @since 2023-08-02
  */
 @Getter
 @Setter

+ 9 - 2
sd-business/src/main/java/com/sd/business/mapper/artwork/ArtworkLibraryMapper.java

@@ -14,8 +14,8 @@ import java.util.List;
  * 图稿库 Mapper 接口
  * </p>
  *
- * @author dk
- * @since 2023-08-01
+ * @author
+ * @since 2023-08-02
  */
 public interface ArtworkLibraryMapper extends BaseMapper<ArtworkLibrary> {
 
@@ -29,4 +29,11 @@ public interface ArtworkLibraryMapper extends BaseMapper<ArtworkLibrary> {
      */
     Page<ArtworkLibraryVo> getPage(@Param("page") Page<Object> page, @Param("ew") IWrapper<ArtworkLibrary> wrapper);
 
+    /**
+     * 根据图稿名称获取图稿信息
+     *
+     * @param artworkName
+     * @return
+     */
+    ArtworkLibrary getArtworkName(@Param("artworkName") String artworkName);
 }

+ 4 - 4
sd-business/src/main/java/com/sd/business/service/artwork/ArtworkLibraryService.java

@@ -14,8 +14,8 @@ import java.util.List;
  * 图稿库 服务类
  * </p>
  *
- * @author dk
- * @since 2023-08-01
+ * @author
+ * @since 2023-08-02
  */
 public interface ArtworkLibraryService extends BaseService<ArtworkLibrary> {
 
@@ -37,12 +37,12 @@ public interface ArtworkLibraryService extends BaseService<ArtworkLibrary> {
     /**
      * 图稿库新增
      */
-    void add(List<ArtworkLibraryDto> artworkLibraryDto);
+    void add(ArtworkLibraryDto artworkLibraryDto);
 
     /**
      * 图稿库编辑
      */
-    void edit(List<ArtworkLibraryDto> artworkLibraryDto);
+    void edit(ArtworkLibraryDto artworkLibraryDto);
 
     /**
      * 图稿库删除

+ 26 - 36
sd-business/src/main/java/com/sd/business/service/artwork/impl/ArtworkLibraryServiceImpl.java

@@ -1,11 +1,11 @@
 package com.sd.business.service.artwork.impl;
 
 import cn.hutool.core.collection.CollUtil;
-import com.ruoyi.common.utils.StringUtils;
 import com.sd.business.entity.artwork.po.ArtworkLibrary;
 import com.sd.business.mapper.artwork.ArtworkLibraryMapper;
 import com.sd.business.service.artwork.ArtworkLibraryService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.sd.business.entity.artwork.vo.ArtworkLibraryVo;
@@ -15,6 +15,7 @@ import com.sd.business.entity.artwork.dto.ArtworkLibraryDto;
 import cn.hutool.core.bean.BeanUtil;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 
 /**
@@ -22,8 +23,8 @@ import java.util.List;
  * 图稿库 服务实现类
  * </p>
  *
- * @author dk
- * @since 2023-08-01
+ * @author
+ * @since 2023-08-02
  */
 @Service
 public class ArtworkLibraryServiceImpl extends ServiceImpl<ArtworkLibraryMapper, ArtworkLibrary> implements ArtworkLibraryService {
@@ -44,12 +45,6 @@ public class ArtworkLibraryServiceImpl extends ServiceImpl<ArtworkLibraryMapper,
         return page;
     }
 
-    /**
-     * 删除图稿
-     *
-     * @param id
-     * @return
-     */
     @Override
     public ArtworkLibraryVo detail(Long id) {
         ArtworkLibrary ArtworkLibrary = this.getById(id);
@@ -63,24 +58,18 @@ public class ArtworkLibraryServiceImpl extends ServiceImpl<ArtworkLibraryMapper,
      * @param artworkLibraryDto
      */
     @Override
-    public void add(List<ArtworkLibraryDto> artworkLibraryDto) {
-        ArrayList<ArtworkLibrary> artworkList = new ArrayList<>();
-        for (ArtworkLibraryDto dto : artworkLibraryDto) {
-            ArtworkLibrary artworkLibrary = new ArtworkLibrary();
-            if (StringUtils.containsAny(dto.getArtworkUploadUrl(), ".ez3")) {
-                artworkLibrary.setArtworkName(dto.getArtworkName());
-                artworkLibrary.setArtworkUploadUrl(dto.getArtworkUploadUrl());
-                artworkLibrary.setId(dto.getArtworkId());
-                artworkLibrary.setArtworkTepy(1L);
-            } else {
-                artworkLibrary.setArtworkName(dto.getArtworkName());
-                artworkLibrary.setArtworkUploadUrl(dto.getArtworkUploadUrl());
-                artworkLibrary.setId(dto.getArtworkId());
-                artworkLibrary.setArtworkTepy(0L);
-            }
-            artworkList.add(artworkLibrary);
+    public void add(ArtworkLibraryDto artworkLibraryDto) {
+
+        String artworkName = artworkLibraryDto.getArtworkName();
+        ArtworkLibrary artworkLibrary = baseMapper.getArtworkName(artworkName);
+        if (artworkLibrary != null) {
+            throw new SecurityException("该图稿已存在!");
         }
-        this.saveBatch(artworkList);
+        ArtworkLibrary newArtworkLibrary = new ArtworkLibrary();
+        BeanUtils.copyProperties(artworkLibraryDto, newArtworkLibrary);
+        newArtworkLibrary.setId(artworkLibraryDto.getArtworkId());
+        this.save(artworkLibrary);
+
     }
 
     /**
@@ -89,18 +78,19 @@ public class ArtworkLibraryServiceImpl extends ServiceImpl<ArtworkLibraryMapper,
      * @param artworkLibraryDto
      */
     @Override
-    public void edit(List<ArtworkLibraryDto> artworkLibraryDto) {
-        ArrayList<ArtworkLibrary> artworkList = new ArrayList<>();
-        for (ArtworkLibraryDto dto : artworkLibraryDto) {
-            ArtworkLibrary artworkLibrary = new ArtworkLibrary();
-            artworkLibrary.setArtworkName(dto.getArtworkName());
-            artworkLibrary.setArtworkUploadUrl(dto.getArtworkUploadUrl());
-            artworkLibrary.setId(dto.getArtworkId());
-            artworkList.add(artworkLibrary);
-        }
-        this.updateBatchById(artworkList);
+    public void edit(ArtworkLibraryDto artworkLibraryDto) {
+        ArtworkLibrary artworkLibrary = baseMapper.selectById(artworkLibraryDto.getArtworkId());
+        artworkLibrary.setArtworkName(artworkLibraryDto.getArtworkName());
+        artworkLibrary.setArtworkUploadImgUrl(artworkLibraryDto.getArtworkUploadImgUrl());
+        artworkLibrary.setArtworkUploadFileUrl(artworkLibraryDto.getArtworkUploadFileUrl());
+        this.updateById(artworkLibrary);
     }
 
+    /**
+     * 删除图稿
+     *
+     * @param id
+     */
     @Override
     public void delete(Long id) {
         this.removeById(id);

+ 1 - 1
sd-business/src/main/java/com/sd/business/service/inventory/impl/InventoryServiceImpl.java

@@ -139,7 +139,7 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory
     @Override
     public void out(Long departmentId, Long warehouseId, List<? extends InOutFun> list) {
 
-        //存储一条数据出库的数量,可以改变
+        //存储一条数据出库的数量
         Map<Long, BigDecimal> map = list.stream()
                 .collect(Collectors.toMap(InOutFun::getBomSpecId, InOutFun::getQuantity));
 

+ 26 - 4
sd-business/src/main/resources/mapper/artwork/ArtworkLibraryMapper.xml

@@ -5,8 +5,12 @@
         select
             al.id,
             al.artwork_name,
-            al.artwork_upload_url,
-            al.artwork_tepy
+            al.artwork_upload_img_url,
+            al.artwork_upload_file_url,
+            al.create_user,
+            al.create_time,
+            al.update_user,
+            al.update_time
         from artwork_library al
             ${ew.customSqlSegment}
     </select>
@@ -15,10 +19,28 @@
         select
             al.id,
             al.artwork_name,
-            al.artwork_upload_url,
-            al.artwork_tepy
+            al.artwork_upload_img_url,
+            al.artwork_upload_file_url,
+            al.create_user,
+            al.create_time,
+            al.update_user,
+            al.update_time
         from artwork_library al
             ${ew.customSqlSegment}
     </select>
 
+    <select id="getArtworkName" resultType="com.sd.business.entity.artwork.po.ArtworkLibrary">
+        select
+            al.id,
+            al.artwork_name,
+            al.artwork_upload_img_url,
+            al.artwork_upload_file_url,
+            al.create_user,
+            al.create_time,
+            al.update_user,
+            al.update_time
+        from artwork_library al
+             where al.artwork_name = #{artworkName}
+    </select>
+
 </mapper>