添加修改标签功能
This commit is contained in:
parent
dff7ef683b
commit
51d22011bc
|
@ -82,6 +82,7 @@ public class Consortia implements Serializable {
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
|
private String tags;
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -53,6 +53,7 @@ public class ConsortiaServiceImpl extends ServiceImpl<ConsortiaDao, Consortia> i
|
||||||
return Result.error("当前用户已经绑定商家,请移除后操作!");
|
return Result.error("当前用户已经绑定商家,请移除后操作!");
|
||||||
}
|
}
|
||||||
consortia.setCreateTime(DateUtils.format(new Date()));
|
consortia.setCreateTime(DateUtils.format(new Date()));
|
||||||
|
consortia.setTags(consortia.getTags().replaceAll(",",","));
|
||||||
baseMapper.insert(consortia);
|
baseMapper.insert(consortia);
|
||||||
userEntity.setConsortiaId(consortia.getConsortiaId());
|
userEntity.setConsortiaId(consortia.getConsortiaId());
|
||||||
userEntity.setIsShop(1);
|
userEntity.setIsShop(1);
|
||||||
|
@ -74,6 +75,7 @@ public class ConsortiaServiceImpl extends ServiceImpl<ConsortiaDao, Consortia> i
|
||||||
}
|
}
|
||||||
user.setConsortiaId(consortia.getConsortiaId());
|
user.setConsortiaId(consortia.getConsortiaId());
|
||||||
user.setIsShop(1);
|
user.setIsShop(1);
|
||||||
|
consortia.setTags(consortia.getTags().replaceAll(",",","));
|
||||||
userService.updateById(user);
|
userService.updateById(user);
|
||||||
userService.update(
|
userService.update(
|
||||||
null,
|
null,
|
||||||
|
@ -83,6 +85,8 @@ public class ConsortiaServiceImpl extends ServiceImpl<ConsortiaDao, Consortia> i
|
||||||
.eq(UserEntity::getUserId, oldConsortia.getUserId())
|
.eq(UserEntity::getUserId, oldConsortia.getUserId())
|
||||||
);
|
);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
consortia.setTags(consortia.getTags().replaceAll(",",","));
|
||||||
}
|
}
|
||||||
baseMapper.updateById(consortia);
|
baseMapper.updateById(consortia);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
|
|
Loading…
Reference in New Issue