TASK:模特相关接口;
This commit is contained in:
@@ -3,6 +3,7 @@ package com.ai.da.controller;
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.system.UserInfo;
|
||||
import com.ai.da.common.config.FileProperties;
|
||||
import com.ai.da.common.config.exception.BusinessException;
|
||||
import com.ai.da.common.context.UserContext;
|
||||
import com.ai.da.common.enums.LibraryLevel1TypeEnum;
|
||||
import com.ai.da.common.response.PageBaseResponse;
|
||||
@@ -68,17 +69,25 @@ public class LibraryController {
|
||||
@ApiParam("二级类型 争对 Sketchboard; 有 Outwear Dress Blouse Skirt Trousers")
|
||||
@RequestParam(value = "level2Type",required = false) String level2Type,
|
||||
@ApiParam("本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取")
|
||||
@RequestParam(value = "timeZone") String timeZone) {
|
||||
@RequestParam(value = "timeZone") String timeZone,
|
||||
@RequestParam(value = "modelType") String modelType,
|
||||
@RequestParam(value = "sex") String sex) {
|
||||
Assert.isTrue(!StringUtils.isEmpty(file.getOriginalFilename()),"Please select a file!");
|
||||
Integer high =null;
|
||||
Integer width =null;
|
||||
if(level1Type.equals(LibraryLevel1TypeEnum.MODELS.getRealName())){
|
||||
if (StringUtils.isEmpty(modelType)) {
|
||||
throw new BusinessException("modelType can't be null");
|
||||
}
|
||||
if (StringUtils.isEmpty(sex)) {
|
||||
throw new BusinessException("sex can't be null");
|
||||
}
|
||||
FileVO fileVO = FileUtil.getFileSize(file);
|
||||
high = fileVO.getHigh();
|
||||
width = fileVO.getWidth();
|
||||
}
|
||||
return Response.success(libraryService.upload(new LibraryUploadDTO(file, level1Type,level2Type,
|
||||
timeZone, MD5Utils.encryptFile(file),high,width)));
|
||||
timeZone, MD5Utils.encryptFile(file),high,width,modelType,sex)));
|
||||
}
|
||||
@ApiOperation(value = "保存或者编辑template打点")
|
||||
@PostMapping("/saveOrEditTemplatePoint")
|
||||
|
||||
Reference in New Issue
Block a user