Bladeren bron

演员库

yumeng 11 maanden geleden
bovenliggende
commit
08208960d8

+ 1 - 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java

@@ -262,6 +262,7 @@ public class ShiroConfig {
         filterChainDefinitionMap.put("/budget/**", "anon");
         filterChainDefinitionMap.put("/ctop/byteDanceVideoInfo/*", "anon");
         filterChainDefinitionMap.put("/first/delivery/*", "anon");
+        filterChainDefinitionMap.put("/budget/**", "anon");
 
         // 添加自己的过滤器并且取名为jwt
         Map<String, Filter> filterMap = new HashMap<>(1);

+ 3 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/constant/CosConstant.java

@@ -4,17 +4,20 @@ public class CosConstant {
 
     //数据万象URL
     public static final String URL="https://media-1301855440.ci.ap-chongqing.myqcloud.com/";
+    public static final String LIVE_URL="https://live-1301855440.ci.ap-chongqing.myqcloud.com/";
     //COS地址前缀
     public static final String COS_MEDIA_URL_PREFIX ="https://media-1301855440.cos.ap-chongqing.myqcloud.com";
     //jobs接口URL
     public static final String URL_JOBS=URL+"jobs";
     //snapshot接口URL
     public static final String URL_SNAPSHOT=URL+"snapshot";
+    public static final String LIVE_URL_SNAPSHOT=LIVE_URL+"snapshot";
     //截帧模板ID
     public static final String TEMPLATE_ID="t11931b0daf5bf4776b612b4136ad67d00";
     //数据万象队列ID
     public static final String QUEUE_ID="p91b206a0462d46cda49b02063c5c42c8";
     //COS首帧地址
     public static final String URL_COS_ADDRESS="https://media-1301855440.cos.ap-chongqing.myqcloud.com/";
+    public static final String URL_COS_LIVE_ADDRESS="https://live-1301855440.cos.ap-chongqing.myqcloud.com/";
 
 }

+ 0 - 12
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/MaterialInfoServiceImpl.java

@@ -577,18 +577,6 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
                 String loadImage = "cutFrame/" + code + "/zero.jpg";
                 String coverUrl = CloudVideoProcessUtil.videoCutPictureHandle(videoUrl, loadImage);
                 info.setCoverUrl(coverUrl);
-               /* Thread thread = new Thread() {
-                    @Override
-                    public void run() {
-                        try {
-                            log.info("开始抽帧,code:{}", code);
-                            materialCutFrameService.getTencentCutFrame(videoUrl, code, coverUrl);
-                        } catch (Exception e) {
-                            e.printStackTrace();
-                        }
-                    }
-                };
-                thread.start();*/
             } else {
                 info.setCoverUrl(cutFrame.getUrl());
             }

+ 36 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/utils/CloudVideoProcessUtil.java

@@ -237,6 +237,42 @@ public class CloudVideoProcessUtil {
         }
     }
 
+
+    public static String videoCutPictureHandleLive(String videoPath, String outputPath) {
+        String auth = generateAuth(SECRET_ID, SECRET_KEY, "/snapshot", HttpMethodName.POST);
+        if (auth.isEmpty()) {
+            logger.error("腾讯云Authorization获取失败");
+        }
+        //拼接请求数据万象jobs接口的参数
+        JSONObject input = new JSONObject();
+        input.put("Object", videoPath);
+        JSONObject output = new JSONObject();
+        output.put("Region", COS_LOCATION);
+        output.put("Bucket", "live-1301855440");
+        output.put("Object", outputPath);
+        JSONObject request = new JSONObject();
+        request.put("Input", input);
+        request.put("Output", output);
+        request.put("Time", 0);
+
+        //请求media-1301855440.ci.ap-chongqing.myqcloud.com/snapshot 接口
+        HttpHeaders headers = new HttpHeaders();
+        headers.set("Authorization", auth);
+        headers.setContentType(MediaType.APPLICATION_JSON);
+        HttpEntity<String> requestEntity = new HttpEntity<>(request.toJSONString(), headers);
+        String response = null;
+        try {
+            response = restTemplate.exchange(CosConstant.LIVE_URL_SNAPSHOT, HttpMethod.POST, requestEntity, String.class).getBody();
+        } catch (RestClientException e) {
+            logger.error(e.getMessage());
+        }
+        if (response.isEmpty()) {
+            return CosConstant.URL_COS_LIVE_ADDRESS + "error.jpg";
+        } else {
+            return CosConstant.URL_COS_LIVE_ADDRESS + outputPath;
+        }
+    }
+
     /**
      * 获取视频处理服务 MpsClient
      */

