diff --git a/mcwl-admin/src/main/java/com/mcwl/web/controller/communityCenter/PublishCommentController.java b/mcwl-admin/src/main/java/com/mcwl/web/controller/communityCenter/PublishCommentController.java index 813d23e..3b61d2c 100644 --- a/mcwl-admin/src/main/java/com/mcwl/web/controller/communityCenter/PublishCommentController.java +++ b/mcwl-admin/src/main/java/com/mcwl/web/controller/communityCenter/PublishCommentController.java @@ -5,17 +5,16 @@ import com.mcwl.common.core.domain.AjaxResult; import com.mcwl.communityCenter.domain.dto.CommentDelRes; import com.mcwl.communityCenter.domain.dto.CommentDetailRes; import com.mcwl.communityCenter.domain.dto.CommentRes; -import com.mcwl.communityCenter.domain.vo.CommentVo; -import com.mcwl.communityCenter.domain.PublishComment; import com.mcwl.communityCenter.service.PublishCommentService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import javax.validation.Valid; -import java.util.List; /** * 社群评论 diff --git a/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/MallProductController.java b/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/MallProductController.java index 5a6f26b..d6e401c 100644 --- a/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/MallProductController.java +++ b/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/MallProductController.java @@ -18,9 +18,12 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; +import java.util.List; + /** *模型 @@ -152,6 +155,40 @@ public class MallProductController extends BaseController { return modelService.selectModelById(id); } + +/** + * 设置模型置顶状态 + * @param id + * @param isTop + * @return + */ + @PutMapping("/{id}/top") + public ResponseEntity setModelTop(@PathVariable Long id, @RequestParam boolean isTop) { + try { + modelService.setModelTop(id, isTop); + return ResponseEntity.ok().build(); + } catch (Exception e) { + return ResponseEntity.badRequest().build(); + } + } + + + /** + * 获取置顶的模型列表 + * @return + */ + @GetMapping + public ResponseEntity> fetchModelsSortedByTopStatus() { + List models = modelService.fetchModelsSortedByTopStatus(); + return ResponseEntity.ok(models); + } + + + + + + + /** * 我的发布-模型 */ @@ -219,4 +256,6 @@ public class MallProductController extends BaseController { } + + } diff --git a/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/ModelImageController.java b/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/ModelImageController.java index 11f546e..380d246 100644 --- a/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/ModelImageController.java +++ b/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/ModelImageController.java @@ -8,6 +8,7 @@ import com.mcwl.common.core.page.PageDomain; import com.mcwl.common.core.page.TableDataInfo; import com.mcwl.common.utils.SecurityUtils; import com.mcwl.resource.domain.ModelImage; +import com.mcwl.resource.domain.ModelProduct; import com.mcwl.resource.domain.dto.ModelImagePageRes; import com.mcwl.resource.domain.dto.ModelImageRes; import com.mcwl.resource.domain.vo.ModelImageVo; @@ -17,9 +18,11 @@ import com.mcwl.system.service.ISysUserService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; +import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import javax.validation.constraints.NotNull; +import java.util.List; import java.util.Objects; /** @@ -102,5 +105,25 @@ public class ModelImageController { } + @PutMapping("/{id}/top") + public ResponseEntity setModelImageTop(@PathVariable Long id, @RequestParam boolean isTop) { + try { + modelImageLikeService.setModelImageTop(id, isTop); + return ResponseEntity.ok().build(); + } catch (Exception e) { + return ResponseEntity.badRequest().build(); + } + } + + + /** + * 获取置顶的模型列表 + * @return + */ + @GetMapping + public ResponseEntity> fetchModelImagesSortedByTopStatus() { + List models = modelImageLikeService.fetchModelImageSortedByTopStatus(); + return ResponseEntity.ok(models); + } } diff --git a/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/WorkFlowController.java b/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/WorkFlowController.java index 6d43eda..bcca61b 100644 --- a/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/WorkFlowController.java +++ b/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/WorkFlowController.java @@ -2,6 +2,8 @@ package com.mcwl.web.controller.resource; import com.mcwl.common.core.controller.BaseController; import com.mcwl.common.core.domain.AjaxResult; +import com.mcwl.resource.domain.ModelProduct; +import com.mcwl.resource.domain.WorkFlow; import com.mcwl.resource.domain.request.RequestWorkFlow; import com.mcwl.resource.domain.vo.PageVo; import com.mcwl.resource.service.impl.WorkFlowServiceImpl; @@ -9,9 +11,12 @@ import com.mcwl.web.controller.common.OssUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; +import java.util.List; + /** * 工作流 @@ -31,6 +36,36 @@ public class WorkFlowController extends BaseController { @Autowired private WorkFlowServiceImpl workFlowService; + + /** + * 设置工作流的置顶状态 + * @param id + * @param isTop + * @return + */ + @PutMapping("/{id}/top") + public ResponseEntity setworkFlowTop(@PathVariable Long id, @RequestParam boolean isTop) { + try { + workFlowService.setworkFlowTop(id, isTop); + return ResponseEntity.ok().build(); + } catch (Exception e) { + return ResponseEntity.badRequest().build(); + } + } + + +/** + * 获取所有工作流,按照置顶状态排序 + * @return + */ + @GetMapping + public ResponseEntity> fetchWorkFlowSortedByTopStatus() { + List models = workFlowService.fetchWorkFlowSortedByTopStatus(); + return ResponseEntity.ok(models); + } + + + /*** * 图片 * @param file diff --git a/mcwl-common/src/main/java/com/mcwl/common/i18n/I18nMessage.java b/mcwl-common/src/main/java/com/mcwl/common/i18n/I18nMessage.java deleted file mode 100644 index e69de29..0000000 diff --git a/mcwl-common/src/main/java/com/mcwl/common/i18n/YamiLocaleChangeFilter.java b/mcwl-common/src/main/java/com/mcwl/common/i18n/YamiLocaleChangeFilter.java deleted file mode 100644 index ab1dc4e..0000000 --- a/mcwl-common/src/main/java/com/mcwl/common/i18n/YamiLocaleChangeFilter.java +++ /dev/null @@ -1,53 +0,0 @@ -///* -// * Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved. -// * -// * https://www.mall4j.com/ -// * -// * 未经允许,不可做商业用途! -// * -// * 版权所有,侵权必究! -// */ -//package com.mcwl.common.i18n; -// -// -// -//import lombok.extern.slf4j.Slf4j; -//import org.springframework.context.i18n.LocaleContextHolder; -//import org.springframework.core.annotation.Order; -//import org.springframework.stereotype.Component; -// -//import javax.servlet.*; -//import javax.servlet.http.HttpServletRequest; -//import javax.servlet.http.HttpServletResponse; -//import java.io.IOException; -//import java.util.Locale; -//import java.util.Objects; -// -///** -// * RequestContextFilter 会传入默认的Locale,优先级(-105) 要比RequestContextFilter优先级高 -// * @author LGH -// */ -//@Slf4j -//@Component -//@Order(-104) -//public class YamiLocaleChangeFilter implements Filter { -// -// public static String ZH_CN = "zh_CN"; -// public static String ZH_CN_L = "zh_cn"; -// -// @Override -// public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { -// HttpServletRequest request = (HttpServletRequest) servletRequest; -// HttpServletResponse response = (HttpServletResponse) servletResponse; -// -// String newLocale = request.getHeader("locale"); -// if(Objects.equals(newLocale,ZH_CN)||Objects.equals(newLocale,ZH_CN_L)){ -// newLocale = "zh"; -// } -// if (newLocale != null) { -// String lowerLocale = newLocale.toLowerCase(); -// LocaleContextHolder.setLocale(new Locale(lowerLocale)); -// } -// filterChain.doFilter(request, response); -// } -//} diff --git a/mcwl-common/src/main/java/com/mcwl/common/i18n/YamiLocaleChangeInterceptor.java b/mcwl-common/src/main/java/com/mcwl/common/i18n/YamiLocaleChangeInterceptor.java deleted file mode 100644 index 6a806ec..0000000 --- a/mcwl-common/src/main/java/com/mcwl/common/i18n/YamiLocaleChangeInterceptor.java +++ /dev/null @@ -1,58 +0,0 @@ -///* -// * Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved. -// * -// * https://www.mall4j.com/ -// * -// * 未经允许,不可做商业用途! -// * -// * 版权所有,侵权必究! -// */ -//package com.mcwl.common.i18n; -// -// -// -//import lombok.extern.slf4j.Slf4j; -//import org.springframework.stereotype.Component; -//import org.springframework.web.servlet.LocaleResolver; -//import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; -//import org.springframework.web.servlet.support.RequestContextUtils; -// -//import javax.servlet.http.HttpServletRequest; -//import javax.servlet.http.HttpServletResponse; -// -///** -// * @author LGH -// */ -//@Component("localeChangeInterceptor") -//@Slf4j -//public class YamiLocaleChangeInterceptor extends LocaleChangeInterceptor { -// -// @Override -// public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) { -// -// String newLocale = request.getHeader(getParamName()); -// if (newLocale != null) { -// LocaleResolver localeResolver = RequestContextUtils.getLocaleResolver(request); -// if (localeResolver == null) { -// throw new IllegalStateException( -// "No LocaleResolver found: not in a DispatcherServlet request?"); -// } -// try { -// localeResolver.setLocale(request, response, parseLocaleValue(newLocale)); -// } -// catch (IllegalArgumentException ex) { -// if (isIgnoreInvalidLocale()) { -// if (logger.isDebugEnabled()) { -// logger.debug("Ignoring invalid locale value [" + newLocale + "]: " + ex.getMessage()); -// } -// } -// else { -// throw ex; -// } -// } -// } -// // Proceed in any case. -// return true; -// } -// -//} diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/domain/ModelImage.java b/mcwl-resource/src/main/java/com/mcwl/resource/domain/ModelImage.java index f7bbcca..e4c0d2d 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/domain/ModelImage.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/domain/ModelImage.java @@ -109,4 +109,11 @@ public class ModelImage extends BaseEntity { */ @ApiModelProperty(value = "是否置顶") private Integer isTop; + + + /** + * 审核(1公开 2自见) + */ + @ApiModelProperty(value = "审核(1公开 2自见)") + private Integer jurisdiction; } diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/domain/ModelProduct.java b/mcwl-resource/src/main/java/com/mcwl/resource/domain/ModelProduct.java index 296e3a3..82b7eb9 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/domain/ModelProduct.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/domain/ModelProduct.java @@ -124,6 +124,19 @@ public class ModelProduct extends BaseEntity { */ @ApiModelProperty(value = "是否推荐模型") private Integer isRecommend; + + /** + * 是否置顶 + */ + @ApiModelProperty(value = "是否置顶") + private Integer isTop; + + /** + * 审核(1公开 2自见) + */ + @ApiModelProperty(value = "审核(1公开 2自见)") + private Integer jurisdiction; + /** * 删除标志(0代表存在 2代表删除) */ diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/domain/WorkFlow.java b/mcwl-resource/src/main/java/com/mcwl/resource/domain/WorkFlow.java index ed1c35e..d45312d 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/domain/WorkFlow.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/domain/WorkFlow.java @@ -147,6 +147,12 @@ public class WorkFlow { @ApiModelProperty(value = "审核权限") private Integer jurisdiction; + /** + * 是否置顶 + */ + @ApiModelProperty(value = "是否置顶") + private Integer isTop; + /** * 创建时间 */ diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/mapper/ModelImageMapper.java b/mcwl-resource/src/main/java/com/mcwl/resource/mapper/ModelImageMapper.java index b7e422c..ffa8c52 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/mapper/ModelImageMapper.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/mapper/ModelImageMapper.java @@ -5,7 +5,15 @@ import com.mcwl.resource.domain.ModelImage; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + @Mapper public interface ModelImageMapper extends BaseMapper { Long sumLikeNumber(@Param("userId") Long userId); + + List fetchModelImageSortedByTopStatus(); + + + void setModelImageTop(@Param("id") Long id, @Param("isTop") int i); + } diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/mapper/ModelMapper.java b/mcwl-resource/src/main/java/com/mcwl/resource/mapper/ModelMapper.java index 63bc3a8..89658da 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/mapper/ModelMapper.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/mapper/ModelMapper.java @@ -6,6 +6,8 @@ import com.mcwl.resource.domain.ModelProduct; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * @Author:ChenYan * @Project:McWl @@ -27,4 +29,11 @@ public interface ModelMapper extends BaseMapper { Long sumLikeNumber(@Param("userId") Long userId); Long sumRunNumber(Long userId); + + void updateTopStatus(@Param("id") Long id, @Param("isTop") int i); + + List selectAllModelsSortedByTopStatus(); + + + } diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/mapper/WorkFlowMapper.java b/mcwl-resource/src/main/java/com/mcwl/resource/mapper/WorkFlowMapper.java index e72f22a..bfde145 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/mapper/WorkFlowMapper.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/mapper/WorkFlowMapper.java @@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.mcwl.resource.domain.WorkFlow; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 工作流 * @author DaiZibo @@ -16,4 +18,7 @@ public interface WorkFlowMapper extends BaseMapper { void updateWorkFlow(WorkFlow workFlow); + List fetchWorkFlowSortedByTopStatus(); + + } diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/service/ModelImageLikeService.java b/mcwl-resource/src/main/java/com/mcwl/resource/service/ModelImageLikeService.java index 6a34b9c..ffadacd 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/service/ModelImageLikeService.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/service/ModelImageLikeService.java @@ -4,8 +4,17 @@ import com.baomidou.mybatisplus.extension.service.IService; import com.mcwl.resource.domain.ModelImage; import com.mcwl.resource.domain.ModelImageLike; +import java.util.List; + public interface ModelImageLikeService extends IService { void like(Long imageId); + + void setModelImageTop(Long id, boolean isTop); + + + List fetchModelImageSortedByTopStatus(); + + } diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/service/ModelImageService.java b/mcwl-resource/src/main/java/com/mcwl/resource/service/ModelImageService.java index c50b1b4..ebe80ab 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/service/ModelImageService.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/service/ModelImageService.java @@ -39,4 +39,8 @@ public interface ModelImageService extends IService { TableDataInfo listByPage(ModelImagePageRes imagePageRes); ModelImageVo getDetail(@NotNull(message = "图片id不能为空") Long imageId); + + + + } diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/service/ModelService.java b/mcwl-resource/src/main/java/com/mcwl/resource/service/ModelService.java index c4e004d..29bf529 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/service/ModelService.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/service/ModelService.java @@ -36,4 +36,10 @@ public interface ModelService extends IService { AjaxResult selectModelById(Long id); + void setModelTop(Long id, boolean isTop); + + List fetchModelsSortedByTopStatus(); + + + } diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/service/WorkFlowService.java b/mcwl-resource/src/main/java/com/mcwl/resource/service/WorkFlowService.java index b8f762f..0a9475f 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/service/WorkFlowService.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/service/WorkFlowService.java @@ -8,6 +8,8 @@ import com.mcwl.resource.domain.dto.ModelImagePageRes; import com.mcwl.resource.domain.request.RequestWorkFlow; import com.mcwl.resource.domain.vo.PageVo; +import java.util.List; + /** * 工作流 业务层 * @author DaiZibo @@ -29,4 +31,9 @@ public interface WorkFlowService extends IService { TableDataInfo listByPage(ModelImagePageRes imagePageRes); + void setworkFlowTop(Long id, boolean isTop); + + List fetchWorkFlowSortedByTopStatus(); + + } diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelCommentServiceImpl.java b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelCommentServiceImpl.java index 8226626..0d975b6 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelCommentServiceImpl.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelCommentServiceImpl.java @@ -46,19 +46,27 @@ public class ModelCommentServiceImpl extends ServiceImpl getComment(Long imageId) { List modelCommentVoList = new ArrayList<>(); diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelImageLikeServiceImpl.java b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelImageLikeServiceImpl.java index 127b601..bde620e 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelImageLikeServiceImpl.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelImageLikeServiceImpl.java @@ -15,6 +15,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Date; +import java.util.List; import java.util.Objects; @Service @@ -58,4 +59,14 @@ public class ModelImageLikeServiceImpl extends ServiceImpl fetchModelImageSortedByTopStatus() { + return modelImageMapper.fetchModelImageSortedByTopStatus(); + } } diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelImageServiceImpl.java b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelImageServiceImpl.java index 08caf58..ef7efa4 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelImageServiceImpl.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelImageServiceImpl.java @@ -15,6 +15,7 @@ import com.mcwl.common.utils.SecurityUtils; import com.mcwl.common.utils.StringUtils; import com.mcwl.resource.domain.ModelImage; import com.mcwl.resource.domain.ModelImageComment; +import com.mcwl.resource.domain.ModelProduct; import com.mcwl.resource.domain.dto.ModelImageCommentRes; import com.mcwl.resource.domain.dto.ModelImagePageRes; import com.mcwl.resource.domain.dto.ModelImageRes; @@ -155,5 +156,4 @@ public class ModelImageServiceImpl extends ServiceImpl impl @Autowired private ISysUserService sysUserService; + /** + * 设置模型置顶状态 + * + * @param modelId 模型ID + * @param isTop 是否置顶 + */ + @Override + public void setModelTop(Long id, boolean isTop) { + postMapper.updateTopStatus(id, isTop ? 1 : 0); + } + /** + * 获取模型列表 + * + * @param + * @return 模型列表 + */ + @Override + public List fetchModelsSortedByTopStatus() { + return postMapper.selectAllModelsSortedByTopStatus(); + } @Override public Page selectByUserId(MallProductVo mallProductVo) { @@ -236,4 +256,6 @@ public class ModelServiceImpl extends ServiceImpl impl } + + } diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/WorkFlowServiceImpl.java b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/WorkFlowServiceImpl.java index f5ba99f..f97dfc8 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/WorkFlowServiceImpl.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/WorkFlowServiceImpl.java @@ -386,5 +386,15 @@ public class WorkFlowServiceImpl extends ServiceImpl i } + @Override + public void setworkFlowTop(Long id, boolean isTop) { + flowMapper.setworkFlowTop(id,isTop?0:1); + } + + @Override + public List fetchWorkFlowSortedByTopStatus() { + return flowMapper.fetchWorkFlowSortedByTopStatus(); + } + } diff --git a/mcwl-resource/src/main/resources/mapper/resource/ModelImageMapper.xml b/mcwl-resource/src/main/resources/mapper/resource/ModelImageMapper.xml index 03e7d4b..103d1a7 100644 --- a/mcwl-resource/src/main/resources/mapper/resource/ModelImageMapper.xml +++ b/mcwl-resource/src/main/resources/mapper/resource/ModelImageMapper.xml @@ -3,6 +3,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> + + UPDATE model_image SET is_top = #{isTop} WHERE image_id = #{imageId} + + + SELECT is_top FROM model_image ORDER BY is_top DESC; + @@ -81,5 +84,8 @@ + diff --git a/mcwl-resource/src/main/resources/mapper/resource/WorkFlowMapper.xml b/mcwl-resource/src/main/resources/mapper/resource/WorkFlowMapper.xml index 39b24cd..fbc873d 100644 --- a/mcwl-resource/src/main/resources/mapper/resource/WorkFlowMapper.xml +++ b/mcwl-resource/src/main/resources/mapper/resource/WorkFlowMapper.xml @@ -31,4 +31,7 @@ WHERE id = #{id} +