|
@@ -87,7 +87,7 @@ public class TaMetaImageTagController extends BaseController {
|
87
|
87
|
}
|
88
|
88
|
|
89
|
89
|
|
90
|
|
- iTaMetaImageTagService.removeAllBy(tagIds);
|
|
90
|
+
|
91
|
91
|
|
92
|
92
|
|
93
|
93
|
iTaMetaImageTagService.saveBatch(taMetaImageTags);
|
|
@@ -108,24 +108,35 @@ public class TaMetaImageTagController extends BaseController {
|
108
|
108
|
return ResponseBean.error("删除失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
|
109
|
109
|
}
|
110
|
110
|
}
|
111
|
|
-
|
112
|
|
-
|
113
|
|
-
|
114
|
|
-
|
115
|
|
-
|
116
|
|
-
|
117
|
|
-
|
118
|
|
-
|
119
|
|
-
|
120
|
|
-
|
121
|
|
-
|
122
|
|
-
|
123
|
|
-
|
124
|
|
-
|
125
|
|
-
|
126
|
|
-
|
127
|
|
-
|
128
|
|
-
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+ * 修改对象
|
|
114
|
+ * @param id 实体ID
|
|
115
|
+ * @param taMetaImageTag 实体对象
|
|
116
|
+ * @return
|
|
117
|
+ */
|
|
118
|
+ @RequestMapping(value="/taMetaImageTag",method= RequestMethod.PUT)
|
|
119
|
+ @ApiOperation(value="更新", notes = "更新", httpMethod = "PUT", response = ResponseBean.class)
|
|
120
|
+ public ResponseBean taMetaImageTagUpdate(@ApiParam("更新内容") @RequestBody Map<String, Object> params) throws Exception{
|
|
121
|
+ String[] originTags = (String[]) params.get("originTags");
|
|
122
|
+ String[] newTags = (String[]) params.get("newTags");
|
|
123
|
+ String originImage = params.get("originImage").toString();
|
|
124
|
+ String newImage = params.get("newImage").toString();
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+ iTaMetaImageTagService.removeAllBy(originTags, originImage);
|
|
128
|
+
|
|
129
|
+ List<TaMetaImageTag> list = new ArrayList<>();
|
|
130
|
+ for (String tagId: newTags) {
|
|
131
|
+ TaMetaImageTag item = new TaMetaImageTag();
|
|
132
|
+ item.setTagId(tagId);
|
|
133
|
+ item.setImageId(newImage);
|
|
134
|
+ list.add(item);
|
|
135
|
+ }
|
|
136
|
+
|
|
137
|
+ iTaMetaImageTagService.saveBatch(list);
|
|
138
|
+ return ResponseBean.success("success");
|
|
139
|
+ }
|
129
|
140
|
|
130
|
141
|
|
131
|
142
|
|