Commit 9c731460 by xmh

1

1 parent 2b825b0d
...@@ -57,7 +57,7 @@ public class CaptionController { ...@@ -57,7 +57,7 @@ public class CaptionController {
@PutMapping("/{id}") @PutMapping("/{id}")
public Message<Caption> updateById(@PathVariable Long id, @RequestBody CaptionVo item) { public Message<Caption> updateById(@PathVariable Long id, @RequestBody CaptionVo item) {
List<Context> texts = item.getContexts(); List<Context> texts = item.getContexts();
if (CollectionUtil.isNotEmpty(texts)) { if (texts != null) {
item.setContext(JSONUtil.toJsonStr(texts)); item.setContext(JSONUtil.toJsonStr(texts));
} }
item.setId(id); item.setId(id);
......
...@@ -67,7 +67,7 @@ public class PicConfigController { ...@@ -67,7 +67,7 @@ public class PicConfigController {
@PutMapping("/{id}") @PutMapping("/{id}")
public Message<PicConfig> updateById(@PathVariable Long id, @RequestBody PicConfigVo item) { public Message<PicConfig> updateById(@PathVariable Long id, @RequestBody PicConfigVo item) {
List<Context> contexts = item.getContexts(); List<Context> contexts = item.getContexts();
if (CollectionUtil.isNotEmpty(contexts)) { if (contexts != null) {
item.setContext(JSONUtil.toJsonStr(contexts)); item.setContext(JSONUtil.toJsonStr(contexts));
} }
item.setId(id); item.setId(id);
......
...@@ -77,7 +77,7 @@ public class StorageConfigController { ...@@ -77,7 +77,7 @@ public class StorageConfigController {
@PutMapping("/{id}") @PutMapping("/{id}")
public Message<StorageConfig> updateById(@PathVariable Long id, @RequestBody StorageConfigVo storageConfigVo) { public Message<StorageConfig> updateById(@PathVariable Long id, @RequestBody StorageConfigVo storageConfigVo) {
List<Context> contexts = storageConfigVo.getContexts(); List<Context> contexts = storageConfigVo.getContexts();
if (CollectionUtil.isNotEmpty(contexts)) { if (contexts != null) {
storageConfigVo.setContext(JSONUtil.toJsonStr(contexts)); storageConfigVo.setContext(JSONUtil.toJsonStr(contexts));
} }
storageConfigVo.setId(id); storageConfigVo.setId(id);
......
...@@ -20,6 +20,7 @@ public class Context { ...@@ -20,6 +20,7 @@ public class Context {
private Integer type; private Integer type;
/** used by CaptionVo */ /** used by CaptionVo */
private String content; private String content;
private Boolean wrap;
/** used by CaptionVo , PicConfigVo and StorageConfigVo */ /** used by CaptionVo , PicConfigVo and StorageConfigVo */
private Integer order; private Integer order;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!