Forráskód Böngészése

对应 cn.reghao.oss.api.dto.ObjectChannel 字段的变化

reghao 4 hónapja
szülő
commit
faff34d21c
17 módosított fájl, 89 hozzáadás és 59 törlés
  1. 13 3
      content/content-service/src/main/java/cn/reghao/tnb/content/app/vod/db/repository/VideoRepository.java
  2. 2 0
      content/content-service/src/main/java/cn/reghao/tnb/content/app/vod/model/dto/CategoryAdd.java
  3. 4 0
      content/content-service/src/main/java/cn/reghao/tnb/content/app/vod/model/po/PostCategory.java
  4. 5 17
      content/content-service/src/main/java/cn/reghao/tnb/content/app/vod/model/po/VideoPost.java
  5. 1 1
      content/content-service/src/main/java/cn/reghao/tnb/content/app/vod/service/CrawledDataService.java
  6. 1 1
      content/content-service/src/main/java/cn/reghao/tnb/content/app/vod/service/VideoPostService.java
  7. 7 8
      content/content-service/src/main/java/cn/reghao/tnb/content/app/vod/service/impl/VideoPostServiceImpl.java
  8. 5 5
      content/content-service/src/main/resources/mapper/vod/PostCategoryMapper.xml
  9. 1 0
      file/file-api/src/main/java/cn/reghao/file/api/iface/OssService.java
  10. 4 4
      file/file-service/src/main/java/cn/reghao/tnb/file/app/controller/FileOssController.java
  11. 0 6
      file/file-service/src/main/java/cn/reghao/tnb/file/app/db/repository/StoreRepository.java
  12. 7 3
      file/file-service/src/main/java/cn/reghao/tnb/file/app/model/po/UploadChannel.java
  13. 5 0
      file/file-service/src/main/java/cn/reghao/tnb/file/app/rpc/StoreServiceWrapper.java
  14. 21 0
      file/file-service/src/main/java/cn/reghao/tnb/file/app/rpc/StoreServiceWrapperRouter.java
  15. 1 0
      file/file-service/src/main/java/cn/reghao/tnb/file/app/service/AvatarService.java
  16. 8 7
      file/file-service/src/main/java/cn/reghao/tnb/file/app/service/UploadChannelService.java
  17. 4 4
      file/file-service/src/main/resources/mapper/UploadChannelMapper.xml

+ 13 - 3
content/content-service/src/main/java/cn/reghao/tnb/content/app/vod/db/repository/VideoRepository.java

@@ -33,15 +33,25 @@ public class VideoRepository {
     }
 
     @Transactional(rollbackFor = Exception.class)
