BUGFIX: format;
This commit is contained in:
@@ -29,6 +29,7 @@ public class FileProperties {
|
||||
}
|
||||
return linux;
|
||||
}
|
||||
|
||||
public String getLinuxDomain() {
|
||||
String os = System.getProperty("os.name");
|
||||
if ((!os.toLowerCase().startsWith("win")) && (!os.toLowerCase().startsWith("mac"))) {
|
||||
|
||||
@@ -18,6 +18,7 @@ public class MinIoClientConfig {
|
||||
|
||||
/**
|
||||
* 注入minio 客户端
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
|
||||
@@ -56,6 +56,7 @@ public class ExceptionCatch {
|
||||
|
||||
/**
|
||||
* 处理参数校验异常
|
||||
*
|
||||
* @param e
|
||||
* @return ResponseData
|
||||
*/
|
||||
@@ -68,6 +69,7 @@ public class ExceptionCatch {
|
||||
|
||||
/**
|
||||
* 处理参数校验异常
|
||||
*
|
||||
* @param e
|
||||
* @return ResponseData
|
||||
*/
|
||||
|
||||
@@ -8,6 +8,7 @@ public class UserContext {
|
||||
public static AuthPrincipalVo getUserHolder() {
|
||||
return userHolder.get();
|
||||
}
|
||||
|
||||
public static void delete() {
|
||||
userHolder.remove();
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ public enum CurrentDesignPictureTypeEnum {
|
||||
public static CurrentDesignPictureTypeEnum of(String name) {
|
||||
return Stream.of(CurrentDesignPictureTypeEnum.values()).filter(v -> v.name().equals(name)).findFirst().orElse(null);
|
||||
}
|
||||
|
||||
public static List<CurrentDesignPictureTypeEnum> ofList(List<Integer> codes) {
|
||||
return Stream.of(CurrentDesignPictureTypeEnum.values()).filter(v -> codes.contains(v.code)).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ public enum CurrentDesignPrintPictureTypeEnum {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public static List<CurrentDesignPrintPictureTypeEnum> ofList(List<Integer> codes) {
|
||||
return Stream.of(CurrentDesignPrintPictureTypeEnum.values()).filter(v -> codes.contains(v.code)).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ public enum LibraryTopTypeEnum {
|
||||
public String getRealName() {
|
||||
return realName;
|
||||
}
|
||||
|
||||
public static LibraryTopTypeEnum uploadOf(String realName) {
|
||||
return Stream.of(LibraryTopTypeEnum.values())
|
||||
.filter(v -> v.getRealName().equals(realName)).findFirst().orElse(null);
|
||||
|
||||
@@ -58,6 +58,7 @@ public enum SysFileLevel2TypeEnum {
|
||||
public static SysFileLevel2TypeEnum uploadOf(String uploadPathName) {
|
||||
return Stream.of(SysFileLevel2TypeEnum.values()).filter(v -> v.getUploadPathName().equals(uploadPathName)).findFirst().orElse(null);
|
||||
}
|
||||
|
||||
public static SysFileLevel2TypeEnum realNameOf(String realName) {
|
||||
return Stream.of(SysFileLevel2TypeEnum.values()).filter(v -> v.getRealName().equals(realName)).findFirst().orElse(null);
|
||||
}
|
||||
@@ -65,9 +66,11 @@ public enum SysFileLevel2TypeEnum {
|
||||
public static SysFileLevel2TypeEnum realNameOfPython(String realName) {
|
||||
return Stream.of(BLOUSE, DRESS, OUTWEAR, SKIRT, TROUSERS).filter(v -> v.getRealName().equals(realName)).findFirst().orElse(null);
|
||||
}
|
||||
|
||||
public static List<String> ofPython() {
|
||||
return Stream.of(BLOUSE, DRESS, OUTWEAR, SKIRT, TROUSERS).map(SysFileLevel2TypeEnum::getRealName).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public static List<String> ofPythonPath() {
|
||||
return Stream.of(BLOUSE, DRESS, OUTWEAR, SKIRT, TROUSERS).map(SysFileLevel2TypeEnum::getUploadPathName).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ public class TokenQuery {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static JSONObject generateUser(Map<String, Object> param, String token) {
|
||||
HttpResponse httpResponse = HttpUtil.createPost(GENERATE_USER_DOMAIN + TokenApis.GENERATE_USER.getUrl())
|
||||
.body(JSONObject.toJSONString(param != null ? param : new HashMap<>()))
|
||||
|
||||
@@ -30,7 +30,6 @@ public class PageBaseResponse<T>{
|
||||
private List<T> content;
|
||||
|
||||
|
||||
|
||||
public PageBaseResponse(List<T> list, long page, long size, long total, long pages) {
|
||||
this.page = page;
|
||||
this.size = size;
|
||||
|
||||
@@ -31,7 +31,6 @@ public class PageResponse<T> extends Response<List<T>> {
|
||||
private List<T> content;
|
||||
|
||||
|
||||
|
||||
public PageResponse(Response<List<T>> response, long page, long size, long total, long pages) {
|
||||
if (response != null) {
|
||||
this.setData(response.getData());
|
||||
|
||||
@@ -48,7 +48,6 @@ public class Response<T> implements Serializable {
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static <T> Response<T> fail(String msg) {
|
||||
return fail(ResultEnum.FAIL.getCode(), msg);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ public enum ResultEnum {
|
||||
private boolean isOK;
|
||||
|
||||
|
||||
|
||||
ResultEnum(boolean isOK, int code, String msg) {
|
||||
this.isOK = isOK;
|
||||
this.code = code;
|
||||
|
||||
@@ -78,10 +78,12 @@ public class AuthenticationFilter extends OncePerRequestFilter {
|
||||
filterChain.doFilter(httpServletRequest, httpServletResponse);
|
||||
}
|
||||
}
|
||||
|
||||
private Boolean calculateUrl(String requestURI) {
|
||||
String filterUrl = FILTER_URL.stream().filter(url -> requestURI.contains(url)).findFirst().orElse(null);
|
||||
return null == filterUrl ? Boolean.TRUE : Boolean.FALSE;
|
||||
}
|
||||
|
||||
private void extracted(HttpServletRequest request) throws AuthenticationException {
|
||||
String jwtToken = request.getHeader(properties.getJwtTokenHeader());
|
||||
log.debug("后台检查令牌:{}", jwtToken);
|
||||
|
||||
@@ -33,6 +33,7 @@ public class AccessLimitUtils {
|
||||
LocalCacheUtils.setAidaInterfaceCurrentLimitingCache(interfaceName, useCount);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验过后 接口完毕 去掉限流
|
||||
*
|
||||
|
||||
@@ -12,11 +12,13 @@ import java.time.format.DateTimeFormatter;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.TimeZone;
|
||||
|
||||
@Slf4j
|
||||
public class DateUtil {
|
||||
public static final String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";
|
||||
public static final String YYYYMM = "yyyyMM";
|
||||
public static final String YYYY_MM_DD = "yyyyMMdd";
|
||||
|
||||
/**
|
||||
* LocalDate -> Date
|
||||
*/
|
||||
@@ -30,8 +32,10 @@ public class DateUtil {
|
||||
public static Date asDate(LocalDateTime localDateTime) {
|
||||
return Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());
|
||||
}
|
||||
|
||||
/**
|
||||
* date 装 String
|
||||
*
|
||||
* @param date
|
||||
* @param formatter
|
||||
* @return
|
||||
@@ -43,8 +47,10 @@ public class DateUtil {
|
||||
LocalDateTime localDateTime = LocalDateTime.ofInstant(instant, zoneId);
|
||||
return dateTimeFormatter.format(localDateTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据时区获取时间
|
||||
*
|
||||
* @param timeZone "Asia/Tokyo"
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -144,6 +144,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
|
||||
}
|
||||
return new FileVO(height, width);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文件尺寸
|
||||
*/
|
||||
@@ -162,6 +163,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
|
||||
}
|
||||
return new FileVO(height, width);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取远程文件流
|
||||
*/
|
||||
@@ -176,6 +178,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
|
||||
throw new BusinessException("get file is failed!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 将文件名解析成文件的上传路径
|
||||
*/
|
||||
@@ -204,6 +207,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 将文件名解析成文件的上传路径
|
||||
*/
|
||||
@@ -242,6 +246,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指定文件夹下所有文件,不含文件夹里的文件
|
||||
*
|
||||
|
||||
@@ -17,6 +17,7 @@ public class ImageUtil {
|
||||
static int r, g, b; // 分别用来存放获取的RGB值
|
||||
static int heigth, width;
|
||||
static int id = 0;
|
||||
|
||||
public static void find() {
|
||||
// 读取要操作的图片,这里的图片路径请改成自己要处理的图片
|
||||
try {
|
||||
|
||||
@@ -25,8 +25,8 @@ public final class LocalCacheUtils {
|
||||
* token
|
||||
*/
|
||||
private static LoadingCache<String, String> tokenCache = loadTokenCache();
|
||||
|
||||
/**
|
||||
*
|
||||
* 缓存接口这里是LoadingCache,LoadingCache在缓存项不存在时可以自动加载缓存
|
||||
*/
|
||||
private static LoadingCache<String, String> loadTokenCache() {
|
||||
@@ -44,6 +44,7 @@ public final class LocalCacheUtils {
|
||||
});
|
||||
return tokenCache;
|
||||
}
|
||||
|
||||
/**
|
||||
* 邮箱,短信验证码
|
||||
*/
|
||||
@@ -176,8 +177,10 @@ public final class LocalCacheUtils {
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* 添加token本地缓存
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
@@ -187,6 +190,7 @@ public final class LocalCacheUtils {
|
||||
|
||||
/**
|
||||
* 获取token本地缓存
|
||||
*
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
@@ -202,8 +206,10 @@ public final class LocalCacheUtils {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除token本地缓存(登出)
|
||||
*
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
@@ -214,8 +220,10 @@ public final class LocalCacheUtils {
|
||||
log.error("delTokenCache方法错误", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加验证码本地缓存
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
@@ -225,6 +233,7 @@ public final class LocalCacheUtils {
|
||||
|
||||
/**
|
||||
* 获取验证码本地缓存
|
||||
*
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
@@ -240,8 +249,10 @@ public final class LocalCacheUtils {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加系统文本地缓存
|
||||
*
|
||||
* @param key
|
||||
* @param sysFile
|
||||
*/
|
||||
@@ -251,6 +262,7 @@ public final class LocalCacheUtils {
|
||||
|
||||
/**
|
||||
* 获取系统文件本地缓存
|
||||
*
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
@@ -263,8 +275,10 @@ public final class LocalCacheUtils {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除所有系统文件本地缓存
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static void clearAllSysFileCache() {
|
||||
@@ -274,8 +288,10 @@ public final class LocalCacheUtils {
|
||||
log.error("clearAllSysFileCache方法错误", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加系统文本地缓存,通过类型
|
||||
*
|
||||
* @param level1Type
|
||||
* @param sysFileList
|
||||
*/
|
||||
@@ -285,6 +301,7 @@ public final class LocalCacheUtils {
|
||||
|
||||
/**
|
||||
* 获取系统文件本地缓存
|
||||
*
|
||||
* @param level2Type
|
||||
* @return
|
||||
*/
|
||||
@@ -296,8 +313,10 @@ public final class LocalCacheUtils {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除所有系统文件本地缓存
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static void clearAllSysFileCacheByLevel2Type() {
|
||||
@@ -307,8 +326,10 @@ public final class LocalCacheUtils {
|
||||
log.error("clearAllSysFileCacheByLevel2Type方法错误", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加系统文件范围最大最小值本地缓存
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
@@ -318,6 +339,7 @@ public final class LocalCacheUtils {
|
||||
|
||||
/**
|
||||
* 获取系统文件范围最大最小值本地缓存
|
||||
*
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
@@ -333,8 +355,10 @@ public final class LocalCacheUtils {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除所有系统文件范围最大最小值本地缓存
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static void clearAllMaxMinValueCache() {
|
||||
@@ -344,8 +368,10 @@ public final class LocalCacheUtils {
|
||||
log.error("clearAllMaxMinValueCache方法错误", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加系design文件进度统计
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
@@ -355,6 +381,7 @@ public final class LocalCacheUtils {
|
||||
|
||||
/**
|
||||
* 获取design文件进度统计
|
||||
*
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
@@ -367,8 +394,10 @@ public final class LocalCacheUtils {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 进度统计完后 删除进度
|
||||
*
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
@@ -382,6 +411,7 @@ public final class LocalCacheUtils {
|
||||
|
||||
/**
|
||||
* 设置本次接口流量数
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
@@ -391,6 +421,7 @@ public final class LocalCacheUtils {
|
||||
|
||||
/**
|
||||
* 获取本次接口流量数
|
||||
*
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -58,6 +58,7 @@ public class MD5Utils {
|
||||
}
|
||||
return md5;
|
||||
}
|
||||
|
||||
/**
|
||||
* MD5加密文件
|
||||
*
|
||||
|
||||
@@ -37,6 +37,7 @@ import java.util.stream.Collectors;
|
||||
public class MinioUtil {
|
||||
@Autowired
|
||||
private MinioClient minioClient;
|
||||
|
||||
/**
|
||||
* description: 判断bucket是否存在,不存在则创建
|
||||
*
|
||||
@@ -55,6 +56,7 @@ public class MinioUtil {
|
||||
|
||||
/**
|
||||
* 创建存储bucket
|
||||
*
|
||||
* @param bucketName 存储bucket名称
|
||||
* @return Boolean
|
||||
*/
|
||||
@@ -72,6 +74,7 @@ public class MinioUtil {
|
||||
|
||||
/**
|
||||
* 删除存储bucket
|
||||
*
|
||||
* @param bucketName 存储bucket名称
|
||||
* @return Boolean
|
||||
*/
|
||||
@@ -86,6 +89,7 @@ public class MinioUtil {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* description: 上传文件
|
||||
*
|
||||
@@ -93,7 +97,6 @@ public class MinioUtil {
|
||||
* @param path
|
||||
* @param multipartFile
|
||||
* @return: java.lang.String
|
||||
|
||||
*/
|
||||
public List<String> uploadBatch(String bucketName, String path, MultipartFile[] multipartFile) {
|
||||
List<String> names = new ArrayList<>(multipartFile.length);
|
||||
@@ -138,7 +141,6 @@ public class MinioUtil {
|
||||
* @param path
|
||||
* @param file
|
||||
* @return: java.lang.String
|
||||
|
||||
*/
|
||||
public String upload(String bucketName, String path, MultipartFile file) {
|
||||
String fileName = file.getOriginalFilename();
|
||||
@@ -292,6 +294,7 @@ public class MinioUtil {
|
||||
|
||||
/**
|
||||
* 查看文件对象
|
||||
*
|
||||
* @param bucketName 存储bucket名称
|
||||
* @return 存储bucket内文件对象信息
|
||||
*/
|
||||
@@ -316,6 +319,7 @@ public class MinioUtil {
|
||||
|
||||
/**
|
||||
* 批量删除文件对象
|
||||
*
|
||||
* @param bucketName 存储bucket名称
|
||||
* @param objects 对象名称集合
|
||||
*/
|
||||
@@ -387,6 +391,7 @@ public class MinioUtil {
|
||||
|
||||
/**
|
||||
* 将桶名、文件名从url中分离出来
|
||||
*
|
||||
* @param url 带桶名、文件名的url
|
||||
* @param expiry 图片过期时间
|
||||
* @return 可以直接访问的minio图片地址
|
||||
|
||||
@@ -45,24 +45,20 @@ public class MultiReadHttpServletRequest extends HttpServletRequestWrapper {
|
||||
while ((line = reader.readLine()) != null) {
|
||||
sb.append(line);
|
||||
}
|
||||
}
|
||||
catch (IOException e) {
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
finally {
|
||||
} finally {
|
||||
if (inputStream != null) {
|
||||
try {
|
||||
inputStream.close();
|
||||
}
|
||||
catch (IOException e) {
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
if (reader != null) {
|
||||
try {
|
||||
reader.close();
|
||||
}
|
||||
catch (IOException e) {
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@@ -72,6 +68,7 @@ public class MultiReadHttpServletRequest extends HttpServletRequestWrapper {
|
||||
|
||||
/**
|
||||
* 复制输入流
|
||||
*
|
||||
* @param inputStream 请求输入流
|
||||
* @return 复制出来的输入流
|
||||
*/
|
||||
@@ -84,8 +81,7 @@ public class MultiReadHttpServletRequest extends HttpServletRequestWrapper {
|
||||
byteArrayOutputStream.write(buffer, 0, len);
|
||||
}
|
||||
byteArrayOutputStream.flush();
|
||||
}
|
||||
catch (IOException e) {
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package com.ai.da.common.utils;
|
||||
|
||||
import java.util.*;
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ public class RandomsUtil {
|
||||
public static String generateVerifyCode(Long randomStart, Long randomEnd) {
|
||||
return String.valueOf(RandomUtil.randomLong(randomStart, randomEnd));
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成随机系统图片
|
||||
*
|
||||
|
||||
@@ -10,8 +10,8 @@ public class RequestInfoUtil {
|
||||
* @param request
|
||||
* @return java.lang.String
|
||||
* @version 1.0
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* <p>
|
||||
* 使用了ng等代理服务器要在ng加以下配置
|
||||
* location / {
|
||||
* proxy_pass http://127.0.0.1:10678;
|
||||
@@ -20,7 +20,6 @@ public class RequestInfoUtil {
|
||||
* proxy_set_header REMOTE-HOST $remote_addr;
|
||||
* proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
* }
|
||||
|
||||
*/
|
||||
public static String getIpAddress(HttpServletRequest request) {
|
||||
String ip = request.getHeader("x-forwarded-for");
|
||||
|
||||
@@ -59,6 +59,7 @@ public class RsaDecryptUtils {
|
||||
|
||||
/**
|
||||
* 解密
|
||||
*
|
||||
* @param args
|
||||
* @throws NoSuchAlgorithmException
|
||||
*/
|
||||
|
||||
@@ -99,6 +99,7 @@ public class SendEmailUtil {
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private static Template contractTemplate(Long templateId, String verifyCode, String ip) {
|
||||
Template template = new Template();
|
||||
template.setTemplateID(templateId);
|
||||
|
||||
@@ -30,6 +30,7 @@ public class AccountController {
|
||||
public Response<AccountPreLoginVO> preLogin(@Valid @RequestBody AccountPreLoginDTO accountDTO) {
|
||||
return Response.success(accountService.preLogin(accountDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "登入")
|
||||
@PostMapping("/login")
|
||||
public Response<AccountLoginVO> login(@Valid @RequestBody AccountLoginDTO accountDTO, HttpServletRequest request) {
|
||||
|
||||
@@ -42,6 +42,7 @@ public class DesignController {
|
||||
public Response<DesignCollectionVO> reDesignCollection(@Valid @RequestBody ReDesignCollectionDTO reDesignDTO) {
|
||||
return Response.success(designService.reDesignCollection(reDesignDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "designItem list,刷新用")
|
||||
@GetMapping("/designItemList")
|
||||
public Response<DesignCollectionVO> designItemList(@ApiParam("designId") @RequestParam("designId") Long designId) {
|
||||
|
||||
@@ -33,6 +33,7 @@ public class DesignDetailController {
|
||||
response.setData(designService.generateHighDesign(generateHighDesignDTO));
|
||||
return response;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除高级design图片")
|
||||
@PostMapping("/deleteHighDesign")
|
||||
public Response<Boolean> deleteHighDesign(@Valid @RequestBody GenerateHighDesignDTO generateHighDesignDTO) {
|
||||
@@ -40,6 +41,7 @@ public class DesignDetailController {
|
||||
response.setData(designService.deleteHighDesign(generateHighDesignDTO));
|
||||
return response;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询design详情")
|
||||
@GetMapping("/getDetail")
|
||||
public Response<DesignItemDetailVO> getDetail(@ApiParam("designItemId") @RequestParam("designItemId") Long designItemId,
|
||||
@@ -54,6 +56,7 @@ public class DesignDetailController {
|
||||
@ApiParam("操作类型 PREV 上一步 NEXT 下一步") @RequestParam("operateType") String operateType) {
|
||||
return Response.success(designItemService.getNextSysElement(id, type, operateType));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "单个design")
|
||||
@PostMapping("/designSingle")
|
||||
public Response<DesignSingleVO> designSingle(@Valid @RequestBody DesignSingleIncludeLayersDTO designSingleIncludeLayersDTO) {
|
||||
|
||||
@@ -95,6 +95,7 @@ public class ElementController {
|
||||
public Response<List<PantoneVO>> getRgbByHsvBatch(@RequestBody @Valid List<GetRgbByHsvBatchDTO> rgbByHsvBatch) {
|
||||
return Response.success(panToneService.getRgbByHsvBatch(rgbByHsvBatch));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "刷新历史数据")
|
||||
@PostMapping("/refreshHistoryData")
|
||||
public Response<Boolean> refreshHistoryData() {
|
||||
|
||||
@@ -103,11 +103,13 @@ public class LibraryController {
|
||||
return Response.success(libraryService.upload(new LibraryUploadDTO(file, level1Type, level2Type,
|
||||
timeZone, md5, high, width, modelType, sex)));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "保存或者编辑template打点")
|
||||
@PostMapping("/saveOrEditTemplatePoint")
|
||||
public Response<LibraryModelPointVO> saveOrEditTemplatePoint(@Valid @RequestBody LibraryModelPointDTO libraryModelPoint) {
|
||||
return Response.success(libraryModelPointService.saveOrEditTemplatePoint(libraryModelPoint));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "批量Library修改用户文件名")
|
||||
@PostMapping("/batchUpdateLibraryName")
|
||||
public Response<Boolean> batchUpdateLibraryName(@Valid @RequestBody LibraryUpdateDTO libraryUpdateDTO) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.ai.da.common.config.mybatis.plus.CommonMapper;
|
||||
import com.ai.da.mapper.entity.TDesignPythonOutfit;
|
||||
import com.ai.da.model.vo.TDesignPythonOutfitVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,7 +33,6 @@ public class Collection implements Serializable {
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*
|
||||
*/
|
||||
private Long accountId;
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ public class CollectionElement implements Serializable {
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*
|
||||
*/
|
||||
private Long accountId;
|
||||
/**
|
||||
|
||||
@@ -31,7 +31,6 @@ public class DesignHistory implements Serializable {
|
||||
private Long id;
|
||||
/**
|
||||
* 用户ID
|
||||
*
|
||||
*/
|
||||
private Long accountId;
|
||||
|
||||
|
||||
@@ -53,7 +53,4 @@ public class GenerateDetail {
|
||||
private Date updateDate;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -33,7 +33,6 @@ public class Library implements Serializable {
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*
|
||||
*/
|
||||
private Long accountId;
|
||||
|
||||
|
||||
@@ -44,19 +44,16 @@ public class SysFile implements Serializable {
|
||||
|
||||
/**
|
||||
* 名字
|
||||
*
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* md5值
|
||||
*
|
||||
*/
|
||||
private String md5;
|
||||
|
||||
/**
|
||||
* 路径 绝对路径
|
||||
*
|
||||
*/
|
||||
private String url;
|
||||
|
||||
|
||||
@@ -11,7 +11,8 @@ public class BizJson implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public BizJson() {}
|
||||
public BizJson() {
|
||||
}
|
||||
|
||||
public BizJson(String name, String key, String value) {
|
||||
this.name = name;
|
||||
|
||||
@@ -13,8 +13,7 @@ public enum FemalePosition implements IEnumDisplay {
|
||||
BLOUSE("Blouse"),
|
||||
DRESS("Dress"),
|
||||
TROUSERS("Trousers"),
|
||||
SKIRT("Skirt")
|
||||
;
|
||||
SKIRT("Skirt");
|
||||
|
||||
private String value;
|
||||
|
||||
|
||||
@@ -11,8 +11,7 @@ public enum MalePosition implements IEnumDisplay {
|
||||
|
||||
TOPS("Tops"),
|
||||
BOTTOMS("Bottoms"),
|
||||
OUTWEAR("Outwear")
|
||||
;
|
||||
OUTWEAR("Outwear");
|
||||
|
||||
private String value;
|
||||
|
||||
|
||||
@@ -10,8 +10,7 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
public enum MannequinType implements IEnumDisplay {
|
||||
|
||||
SYSTEM("System"),
|
||||
LIBRARY("Library")
|
||||
;
|
||||
LIBRARY("Library");
|
||||
|
||||
private String value;
|
||||
|
||||
|
||||
@@ -11,8 +11,7 @@ public enum ModelType implements IEnumDisplay {
|
||||
|
||||
SYSTEM("System"),
|
||||
|
||||
LIBRARY("Library")
|
||||
;
|
||||
LIBRARY("Library");
|
||||
|
||||
private String value;
|
||||
|
||||
|
||||
@@ -41,5 +41,4 @@ public class DesignLibraryModelPointVO implements Serializable {
|
||||
private String templateUrl;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
@ApiModel("HistoryUpdateVO-响应")
|
||||
|
||||
@@ -28,7 +28,6 @@ public class LibraryVo implements Serializable {
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*
|
||||
*/
|
||||
private Long accountId;
|
||||
/**
|
||||
|
||||
@@ -6,6 +6,7 @@ import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@ApiModel("潘通-响应")
|
||||
|
||||
@@ -30,7 +30,6 @@ public class SysFileVO implements Serializable {
|
||||
|
||||
/**
|
||||
* md5值
|
||||
*
|
||||
*/
|
||||
private String md5;
|
||||
|
||||
|
||||
@@ -1331,6 +1331,7 @@ public class PythonService {
|
||||
sysFileIds.add(sysFileId);
|
||||
return sysFileService.getById(sysFileId);
|
||||
}
|
||||
|
||||
private SysFileVO getRandomSysFileByAttributeRetrieval(List<String> level2TypeList, List<SysFileVO> sysFileVo, List<Long> sysFileIds) {
|
||||
sysFileVo = sysFileVo.stream().filter(
|
||||
f -> level2TypeList.contains(f.getLevel2Type()) && (!sysFileIds.contains(f.getId())))
|
||||
@@ -1550,6 +1551,7 @@ public class PythonService {
|
||||
//生成失败
|
||||
throw new BusinessException("system error!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成 attribute_retrieval
|
||||
*
|
||||
@@ -1603,6 +1605,7 @@ public class PythonService {
|
||||
//生成失败
|
||||
throw new BusinessException("system error!");
|
||||
}
|
||||
|
||||
private static DesignAttributeRetrievalDTO resolveDesignAttributeRetrievalDTO(String bodyStr) {
|
||||
DesignAttributeRetrievalDTO response = new DesignAttributeRetrievalDTO();
|
||||
JSONObject jsonObject = JSON.parseObject(bodyStr);
|
||||
@@ -1658,6 +1661,7 @@ public class PythonService {
|
||||
|
||||
/**
|
||||
* 组装和计算设计包括图层的单品的参数,不需要priority
|
||||
*
|
||||
* @param designSingleDTO
|
||||
* @param singleOverall
|
||||
* @param switchCategory
|
||||
@@ -1702,6 +1706,7 @@ public class PythonService {
|
||||
|
||||
/**
|
||||
* 设计包括图层的单品,每次只针对一个单品
|
||||
*
|
||||
* @param designSingleIncludeLayersDTO
|
||||
* @param designLibraryModelPoint
|
||||
* @return
|
||||
@@ -1736,7 +1741,6 @@ public class PythonService {
|
||||
}
|
||||
|
||||
|
||||
|
||||
private DesignPythonItemPrint resolveDesignSinglePrint(DesignSinglePrintDTO printObject, String clothesPath) {
|
||||
// 没有印花时的参数设置
|
||||
if (printObject.getIfSingle().equals(Boolean.FALSE) && CollectionUtil.isEmpty(printObject.getPrints())) {
|
||||
@@ -1808,6 +1812,7 @@ public class PythonService {
|
||||
|
||||
/**
|
||||
* 设计包括图层的单品,不用指定save_name和priority
|
||||
*
|
||||
* @param singleOverall
|
||||
* @param switchCategory
|
||||
* @param designLibraryModelPoint
|
||||
@@ -1968,7 +1973,6 @@ public class PythonService {
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String generateSketchCaption(String url) {
|
||||
//限流校验
|
||||
AccessLimitUtils.validate("generateSketchCaption", 5);
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.ai.da.mapper.entity.Library;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class DesignPythonObjects {
|
||||
private String process_id;
|
||||
|
||||
@@ -20,18 +20,23 @@ public interface AccountService extends IService<Account> {
|
||||
|
||||
/**
|
||||
* 账户预先登入
|
||||
*
|
||||
* @param accountDTO
|
||||
* @return
|
||||
*/
|
||||
AccountPreLoginVO preLogin(AccountPreLoginDTO accountDTO);
|
||||
|
||||
/**
|
||||
* 账户登入
|
||||
*
|
||||
* @param accountLoginDTO
|
||||
* @return
|
||||
*/
|
||||
AccountLoginVO login(AccountLoginDTO accountLoginDTO, HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* 绑定邮箱
|
||||
*
|
||||
* @param accountBindEmailDTO
|
||||
* @return
|
||||
*/
|
||||
@@ -39,36 +44,47 @@ public interface AccountService extends IService<Account> {
|
||||
|
||||
/**
|
||||
* 忘记密码
|
||||
*
|
||||
* @param accountDTO
|
||||
* @return
|
||||
*/
|
||||
Boolean forgetPwd(AccountRegisterDTO accountDTO);
|
||||
|
||||
/**
|
||||
* 发送邮件
|
||||
*
|
||||
* @param emailSendDTO
|
||||
* @return
|
||||
*/
|
||||
Boolean sendEmail(EmailSendDTO emailSendDTO);
|
||||
|
||||
/**
|
||||
* 登出
|
||||
*
|
||||
* @param accountLogoutDTO
|
||||
* @return
|
||||
*/
|
||||
Boolean logout(AccountLogoutDTO accountLogoutDTO);
|
||||
|
||||
/**
|
||||
* 判断是否登出 Boolean为登入
|
||||
*
|
||||
* @param accountLogoutDTO
|
||||
* @return
|
||||
*/
|
||||
Boolean isLogin(AccountLogoutDTO accountLogoutDTO);
|
||||
|
||||
/**
|
||||
* 添加用户信息
|
||||
*
|
||||
* @param accountAddDTO
|
||||
* @return
|
||||
*/
|
||||
Boolean addUser(AccountAddDTO accountAddDTO);
|
||||
|
||||
/**
|
||||
* 编辑用户信息
|
||||
*
|
||||
* @param accountEditDTO
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -31,6 +31,7 @@ public interface CollectionElementService extends IService<CollectionElement> {
|
||||
* @return
|
||||
*/
|
||||
void delete(Long id);
|
||||
|
||||
/**
|
||||
* 删除元素图片
|
||||
*
|
||||
@@ -38,6 +39,7 @@ public interface CollectionElementService extends IService<CollectionElement> {
|
||||
* @return
|
||||
*/
|
||||
void batchDelete(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 生产印花图片
|
||||
*
|
||||
@@ -45,6 +47,7 @@ public interface CollectionElementService extends IService<CollectionElement> {
|
||||
* @return
|
||||
*/
|
||||
CollectionGeneratePrintVO generatePrint(CollectionGeneratePrintDTO generatePrintDTO);
|
||||
|
||||
/**
|
||||
* 保存印花图片
|
||||
*
|
||||
@@ -52,6 +55,7 @@ public interface CollectionElementService extends IService<CollectionElement> {
|
||||
* @return
|
||||
*/
|
||||
Boolean savePrint(CollectionSavePrintDTO savePrintDTO);
|
||||
|
||||
/**
|
||||
* 通过element保存library
|
||||
*
|
||||
@@ -59,7 +63,9 @@ public interface CollectionElementService extends IService<CollectionElement> {
|
||||
* @return
|
||||
*/
|
||||
Boolean saveLibraryByCollectionElement(List<CollectionElement> elements, String timeZone);
|
||||
|
||||
Boolean saveLibraryByCollectionElement(List<CollectionElement> elements, String timeZone, String modelSex);
|
||||
|
||||
/**
|
||||
* 校验element
|
||||
*
|
||||
@@ -67,6 +73,7 @@ public interface CollectionElementService extends IService<CollectionElement> {
|
||||
* @return
|
||||
*/
|
||||
ValidateElementVO validateElement(DesignCollectionDTO designDTO);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
@@ -74,6 +81,7 @@ public interface CollectionElementService extends IService<CollectionElement> {
|
||||
* @return
|
||||
*/
|
||||
void editSketchBoardsElement(ValidateElementVO elementVO, List<CollectionSketchDTO> sketchBoards);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
@@ -81,6 +89,7 @@ public interface CollectionElementService extends IService<CollectionElement> {
|
||||
* @return
|
||||
*/
|
||||
void editPrintBoardsElement(ValidateElementVO elementVO, List<DesignCollectionPrintElementDTO> printBoards);
|
||||
|
||||
/**
|
||||
* 关联element和collection
|
||||
*
|
||||
@@ -110,6 +119,7 @@ public interface CollectionElementService extends IService<CollectionElement> {
|
||||
List<CollectionElement> getByOnlyCollectionId(Long collectionId);
|
||||
|
||||
DesignLibraryModelPointVO calculateTemplatePoint(LibraryModelPoint modelPoint, Integer high, Integer width, String templateUrl);
|
||||
|
||||
DesignLibraryModelPointVO calculateTemplatePointTemplate(LibraryModelPoint modelPoint, Integer high, Integer width, String templateUrl);
|
||||
|
||||
/**
|
||||
@@ -119,6 +129,7 @@ public interface CollectionElementService extends IService<CollectionElement> {
|
||||
|
||||
/**
|
||||
* 当level2Type发生改变时,修改levelType
|
||||
*
|
||||
* @param elementId
|
||||
* @param level2Type
|
||||
* @return
|
||||
|
||||
@@ -23,10 +23,12 @@ public interface CollectionService extends IService<Collection> {
|
||||
* 保存collection
|
||||
*/
|
||||
Long saveCollection(Long accountId, String timeZone, String moodTemplateId);
|
||||
|
||||
/**
|
||||
* 根据主键查询
|
||||
*/
|
||||
Collection findById(Long id);
|
||||
|
||||
/**
|
||||
* 查询choose关联的collection
|
||||
*/
|
||||
|
||||
@@ -29,6 +29,7 @@ public interface DesignItemService extends IService<DesignItem> {
|
||||
|
||||
/**
|
||||
* 切换系统elemnt
|
||||
*
|
||||
* @param id
|
||||
* @param type
|
||||
*/
|
||||
@@ -36,12 +37,14 @@ public interface DesignItemService extends IService<DesignItem> {
|
||||
|
||||
/**
|
||||
* 单个design
|
||||
*
|
||||
* @param designSingleDTO
|
||||
*/
|
||||
DesignCollectionItemVO designSingle(DesignSingleDTO designSingleDTO);
|
||||
|
||||
/**
|
||||
* print打点
|
||||
*
|
||||
* @param designSingleDTO
|
||||
*/
|
||||
String printDot(DesignSingleDTO designSingleDTO);
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.math.BigDecimal;
|
||||
public interface DesignService extends IService<Design> {
|
||||
/**
|
||||
* design
|
||||
*
|
||||
* @param designDTO
|
||||
* @return
|
||||
*/
|
||||
@@ -27,12 +28,15 @@ public interface DesignService extends IService<Design> {
|
||||
|
||||
/**
|
||||
* redesign
|
||||
*
|
||||
* @param reDesignDTO
|
||||
* @return
|
||||
*/
|
||||
DesignCollectionVO reDesignCollection(ReDesignCollectionDTO reDesignDTO);
|
||||
|
||||
/**
|
||||
* redesign
|
||||
*
|
||||
* @param designId
|
||||
* @return
|
||||
*/
|
||||
@@ -45,6 +49,7 @@ public interface DesignService extends IService<Design> {
|
||||
|
||||
/**
|
||||
* like
|
||||
*
|
||||
* @param designLikeDTO
|
||||
* @return
|
||||
*/
|
||||
@@ -52,6 +57,7 @@ public interface DesignService extends IService<Design> {
|
||||
|
||||
/**
|
||||
* dislike
|
||||
*
|
||||
* @param disDesignLikeDTO
|
||||
* @return
|
||||
*/
|
||||
@@ -59,6 +65,7 @@ public interface DesignService extends IService<Design> {
|
||||
|
||||
/**
|
||||
* generateHighDesign
|
||||
*
|
||||
* @param generateHighDesignDTO
|
||||
* @return
|
||||
*/
|
||||
@@ -66,6 +73,7 @@ public interface DesignService extends IService<Design> {
|
||||
|
||||
/**
|
||||
* deleteHighDesign
|
||||
*
|
||||
* @param generateHighDesignDTO
|
||||
* @return
|
||||
*/
|
||||
@@ -73,6 +81,7 @@ public interface DesignService extends IService<Design> {
|
||||
|
||||
/**
|
||||
* detail
|
||||
*
|
||||
* @param designItemId
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -28,6 +28,7 @@ public interface ITDesignPythonOutfitDetailService extends IService<TDesignPytho
|
||||
|
||||
/**
|
||||
* 通过DesignPythonOutfitId获取designPythonOutfitDetail
|
||||
*
|
||||
* @param designPythonOutfitId
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -25,6 +25,7 @@ public interface LibraryModelPointService extends IService<LibraryModelPoint> {
|
||||
|
||||
/**
|
||||
* 模特打点
|
||||
*
|
||||
* @param modelsDotDTO
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -23,6 +23,7 @@ import java.util.List;
|
||||
public interface LibraryService extends IService<Library> {
|
||||
/**
|
||||
* 根据用户id和一等级查询
|
||||
*
|
||||
* @param accountId
|
||||
* @param level1Types
|
||||
* @return
|
||||
@@ -31,6 +32,7 @@ public interface LibraryService extends IService<Library> {
|
||||
|
||||
/**
|
||||
* 分页查询library
|
||||
*
|
||||
* @param query
|
||||
* @return
|
||||
*/
|
||||
@@ -46,24 +48,28 @@ public interface LibraryService extends IService<Library> {
|
||||
|
||||
/**
|
||||
* 编辑library 文件名
|
||||
*
|
||||
* @param libraryUpdateDTO
|
||||
*/
|
||||
void updateLibraryName(LibraryUpdateDTO libraryUpdateDTO);
|
||||
|
||||
/**
|
||||
* 跟进ids批量查询
|
||||
*
|
||||
* @param ids
|
||||
*/
|
||||
List<Library> getByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 根据md5集合查询
|
||||
*
|
||||
* @param md5List
|
||||
*/
|
||||
List<Library> getByMD5List(List<String> md5List);
|
||||
|
||||
/**
|
||||
* 根据集合url查询
|
||||
*
|
||||
* @param urlList
|
||||
*/
|
||||
List<LibraryVo> getByUrlList(List<String> urlList, Long userId);
|
||||
|
||||
@@ -25,6 +25,7 @@ public interface PanToneService extends IService<PanTone> {
|
||||
* @return
|
||||
*/
|
||||
PantoneVO getByHSV(Integer h, Integer s, Integer v);
|
||||
|
||||
/**
|
||||
* 根据TCX值查询
|
||||
*
|
||||
@@ -35,6 +36,7 @@ public interface PanToneService extends IService<PanTone> {
|
||||
|
||||
/**
|
||||
* 根据TRGB值查询
|
||||
*
|
||||
* @param r
|
||||
* @param g
|
||||
* @param b
|
||||
@@ -48,6 +50,7 @@ public interface PanToneService extends IService<PanTone> {
|
||||
|
||||
/**
|
||||
* 根据hsv批量查询
|
||||
*
|
||||
* @param rgbByHsvBatch
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.ai.da.service;
|
||||
|
||||
|
||||
|
||||
import com.ai.da.mapper.entity.PythonTAllInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
|
||||
@@ -38,18 +38,23 @@ public interface SysFileService extends IService<SysFile> {
|
||||
|
||||
/**
|
||||
* 根据id获取系统文件
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
SysFileVO getById(Long id);
|
||||
|
||||
/**
|
||||
* 根据level1Type获取系统文件
|
||||
*
|
||||
* @param level2Type
|
||||
* @return
|
||||
*/
|
||||
List<SysFileVO> getByLevel2Type(String level2Type);
|
||||
|
||||
/**
|
||||
* 根据集合url查询
|
||||
*
|
||||
* @param urlList
|
||||
*/
|
||||
List<SysFileVO> getByUrlList(List<String> urlList);
|
||||
|
||||
@@ -16,5 +16,6 @@ import java.util.List;
|
||||
*/
|
||||
public interface TCollectionElementRelationService extends IService<TCollectionElementRelation> {
|
||||
void deleteByCollectionId(Long collectionId);
|
||||
|
||||
List<Long> getByCollectionId(Long collectionId);
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ public interface UserLikeGroupService extends IService<UserLikeGroup> {
|
||||
|
||||
/**
|
||||
* choose
|
||||
*
|
||||
* @param userGroupId
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -514,6 +514,7 @@ public class CollectionElementServiceImpl extends ServiceImpl<CollectionElementM
|
||||
elementVO.setModelSex(designDTO.getModelSex());
|
||||
return elementVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DesignLibraryModelPointVO calculateTemplatePoint(LibraryModelPoint modelPoint, Integer high, Integer width, String templateUrl) {
|
||||
DesignLibraryModelPointVO libraryModelPoint = new DesignLibraryModelPointVO();
|
||||
@@ -547,6 +548,7 @@ public class CollectionElementServiceImpl extends ServiceImpl<CollectionElementM
|
||||
libraryModelPoint.setTemplateUrl(templateUrl);
|
||||
return libraryModelPoint;
|
||||
}
|
||||
|
||||
private List<BigDecimal> calculateTemplatePointOne(String template, Integer high, Integer width) {
|
||||
List<BigDecimal> originRatioList = JSON.parseObject(template, List.class);
|
||||
originRatioList.set(0, originRatioList.get(0).multiply(BigDecimal.valueOf(width)));
|
||||
@@ -591,6 +593,7 @@ public class CollectionElementServiceImpl extends ServiceImpl<CollectionElementM
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void validateDesignType(List<DesignCollectionElementDTO> collectionElements, String msg) {
|
||||
Boolean result = collectionElements.stream().filter(mood -> StringUtils.isEmpty(mood.getDesignType())).findFirst().isPresent();
|
||||
if (result) {
|
||||
@@ -612,6 +615,7 @@ public class CollectionElementServiceImpl extends ServiceImpl<CollectionElementM
|
||||
elementVO.setSketchBoardElements(sketchBoardElements);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void editPrintBoardsElement(ValidateElementVO elementVO, List<DesignCollectionPrintElementDTO> printBoards) {
|
||||
if (CollectionUtil.isNotEmpty(printBoards)) {
|
||||
@@ -652,6 +656,7 @@ public class CollectionElementServiceImpl extends ServiceImpl<CollectionElementM
|
||||
}
|
||||
return CopyUtil.copyList(colorElements, CollectionElementVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refreshHistoryData() {
|
||||
//幂等
|
||||
@@ -718,6 +723,7 @@ public class CollectionElementServiceImpl extends ServiceImpl<CollectionElementM
|
||||
queryWrapper.in("id", elementIds);
|
||||
return collectionElementMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CollectionElement> getByOnlyCollectionId(Long collectionId) {
|
||||
QueryWrapper<CollectionElement> queryWrapper = new QueryWrapper<>();
|
||||
|
||||
@@ -123,6 +123,7 @@ public class CollectionServiceImpl extends ServiceImpl<CollectionMapper, Collect
|
||||
});
|
||||
return response;
|
||||
}
|
||||
|
||||
private List<CollectionColorVO> resolveColorBoard(List<CollectionElement> collectionElements) {
|
||||
return CopyUtil.copyList(collectionElements, CollectionColorVO.class, (o, d) -> {
|
||||
String name = o.getName();
|
||||
|
||||
@@ -183,6 +183,7 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
||||
designItem.setDesignUrl(response.getDesignItemUrl());
|
||||
return response;
|
||||
}
|
||||
|
||||
private LibraryModelPointVO resloveVoByModelPoint(LibraryModelPoint modelPoint, Library library) {
|
||||
LibraryModelPointVO libraryModelPointVO = CopyUtil.copyObject(modelPoint, LibraryModelPointVO.class);
|
||||
libraryModelPointVO.setTemplateId(modelPoint.getId());
|
||||
@@ -230,6 +231,7 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private DesignCollectionItemVO saveSingleDesignItemAndDetail(DesignPythonObjects pythonObjects
|
||||
, Long designId, Long designItemId, Long collectionId, AuthPrincipalVo userInfo, String timeZone) {
|
||||
DesignCollectionItemVO response = new DesignCollectionItemVO();
|
||||
@@ -536,7 +538,8 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
||||
// 图片用于修改前后的一键对比
|
||||
designSingleVO.setDesignItemUrl(designItemUrl);
|
||||
// 当前全身图
|
||||
designSingleVO.setCurrentFullBodyView(minioUtil.getPresignedUrl(currentFullBodyView,24 * 60));;
|
||||
designSingleVO.setCurrentFullBodyView(minioUtil.getPresignedUrl(currentFullBodyView, 24 * 60));
|
||||
;
|
||||
designSingleVO.setClothes(clothes);
|
||||
|
||||
designSingleItemDTOList.forEach(singleItem -> {
|
||||
|
||||
@@ -967,6 +967,7 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
||||
|
||||
/**
|
||||
* 避免多次连接数据,所这里一次查多条颜色并利用designItemDetailId保持颜色与vo的对应关系
|
||||
*
|
||||
* @param designItemDetails
|
||||
* @param designItemDetailVO
|
||||
* @return
|
||||
|
||||
@@ -79,6 +79,7 @@ public class LibraryModelPointServiceImpl extends ServiceImpl<LibraryModelPointM
|
||||
}
|
||||
return libraryModelPointVO;
|
||||
}
|
||||
|
||||
private LibraryModelPoint resolvePoint(LibraryModelPointDTO libraryModelPointDTO) {
|
||||
LibraryModelPoint libraryModelPoint = CopyUtil.copyObject(libraryModelPointDTO, LibraryModelPoint.class);
|
||||
libraryModelPoint.setRelationId(libraryModelPointDTO.getLibraryId());
|
||||
@@ -111,6 +112,7 @@ public class LibraryModelPointServiceImpl extends ServiceImpl<LibraryModelPointM
|
||||
d.setWaistbandLeft(JSON.parseObject(o.getWaistbandLeft(), List.class));
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public String modelsDot(ModelsDotDTO modelsDotDTO) {
|
||||
DesignPythonObjects objects = pythonService.covertModelsDotParam(
|
||||
|
||||
@@ -178,6 +178,7 @@ public class PanToneServiceImpl extends ServiceImpl<PanToneMapper, PanTone> impl
|
||||
pantoneVO.setId(panTone.getPantoneIndex());
|
||||
return pantoneVO;
|
||||
}
|
||||
|
||||
private List<PantoneVO> coverPanToneToVoList(List<PanTone> panTones
|
||||
, Map<Integer, Integer> indexToValue, Map<Integer, GetRgbByHsvBatchDTO> valueToHsv,
|
||||
List<GetRgbByHsvBatchDTO> hsvBatch) {
|
||||
|
||||
@@ -71,12 +71,14 @@ public class SysFileServiceImpl extends ServiceImpl<SysFileMapper, SysFile> impl
|
||||
}
|
||||
saveMany(initSysFile(allFile, idMap));
|
||||
}
|
||||
|
||||
private void clearCacheSysFileData() {
|
||||
LocalCacheUtils.clearAllMaxMinValueCache();
|
||||
LocalCacheUtils.clearAllSysFileCache();
|
||||
LocalCacheUtils.clearAllSysFileCacheByLevel2Type();
|
||||
log.info("初始化系统文件删除删除系统文件缓存完毕#####");
|
||||
}
|
||||
|
||||
private void deleteAllSysFileData() {
|
||||
AtomicInteger process = new AtomicInteger();
|
||||
while (true) {
|
||||
@@ -93,6 +95,7 @@ public class SysFileServiceImpl extends ServiceImpl<SysFileMapper, SysFile> impl
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private List<SysFile> initSysFile(List<File> files, Map<String, Long> idMap) {
|
||||
List<SysFile> sysFiles = Lists.newArrayList();
|
||||
files.forEach(file -> {
|
||||
@@ -120,6 +123,7 @@ public class SysFileServiceImpl extends ServiceImpl<SysFileMapper, SysFile> impl
|
||||
});
|
||||
return sysFiles;
|
||||
}
|
||||
|
||||
private String calculateLevel1Type(String filePath) {
|
||||
String[] split = filePath.split("/");
|
||||
//一级目录
|
||||
@@ -129,6 +133,7 @@ public class SysFileServiceImpl extends ServiceImpl<SysFileMapper, SysFile> impl
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
private String calculateLevel2Type(String filePath) {
|
||||
String[] split = filePath.split("/");
|
||||
//一级目录
|
||||
@@ -138,12 +143,14 @@ public class SysFileServiceImpl extends ServiceImpl<SysFileMapper, SysFile> impl
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
private Long getIdByLevel2Type(String level2Type, Map<String, Long> IdMp) {
|
||||
Long id = IdMp.get(level2Type);
|
||||
Long newId = id + 1;
|
||||
IdMp.put(level2Type, newId);
|
||||
return newId;
|
||||
}
|
||||
|
||||
private Map<String, Long> initIdValueByLevel2Type() {
|
||||
//每个类型分配100000 十万个位置
|
||||
Map<String, Long> idMap = Maps.newHashMap();
|
||||
@@ -230,6 +237,7 @@ public class SysFileServiceImpl extends ServiceImpl<SysFileMapper, SysFile> impl
|
||||
SysFile sysFile = sysFileMapper.selectOne(queryWrapper);
|
||||
return sysFile.getId();
|
||||
}
|
||||
|
||||
private Long minId(String level2Type, String modelSex) {
|
||||
QueryWrapper<SysFile> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("level2_type", level2Type);
|
||||
@@ -238,6 +246,7 @@ public class SysFileServiceImpl extends ServiceImpl<SysFileMapper, SysFile> impl
|
||||
SysFile sysFile = sysFileMapper.selectOne(queryWrapper);
|
||||
return sysFile.getId();
|
||||
}
|
||||
|
||||
private boolean saveMany(List<SysFile> sysFiles) {
|
||||
if (!this.saveBatch(sysFiles)) {
|
||||
throw new BusinessException("save system file failed!");
|
||||
|
||||
@@ -32,6 +32,7 @@ public class TDesignPythonOutfitDetailServiceImpl extends ServiceImpl<TDesignPyt
|
||||
|
||||
@Resource
|
||||
private MinioUtil minIoUtil;
|
||||
|
||||
@Override
|
||||
public IPage<TDesignPythonOutfitDetailVO> selectTDesignPythonOutfitDetailPage(IPage<TDesignPythonOutfitDetailVO> page, TDesignPythonOutfitDetailVO tDesignPythonOutfitDetail) {
|
||||
return page.setRecords(baseMapper.selectTDesignPythonOutfitDetailPage(page, tDesignPythonOutfitDetail));
|
||||
|
||||
@@ -81,6 +81,7 @@ public class WorkspaceServiceImpl extends ServiceImpl<WorkspaceMapper, Workspace
|
||||
public IPage<WorkspaceVO> selectWorkspacePage(IPage<WorkspaceVO> page, WorkspaceVO workspace) {
|
||||
return page.setRecords(baseMapper.selectWorkspacePage(page, workspace));
|
||||
}
|
||||
|
||||
private final static String WORKSPACE_NAME = "Default workspace name";
|
||||
private final static Integer SYSTEM_DESIGNER_PERCENTAGE = 30;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user