mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-06-22 03:42:42 +08:00
fixed: 图片上传选择无分类的Bug
This commit is contained in:
parent
c9371b0589
commit
f4002b799b
@ -89,13 +89,15 @@ public class ResourceServiceImpl extends ServiceImpl<ResourceMapper, Resource>
|
||||
if (categoryIds != null && categoryIds.trim().length() > 0) {
|
||||
String[] idArray = categoryIds.split(",");
|
||||
List<ResourceCategoryRelation> relations = new ArrayList<>();
|
||||
for (int i = 0; i < idArray.length; i++) {
|
||||
String tmpId = idArray[i];
|
||||
|
||||
for (String s : idArray) {
|
||||
int tmpId = Integer.parseInt(s);
|
||||
if (tmpId == 0) {
|
||||
continue;
|
||||
}
|
||||
relations.add(
|
||||
new ResourceCategoryRelation() {
|
||||
{
|
||||
setCid(Integer.valueOf(tmpId));
|
||||
setCid(tmpId);
|
||||
setRid(resource.getId());
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user