+ 22 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/manage/modules/actor/entity/Actor.java

@@ -39,4 +39,26 @@ public class Actor {
     private List<String> imageUrl;
     @TableField(exist = false)
     private List<String> videoUrl;
+    @TableField(exist = false)
+    private List<Long> tagList;
+    @TableField(exist = false)
+    private List<String> tagNameList;
+    @TableField(exist = false)
+    private String encPhone;
+    private String phone;
+    private String idCard;
+    private String unitPrice;
+    private String bankName;
+    private String bankCode;
+    private String actorRemark;
+    private String actorHeight;
+    private String actorWeight;
+    private String actorThree;
+    private String actorShoeSize;
+    private String actorCityName;
+    private Integer actorCityId;
+    private Integer isCooperate;
+    private String userId;
+
+
 }

+ 1 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/manage/modules/actor/entity/ActorVideo.java

@@ -19,6 +19,7 @@ public class ActorVideo {
     private Long id;
     private Long actorId;
     private String videoUrl;
+    private String coverUrl;
     @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
     private Date createTime;
     @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")

+ 21 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/manage/modules/actor/mapper/ActorCommentMapper.java

@@ -1,11 +1,32 @@
 package cn.com.ctop.manage.modules.actor.mapper;
 
 import cn.com.ctop.manage.modules.actor.entity.ActorComment;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
  * @author jeecg-boot
  * 2019年12月5日19:55:14
  */
 public interface ActorCommentMapper extends BaseMapper<ActorComment> {
+    List<JSONObject> getCityList();
+
+    List<JSONObject> getTagList();
+
+    String getCityName(@Param("actorCityId") Integer actorCityId);
+
+    String geTagName(@Param("tagId") Long tagId);
+
+    void addTag(@Param("actorId") Long actorId, @Param("tagId") Long tagId, @Param("tagName") String tagName);
+
+    List<Long> getTagListBy(@Param("actorId") Long actorId);
+
+    List<String> getTagsId(@Param("actorId") Long actorId);
+
+    void deleteTagByActorId(@Param("actorId") Long actorId);
+
+    List<Long> getActorIds(@Param("tagIds") List<Long> tagIds);
 }

+ 50 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/manage/modules/actor/mapper/xml/ActorCommentMapper.xml

@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="cn.com.ctop.manage.modules.actor.mapper.ActorCommentMapper">
+    <insert id="addTag">
+        insert into actor_tag_info (actor_id, tag_id, tag_name)
+        values (#{actorId}, #{tagId}, #{tagName})
+
+    </insert>
+    <delete id="deleteTagByActorId" parameterType="java.lang.Long">
+        delete from actor_tag_info where actor_id =#{actorId}
+    </delete>
+
+
+    <select id="getCityList" resultType="com.alibaba.fastjson.JSONObject">
+        select city_id  as 'cityId', city_name as 'cityName'
+        from city_tag order by city_id asc
+
+    </select>
+    <select id="getTagList" resultType="com.alibaba.fastjson.JSONObject">
+        select tag_id as 'tagId',tag_name as 'tagName'
+        from actor_tag
+        order by tag_id asc
+    </select>
+    <select id="getCityName" resultType="java.lang.String" parameterType="java.lang.Integer">
+        select  city_name   from city_tag where city_id = #{actorCityId}
+    </select>
+    <select id="geTagName" resultType="java.lang.String" parameterType="java.lang.Long">
+        select  tag_name  from  actor_tag where tag_id = #{tagId}
+    </select>
+    <select id="getTagListBy" resultType="java.lang.Long" parameterType="java.lang.Long">
+        select tag_id   from actor_tag_info where actor_id = #{actorId}
+    </select>
+    <select id="getTagsId" resultType="java.lang.String" parameterType="java.lang.Long">
+        select tag_Name
+        from actor_tag_info
+        where actor_id = #{actorId}
+    </select>
+    <select id="getActorIds" resultType="java.lang.Long" >
+        select actor_id from actor_tag_info where tag_id in
+
+        <foreach collection="tagIds" item="item" separator=","
+                 open="(" close=")">
+            #{item}
+        </foreach>
+        group by
+        actor_id
+
+
+    </select>
+</mapper>

+ 20 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/manage/modules/actor/service/IActorCommentService.java

@@ -1,7 +1,27 @@
 package cn.com.ctop.manage.modules.actor.service;
 
 import cn.com.ctop.manage.modules.actor.entity.ActorComment;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.List;
+
 public interface IActorCommentService extends IService<ActorComment> {
+    List<JSONObject> getCityList();
+
+    List<JSONObject> getTagList();
+
+    String getCityName(Integer actorCityId);
+
+    String geTagName(Long integer);
+
+    void addTag(Long id, Long tagId, String tagName);
+
+    List<Long> getTagListBy(Long actorId);
+
+    List<String> getTagsNames(Long id);
+
+    void deleteTagByActorId(Long id);
+
+    List<Long> getActorIds(List<Long> tagIds);
 }

+ 50 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/manage/modules/actor/service/impl/ActorCommentServiceImpl.java

@@ -3,9 +3,59 @@ package cn.com.ctop.manage.modules.actor.service.impl;
 import cn.com.ctop.manage.modules.actor.entity.ActorComment;
 import cn.com.ctop.manage.modules.actor.mapper.ActorCommentMapper;
 import cn.com.ctop.manage.modules.actor.service.IActorCommentService;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 @Service
 public class ActorCommentServiceImpl extends ServiceImpl<ActorCommentMapper, ActorComment> implements IActorCommentService {
+    @Autowired
+    private ActorCommentMapper actorCommentMapper;
+    @Override
+    public List<JSONObject> getCityList() {
+        return actorCommentMapper.getCityList();
+    }
+
+    @Override
+    public List<JSONObject> getTagList() {
+        return actorCommentMapper.getTagList();
+    }
+
+    @Override
+    public String getCityName(Integer actorCityId) {
+        return actorCommentMapper.getCityName(actorCityId);
+    }
+
+    @Override
+    public String geTagName(Long integer) {
+        return actorCommentMapper.geTagName(integer);
+    }
+
+    @Override
+    public void addTag(Long actorId, Long tagId, String tagName) {
+        actorCommentMapper.addTag(actorId,tagId,tagName);
+    }
+
+    @Override
+    public List<Long> getTagListBy(Long actorId) {
+        return actorCommentMapper.getTagListBy(actorId);
+    }
+
+    @Override
+    public List<String> getTagsNames(Long id) {
+        return actorCommentMapper.getTagsId(id);
+    }
+
+    @Override
+    public void deleteTagByActorId(Long actorId) {
+        actorCommentMapper.deleteTagByActorId(actorId);
+    }
+
+    @Override
+    public List<Long> getActorIds(List<Long> tagIds) {
+        return actorCommentMapper.getActorIds(tagIds);
+    }
 }

+ 178 - 8
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ActorController.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.common.module.utils.CloudVideoProcessUtil;
 import cn.com.ctop.common.module.utils.KuaishouInterfaceConstant;
 import cn.com.ctop.manage.modules.actor.entity.Actor;
 import cn.com.ctop.manage.modules.actor.entity.ActorComment;
@@ -10,16 +11,24 @@ import cn.com.ctop.manage.modules.actor.service.IActorCommentService;
 import cn.com.ctop.manage.modules.actor.service.IActorPhotoService;
 import cn.com.ctop.manage.modules.actor.service.IActorService;
 import cn.com.ctop.manage.modules.actor.service.IActorVideoService;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
+import org.checkerframework.checker.units.qual.A;
+import org.checkerframework.checker.units.qual.C;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
+import java.net.URLDecoder;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
 
 /**
  * @author jeecg-boot
@@ -42,6 +51,15 @@ public class ActorController {
     public Result<Actor> getDetail(@RequestParam(name = "actorId") Long actorId) {
         Result<Actor> result = new Result<>();
         Actor actor = actorService.getById(actorId);
+        List<String> tags = actorCommentService.getTagsNames(actorId);
+        actor.setTagNameList(tags);
+        String phone = actor.getPhone();
+        if (!Check.isNull(phone)) {
+            String encPhone = getEncPhone(phone);
+            if (!Check.isNull(encPhone)) {
+                actor.setEncPhone(encPhone);
+            }
+        }
         result.setResult(actor);
         result.setSuccess(true);
         return result;
@@ -62,15 +80,73 @@ public class ActorController {
                                               @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                               HttpServletRequest req) {
         Result<IPage<Actor>> result = new Result<>();
+        String parm = actor.getName();
+        actor.setName(null);
         QueryWrapper<Actor> queryWrapper = QueryGenerator.initQueryWrapper(actor, req.getParameterMap());
+        if (!Check.isNull(parm)) {
+            JSONObject jsonObject = JSONObject.parseObject(parm);
+            if (!Check.isNull(jsonObject)) {
+                String name = jsonObject.getString("name");
+                if (!Check.isNull(name)) {
+                    queryWrapper.like("name", name);
+                }
+                Integer cityId = jsonObject.getInteger("cityId");
+                if (!Check.isNull(cityId) && cityId != 0) {
+                    queryWrapper.eq("actor_city_id", cityId);
+                }
+
+                JSONArray tagList = jsonObject.getJSONArray("tagList");
+                if (!Check.isNull(tagList)) {
+                    List<Long> tagIds = new ArrayList<>();
+                    for (int i = 0; i < tagList.size(); i++) {
+                        Long aLong = tagList.getLong(i);
+                        tagIds.add(aLong);
+                    }
+                    List<Long> actorIds = actorCommentService.getActorIds(tagIds);
+                    queryWrapper.in("id", actorIds);
+                }
+            }
+        }
+
+
         queryWrapper.orderByDesc("create_time");
         Page<Actor> page = new Page<>(pageNo, pageSize);
         IPage<Actor> pageList = actorService.page(page, queryWrapper);
+
+        List<Actor> records = pageList.getRecords();
+        for (int i = 0; i < records.size(); i++) {
+            Actor actor1 = records.get(i);
+            Long id = actor1.getId();
+            List<Long> tags = actorCommentService.getTagListBy(id);
+            actor1.setTagList(tags);
+
+            String phone = actor1.getPhone();
+            if (!Check.isNull(phone)) {
+                String encPhone = getEncPhone(phone);
+                if (!Check.isNull(encPhone)) {
+                    actor1.setEncPhone(encPhone);
+                }
+            }
+
+        }
+
         result.setSuccess(true);
         result.setResult(pageList);
         return result;
     }
 
+
+    private String getEncPhone(String phoneNumber) {
+        //截取前三位
+        String beginStr = phoneNumber.substring(0, 3);
+        //截取后四位
+        String endStr = phoneNumber.substring(7);
+        String encPhone = beginStr + "****" + endStr;
+        return encPhone;
+
+
+    }
+
     @GetMapping(value = "/photo/list")
     public Result<IPage<ActorPhoto>> queryPhotoPageList(ActorPhoto actorPhoto,
                                                         @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@@ -99,6 +175,26 @@ public class ActorController {
         return result;
     }
 
+
+    @GetMapping(value = "/getCityList")
+    public Result<List<JSONObject>> getCityList() {
+        Result<List<JSONObject>> result = new Result<>();
+        List<JSONObject> cityList = actorCommentService.getCityList();
+        result.setSuccess(true);
+        result.setResult(cityList);
+        return result;
+    }
+
+    @GetMapping(value = "/getTagList")
+    public Result<List<JSONObject>> getTagList() {
+        Result<List<JSONObject>> result = new Result<>();
+        List<JSONObject> cityList = actorCommentService.getTagList();
+        result.setSuccess(true);
+        result.setResult(cityList);
+        return result;
+    }
+
+
     @DeleteMapping(value = "/comment/delete")
     public Result<ActorComment> deleteComment(@RequestParam(name = "id", required = true) String id) {
         Result<ActorComment> result = new Result<>();
@@ -161,11 +257,36 @@ public class ActorController {
     public Result<ActorVideo> addVideo(ActorVideo actorVideo) {
         Result<ActorVideo> result = new Result<>();
         try {
+            Long actorId = actorVideo.getActorId();
             String videoUrl = actorVideo.getVideoUrl();
-            if (!Check.isNull(videoUrl) && !videoUrl.contains(KuaishouInterfaceConstant.HTTPS_PREFIX)) {
-                actorVideo.setVideoUrl(KuaishouInterfaceConstant.HTTPS_PREFIX + videoUrl);
+            if (Check.isNull(videoUrl)) {
+                throw new Exception("请选择需要上传的图片");
+            }
+            String[] split = videoUrl.split(",");
+            if (Check.isNull(split)) {
+                throw new Exception("图片格式不正确");
+            }
+            for (int i = 0; i < split.length; i++) {
+                String video = split[i];
+                String newVideoUrl = null;
+                if (!video.contains(KuaishouInterfaceConstant.HTTPS_PREFIX)) {
+                    newVideoUrl = KuaishouInterfaceConstant.HTTPS_PREFIX + video;
+                }
+                ActorVideo addActorVideo = new ActorVideo();
+
+                String url = URLDecoder.decode(newVideoUrl).replace("https://live-1301855440.cos.ap-chongqing.myqcloud.com/", "");
+
+                String uuid = UUID.randomUUID().toString();
+                String loadImage = "cutFrame/" + uuid + ".jpg";
+                String coverUrl = CloudVideoProcessUtil.videoCutPictureHandleLive(url, loadImage);
+
+
+                addActorVideo.setCoverUrl(coverUrl);
+                addActorVideo.setActorId(actorId);
+                addActorVideo.setVideoUrl(newVideoUrl);
+                actorVideoService.save(addActorVideo);
             }
-            actorVideoService.save(actorVideo);
+
             result.success("添加成功!");
         } catch (Exception e) {
             log.error(e.getMessage(), e);
@@ -178,15 +299,33 @@ public class ActorController {
     public Result<ActorPhoto> addPhoto(ActorPhoto actorPhoto) {
         Result<ActorPhoto> result = new Result<>();
         try {
+
+            Long actorId = actorPhoto.getActorId();
             String photoUrl = actorPhoto.getPhotoUrl();
-            if (!Check.isNull(photoUrl) && !photoUrl.contains(KuaishouInterfaceConstant.HTTPS_PREFIX)) {
-                actorPhoto.setPhotoUrl(KuaishouInterfaceConstant.HTTPS_PREFIX + photoUrl);
+            if (Check.isNull(photoUrl)) {
+                throw new Exception("请选择需要上传的图片");
             }
-            actorPhotoService.save(actorPhoto);
+            String[] split = photoUrl.split(",");
+            if (Check.isNull(split)) {
+                throw new Exception("图片格式不正确");
+            }
+            for (int i = 0; i < split.length; i++) {
+                String photo = split[i];
+                String newPhotoUrl = null;
+                if (!photo.contains(KuaishouInterfaceConstant.HTTPS_PREFIX)) {
+                    newPhotoUrl = KuaishouInterfaceConstant.HTTPS_PREFIX + photo;
+                }
+                ActorPhoto addActorPhoto = new ActorPhoto();
+                addActorPhoto.setActorId(actorId);
+                addActorPhoto.setPhotoUrl(newPhotoUrl);
+                actorPhotoService.save(addActorPhoto);
+            }
+
+
             result.success("添加成功!");
         } catch (Exception e) {
             log.error(e.getMessage(), e);
-            result.error500("操作失败");
+            result.error500(e.getMessage());
         }
         return result;
     }
@@ -220,6 +359,10 @@ public class ActorController {
             if (!Check.isNull(coverUrl) && !coverUrl.contains(KuaishouInterfaceConstant.HTTPS_PREFIX)) {
                 actor.setCoverUrl(KuaishouInterfaceConstant.HTTPS_PREFIX + coverUrl);
             }
+
+            Integer actorCityId = actor.getActorCityId();
+            String cityName = actorCommentService.getCityName(actorCityId);
+            actor.setActorCityName(cityName);
             actorService.save(actor);
             if (null != actor.getImageUrl() && !actor.getImageUrl().isEmpty()) {
                 for (String url : actor.getImageUrl()) {
@@ -235,12 +378,27 @@ public class ActorController {
                 for (String url : actor.getVideoUrl()) {
                     ActorVideo video = new ActorVideo();
                     video.setActorId(actor.getId());
+                    String videoUrl = null;
                     if (!Check.isNull(url) && !url.contains(KuaishouInterfaceConstant.HTTPS_PREFIX)) {
+                        videoUrl = KuaishouInterfaceConstant.HTTPS_PREFIX + url;
                         video.setVideoUrl(KuaishouInterfaceConstant.HTTPS_PREFIX + url);
                     }
+                    String newUrl = URLDecoder.decode(videoUrl).replace("https://live-1301855440.cos.ap-chongqing.myqcloud.com/", "");
+                    String uuid = UUID.randomUUID().toString();
+                    String loadImage = "cutFrame/" + uuid + ".jpg";
+                    String videoCoverUrl = CloudVideoProcessUtil.videoCutPictureHandleLive(newUrl, loadImage);
+                    video.setCoverUrl(videoCoverUrl);
                     actorVideoService.save(video);
                 }
             }
+
+            if (actor.getTagList() != null && !actor.getTagList().isEmpty()) {
+                for (Long tagId : actor.getTagList()) {
+                    String tagName = actorCommentService.geTagName(tagId);
+                    actorCommentService.addTag(actor.getId(), tagId, tagName);
+                }
+            }
+
             result.success("添加成功!");
         } catch (Exception e) {
             log.error(e.getMessage(), e);
@@ -267,9 +425,21 @@ public class ActorController {
             if (!Check.isNull(coverUrl) && !coverUrl.contains(KuaishouInterfaceConstant.HTTPS_PREFIX)) {
                 actor.setCoverUrl(KuaishouInterfaceConstant.HTTPS_PREFIX + coverUrl);
             }
+            Integer actorCityId = actor.getActorCityId();
+            if (!Check.isNull(actorCityId)) {
+                String cityName = actorCommentService.getCityName(actorCityId);
+                actor.setActorCityName(cityName);
 
+            }
             boolean ok = actorService.updateById(actor);
             if (ok) {
+                if (actor.getTagList() != null && !actor.getTagList().isEmpty()) {
+                    actorCommentService.deleteTagByActorId(actor.getId());
+                    for (Long tagId : actor.getTagList()) {
+                        String tagName = actorCommentService.geTagName(tagId);
+                        actorCommentService.addTag(actor.getId(), tagId, tagName);
+                    }
+                }
                 result.success("修改成功!");
             }
         }
@@ -281,7 +451,7 @@ public class ActorController {
         try {
             actorService.removeById(id);
         } catch (Exception e) {
-            log.error("删除失败",e.getMessage());
+            log.error("删除失败", e.getMessage());
             return Result.error("删除失败!");
         }
         return Result.ok("删除成功!");