|
@@ -230,7 +230,7 @@ public class ActorController {
|
|
public Result<Actor> add(@RequestBody Actor actor) {
|
|
public Result<Actor> add(@RequestBody Actor actor) {
|
|
Result<Actor> result = new Result<Actor>();
|
|
Result<Actor> result = new Result<Actor>();
|
|
try {
|
|
try {
|
|
- actorService.save(actor);
|
|
|
|
|
|
+
|
|
// if (actor.getImageUrl() != null && actor.getImageUrl().size() > 0) {
|
|
// if (actor.getImageUrl() != null && actor.getImageUrl().size() > 0) {
|
|
// for (String url : actor.getImageUrl()) {
|
|
// for (String url : actor.getImageUrl()) {
|
|
// ActorPhoto photo = new ActorPhoto();
|
|
// ActorPhoto photo = new ActorPhoto();
|
|
@@ -254,6 +254,7 @@ public class ActorController {
|
|
actor.setCoverUrl(KuaishouInterfaceConstant.HTTPS_PREFIX + coverUrl);
|
|
actor.setCoverUrl(KuaishouInterfaceConstant.HTTPS_PREFIX + coverUrl);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ actorService.save(actor);
|
|
result.success("添加成功!");
|
|
result.success("添加成功!");
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
log.error(e.getMessage(), e);
|
|
log.error(e.getMessage(), e);
|
|
@@ -276,6 +277,14 @@ public class ActorController {
|
|
if (actorEntity == null) {
|
|
if (actorEntity == null) {
|
|
result.error500("未找到对应实体");
|
|
result.error500("未找到对应实体");
|
|
} else {
|
|
} else {
|
|
|
|
+
|
|
|
|
+ String coverUrl = actor.getCoverUrl();
|
|
|
|
+ if (!Check.isNull(coverUrl)) {
|
|
|
|
+ if (!coverUrl.contains(KuaishouInterfaceConstant.HTTPS_PREFIX)) {
|
|
|
|
+ actor.setCoverUrl(KuaishouInterfaceConstant.HTTPS_PREFIX + coverUrl);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
boolean ok = actorService.updateById(actor);
|
|
boolean ok = actorService.updateById(actor);
|
|
// ActorPhoto actorPhoto = new ActorPhoto();
|
|
// ActorPhoto actorPhoto = new ActorPhoto();
|
|
// actorPhoto.setActorId(actor.getId());
|
|
// actorPhoto.setActorId(actor.getId());
|