-    public void savePostVideo(VideoPost videoPost, VideoStatistic videoStatistic) {
+    public void saveVideo(VideoFile videoFile, VideoPost videoPost) {
+        String videoId = videoPost.getVideoId();
+        VideoStatistic videoStatistic = new VideoStatistic(videoId);
+
         videoPostMapper.save(videoPost);
         videoStatisticMapper.save(videoStatistic);
+        videoFileMapper.save(videoFile);
     }
 
     @Transactional(rollbackFor = Exception.class)
-    public void saveVideo(VideoFile videoFile, VideoPost videoPost) {
-        videoFileMapper.save(videoFile);
+    public void updateVideoPublish(VideoPost videoPost) {
+        videoPostMapper.updateVideoPublish(videoPost);
+    }
+
+    @Transactional(rollbackFor = Exception.class)
+    @Deprecated
+    public void saveVideoCrawled(VideoPost videoPost, VideoStatistic videoStatistic) {
         videoPostMapper.save(videoPost);
+        videoStatisticMapper.save(videoStatistic);
     }
 
     @Transactional(rollbackFor = Exception.class)

+ 2 - 0
content/content-service/src/main/java/cn/reghao/tnb/content/app/vod/model/dto/CategoryAdd.java

@@ -17,4 +17,6 @@ public class CategoryAdd {
     @NotBlank
     @Size(min = 1, max = 10, message = "分区名字不能超过 10 个字符")
     private String name;
+    @NotNull
+    private Boolean vip;
 }

+ 4 - 0
content/content-service/src/main/java/cn/reghao/tnb/content/app/vod/model/po/PostCategory.java

@@ -31,11 +31,15 @@ public class PostCategory extends BaseObject<Integer> {
     public PostCategory(int pid, String name) {
         this.pid = pid;
         this.name = name;
+        this.sort = 1;
+        this.vip = false;
     }
 
     public PostCategory(CategoryAdd categoryAdd) {
         this.pid = categoryAdd.getPid();
         this.name = categoryAdd.getName();
+        this.sort = 1;
+        this.vip = categoryAdd.getVip();
     }
 
     @Override

+ 5 - 17
content/content-service/src/main/java/cn/reghao/tnb/content/app/vod/model/po/VideoPost.java

@@ -54,27 +54,15 @@ public class VideoPost extends BaseObject<Integer> {
     @NotNull
     private Long publishBy;
 
-    public VideoPost(String videoId, VideoPublishSbt video, String coverUrl,
-                     VideoFile videoInfo, int status, long publishAt) {
-        this.videoId = videoId;
-        this.title = video.getTitle();
-        this.description = video.getDescription();
-        this.categoryPid = video.getCategoryPid();
-        this.categoryId = video.getCategoryId();
-        this.duration = videoInfo.getDuration();
-        this.horizontal = videoInfo.getHorizontal();
-        this.coverUrl = coverUrl;
-        this.scope = video.getScope();
-        this.status = status;
-        this.publishAt = DateTimeConverter.localDateTime(publishAt);
-        this.publishBy = UserContext.getUserId();
-    }
-
     public VideoPost(String videoId, String title, VideoFile videoInfo) {
         this.videoId = videoId;
         this.title = title;
+        this.description = "";
+        this.categoryPid = 0;
+        this.categoryId = 0;
         this.duration = videoInfo.getDuration();
         this.horizontal = videoInfo.getHorizontal();
+        this.coverUrl = "";
         this.scope = PostScope.PRIVATE.getCode();
         this.status = VideoStatus.censor.getCode();
         this.publishAt = DateTimeConverter.localDateTime(System.currentTimeMillis());
@@ -99,7 +87,7 @@ public class VideoPost extends BaseObject<Integer> {
 
     public void update(VideoPublishSbt video, String coverUrl, long publishAt) {
         this.title = video.getTitle();
-        this.description = video.getDescription();
+        this.description = video.getDescription() != null ? video.getDescription() : "";
         this.categoryPid = video.getCategoryPid();
         this.categoryId = video.getCategoryId();
         this.coverUrl = coverUrl;

+ 1 - 1
content/content-service/src/main/java/cn/reghao/tnb/content/app/vod/service/CrawledDataService.java

@@ -55,7 +55,7 @@ public class CrawledDataService {
         VideoPost videoPost = new VideoPost(crawledVideo, publishBy);
         VideoStatistic videoStatistic = new VideoStatistic(crawledVideo);
         String tags = crawledVideo.getTags();
-        videoPostService.saveVideo(videoPost, videoStatistic, tags);
+        videoPostService.saveCrawledVideo(videoPost, videoStatistic, tags);
     }
 
     public void updateVideoStatistic(CrawledVideo crawledVideo) {

+ 1 - 1
content/content-service/src/main/java/cn/reghao/tnb/content/app/vod/service/VideoPostService.java

@@ -16,7 +16,7 @@ public interface VideoPostService {
     String publishVideoFile(VideoFilePublish videoFilePublish) throws Exception;
     Result publishVideoPost(VideoPublishSbt videoPublishSbt);
     @Deprecated
-    void saveVideo(VideoPost videoPost, VideoStatistic videoStatistic, String tags);
+    void saveCrawledVideo(VideoPost videoPost, VideoStatistic videoStatistic, String tags);
     void updateVideoScope(VideoScopeUpdate videoScopeUpdate);
     void updateVideoInfo(VideoInfoUpdate videoInfoUpdate);
     void updateVideoCover(VideoCoverUpdate videoCoverUpdate);

+ 7 - 8
content/content-service/src/main/java/cn/reghao/tnb/content/app/vod/service/impl/VideoPostServiceImpl.java

@@ -61,6 +61,7 @@ public class VideoPostServiceImpl implements VideoPostService {
         String title = videoFilePublish.getFilename();
         String videoFileId = videoFilePublish.getVideoFileId();
         int channelCode = videoFilePublish.getChannelCode();
+        ossService.setObjectUpload(channelCode, videoFileId);
         VideoInfo videoInfo = ossService.getVideoInfo(channelCode, videoFileId);
         if (!videoInfo.getFormatName().contains("mov,mp4")) {
             long jobId = jobService.addConvertVideoJob(videoFileId, channelCode);
@@ -84,6 +85,7 @@ public class VideoPostServiceImpl implements VideoPostService {
         try {
             int coverChannelCode = videoPublishSbt.getCoverChannelCode();
             String coverFileId = videoPublishSbt.getCoverFileId();
+            ossService.setObjectUpload(coverChannelCode, coverFileId);
             ImageInfo imageInfo = ossService.getImageInfo(coverChannelCode, coverFileId);
             if (imageInfo == null) {
                 String errMsg = String.format("封面文件 %s 在 oss 中不存在", coverFileId);
@@ -133,7 +135,7 @@ public class VideoPostServiceImpl implements VideoPostService {
                 videoPost.update(videoPublishSbt, coverUrl, scheduledTime);
             }
 
-            saveVideo(videoPost, tags1);
+            saveVideoPublish(videoPost, tags1);
             if (scheduledTime != null) {
                 long jobId = jobService.addPublishVideoJob(videoId, videoPublishSbt.getScheduledTime());
             }
@@ -145,20 +147,17 @@ public class VideoPostServiceImpl implements VideoPostService {
         return result;
     }
 
-    public void saveVideo(VideoPost videoPost, String tags) {
+    public void saveVideoPublish(VideoPost videoPost, String tags) {
         String videoId = videoPost.getVideoId();
-        VideoStatistic videoStatistic = new VideoStatistic(videoId);
-        videoRepository.savePostVideo(videoPost, videoStatistic);
-
+        videoRepository.updateVideoPublish(videoPost);
         tagService.addVideoTags(videoId, videoPost.getScope(), tags);
         categoryService.setVideoCategoryPost(videoPost);
     }
 
     @Transactional(rollbackFor = Exception.class)
     @Deprecated
-    public void saveVideo(VideoPost videoPost, VideoStatistic videoStatistic, String tags) {
-        videoRepository.savePostVideo(videoPost, videoStatistic);
-
+    public void saveCrawledVideo(VideoPost videoPost, VideoStatistic videoStatistic, String tags) {
+        videoRepository.saveVideoCrawled(videoPost, videoStatistic);
         String videoId = videoPost.getVideoId();
         tagService.addVideoTags(videoId, videoPost.getScope(), tags);
         categoryService.setVideoCategoryPost(videoPost);

+ 5 - 5
content/content-service/src/main/resources/mapper/vod/VideoCategoryMapper.xml → content/content-service/src/main/resources/mapper/vod/PostCategoryMapper.xml

@@ -4,21 +4,21 @@
 <mapper namespace="cn.reghao.tnb.content.app.vod.db.mapper.PostCategoryMapper">
     <insert id="save" useGeneratedKeys="true" keyProperty="id">
         insert into vod_post_category
-        (`pid`,`name`,`region_id`,`icon`,`sort`,`vip`)
+        (`pid`,`name`,`sort`,`vip`)
         values 
-        (#{pid},#{name},#{regionId},#{icon},#{sort},#{vip})
+        (#{pid},#{name},#{sort},#{vip})
     </insert>
     <insert id="saveAll" useGeneratedKeys="true" keyProperty="id">
         insert into vod_post_category
-        (`pid`,`name`,`region_id`,`icon`,`sort`,`vip`)
+        (`pid`,`name`,`sort`,`vip`)
         values
         <foreach collection="list" item="item" index="index" separator=",">
-            (#{item.pid},#{item.name},#{item.regionId},#{item.icon},#{item.sort},#{item.vip})
+            (#{item.pid},#{item.name},#{item.sort},#{item.vip})
         </foreach>
     </insert>
 
     <select id="findAllCategoryIds" resultType="cn.reghao.tnb.content.api.dto.spider.BiliRegion">
-        select region_id,pid as category_pid,id as category_id
+        select pid as category_pid,id as category_id
         from vod_post_category
         where pid not in (0, 3, 11)
     </select>

+ 1 - 0
file/file-api/src/main/java/cn/reghao/file/api/iface/OssService.java

@@ -14,6 +14,7 @@ import cn.reghao.oss.api.dto.media.VideoInfo;
 public interface OssService {
     ServerInfo getUploadStore(String channelName) throws Exception;
     Integer getChannelScope(int channelCode);
+    void setObjectUpload(int channelCode, String objectId) throws Exception;
     void setObjectScope(int channelCode, String objectId, int scope) throws Exception;
     void deleteByObjectId(int channelCode, String objectId) throws Exception;
     void deleteByObjectUrl(String objectUrl) throws Exception;

+ 4 - 4
file/file-service/src/main/java/cn/reghao/tnb/file/app/controller/FileOssController.java

@@ -32,7 +32,7 @@ public class FileOssController {
     public String getImageChannelInfo() throws Exception {
         String channelName = UploadChannelType.imageChannel.name();
         ServerInfo serverInfo = storeServiceWrapperRouter.getUploadStore(channelName);
-        return WebResult.success(serverInfo);
+        return serverInfo != null ? WebResult.success(serverInfo) : WebResult.failWithMsg("get ServerInfo failed");
     }
 
     @AuthUser
@@ -41,7 +41,7 @@ public class FileOssController {
     public String getPhotoChannelInfo() throws Exception {
         String channelName = UploadChannelType.photoChannel.name();
         ServerInfo serverInfo = storeServiceWrapperRouter.getUploadStore(channelName);
-        return WebResult.success(serverInfo);
+        return serverInfo != null ? WebResult.success(serverInfo) : WebResult.failWithMsg("get ServerInfo failed");
     }
 
     @AuthUser
@@ -50,7 +50,7 @@ public class FileOssController {
     public String getVideoChannelInfo() throws Exception {
         String channelName = UploadChannelType.videoChannel.name();
         ServerInfo serverInfo = storeServiceWrapperRouter.getUploadStore(channelName);
-        return WebResult.success(serverInfo);
+        return serverInfo != null ? WebResult.success(serverInfo) : WebResult.failWithMsg("get ServerInfo failed");
     }
 
     @AuthUser
@@ -59,6 +59,6 @@ public class FileOssController {
     public String getFileChannelInfo() throws Exception {
         String channelName = UploadChannelType.fileChannel.name();
         ServerInfo serverInfo = storeServiceWrapperRouter.getUploadStore(channelName);
-        return WebResult.success(serverInfo);
+        return serverInfo != null ? WebResult.success(serverInfo) : WebResult.failWithMsg("get ServerInfo failed");
     }
 }

+ 0 - 6
file/file-service/src/main/java/cn/reghao/tnb/file/app/db/repository/StoreRepository.java

@@ -50,13 +50,7 @@ public class StoreRepository {
     }
 
     @Cacheable(cacheNames = "tnb:file:channel", key = "#ossUser + '_' + #channelName", unless = "#result == null")
-    @Deprecated
     public UploadChannel getUploadChannel(int ossUser, String channelName) {
         return uploadChannelMapper.findByCreateByAndName(ossUser, channelName);
     }
-
-    public UploadChannel getUploadChannel(String channelName) {
-        int ossUser = storeConfigService.getLocalOssUser();
-        return uploadChannelMapper.findByCreateByAndName(ossUser, channelName);
-    }
 }

+ 7 - 3
file/file-service/src/main/java/cn/reghao/tnb/file/app/model/po/UploadChannel.java

@@ -33,7 +33,9 @@ public class UploadChannel extends BaseObject<Integer> {
     @NotNull
     private Integer scope;
     @NotNull
-    private Boolean seturl;
+    private Boolean setUrl;
+    @NotNull
+    private Boolean setCallback;
     @NotNull
     private Boolean enabled;
     @NotNull
@@ -51,7 +53,8 @@ public class UploadChannel extends BaseObject<Integer> {
         this.maxSize = uploadChannelDto.getMaxSize();
         this.fileType = uploadChannelDto.getObjectType();
         this.scope = uploadChannelDto.getScope();
-        this.seturl = false;
+        this.setUrl = false;
+        this.setCallback = false;
         this.enabled = true;
         this.createBy = ossUser;
     }
@@ -64,7 +67,8 @@ public class UploadChannel extends BaseObject<Integer> {
         this.maxSize = uploadChannelType.getMaxSize();
         this.fileType = uploadChannelType.getFileType();
         this.scope = uploadChannelType.getScope();
-        this.seturl = false;
+        this.setUrl = false;
+        this.setCallback = false;
         this.enabled = true;
         this.createBy = ossUser;
     }

+ 5 - 0
file/file-service/src/main/java/cn/reghao/tnb/file/app/rpc/StoreServiceWrapper.java

@@ -60,6 +60,11 @@ public class StoreServiceWrapper {
         return storeService.getDiskVolumes();
     }
 
+    public void setObjectUpload(int channelCode, String objectId, int owner) throws Exception {
+        StoreService storeService = getStoreService(channelCode, owner);
+        storeService.setObjectUpload(objectId);
+    }
+
     public void setObjectScope(int channelCode, String objectId, int scope, int owner) throws Exception {
         StoreService storeService = getStoreService(channelCode, owner);
         storeService.setObjectScope(objectId, scope);

+ 21 - 0
file/file-service/src/main/java/cn/reghao/tnb/file/app/rpc/StoreServiceWrapperRouter.java

@@ -41,6 +41,7 @@ public class StoreServiceWrapperRouter implements OssService {
         this.uploadChannelService = uploadChannelService;
     }
 
+    @Override
     public ServerInfo getUploadStore(String channelName) throws Exception {
         int ossUser = storeConfigService.getLocalOssUser();
         UploadChannel uploadChannel = storeRepository.getUploadChannel(ossUser, channelName);
@@ -53,6 +54,7 @@ public class StoreServiceWrapperRouter implements OssService {
         return consoleService.getUploadStore(channelCode);
     }
 
+    @Override
     public Integer getChannelScope(int channelCode) {
         /*try {
             if (ossType == OssType.localOss.getCode()) {
@@ -66,6 +68,16 @@ public class StoreServiceWrapperRouter implements OssService {
         return ObjectScope.PRIVATE.getCode();
     }
 
+    @Override
+    public void setObjectUpload(int channelCode, String objectId) throws Exception {
+        int ossUser = storeConfigService.getLocalOssUser();
+        if (ossType == OssType.localOss.getCode()) {
+            storeServiceWrapper.setObjectUpload(channelCode, objectId, ossUser);
+        } else if (ossType == OssType.aliyunOss.getCode()) {
+        }
+    }
+
+    @Override
     public void setObjectScope(int channelCode, String objectId, int scope) throws Exception {
         int ossUser = storeConfigService.getLocalOssUser();
         if (ossType == OssType.localOss.getCode()) {
@@ -74,6 +86,7 @@ public class StoreServiceWrapperRouter implements OssService {
         }
     }
 
+    @Override
     public void deleteByObjectId(int channelCode, String objectId) throws Exception {
         int ossUser = storeConfigService.getLocalOssUser();
         if (ossType == OssType.localOss.getCode()) {
@@ -82,6 +95,7 @@ public class StoreServiceWrapperRouter implements OssService {
         }
     }
 
+    @Override
     public void deleteByObjectUrl(String objectUrl) throws Exception {
         int ossUser = storeConfigService.getLocalOssUser();
         if (ossType == OssType.localOss.getCode()) {
@@ -90,6 +104,7 @@ public class StoreServiceWrapperRouter implements OssService {
         }
     }
 
+    @Override
     public ObjectInfo getObjectInfo(int channelCode, String objectId) throws Exception {
         int ossUser = storeConfigService.getLocalOssUser();
         if (ossType == OssType.localOss.getCode()) {
@@ -100,6 +115,7 @@ public class StoreServiceWrapperRouter implements OssService {
         throw new Exception("OSSType not found");
     }
 
+    @Override
     public String getSignedUrl(int channelCode, String objectId) throws Exception {
         int ossUser = storeConfigService.getLocalOssUser();
         if (ossType == OssType.localOss.getCode()) {
@@ -110,6 +126,7 @@ public class StoreServiceWrapperRouter implements OssService {
         throw new Exception("OSSType not found");
     }
 
+    @Override
     public String getSignedUrlByUrl(int channelCode, String objectUrl) throws Exception {
         int ossUser = storeConfigService.getLocalOssUser();
         if (ossType == OssType.localOss.getCode()) {
@@ -120,11 +137,13 @@ public class StoreServiceWrapperRouter implements OssService {
         throw new Exception("OSSType not found");
     }
 
+    @Override
     public VideoInfo getVideoInfo(int channelCode, String videoFileId) throws Exception {
         int ossUser = storeConfigService.getLocalOssUser();
         return storeServiceWrapper.getVideoInfo(channelCode, videoFileId, ossUser);
     }
 
+    @Override
     public ImageInfo getImageInfo(int channelCode, String imageFileId) throws Exception {
         int ossUser = storeConfigService.getLocalOssUser();
         if (ossType == OssType.localOss.getCode()) {
@@ -135,6 +154,7 @@ public class StoreServiceWrapperRouter implements OssService {
         throw new Exception("OSSType not found");
     }
 
+    @Override
     public ConvertedImageInfo getWebpInfo(int channelCode, String imageFileId) throws Exception {
         int ossUser = storeConfigService.getLocalOssUser();
         if (ossType == OssType.localOss.getCode()) {
@@ -144,6 +164,7 @@ public class StoreServiceWrapperRouter implements OssService {
         throw new Exception("OSSType not found");
     }
 
+    @Override
     public AudioInfo getAudioInfo(int channelCode, String audioFileId) throws Exception {
         int ossUser = storeConfigService.getLocalOssUser();
         if (ossType == OssType.localOss.getCode()) {

+ 1 - 0
file/file-service/src/main/java/cn/reghao/tnb/file/app/service/AvatarService.java

@@ -25,6 +25,7 @@ public class AvatarService {
     public String updateAvatar(AvatarUpdate avatarUpdate) throws Exception {
         int channelCode = avatarUpdate.getChannelCode();
         String uploadId = avatarUpdate.getUploadId();
+        ossService.setObjectUpload(channelCode, uploadId);
         ImageInfo imageInfo = ossService.getImageInfo(channelCode, uploadId);
         if (imageInfo != null) {
             String avatarUrl = imageInfo.getUrl();

+ 8 - 7
file/file-service/src/main/java/cn/reghao/tnb/file/app/service/UploadChannelService.java

@@ -142,21 +142,22 @@ public class UploadChannelService {
 
     public ObjectChannel getObjectChannelByChannelCode(int channelCode, long createBy) {
         UploadChannel uploadChannel = uploadChannelMapper.findByCreateByAndChannelCode(createBy, channelCode);
-        return getObjectChannel(uploadChannel);
-    }
+        if (uploadChannel == null) {
+            return null;
+        }
 
-    private ObjectChannel getObjectChannel(UploadChannel uploadChannel) {
         int id = uploadChannel.getId();
-        int channelCode = uploadChannel.getChannelCode();
         String channelPrefix = uploadChannel.getPrefix();
         long maxSize = uploadChannel.getMaxSize();
         int fileType = uploadChannel.getFileType();
-        boolean seturl = uploadChannel.getSeturl();
+        boolean setUrl = uploadChannel.getSetUrl();
+        boolean setCallback = uploadChannel.getSetCallback();
         int scope = uploadChannel.getScope();
-        long createBy = uploadChannel.getCreateBy();
 
         UserNode userNode = userNodeService.getUserNode(uploadChannel.getUserNodeId());
         String domain = userNode.getDomain();
-        return new ObjectChannel(id, channelCode, channelPrefix, maxSize, fileType, seturl, scope, domain, (int) createBy);
+        ObjectChannel objectChannel = new ObjectChannel(id, channelCode, channelPrefix, maxSize, fileType,
+                setUrl, setCallback, scope, domain, (int) createBy);
+        return objectChannel;
     }
 }

+ 4 - 4
file/file-service/src/main/resources/mapper/UploadChannelMapper.xml

@@ -4,16 +4,16 @@
 <mapper namespace="cn.reghao.tnb.file.app.db.mapper.UploadChannelMapper">
     <insert id="save" useGeneratedKeys="true" keyProperty="id">
         insert into file_upload_channel
-        (`channel_code`,`name`,`prefix`,`max_size`,`file_type`,`seturl`,`scope`,`enabled`,`user_node_id`,`create_by`)
+        (`channel_code`,`name`,`prefix`,`max_size`,`file_type`,`set_url`,`set_callback`,`scope`,`enabled`,`user_node_id`,`create_by`)
         values
-        (#{channelCode},#{name},#{prefix},#{maxSize},#{fileType},#{seturl},#{scope},#{enabled},#{userNodeId},#{createBy})
+        (#{channelCode},#{name},#{prefix},#{maxSize},#{fileType},#{setUrl},#{setCallback},#{scope},#{enabled},#{userNodeId},#{createBy})
     </insert>
     <insert id="saveAll" useGeneratedKeys="true" keyProperty="id">
         insert into file_upload_channel
-        (`channel_code`,`name`,`prefix`,`max_size`,`file_type`,`seturl`,`scope`,`enabled`,`user_node_id`,`create_by`)
+        (`channel_code`,`name`,`prefix`,`max_size`,`file_type`,`set_url`,`set_callback`,`scope`,`enabled`,`user_node_id`,`create_by`)
         values
         <foreach collection="list" item="item" index="index" separator=",">
-            (#{item.channelCode},#{item.name},#{item.prefix},#{item.maxSize},#{item.fileType},#{item.seturl},#{item.scope},#{item.enabled},#{item.userNodeId},#{item.createBy})
+            (#{item.channelCode},#{item.name},#{item.prefix},#{item.maxSize},#{item.fileType},#{item.setUrl},#{item.setCallback},#{item.scope},#{item.enabled},#{item.userNodeId},#{item.createBy})
         </foreach>
     </insert>