diff --git a/muyu-auth/src/main/java/com/muyu/auth/service/SysPasswordService.java b/muyu-auth/src/main/java/com/muyu/auth/service/SysPasswordService.java index 5f3c126..e743d92 100644 --- a/muyu-auth/src/main/java/com/muyu/auth/service/SysPasswordService.java +++ b/muyu-auth/src/main/java/com/muyu/auth/service/SysPasswordService.java @@ -21,9 +21,9 @@ public class SysPasswordService { @Autowired private RedisService redisService; - private int maxRetryCount = CacheConstants.PASSWORD_MAX_RETRY_COUNT; + private final int maxRetryCount = CacheConstants.PASSWORD_MAX_RETRY_COUNT; - private Long lockTime = CacheConstants.PASSWORD_LOCK_TIME; + private final Long lockTime = CacheConstants.PASSWORD_LOCK_TIME; @Autowired private SysRecordLogService recordLogService; diff --git a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/annotation/Excel.java b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/annotation/Excel.java index 36180e5..ef99dd5 100644 --- a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/annotation/Excel.java +++ b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/annotation/Excel.java @@ -21,134 +21,134 @@ public @interface Excel { /** * 导出时在excel中排序 */ - public int sort () default Integer.MAX_VALUE; + int sort() default Integer.MAX_VALUE; /** * 导出到Excel中的名字. */ - public String name () default ""; + String name() default ""; /** * 日期格式, 如: yyyy-MM-dd */ - public String dateFormat () default ""; + String dateFormat() default ""; /** * 读取内容转表达式 (如: 0=男,1=女,2=未知) */ - public String readConverterExp () default ""; + String readConverterExp() default ""; /** * 分隔符,读取字符串组内容 */ - public String separator () default ","; + String separator() default ","; /** * BigDecimal 精度 默认:-1(默认不开启BigDecimal格式化) */ - public int scale () default -1; + int scale() default -1; /** * BigDecimal 舍入规则 默认:BigDecimal.ROUND_HALF_EVEN */ - public int roundingMode () default BigDecimal.ROUND_HALF_EVEN; + int roundingMode() default BigDecimal.ROUND_HALF_EVEN; /** * 导出时在excel中每个列的高度 */ - public double height () default 14; + double height() default 14; /** * 导出时在excel中每个列的宽度 */ - public double width () default 16; + double width() default 16; /** * 文字后缀,如% 90 变成90% */ - public String suffix () default ""; + String suffix() default ""; /** * 当值为空时,字段的默认值 */ - public String defaultValue () default ""; + String defaultValue() default ""; /** * 提示信息 */ - public String prompt () default ""; + String prompt() default ""; /** * 设置只能选择不能输入的列内容. */ - public String[] combo () default {}; + String[] combo() default {}; /** * 是否需要纵向合并单元格,应对需求:含有list集合单元格) */ - public boolean needMerge () default false; + boolean needMerge() default false; /** * 是否导出数据,应对需求:有时我们需要导出一份模板,这是标题需要但内容需要用户手工填写. */ - public boolean isExport () default true; + boolean isExport() default true; /** * 另一个类中的属性名称,支持多级获取,以小数点隔开 */ - public String targetAttr () default ""; + String targetAttr() default ""; /** * 是否自动统计数据,在最后追加一行统计数据总和 */ - public boolean isStatistics () default false; + boolean isStatistics() default false; /** * 导出类型(0数字 1字符串) */ - public ColumnType cellType () default ColumnType.STRING; + ColumnType cellType() default ColumnType.STRING; /** * 导出列头背景颜色 */ - public IndexedColors headerBackgroundColor () default IndexedColors.GREY_50_PERCENT; + IndexedColors headerBackgroundColor() default IndexedColors.GREY_50_PERCENT; /** * 导出列头字体颜色 */ - public IndexedColors headerColor () default IndexedColors.WHITE; + IndexedColors headerColor() default IndexedColors.WHITE; /** * 导出单元格背景颜色 */ - public IndexedColors backgroundColor () default IndexedColors.WHITE; + IndexedColors backgroundColor() default IndexedColors.WHITE; /** * 导出单元格字体颜色 */ - public IndexedColors color () default IndexedColors.BLACK; + IndexedColors color() default IndexedColors.BLACK; /** * 导出字段对齐方式 */ - public HorizontalAlignment align () default HorizontalAlignment.CENTER; + HorizontalAlignment align() default HorizontalAlignment.CENTER; /** * 自定义数据处理器 */ - public Class handler () default ExcelHandlerAdapter.class; + Class handler() default ExcelHandlerAdapter.class; /** * 自定义数据处理器参数 */ - public String[] args () default {}; + String[] args() default {}; /** * 字段类型(0:导出导入;1:仅导出;2:仅导入) */ Type type () default Type.ALL; - public enum Type { + enum Type { ALL(0), EXPORT(1), IMPORT(2); private final int value; @@ -161,7 +161,7 @@ public @interface Excel { } } - public enum ColumnType { + enum ColumnType { NUMERIC(0), STRING(1), IMAGE(2); private final int value; diff --git a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/constant/ScheduleConstants.java b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/constant/ScheduleConstants.java index b5bceb0..368317a 100644 --- a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/constant/ScheduleConstants.java +++ b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/constant/ScheduleConstants.java @@ -43,9 +43,9 @@ public class ScheduleConstants { */ PAUSE("1"); - private String value; + private final String value; - private Status (String value) { + Status(String value) { this.value = value; } diff --git a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/exception/base/BaseException.java b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/exception/base/BaseException.java index 9bb1356..ecf55f7 100644 --- a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/exception/base/BaseException.java +++ b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/exception/base/BaseException.java @@ -11,22 +11,22 @@ public class BaseException extends RuntimeException { /** * 所属模块 */ - private String module; + private final String module; /** * 错误码 */ - private String code; + private final String code; /** * 错误码对应的参数 */ - private Object[] args; + private final Object[] args; /** * 错误消息 */ - private String defaultMessage; + private final String defaultMessage; public BaseException (String module, String code, Object[] args, String defaultMessage) { this.module = module; diff --git a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/exception/file/InvalidExtensionException.java b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/exception/file/InvalidExtensionException.java index 3a993c2..125327c 100644 --- a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/exception/file/InvalidExtensionException.java +++ b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/exception/file/InvalidExtensionException.java @@ -10,9 +10,9 @@ import java.util.Arrays; public class InvalidExtensionException extends FileUploadException { private static final long serialVersionUID = 1L; - private String[] allowedExtension; - private String extension; - private String filename; + private final String[] allowedExtension; + private final String extension; + private final String filename; public InvalidExtensionException (String[] allowedExtension, String extension, String filename) { super("filename : [" + filename + "], extension : [" + extension + "], allowed extension : [" + Arrays.toString(allowedExtension) + "]"); diff --git a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/exception/job/TaskException.java b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/exception/job/TaskException.java index aee364a..e7e3661 100644 --- a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/exception/job/TaskException.java +++ b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/exception/job/TaskException.java @@ -8,7 +8,7 @@ package com.muyu.common.core.exception.job; public class TaskException extends Exception { private static final long serialVersionUID = 1L; - private Code code; + private final Code code; public TaskException (String msg, Code code) { this(msg, code, null); diff --git a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/text/CharsetKit.java b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/text/CharsetKit.java index fe5e9fa..b1a5140 100644 --- a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/text/CharsetKit.java +++ b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/text/CharsetKit.java @@ -27,11 +27,11 @@ public class CharsetKit { /** * ISO-8859-1 */ - public static final Charset CHARSET_ISO_8859_1 = Charset.forName(ISO_8859_1); + public static final Charset CHARSET_ISO_8859_1 = StandardCharsets.ISO_8859_1; /** * UTF-8 */ - public static final Charset CHARSET_UTF_8 = Charset.forName(UTF_8); + public static final Charset CHARSET_UTF_8 = StandardCharsets.UTF_8; /** * GBK */ diff --git a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/DateUtils.java b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/DateUtils.java index fb15c59..d76255e 100644 --- a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/DateUtils.java +++ b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/DateUtils.java @@ -24,7 +24,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils { public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss"; - private static String[] parsePatterns = { + private static final String[] parsePatterns = { "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM", "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM", "yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM"}; diff --git a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/ServletUtils.java b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/ServletUtils.java index c9a8998..b9db2c8 100644 --- a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/ServletUtils.java +++ b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/ServletUtils.java @@ -23,6 +23,7 @@ import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; import java.util.Collections; import java.util.Enumeration; import java.util.HashMap; @@ -212,11 +213,7 @@ public class ServletUtils { * @return 编码后的内容 */ public static String urlEncode (String str) { - try { - return URLEncoder.encode(str, Constants.UTF8); - } catch (UnsupportedEncodingException e) { - return StringUtils.EMPTY; - } + return URLEncoder.encode(str, StandardCharsets.UTF_8); } /** @@ -227,11 +224,7 @@ public class ServletUtils { * @return 解码后的内容 */ public static String urlDecode (String str) { - try { - return URLDecoder.decode(str, Constants.UTF8); - } catch (UnsupportedEncodingException e) { - return StringUtils.EMPTY; - } + return URLDecoder.decode(str, StandardCharsets.UTF_8); } /** diff --git a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/SpringUtils.java b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/SpringUtils.java index c37a65c..27f5bac 100644 --- a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/SpringUtils.java +++ b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/SpringUtils.java @@ -43,7 +43,7 @@ public final class SpringUtils implements BeanFactoryPostProcessor { * @throws org.springframework.beans.BeansException */ public static T getBean (Class clz) throws BeansException { - T result = (T) beanFactory.getBean(clz); + T result = beanFactory.getBean(clz); return result; } diff --git a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/file/FileUtils.java b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/file/FileUtils.java index 30f01b8..4bbc2b3 100644 --- a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/file/FileUtils.java +++ b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/file/FileUtils.java @@ -125,17 +125,17 @@ public class FileUtils { String filename = fileName; if (agent.contains("MSIE")) { // IE浏览器 - filename = URLEncoder.encode(filename, "utf-8"); + filename = URLEncoder.encode(filename, StandardCharsets.UTF_8); filename = filename.replace("+", " "); } else if (agent.contains("Firefox")) { // 火狐浏览器 filename = new String(fileName.getBytes(), "ISO8859-1"); } else if (agent.contains("Chrome")) { // google浏览器 - filename = URLEncoder.encode(filename, "utf-8"); + filename = URLEncoder.encode(filename, StandardCharsets.UTF_8); } else { // 其它浏览器 - filename = URLEncoder.encode(filename, "utf-8"); + filename = URLEncoder.encode(filename, StandardCharsets.UTF_8); } return filename; } @@ -197,15 +197,14 @@ public class FileUtils { public static void setAttachmentResponseHeader (HttpServletResponse response, String realFileName) throws UnsupportedEncodingException { String percentEncodedFileName = percentEncode(realFileName); - StringBuilder contentDispositionValue = new StringBuilder(); - contentDispositionValue.append("attachment; filename=") - .append(percentEncodedFileName) - .append(";") - .append("filename*=") - .append("utf-8''") - .append(percentEncodedFileName); + String contentDispositionValue = "attachment; filename=" + + percentEncodedFileName + + ";" + + "filename*=" + + "utf-8''" + + percentEncodedFileName; - response.setHeader("Content-disposition", contentDispositionValue.toString()); + response.setHeader("Content-disposition", contentDispositionValue); response.setHeader("download-filename", percentEncodedFileName); } @@ -217,7 +216,7 @@ public class FileUtils { * @return 百分号编码后的字符串 */ public static String percentEncode (String s) throws UnsupportedEncodingException { - String encode = URLEncoder.encode(s, StandardCharsets.UTF_8.toString()); + String encode = URLEncoder.encode(s, StandardCharsets.UTF_8); return encode.replaceAll("\\+", "%20"); } } diff --git a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/html/EscapeUtil.java b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/html/EscapeUtil.java index 7dba9be..1fc6f91 100644 --- a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/html/EscapeUtil.java +++ b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/html/EscapeUtil.java @@ -124,7 +124,7 @@ public class EscapeUtil { tmp.append(content.substring(lastPos)); lastPos = content.length(); } else { - tmp.append(content.substring(lastPos, pos)); + tmp.append(content, lastPos, pos); lastPos = pos; } } diff --git a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/ip/IpUtils.java b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/ip/IpUtils.java index f7ad9bf..b2c32f2 100644 --- a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/ip/IpUtils.java +++ b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/ip/IpUtils.java @@ -225,7 +225,7 @@ public class IpUtils { if (ip != null && ip.indexOf(",") > 0) { final String[] ips = ip.trim().split(","); for (String subIp : ips) { - if (false == isUnknown(subIp)) { + if (!isUnknown(subIp)) { ip = subIp; break; } diff --git a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/poi/ExcelUtil.java b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/poi/ExcelUtil.java index 69795db..727dbd4 100644 --- a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/poi/ExcelUtil.java +++ b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/poi/ExcelUtil.java @@ -121,7 +121,7 @@ public class ExcelUtil { /** * 统计列表 */ - private Map statistics = new HashMap(); + private final Map statistics = new HashMap(); public ExcelUtil (Class clazz) { this.clazz = clazz; @@ -531,7 +531,7 @@ public class ExcelUtil { rowNo = isSubList() ? (i > 1 ? rowNo + 1 : rowNo + i) : i + 1 + rownum - startNo; row = sheet.createRow(rowNo); // 得到导出对象. - T vo = (T) list.get(i); + T vo = list.get(i); Collection subList = null; if (isSubList()) { if (isSubListValue(vo)) { @@ -913,7 +913,7 @@ public class ExcelUtil { public String dataFormatHandlerAdapter (Object value, Excel excel, Cell cell) { try { Object instance = excel.handler().newInstance(); - Method formatMethod = excel.handler().getMethod("format", new Class[]{Object.class, String[].class, Cell.class, Workbook.class}); + Method formatMethod = excel.handler().getMethod("format", Object.class, String[].class, Cell.class, Workbook.class); value = formatMethod.invoke(instance, value, excel.args(), cell, this.wb); } catch (Exception e) { log.error("不能格式化数据 " + excel.handler(), e.getMessage()); @@ -1200,7 +1200,7 @@ public class ExcelUtil { public Collection getListCellValue (Object obj) { Object value; try { - value = subMethod.invoke(obj, new Object[]{}); + value = subMethod.invoke(obj); } catch (Exception e) { return new ArrayList(); } @@ -1221,7 +1221,7 @@ public class ExcelUtil { getMethodName.append(name.substring(1)); Method method = null; try { - method = pojoClass.getMethod(getMethodName.toString(), new Class[]{}); + method = pojoClass.getMethod(getMethodName.toString()); } catch (Exception e) { log.error("获取对象异常{}", e.getMessage()); } diff --git a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/reflect/ReflectUtils.java b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/reflect/ReflectUtils.java index 2ec7e4f..82897c7 100644 --- a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/reflect/ReflectUtils.java +++ b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/reflect/ReflectUtils.java @@ -24,7 +24,7 @@ public class ReflectUtils { private static final String CGLIB_CLASS_SEPARATOR = "$$"; - private static Logger logger = LoggerFactory.getLogger(ReflectUtils.class); + private static final Logger logger = LoggerFactory.getLogger(ReflectUtils.class); /** * 调用Getter方法. @@ -113,7 +113,7 @@ public class ReflectUtils { try { return (E) method.invoke(obj, args); } catch (Exception e) { - String msg = "method: " + method + ", obj: " + obj + ", args: " + args + ""; + String msg = "method: " + method + ", obj: " + obj + ", args: " + args; throw convertReflectionExceptionToUnchecked(msg, e); } } @@ -162,7 +162,7 @@ public class ReflectUtils { } return (E) method.invoke(obj, args); } catch (Exception e) { - String msg = "method: " + method + ", obj: " + obj + ", args: " + args + ""; + String msg = "method: " + method + ", obj: " + obj + ", args: " + args; throw convertReflectionExceptionToUnchecked(msg, e); } } diff --git a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/sign/Base64.java b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/sign/Base64.java index 038933f..f6e4305 100644 --- a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/sign/Base64.java +++ b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/sign/Base64.java @@ -46,8 +46,8 @@ public final class Base64 { for (int i = 52, j = 0 ; i <= 61 ; i++, j++) { lookUpBase64Alphabet[i] = (char) ('0' + j); } - lookUpBase64Alphabet[62] = (char) '+'; - lookUpBase64Alphabet[63] = (char) '/'; + lookUpBase64Alphabet[62] = '+'; + lookUpBase64Alphabet[63] = '/'; } private static boolean isWhiteSpace (char octect) { @@ -82,7 +82,7 @@ public final class Base64 { int fewerThan24bits = lengthDataBits % TWENTYFOURBITGROUP; int numberTriplets = lengthDataBits / TWENTYFOURBITGROUP; int numberQuartet = fewerThan24bits != 0 ? numberTriplets + 1 : numberTriplets; - char encodedData[] = null; + char[] encodedData = null; encodedData = new char[numberQuartet * 4]; @@ -161,7 +161,7 @@ public final class Base64 { return new byte[0]; } - byte decodedData[] = null; + byte[] decodedData = null; byte b1 = 0, b2 = 0, b3 = 0, b4 = 0; char d1 = 0, d2 = 0, d3 = 0, d4 = 0; diff --git a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/uuid/Seq.java b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/uuid/Seq.java index b72e3dd..2b4e382 100644 --- a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/uuid/Seq.java +++ b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/uuid/Seq.java @@ -17,9 +17,9 @@ public class Seq { // 机器标识 private static final String machineCode = "A"; // 通用接口序列数 - private static AtomicInteger commSeq = new AtomicInteger(1); + private static final AtomicInteger commSeq = new AtomicInteger(1); // 上传接口序列数 - private static AtomicInteger uploadSeq = new AtomicInteger(1); + private static final AtomicInteger uploadSeq = new AtomicInteger(1); /** * 获取通用序列号 diff --git a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/uuid/UUID.java b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/uuid/UUID.java index 37c3c9e..eb18d5b 100644 --- a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/uuid/UUID.java +++ b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/utils/uuid/UUID.java @@ -353,22 +353,22 @@ public final class UUID implements java.io.Serializable, Comparable { final StringBuilder builder = new StringBuilder(isSimple ? 32 : 36); // time_low builder.append(digits(mostSigBits >> 32, 8)); - if (false == isSimple) { + if (!isSimple) { builder.append('-'); } // time_mid builder.append(digits(mostSigBits >> 16, 4)); - if (false == isSimple) { + if (!isSimple) { builder.append('-'); } // time_high_and_version builder.append(digits(mostSigBits, 4)); - if (false == isSimple) { + if (!isSimple) { builder.append('-'); } // variant_and_sequence builder.append(digits(leastSigBits >> 48, 4)); - if (false == isSimple) { + if (!isSimple) { builder.append('-'); } // node diff --git a/muyu-common/muyu-common-datascope/src/main/java/com/muyu/common/datascope/annotation/DataScope.java b/muyu-common/muyu-common-datascope/src/main/java/com/muyu/common/datascope/annotation/DataScope.java index 498f06b..d42163c 100644 --- a/muyu-common/muyu-common-datascope/src/main/java/com/muyu/common/datascope/annotation/DataScope.java +++ b/muyu-common/muyu-common-datascope/src/main/java/com/muyu/common/datascope/annotation/DataScope.java @@ -14,15 +14,15 @@ public @interface DataScope { /** * 部门表的别名 */ - public String deptAlias () default ""; + String deptAlias() default ""; /** * 用户表的别名 */ - public String userAlias () default ""; + String userAlias() default ""; /** * 权限字符(用于多个角色匹配符合要求的权限)默认根据权限注解@RequiresPermissions获取,多个权限用逗号分隔开来 */ - public String permission () default ""; + String permission() default ""; } diff --git a/muyu-common/muyu-common-datascope/src/main/java/com/muyu/common/datascope/aspect/DataScopeAspect.java b/muyu-common/muyu-common-datascope/src/main/java/com/muyu/common/datascope/aspect/DataScopeAspect.java index 3d66b0d..ff9110d 100644 --- a/muyu-common/muyu-common-datascope/src/main/java/com/muyu/common/datascope/aspect/DataScopeAspect.java +++ b/muyu-common/muyu-common-datascope/src/main/java/com/muyu/common/datascope/aspect/DataScopeAspect.java @@ -109,8 +109,7 @@ public class DataScopeAspect { if (StringUtils.isNotBlank(sqlString.toString())) { Object params = joinPoint.getArgs()[0]; - if (StringUtils.isNotNull(params) && params instanceof BaseEntity) { - BaseEntity baseEntity = (BaseEntity) params; + if (StringUtils.isNotNull(params) && params instanceof BaseEntity baseEntity) { baseEntity.getParams().put(DATA_SCOPE, " AND (" + sqlString.substring(4) + ")"); } } @@ -141,8 +140,7 @@ public class DataScopeAspect { */ private void clearDataScope (final JoinPoint joinPoint) { Object params = joinPoint.getArgs()[0]; - if (StringUtils.isNotNull(params) && params instanceof BaseEntity) { - BaseEntity baseEntity = (BaseEntity) params; + if (StringUtils.isNotNull(params) && params instanceof BaseEntity baseEntity) { baseEntity.getParams().put(DATA_SCOPE, ""); } } diff --git a/muyu-common/muyu-common-log/src/main/java/com/muyu/common/log/annotation/Log.java b/muyu-common/muyu-common-log/src/main/java/com/muyu/common/log/annotation/Log.java index ac6394e..1a240a8 100644 --- a/muyu-common/muyu-common-log/src/main/java/com/muyu/common/log/annotation/Log.java +++ b/muyu-common/muyu-common-log/src/main/java/com/muyu/common/log/annotation/Log.java @@ -17,30 +17,30 @@ public @interface Log { /** * 模块 */ - public String title () default ""; + String title() default ""; /** * 功能 */ - public BusinessType businessType () default BusinessType.OTHER; + BusinessType businessType() default BusinessType.OTHER; /** * 操作人类别 */ - public OperatorType operatorType () default OperatorType.MANAGE; + OperatorType operatorType() default OperatorType.MANAGE; /** * 是否保存请求的参数 */ - public boolean isSaveRequestData () default true; + boolean isSaveRequestData() default true; /** * 是否保存响应的参数 */ - public boolean isSaveResponseData () default true; + boolean isSaveResponseData() default true; /** * 排除指定的请求参数 */ - public String[] excludeParamNames () default {}; + String[] excludeParamNames() default {}; } diff --git a/muyu-common/muyu-common-log/src/main/java/com/muyu/common/log/aspect/LogAspect.java b/muyu-common/muyu-common-log/src/main/java/com/muyu/common/log/aspect/LogAspect.java index 4ecefc5..29bac14 100644 --- a/muyu-common/muyu-common-log/src/main/java/com/muyu/common/log/aspect/LogAspect.java +++ b/muyu-common/muyu-common-log/src/main/java/com/muyu/common/log/aspect/LogAspect.java @@ -169,12 +169,12 @@ public class LogAspect { */ private String argsArrayToString (Object[] paramsArray, String[] excludeParamNames) { String params = ""; - if (paramsArray != null && paramsArray.length > 0) { + if (paramsArray != null) { for (Object o : paramsArray) { if (StringUtils.isNotNull(o) && !isFilterObject(o)) { try { String jsonObj = JSON.toJSONString(o, excludePropertyPreFilter(excludeParamNames)); - params += jsonObj.toString() + " "; + params += jsonObj + " "; } catch (Exception e) { } } diff --git a/muyu-common/muyu-common-redis/src/main/java/com/muyu/common/redis/configure/FastJson2JsonRedisSerializer.java b/muyu-common/muyu-common-redis/src/main/java/com/muyu/common/redis/configure/FastJson2JsonRedisSerializer.java index 5959aad..9d719fd 100644 --- a/muyu-common/muyu-common-redis/src/main/java/com/muyu/common/redis/configure/FastJson2JsonRedisSerializer.java +++ b/muyu-common/muyu-common-redis/src/main/java/com/muyu/common/redis/configure/FastJson2JsonRedisSerializer.java @@ -9,6 +9,7 @@ import org.springframework.data.redis.serializer.RedisSerializer; import org.springframework.data.redis.serializer.SerializationException; import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; /** * Redis使用FastJson序列化 @@ -16,11 +17,11 @@ import java.nio.charset.Charset; * @author muyu */ public class FastJson2JsonRedisSerializer implements RedisSerializer { - public static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8"); + public static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8; static final Filter AUTO_TYPE_FILTER = JSONReader.autoTypeFilter(Constants.JSON_WHITELIST_STR); - private Class clazz; + private final Class clazz; public FastJson2JsonRedisSerializer (Class clazz) { super(); diff --git a/muyu-common/muyu-common-system/src/main/java/com/muyu/common/system/remote/RemoteFileService.java b/muyu-common/muyu-common-system/src/main/java/com/muyu/common/system/remote/RemoteFileService.java index 96dd181..00d5d88 100644 --- a/muyu-common/muyu-common-system/src/main/java/com/muyu/common/system/remote/RemoteFileService.java +++ b/muyu-common/muyu-common-system/src/main/java/com/muyu/common/system/remote/RemoteFileService.java @@ -25,5 +25,5 @@ public interface RemoteFileService { * @return 结果 */ @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) - public Result upload (@RequestPart(value = "file") MultipartFile file); + Result upload(@RequestPart(value = "file") MultipartFile file); } diff --git a/muyu-common/muyu-common-system/src/main/java/com/muyu/common/system/remote/RemoteLogService.java b/muyu-common/muyu-common-system/src/main/java/com/muyu/common/system/remote/RemoteLogService.java index 7e767c4..1b67135 100644 --- a/muyu-common/muyu-common-system/src/main/java/com/muyu/common/system/remote/RemoteLogService.java +++ b/muyu-common/muyu-common-system/src/main/java/com/muyu/common/system/remote/RemoteLogService.java @@ -27,7 +27,7 @@ public interface RemoteLogService { * @return 结果 */ @PostMapping("/operlog") - public Result saveLog (@RequestBody SysOperLog sysOperLog, @RequestHeader(SecurityConstants.FROM_SOURCE) String source) throws Exception; + Result saveLog(@RequestBody SysOperLog sysOperLog, @RequestHeader(SecurityConstants.FROM_SOURCE) String source) throws Exception; /** * 保存访问记录 @@ -38,5 +38,5 @@ public interface RemoteLogService { * @return 结果 */ @PostMapping("/logininfor") - public Result saveLogininfor (@RequestBody SysLogininfor sysLogininfor, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); + Result saveLogininfor(@RequestBody SysLogininfor sysLogininfor, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); } diff --git a/muyu-common/muyu-common-system/src/main/java/com/muyu/common/system/remote/RemoteUserService.java b/muyu-common/muyu-common-system/src/main/java/com/muyu/common/system/remote/RemoteUserService.java index cb968e0..5f108d1 100644 --- a/muyu-common/muyu-common-system/src/main/java/com/muyu/common/system/remote/RemoteUserService.java +++ b/muyu-common/muyu-common-system/src/main/java/com/muyu/common/system/remote/RemoteUserService.java @@ -25,7 +25,7 @@ public interface RemoteUserService { * @return 结果 */ @GetMapping("/user/info/{username}") - public Result getUserInfo (@PathVariable("username") String username, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); + Result getUserInfo(@PathVariable("username") String username, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); /** * 注册用户信息 @@ -36,5 +36,5 @@ public interface RemoteUserService { * @return 结果 */ @PostMapping("/user/register") - public Result registerUserInfo (@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); + Result registerUserInfo(@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); } diff --git a/muyu-gateway/src/main/java/com/muyu/gateway/filter/BlackListUrlFilter.java b/muyu-gateway/src/main/java/com/muyu/gateway/filter/BlackListUrlFilter.java index 0096d4c..b59634e 100644 --- a/muyu-gateway/src/main/java/com/muyu/gateway/filter/BlackListUrlFilter.java +++ b/muyu-gateway/src/main/java/com/muyu/gateway/filter/BlackListUrlFilter.java @@ -36,7 +36,7 @@ public class BlackListUrlFilter extends AbstractGatewayFilterFactory blacklistUrl; - private List blacklistUrlPattern = new ArrayList<>(); + private final List blacklistUrlPattern = new ArrayList<>(); public boolean matchBlacklist (String url) { return !blacklistUrlPattern.isEmpty() && blacklistUrlPattern.stream().anyMatch(p -> p.matcher(url).find()); diff --git a/muyu-gateway/src/main/java/com/muyu/gateway/handler/GatewayExceptionHandler.java b/muyu-gateway/src/main/java/com/muyu/gateway/handler/GatewayExceptionHandler.java index ed5198e..25e13bf 100644 --- a/muyu-gateway/src/main/java/com/muyu/gateway/handler/GatewayExceptionHandler.java +++ b/muyu-gateway/src/main/java/com/muyu/gateway/handler/GatewayExceptionHandler.java @@ -34,8 +34,7 @@ public class GatewayExceptionHandler implements ErrorWebExceptionHandler { if (ex instanceof NotFoundException) { msg = "服务未找到"; - } else if (ex instanceof ResponseStatusException) { - ResponseStatusException responseStatusException = (ResponseStatusException) ex; + } else if (ex instanceof ResponseStatusException responseStatusException) { msg = responseStatusException.getMessage(); } else { msg = "内部服务器错误"; diff --git a/muyu-gateway/src/main/java/com/muyu/gateway/service/ValidateCodeService.java b/muyu-gateway/src/main/java/com/muyu/gateway/service/ValidateCodeService.java index 25ed94e..d3381f4 100644 --- a/muyu-gateway/src/main/java/com/muyu/gateway/service/ValidateCodeService.java +++ b/muyu-gateway/src/main/java/com/muyu/gateway/service/ValidateCodeService.java @@ -14,10 +14,10 @@ public interface ValidateCodeService { /** * 生成验证码 */ - public Result createCaptcha () throws IOException, CaptchaException; + Result createCaptcha() throws IOException, CaptchaException; /** * 校验验证码 */ - public void checkCaptcha (String key, String value) throws CaptchaException; + void checkCaptcha(String key, String value) throws CaptchaException; } diff --git a/muyu-modules/muyu-file/src/main/java/com/muyu/file/service/ISysFileService.java b/muyu-modules/muyu-file/src/main/java/com/muyu/file/service/ISysFileService.java index 416c26c..54ea680 100644 --- a/muyu-modules/muyu-file/src/main/java/com/muyu/file/service/ISysFileService.java +++ b/muyu-modules/muyu-file/src/main/java/com/muyu/file/service/ISysFileService.java @@ -17,5 +17,5 @@ public interface ISysFileService { * * @throws Exception */ - public String uploadFile (MultipartFile file) throws Exception; + String uploadFile(MultipartFile file) throws Exception; } diff --git a/muyu-modules/muyu-file/src/main/java/com/muyu/file/utils/OSSCloudClient.java b/muyu-modules/muyu-file/src/main/java/com/muyu/file/utils/OSSCloudClient.java index 73d3de7..ad3b232 100644 --- a/muyu-modules/muyu-file/src/main/java/com/muyu/file/utils/OSSCloudClient.java +++ b/muyu-modules/muyu-file/src/main/java/com/muyu/file/utils/OSSCloudClient.java @@ -24,7 +24,7 @@ public class OSSCloudClient { } private static class SingletonContainer{ - private static OSSCloudClient instance = new OSSCloudClient(); + private static final OSSCloudClient instance = new OSSCloudClient(); } public static OSSCloudClient getInstance() { diff --git a/muyu-modules/muyu-gen/src/main/resources/vm/java/mapper.java.vm b/muyu-modules/muyu-gen/src/main/resources/vm/java/mapper.java.vm index 4512bad..d59575a 100644 --- a/muyu-modules/muyu-gen/src/main/resources/vm/java/mapper.java.vm +++ b/muyu-modules/muyu-gen/src/main/resources/vm/java/mapper.java.vm @@ -21,7 +21,7 @@ public interface ${ClassName}Mapper extends BaseMapper<${ClassName}> * @param ${pkColumn.javaField} ${functionName}主键 * @return ${functionName} */ - public ${ClassName} select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); + ${ClassName} select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); /** * 查询${functionName}列表 @@ -29,7 +29,7 @@ public interface ${ClassName}Mapper extends BaseMapper<${ClassName}> * @param ${className} ${functionName} * @return ${functionName}集合 */ - public List<${ClassName}> select${ClassName}List(${ClassName} ${className}); + List<${ClassName}> select${ClassName}List(${ClassName} ${className}); /** * 新增${functionName} @@ -37,7 +37,7 @@ public interface ${ClassName}Mapper extends BaseMapper<${ClassName}> * @param ${className} ${functionName} * @return 结果 */ - public int insert${ClassName}(${ClassName} ${className}); + int insert${ClassName}(${ClassName} ${className}); /** * 修改${functionName} @@ -45,7 +45,7 @@ public interface ${ClassName}Mapper extends BaseMapper<${ClassName}> * @param ${className} ${functionName} * @return 结果 */ - public int update${ClassName}(${ClassName} ${className}); + int update${ClassName}(${ClassName} ${className}); /** * 删除${functionName} @@ -53,7 +53,7 @@ public interface ${ClassName}Mapper extends BaseMapper<${ClassName}> * @param ${pkColumn.javaField} ${functionName}主键 * @return 结果 */ - public int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); + int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); /** * 批量删除${functionName} @@ -61,7 +61,7 @@ public interface ${ClassName}Mapper extends BaseMapper<${ClassName}> * @param ${pkColumn.javaField}s 需要删除的数据主键集合 * @return 结果 */ - public int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); + int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); #if($table.sub) /** @@ -70,7 +70,7 @@ public interface ${ClassName}Mapper extends BaseMapper<${ClassName}> * @param ${pkColumn.javaField}s 需要删除的数据主键集合 * @return 结果 */ - public int delete${subClassName}By${subTableFkClassName}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); + int delete${subClassName}By${subTableFkClassName}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); /** * 批量新增${subTable.functionName} @@ -78,7 +78,7 @@ public interface ${ClassName}Mapper extends BaseMapper<${ClassName}> * @param ${subclassName}List ${subTable.functionName}列表 * @return 结果 */ - public int batch${subClassName}(List<${subClassName}> ${subclassName}List); + int batch${subClassName}(List<${subClassName}> ${subclassName}List); /** @@ -87,6 +87,6 @@ public interface ${ClassName}Mapper extends BaseMapper<${ClassName}> * @param ${pkColumn.javaField} ${functionName}ID * @return 结果 */ - public int delete${subClassName}By${subTableFkClassName}(${pkColumn.javaType} ${pkColumn.javaField}); + int delete${subClassName}By${subTableFkClassName}(${pkColumn.javaType} ${pkColumn.javaField}); #end } diff --git a/muyu-modules/muyu-gen/src/main/resources/vm/java/service.java.vm b/muyu-modules/muyu-gen/src/main/resources/vm/java/service.java.vm index fbea898..253b7f0 100644 --- a/muyu-modules/muyu-gen/src/main/resources/vm/java/service.java.vm +++ b/muyu-modules/muyu-gen/src/main/resources/vm/java/service.java.vm @@ -18,7 +18,7 @@ public interface ${ClassName}Service extends IService<${ClassName}> * @param ${pkColumn.javaField} ${functionName}主键 * @return ${functionName} */ - public ${ClassName} select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); + ${ClassName} select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); /** * 查询${functionName}列表 @@ -26,7 +26,7 @@ public interface ${ClassName}Service extends IService<${ClassName}> * @param ${className} ${functionName} * @return ${functionName}集合 */ - public List<${ClassName}> select${ClassName}List(${ClassName} ${className}); + List<${ClassName}> select${ClassName}List(${ClassName} ${className}); /** * 新增${functionName} @@ -34,7 +34,7 @@ public interface ${ClassName}Service extends IService<${ClassName}> * @param ${className} ${functionName} * @return 结果 */ - public int insert${ClassName}(${ClassName} ${className}); + int insert${ClassName}(${ClassName} ${className}); /** * 修改${functionName} @@ -42,7 +42,7 @@ public interface ${ClassName}Service extends IService<${ClassName}> * @param ${className} ${functionName} * @return 结果 */ - public int update${ClassName}(${ClassName} ${className}); + int update${ClassName}(${ClassName} ${className}); /** * 批量删除${functionName} @@ -50,7 +50,7 @@ public interface ${ClassName}Service extends IService<${ClassName}> * @param ${pkColumn.javaField}s 需要删除的${functionName}主键集合 * @return 结果 */ - public int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); + int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); /** * 删除${functionName}信息 @@ -58,5 +58,5 @@ public interface ${ClassName}Service extends IService<${ClassName}> * @param ${pkColumn.javaField} ${functionName}主键 * @return 结果 */ - public int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); + int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); } diff --git a/muyu-modules/muyu-gen/src/main/resources/vm/vue/index-tree.vue.vm b/muyu-modules/muyu-gen/src/main/resources/vm/vue/index-tree.vue.vm index a4c64a0..ec7de58 100644 --- a/muyu-modules/muyu-gen/src/main/resources/vm/vue/index-tree.vue.vm +++ b/muyu-modules/muyu-gen/src/main/resources/vm/vue/index-tree.vue.vm @@ -494,7 +494,7 @@ export default { /** 删除按钮操作 */ handleDelete(row) { this.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + row.${pkColumn.javaField} + '"的数据项?').then(function() { - return del${BusinessName}(row.${pkColumn.javaField}); + return del${BusinessName}(row.${pkColumn.javaField}) }).then(() => { this.getList(); this.#[[$modal]]#.msgSuccess("删除成功"); diff --git a/muyu-modules/muyu-gen/src/main/resources/vm/vue/index.vue.vm b/muyu-modules/muyu-gen/src/main/resources/vm/vue/index.vue.vm index 6296014..61f9f05 100644 --- a/muyu-modules/muyu-gen/src/main/resources/vm/vue/index.vue.vm +++ b/muyu-modules/muyu-gen/src/main/resources/vm/vue/index.vue.vm @@ -170,7 +170,7 @@ - + diff --git a/muyu-modules/muyu-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm b/muyu-modules/muyu-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm index 7bbd2fc..4e73097 100644 --- a/muyu-modules/muyu-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm +++ b/muyu-modules/muyu-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm @@ -355,7 +355,7 @@ function getTreeselect() { ${businessName}Options.value.push(data); }); } - + // 取消按钮 function cancel() { open.value = false; @@ -463,7 +463,7 @@ function submitForm() { /** 删除按钮操作 */ function handleDelete(row) { proxy.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + row.${pkColumn.javaField} + '"的数据项?').then(function() { - return del${BusinessName}(row.${pkColumn.javaField}); + return del${BusinessName}(row.${pkColumn.javaField}) }).then(() => { getList(); proxy.#[[$modal]]#.msgSuccess("删除成功"); diff --git a/muyu-modules/muyu-gen/src/main/resources/vm/vue/v3/index.vue.vm b/muyu-modules/muyu-gen/src/main/resources/vm/vue/v3/index.vue.vm index 8b25665..7396c08 100644 --- a/muyu-modules/muyu-gen/src/main/resources/vm/vue/v3/index.vue.vm +++ b/muyu-modules/muyu-gen/src/main/resources/vm/vue/v3/index.vue.vm @@ -153,7 +153,7 @@ - + { getList(); proxy.#[[$modal]]#.msgSuccess("删除成功"); diff --git a/muyu-modules/muyu-job/src/main/java/com/muyu/job/mapper/SysJobLogMapper.java b/muyu-modules/muyu-job/src/main/java/com/muyu/job/mapper/SysJobLogMapper.java index 675b15d..892a468 100644 --- a/muyu-modules/muyu-job/src/main/java/com/muyu/job/mapper/SysJobLogMapper.java +++ b/muyu-modules/muyu-job/src/main/java/com/muyu/job/mapper/SysJobLogMapper.java @@ -18,14 +18,14 @@ public interface SysJobLogMapper extends BaseMapper { * * @return 调度任务日志集合 */ - public List selectJobLogList (SysJobLog jobLog); + List selectJobLogList(SysJobLog jobLog); /** * 查询所有调度任务日志 * * @return 调度任务日志列表 */ - public List selectJobLogAll (); + List selectJobLogAll(); /** * 通过调度任务日志ID查询调度信息 @@ -34,7 +34,7 @@ public interface SysJobLogMapper extends BaseMapper { * * @return 调度任务日志对象信息 */ - public SysJobLog selectJobLogById (Long jobLogId); + SysJobLog selectJobLogById(Long jobLogId); /** * 新增任务日志 @@ -43,7 +43,7 @@ public interface SysJobLogMapper extends BaseMapper { * * @return 结果 */ - public int insertJobLog (SysJobLog jobLog); + int insertJobLog(SysJobLog jobLog); /** * 批量删除调度日志信息 @@ -52,7 +52,7 @@ public interface SysJobLogMapper extends BaseMapper { * * @return 结果 */ - public int deleteJobLogByIds (Long[] logIds); + int deleteJobLogByIds(Long[] logIds); /** * 删除任务日志 @@ -61,10 +61,10 @@ public interface SysJobLogMapper extends BaseMapper { * * @return 结果 */ - public int deleteJobLogById (Long jobId); + int deleteJobLogById(Long jobId); /** * 清空任务日志 */ - public void cleanJobLog (); + void cleanJobLog(); } diff --git a/muyu-modules/muyu-job/src/main/java/com/muyu/job/mapper/SysJobMapper.java b/muyu-modules/muyu-job/src/main/java/com/muyu/job/mapper/SysJobMapper.java index 84e9fa4..e5a710b 100644 --- a/muyu-modules/muyu-job/src/main/java/com/muyu/job/mapper/SysJobMapper.java +++ b/muyu-modules/muyu-job/src/main/java/com/muyu/job/mapper/SysJobMapper.java @@ -18,14 +18,14 @@ public interface SysJobMapper extends BaseMapper { * * @return 操作日志集合 */ - public List selectJobList (SysJob job); + List selectJobList(SysJob job); /** * 查询所有调度任务 * * @return 调度任务列表 */ - public List selectJobAll (); + List selectJobAll(); /** * 通过调度ID查询调度任务信息 @@ -34,7 +34,7 @@ public interface SysJobMapper extends BaseMapper { * * @return 角色对象信息 */ - public SysJob selectJobById (Long jobId); + SysJob selectJobById(Long jobId); /** * 通过调度ID删除调度任务信息 @@ -43,7 +43,7 @@ public interface SysJobMapper extends BaseMapper { * * @return 结果 */ - public int deleteJobById (Long jobId); + int deleteJobById(Long jobId); /** * 批量删除调度任务信息 @@ -52,7 +52,7 @@ public interface SysJobMapper extends BaseMapper { * * @return 结果 */ - public int deleteJobByIds (Long[] ids); + int deleteJobByIds(Long[] ids); /** * 修改调度任务信息 @@ -61,7 +61,7 @@ public interface SysJobMapper extends BaseMapper { * * @return 结果 */ - public int updateJob (SysJob job); + int updateJob(SysJob job); /** * 新增调度任务信息 @@ -70,5 +70,5 @@ public interface SysJobMapper extends BaseMapper { * * @return 结果 */ - public int insertJob (SysJob job); + int insertJob(SysJob job); } diff --git a/muyu-modules/muyu-job/src/main/java/com/muyu/job/service/ISysJobLogService.java b/muyu-modules/muyu-job/src/main/java/com/muyu/job/service/ISysJobLogService.java index 349f901..df9d7e3 100644 --- a/muyu-modules/muyu-job/src/main/java/com/muyu/job/service/ISysJobLogService.java +++ b/muyu-modules/muyu-job/src/main/java/com/muyu/job/service/ISysJobLogService.java @@ -17,7 +17,7 @@ public interface ISysJobLogService { * * @return 调度任务日志集合 */ - public List selectJobLogList (SysJobLog jobLog); + List selectJobLogList(SysJobLog jobLog); /** * 通过调度任务日志ID查询调度信息 @@ -26,14 +26,14 @@ public interface ISysJobLogService { * * @return 调度任务日志对象信息 */ - public SysJobLog selectJobLogById (Long jobLogId); + SysJobLog selectJobLogById(Long jobLogId); /** * 新增任务日志 * * @param jobLog 调度日志信息 */ - public void addJobLog (SysJobLog jobLog); + void addJobLog(SysJobLog jobLog); /** * 批量删除调度日志信息 @@ -42,7 +42,7 @@ public interface ISysJobLogService { * * @return 结果 */ - public int deleteJobLogByIds (Long[] logIds); + int deleteJobLogByIds(Long[] logIds); /** * 删除任务日志 @@ -51,10 +51,10 @@ public interface ISysJobLogService { * * @return 结果 */ - public int deleteJobLogById (Long jobId); + int deleteJobLogById(Long jobId); /** * 清空任务日志 */ - public void cleanJobLog (); + void cleanJobLog(); } diff --git a/muyu-modules/muyu-job/src/main/java/com/muyu/job/service/ISysJobService.java b/muyu-modules/muyu-job/src/main/java/com/muyu/job/service/ISysJobService.java index 49a8cd3..072b87a 100644 --- a/muyu-modules/muyu-job/src/main/java/com/muyu/job/service/ISysJobService.java +++ b/muyu-modules/muyu-job/src/main/java/com/muyu/job/service/ISysJobService.java @@ -19,7 +19,7 @@ public interface ISysJobService { * * @return 调度任务集合 */ - public List selectJobList (SysJob job); + List selectJobList(SysJob job); /** * 通过调度任务ID查询调度信息 @@ -28,7 +28,7 @@ public interface ISysJobService { * * @return 调度任务对象信息 */ - public SysJob selectJobById (Long jobId); + SysJob selectJobById(Long jobId); /** * 暂停任务 @@ -37,7 +37,7 @@ public interface ISysJobService { * * @return 结果 */ - public int pauseJob (SysJob job) throws SchedulerException; + int pauseJob(SysJob job) throws SchedulerException; /** * 恢复任务 @@ -46,7 +46,7 @@ public interface ISysJobService { * * @return 结果 */ - public int resumeJob (SysJob job) throws SchedulerException; + int resumeJob(SysJob job) throws SchedulerException; /** * 删除任务后,所对应的trigger也将被删除 @@ -55,7 +55,7 @@ public interface ISysJobService { * * @return 结果 */ - public int deleteJob (SysJob job) throws SchedulerException; + int deleteJob(SysJob job) throws SchedulerException; /** * 批量删除调度信息 @@ -64,7 +64,7 @@ public interface ISysJobService { * * @return 结果 */ - public void deleteJobByIds (Long[] jobIds) throws SchedulerException; + void deleteJobByIds(Long[] jobIds) throws SchedulerException; /** * 任务调度状态修改 @@ -73,7 +73,7 @@ public interface ISysJobService { * * @return 结果 */ - public int changeStatus (SysJob job) throws SchedulerException; + int changeStatus(SysJob job) throws SchedulerException; /** * 立即运行任务 @@ -82,7 +82,7 @@ public interface ISysJobService { * * @return 结果 */ - public boolean run (SysJob job) throws SchedulerException; + boolean run(SysJob job) throws SchedulerException; /** * 新增任务 @@ -91,7 +91,7 @@ public interface ISysJobService { * * @return 结果 */ - public int insertJob (SysJob job) throws SchedulerException, TaskException; + int insertJob(SysJob job) throws SchedulerException, TaskException; /** * 更新任务 @@ -100,7 +100,7 @@ public interface ISysJobService { * * @return 结果 */ - public int updateJob (SysJob job) throws SchedulerException, TaskException; + int updateJob(SysJob job) throws SchedulerException, TaskException; /** * 校验cron表达式是否有效 @@ -109,5 +109,5 @@ public interface ISysJobService { * * @return 结果 */ - public boolean checkCronExpressionIsValid (String cronExpression); + boolean checkCronExpressionIsValid(String cronExpression); } diff --git a/muyu-modules/muyu-job/src/main/java/com/muyu/job/util/AbstractQuartzJob.java b/muyu-modules/muyu-job/src/main/java/com/muyu/job/util/AbstractQuartzJob.java index 772b248..ec191ba 100644 --- a/muyu-modules/muyu-job/src/main/java/com/muyu/job/util/AbstractQuartzJob.java +++ b/muyu-modules/muyu-job/src/main/java/com/muyu/job/util/AbstractQuartzJob.java @@ -27,7 +27,7 @@ public abstract class AbstractQuartzJob implements Job { /** * 线程本地变量 */ - private static ThreadLocal threadLocal = new ThreadLocal<>(); + private static final ThreadLocal threadLocal = new ThreadLocal<>(); @Override public void execute (JobExecutionContext context) throws JobExecutionException { diff --git a/muyu-modules/muyu-job/src/main/java/com/muyu/job/util/JobInvokeUtil.java b/muyu-modules/muyu-job/src/main/java/com/muyu/job/util/JobInvokeUtil.java index b942b26..68b11bc 100644 --- a/muyu-modules/muyu-job/src/main/java/com/muyu/job/util/JobInvokeUtil.java +++ b/muyu-modules/muyu-job/src/main/java/com/muyu/job/util/JobInvokeUtil.java @@ -157,7 +157,7 @@ public class JobInvokeUtil { Object[] classs = new Object[methodParams.size()]; int index = 0; for (Object[] os : methodParams) { - classs[index] = (Object) os[0]; + classs[index] = os[0]; index++; } return classs; diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/Brand.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/Brand.java index 92270ef..556d273 100644 --- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/Brand.java +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/Brand.java @@ -64,70 +64,6 @@ public class Brand extends BaseEntity { @Excel(name = "公司地址") private String addressName; - public void setId(Long id) { - this.id = id; - } - - public Long getId() { - return id; - } - - public void setName(String name) { - this.name = name; - } - - public String getName() { - return name; - } - - public void setLogo(String logo) { - this.logo = logo; - } - - public String getLogo() { - return logo; - } - - public void setIntroduction(String introduction) { - this.introduction = introduction; - } - - public String getIntroduction() { - return introduction; - } - - public void setStatus(String status) { - this.status = status; - } - - public String getStatus() { - return status; - } - - public void setAddressName(String addressName) { - this.addressName = addressName; - } - - public String getAddressName() { - return addressName; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("name", getName()) - .append("logo", getLogo()) - .append("introduction", getIntroduction()) - .append("status", getStatus()) - .append("addressName", getAddressName()) - .append("remark", getRemark()) - .append("createBy", SecurityUtils.getUsername()) - .append("createTime", getCreateTime()) - .append("updateBy", SecurityUtils.getUsername()) - .append("updateTime", getUpdateTime()) - .toString(); - } //添加数据构造体 public static Brand saveBuilder(BrandReq brandReq) { diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/BrandCategory.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/BrandCategory.java index 71a7eaf..229245d 100644 --- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/BrandCategory.java +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/BrandCategory.java @@ -37,45 +37,5 @@ public class BrandCategory extends BaseEntity @Excel(name = "品牌编号") private Long brandId; - public void setId(Long id) - { - this.id = id; - } - public Long getId() - { - return id; - } - public void setCategoryId(Long categoryId) - { - this.categoryId = categoryId; - } - - public Long getCategoryId() - { - return categoryId; - } - public void setBrandId(Long brandId) - { - this.brandId = brandId; - } - - public Long getBrandId() - { - return brandId; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("categoryId", getCategoryId()) - .append("brandId", getBrandId()) - .append("remark", getRemark()) - .append("createBy", SecurityUtils.getUsername()) - .append("createTime", getCreateTime()) - .append("updateBy", SecurityUtils.getUsername()) - .append("updateTime", getUpdateTime()) - .toString(); - } } diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryAttribute.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryAttribute.java index 53dc4b4..01a63c7 100644 --- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryAttribute.java +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryAttribute.java @@ -37,45 +37,10 @@ public class CategoryAttribute extends BaseEntity @Excel(name = "品类编号") private Long categoryId; - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setAttributeId(Long attributeId) - { - this.attributeId = attributeId; - } - - public Long getAttributeId() - { - return attributeId; - } - public void setCategoryId(Long categoryId) - { - this.categoryId = categoryId; - } - - public Long getCategoryId() - { - return categoryId; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("attributeId", getAttributeId()) - .append("categoryId", getCategoryId()) - .append("remark", getRemark()) - .append("createBy", SecurityUtils.getUsername()) - .append("createTime", getCreateTime()) - .append("updateBy", SecurityUtils.getUsername()) - .append("updateTime", getUpdateTime()) - .toString(); + public static CategoryAttribute categoryBuilder(Long id, Long attributeId) { + return CategoryAttribute.builder() + .categoryId(id) + .attributeId(attributeId) + .build(); } } diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryAttributeGroup.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryAttributeGroup.java index 2c8e19e..89b2267 100644 --- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryAttributeGroup.java +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryAttributeGroup.java @@ -37,45 +37,18 @@ public class CategoryAttributeGroup extends BaseEntity @Excel(name = "品类编号") private Long categoryId; - public void setId(Long id) - { - this.id = id; - } + /** + * 品类属性组中间表构建体 + * 作用:提供数组对象 + * @param id + * @param groupId + * @return + */ + public static CategoryAttributeGroup saveBuilder(Long id, Long groupId) { + return CategoryAttributeGroup.builder() + .attributeGroupId(groupId) + .categoryId(id) + .build(); - public Long getId() - { - return id; - } - public void setAttributeGroupId(Long attributeGroupId) - { - this.attributeGroupId = attributeGroupId; - } - - public Long getAttributeGroupId() - { - return attributeGroupId; - } - public void setCategoryId(Long categoryId) - { - this.categoryId = categoryId; - } - - public Long getCategoryId() - { - return categoryId; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("attributeGroupId", getAttributeGroupId()) - .append("categoryId", getCategoryId()) - .append("remark", getRemark()) - .append("createBy", SecurityUtils.getUsername()) - .append("createTime", getCreateTime()) - .append("updateBy", SecurityUtils.getUsername()) - .append("updateTime", getUpdateTime()) - .toString(); } } diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryInfo.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryInfo.java index 02861cb..ddd5abc 100644 --- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryInfo.java +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryInfo.java @@ -1,15 +1,14 @@ package com.muyu.product.domain; -import com.muyu.common.security.utils.SecurityUtils; import com.muyu.common.core.annotation.Excel; import com.muyu.common.core.web.domain.TreeEntity; +import com.muyu.product.domain.model.CategoryInfoSaveModel; +import com.muyu.product.domain.req.CategoryReq; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; /** * 品类信息对象 category_info @@ -41,56 +40,30 @@ public class CategoryInfo extends TreeEntity @Excel(name = "是否启用") private String status; - public void setId(Long id) - { - this.id = id; + /** + * 查询构造器 + * @param req + * @return + */ + public static CategoryInfo queryBuilder(CategoryReq req){ + return CategoryInfo.builder() + .name(req.getName()) + .image(req.getImage()) + .status(req.getStatus()) + .remark(req.getRemark()) + .build(); } - public Long getId() - { - return id; - } - public void setName(String name) - { - this.name = name; - } - public String getName() - { - return name; - } - public void setImage(String image) - { - this.image = image; - } - - public String getImage() - { - return image; - } - public void setStatus(String status) - { - this.status = status; - } - - public String getStatus() - { - return status; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("name", getName()) - .append("image", getImage()) - .append("parentId", getParentId()) - .append("status", getStatus()) - .append("remark", getRemark()) - .append("createBy", SecurityUtils.getUsername()) - .append("createTime", getCreateTime()) - .append("updateBy", SecurityUtils.getUsername()) - .append("updateTime", getUpdateTime()) - .toString(); + /** 响应值对象 */ + public static CategoryInfo saveCategoryBuilder(CategoryInfoSaveModel req){ + return CategoryInfo.builder() + .name(req.getName()) + .status(req.getStatus()) + .image(req.getImage()) + .remark(req.getRemark()) + .createBy(req.getCreateBy()) + .createTime(req.getCreateTime()) + .build(); } } diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/model/CategoryInfoSaveModel.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/model/CategoryInfoSaveModel.java new file mode 100644 index 0000000..5a0eaa3 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/model/CategoryInfoSaveModel.java @@ -0,0 +1,68 @@ +package com.muyu.product.domain.model; + +import com.muyu.common.core.web.domain.TreeEntity; +import com.muyu.product.domain.req.CategoryReq; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +import java.util.Date; +import java.util.List; +import java.util.function.Supplier; + +/** + * @ClassName CategoryInfoSaveModel + * @Description 描述 + * @Author SaiSai.Liu + * @Date 2024/3/5/0005 17:17 + */ +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +public class CategoryInfoSaveModel extends TreeEntity { + /** 主键 */ + private Long id; + + /** 品类名称 */ + private String name; + + /** 图片 */ + private String image; + + /** 父级品类 */ + private Long parentId; + + /** 是否启用 */ + private String status; + + /** 说明 */ + private String remark; + private String createBy; + private Date createTime; + + private List checkedAttributeIds; + + private List attributeGroupIds; + + private List brandIds; + + /** + * 保存构建体 + */ + public static CategoryInfoSaveModel saveBuilder(CategoryReq req, Supplier username){ + return CategoryInfoSaveModel.builder() + .checkedAttributeIds(req.getCheckedAttributeIds()) + .attributeGroupIds(req.getAttributeGroupIds()) + .brandIds(req.getBrandIds()) + .image(req.getImage()) + .name(req.getName()) + .parentId(req.getParentId()) + .createBy(username.get()) + .createTime(req.getCreateTime()) + .status(req.getStatus()) + .remark(req.getRemark()) + .build(); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/CategoryReq.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/CategoryReq.java new file mode 100644 index 0000000..d38820e --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/CategoryReq.java @@ -0,0 +1,51 @@ +package com.muyu.product.domain.req; + +import com.muyu.common.core.annotation.Excel; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +import java.util.Date; +import java.util.List; + +/** + * @ClassName CategoryReq + * @Description 描述 + * @Author SaiSai.Liu + * @Date 2024/3/5/0005 12:35 + */ +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +public class CategoryReq { + /** 主键 */ + private Long id; + + /** 品类名称 */ + private String name; + + /** 图片 */ + private String image; + + /** 父级品类 */ + private Long parentId; + + /** 是否启用 */ + private String status; + + /** 说明 */ + private String remark; + private String createBy; + private Date createTime; + + private List checkedAttributeIds; + + private List attributeGroupIds; + + private List brandIds; + + + +} diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/resp/CategoryResp.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/resp/CategoryResp.java new file mode 100644 index 0000000..913233a --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/resp/CategoryResp.java @@ -0,0 +1,76 @@ +package com.muyu.product.domain.resp; + +import com.muyu.common.core.web.domain.TreeEntity; +import com.muyu.common.security.utils.SecurityUtils; +import com.muyu.product.domain.req.CategoryReq; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +import java.util.Date; + +/** + * @ClassName CategoryResp + * @Description 描述 + * @Author SaiSai.Liu + * @Date 2024/3/5/0005 12:35 + */ + +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +public class CategoryResp extends TreeEntity { + /** 主键 */ + private Long id; + + /** 品类名称 */ + private String name; + + /** 图片 */ + private String image; + + /** 是否启用 */ + private String status; + + private String createBy; + private String updateBy; + private Date createTime; + private Date updateTime; + + + /** + * 保存构建体 + * @param categoryReq + * @return + */ + public static CategoryResp saveBuilder(CategoryReq categoryReq){ + return CategoryResp.builder() + .name(categoryReq.getName()) + .image(categoryReq.getImage()) + .status(categoryReq.getStatus()) + .createBy(SecurityUtils.getUsername()) + .createTime(new Date()) + .build(); + } + + + /** + * 修改构建体 + * @param categoryReq + * @return + */ + public static CategoryResp updateBuilder(CategoryReq categoryReq){ + return CategoryResp.builder() + .name(categoryReq.getName()) + .image(categoryReq.getImage()) + .status(categoryReq.getStatus()) + .updateBy(SecurityUtils.getUsername()) + .updateTime(new Date()) + .build(); + } + + + +} diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/结构 b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/结构 new file mode 100644 index 0000000..5ac22f2 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/结构 @@ -0,0 +1,42 @@ +{ + "categoryInfoId": 1, + "states": "y", + "categoryName": "节点", + "remark": null, + "images": null, + "req": { + "asAttributeCategoryList": [ + + ], + "asAttributeGroupList": [ + 属性组 + ], + "asBrandCategoryList":[ + 品类品牌 + ] + } +} + + + + + +{ + "categoryInfoId": 1, + "categoryName": "节点", + "remark": null, + "req": { + "asAttributeCategoryList": [ + "attributeInfo": { + "id": 1 + "attributeName": null + } + ], + "attributeGroupList": [ + "attributeInfoGroup": { + "id": 1, + "attributeInfoList": [] + } + ] + } +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryInfoController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryInfoController.java index 75b441e..19b6330 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryInfoController.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryInfoController.java @@ -3,6 +3,11 @@ package com.muyu.product.controller; import java.util.List; import java.io.IOException; import javax.servlet.http.HttpServletResponse; + +import com.muyu.common.security.utils.SecurityUtils; +import com.muyu.product.domain.model.CategoryInfoSaveModel; +import com.muyu.product.domain.req.CategoryReq; +import com.muyu.product.domain.resp.CategoryResp; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -74,9 +79,9 @@ public class CategoryInfoController extends BaseController @RequiresPermissions("product:category_info:add") @Log(title = "品类信息", businessType = BusinessType.INSERT) @PostMapping - public Result add(@RequestBody CategoryInfo categoryInfo) + public Result add(@RequestBody CategoryReq categoryReq) { - return toAjax(categoryInfoService.insertCategoryInfo(categoryInfo)); + return toAjax(categoryInfoService.save(CategoryInfoSaveModel.saveBuilder(categoryReq, SecurityUtils::getUsername ))); } /** diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AddressMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AddressMapper.java index 683a625..30c7230 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AddressMapper.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AddressMapper.java @@ -19,7 +19,7 @@ public interface AddressMapper extends BaseMapper
* @param id 地区主键 * @return 地区 */ - public Address selectAddressById(Long id); + Address selectAddressById(Long id); /** * 查询地区列表 @@ -27,7 +27,7 @@ public interface AddressMapper extends BaseMapper
* @param address 地区 * @return 地区集合 */ - public List
selectAddressList(Address address); + List
selectAddressList(Address address); /** * 新增地区 @@ -35,7 +35,7 @@ public interface AddressMapper extends BaseMapper
* @param address 地区 * @return 结果 */ - public int insertAddress(Address address); + int insertAddress(Address address); /** * 修改地区 @@ -43,7 +43,7 @@ public interface AddressMapper extends BaseMapper
* @param address 地区 * @return 结果 */ - public int updateAddress(Address address); + int updateAddress(Address address); /** * 删除地区 @@ -51,7 +51,7 @@ public interface AddressMapper extends BaseMapper
* @param id 地区主键 * @return 结果 */ - public int deleteAddressById(Long id); + int deleteAddressById(Long id); /** * 批量删除地区 @@ -59,5 +59,5 @@ public interface AddressMapper extends BaseMapper
* @param ids 需要删除的数据主键集合 * @return 结果 */ - public int deleteAddressByIds(Long[] ids); + int deleteAddressByIds(Long[] ids); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AsAttributeGroupMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AsAttributeGroupMapper.java index e1feabe..14c730b 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AsAttributeGroupMapper.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AsAttributeGroupMapper.java @@ -19,7 +19,7 @@ public interface AsAttributeGroupMapper extends BaseMapper * @param id 属性组中间主键 * @return 属性组中间 */ - public AsAttributeGroup selectAsAttributeGroupById(Long id); + AsAttributeGroup selectAsAttributeGroupById(Long id); /** * 查询属性组中间列表 @@ -27,7 +27,7 @@ public interface AsAttributeGroupMapper extends BaseMapper * @param asAttributeGroup 属性组中间 * @return 属性组中间集合 */ - public List selectAsAttributeGroupList(AsAttributeGroup asAttributeGroup); + List selectAsAttributeGroupList(AsAttributeGroup asAttributeGroup); /** * 新增属性组中间 @@ -35,7 +35,7 @@ public interface AsAttributeGroupMapper extends BaseMapper * @param asAttributeGroup 属性组中间 * @return 结果 */ - public int insertAsAttributeGroup(AsAttributeGroup asAttributeGroup); + int insertAsAttributeGroup(AsAttributeGroup asAttributeGroup); /** * 修改属性组中间 @@ -43,7 +43,7 @@ public interface AsAttributeGroupMapper extends BaseMapper * @param asAttributeGroup 属性组中间 * @return 结果 */ - public int updateAsAttributeGroup(AsAttributeGroup asAttributeGroup); + int updateAsAttributeGroup(AsAttributeGroup asAttributeGroup); /** * 删除属性组中间 @@ -51,7 +51,7 @@ public interface AsAttributeGroupMapper extends BaseMapper * @param id 属性组中间主键 * @return 结果 */ - public int deleteAsAttributeGroupById(Long id); + int deleteAsAttributeGroupById(Long id); /** * 批量删除属性组中间 @@ -59,7 +59,7 @@ public interface AsAttributeGroupMapper extends BaseMapper * @param ids 需要删除的数据主键集合 * @return 结果 */ - public int deleteAsAttributeGroupByIds(Long[] ids); + int deleteAsAttributeGroupByIds(Long[] ids); - public int deleteAsAttributeGroupByGroupId(Long id); + int deleteAsAttributeGroupByGroupId(Long id); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AttributeGroupMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AttributeGroupMapper.java index abf14c4..6d8ae3b 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AttributeGroupMapper.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AttributeGroupMapper.java @@ -19,7 +19,7 @@ public interface AttributeGroupMapper extends BaseMapper * @param id 属性组主键 * @return 属性组 */ - public AttributeGroup selectAttributeGroupById(Long id); + AttributeGroup selectAttributeGroupById(Long id); /** * 查询属性组列表 @@ -27,7 +27,7 @@ public interface AttributeGroupMapper extends BaseMapper * @param attributeGroup 属性组 * @return 属性组集合 */ - public List selectAttributeGroupList(AttributeGroup attributeGroup); + List selectAttributeGroupList(AttributeGroup attributeGroup); /** * 新增属性组 @@ -35,7 +35,7 @@ public interface AttributeGroupMapper extends BaseMapper * @param attributeGroup 属性组 * @return 结果 */ - public int insertAttributeGroup(AttributeGroup attributeGroup); + int insertAttributeGroup(AttributeGroup attributeGroup); /** * 修改属性组 @@ -43,7 +43,7 @@ public interface AttributeGroupMapper extends BaseMapper * @param attributeGroup 属性组 * @return 结果 */ - public int updateAttributeGroup(AttributeGroup attributeGroup); + int updateAttributeGroup(AttributeGroup attributeGroup); /** * 删除属性组 @@ -51,7 +51,7 @@ public interface AttributeGroupMapper extends BaseMapper * @param id 属性组主键 * @return 结果 */ - public int deleteAttributeGroupById(Long id); + int deleteAttributeGroupById(Long id); /** * 批量删除属性组 @@ -59,5 +59,5 @@ public interface AttributeGroupMapper extends BaseMapper * @param ids 需要删除的数据主键集合 * @return 结果 */ - public int deleteAttributeGroupByIds(Long[] ids); + int deleteAttributeGroupByIds(Long[] ids); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AttributeMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AttributeMapper.java index b19927f..04a9a2c 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AttributeMapper.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AttributeMapper.java @@ -19,7 +19,7 @@ public interface AttributeMapper extends BaseMapper * @param id 属性主键 * @return 属性 */ - public Attribute selectAttributeById(Long id); + Attribute selectAttributeById(Long id); /** * 查询属性列表 @@ -27,7 +27,7 @@ public interface AttributeMapper extends BaseMapper * @param attribute 属性 * @return 属性集合 */ - public List selectAttributeList(Attribute attribute); + List selectAttributeList(Attribute attribute); /** * 新增属性 @@ -35,7 +35,7 @@ public interface AttributeMapper extends BaseMapper * @param attribute 属性 * @return 结果 */ - public int insertAttribute(Attribute attribute); + int insertAttribute(Attribute attribute); /** * 修改属性 @@ -43,7 +43,7 @@ public interface AttributeMapper extends BaseMapper * @param attribute 属性 * @return 结果 */ - public int updateAttribute(Attribute attribute); + int updateAttribute(Attribute attribute); /** * 删除属性 @@ -51,7 +51,7 @@ public interface AttributeMapper extends BaseMapper * @param id 属性主键 * @return 结果 */ - public int deleteAttributeById(Long id); + int deleteAttributeById(Long id); /** * 批量删除属性 @@ -59,5 +59,5 @@ public interface AttributeMapper extends BaseMapper * @param ids 需要删除的数据主键集合 * @return 结果 */ - public int deleteAttributeByIds(Long[] ids); + int deleteAttributeByIds(Long[] ids); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AttributeProductMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AttributeProductMapper.java index e5cfc47..d6a7759 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AttributeProductMapper.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AttributeProductMapper.java @@ -19,7 +19,7 @@ public interface AttributeProductMapper extends BaseMapper * @param id 商品属性中间表主键 * @return 商品属性中间表 */ - public AttributeProduct selectAttributeProductById(Long id); + AttributeProduct selectAttributeProductById(Long id); /** * 查询商品属性中间表列表 @@ -27,7 +27,7 @@ public interface AttributeProductMapper extends BaseMapper * @param attributeProduct 商品属性中间表 * @return 商品属性中间表集合 */ - public List selectAttributeProductList(AttributeProduct attributeProduct); + List selectAttributeProductList(AttributeProduct attributeProduct); /** * 新增商品属性中间表 @@ -35,7 +35,7 @@ public interface AttributeProductMapper extends BaseMapper * @param attributeProduct 商品属性中间表 * @return 结果 */ - public int insertAttributeProduct(AttributeProduct attributeProduct); + int insertAttributeProduct(AttributeProduct attributeProduct); /** * 修改商品属性中间表 @@ -43,7 +43,7 @@ public interface AttributeProductMapper extends BaseMapper * @param attributeProduct 商品属性中间表 * @return 结果 */ - public int updateAttributeProduct(AttributeProduct attributeProduct); + int updateAttributeProduct(AttributeProduct attributeProduct); /** * 删除商品属性中间表 @@ -51,7 +51,7 @@ public interface AttributeProductMapper extends BaseMapper * @param id 商品属性中间表主键 * @return 结果 */ - public int deleteAttributeProductById(Long id); + int deleteAttributeProductById(Long id); /** * 批量删除商品属性中间表 @@ -59,5 +59,5 @@ public interface AttributeProductMapper extends BaseMapper * @param ids 需要删除的数据主键集合 * @return 结果 */ - public int deleteAttributeProductByIds(Long[] ids); + int deleteAttributeProductByIds(Long[] ids); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/BrandCategoryMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/BrandCategoryMapper.java index 8efff48..9431c76 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/BrandCategoryMapper.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/BrandCategoryMapper.java @@ -19,7 +19,7 @@ public interface BrandCategoryMapper extends BaseMapper * @param id 品牌品类中间主键 * @return 品牌品类中间 */ - public BrandCategory selectBrandCategoryById(Long id); + BrandCategory selectBrandCategoryById(Long id); /** * 查询品牌品类中间列表 @@ -27,7 +27,7 @@ public interface BrandCategoryMapper extends BaseMapper * @param brandCategory 品牌品类中间 * @return 品牌品类中间集合 */ - public List selectBrandCategoryList(BrandCategory brandCategory); + List selectBrandCategoryList(BrandCategory brandCategory); /** * 新增品牌品类中间 @@ -35,7 +35,7 @@ public interface BrandCategoryMapper extends BaseMapper * @param brandCategory 品牌品类中间 * @return 结果 */ - public int insertBrandCategory(BrandCategory brandCategory); + int insertBrandCategory(BrandCategory brandCategory); /** * 修改品牌品类中间 @@ -43,7 +43,7 @@ public interface BrandCategoryMapper extends BaseMapper * @param brandCategory 品牌品类中间 * @return 结果 */ - public int updateBrandCategory(BrandCategory brandCategory); + int updateBrandCategory(BrandCategory brandCategory); /** * 删除品牌品类中间 @@ -51,7 +51,7 @@ public interface BrandCategoryMapper extends BaseMapper * @param id 品牌品类中间主键 * @return 结果 */ - public int deleteBrandCategoryById(Long id); + int deleteBrandCategoryById(Long id); /** * 批量删除品牌品类中间 @@ -59,5 +59,5 @@ public interface BrandCategoryMapper extends BaseMapper * @param ids 需要删除的数据主键集合 * @return 结果 */ - public int deleteBrandCategoryByIds(Long[] ids); + int deleteBrandCategoryByIds(Long[] ids); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/BrandMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/BrandMapper.java index 5cdd87e..fc28903 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/BrandMapper.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/BrandMapper.java @@ -20,7 +20,7 @@ public interface BrandMapper extends BaseMapper * @param id 品牌主键 * @return 品牌 */ - public Brand selectBrandById(Long id); + Brand selectBrandById(Long id); /** * 查询品牌列表 @@ -28,7 +28,7 @@ public interface BrandMapper extends BaseMapper * @param brand 品牌 * @return 品牌集合 */ - public List selectBrandList(Brand brand); + List selectBrandList(Brand brand); /** * 新增品牌 @@ -36,7 +36,7 @@ public interface BrandMapper extends BaseMapper * @param brand 品牌 * @return 结果 */ - public int insertBrand(Brand brand); + int insertBrand(Brand brand); /** * 修改品牌 @@ -44,7 +44,7 @@ public interface BrandMapper extends BaseMapper * @param brand 品牌 * @return 结果 */ - public int updateBrand(Brand brand); + int updateBrand(Brand brand); /** * 删除品牌 @@ -52,7 +52,7 @@ public interface BrandMapper extends BaseMapper * @param id 品牌主键 * @return 结果 */ - public int deleteBrandById(Long id); + int deleteBrandById(Long id); /** * 批量删除品牌 @@ -60,5 +60,5 @@ public interface BrandMapper extends BaseMapper * @param ids 需要删除的数据主键集合 * @return 结果 */ - public int deleteBrandByIds(Long[] ids); + int deleteBrandByIds(Long[] ids); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/CategoryAttributeGroupMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/CategoryAttributeGroupMapper.java index 1111f6e..062bc5c 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/CategoryAttributeGroupMapper.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/CategoryAttributeGroupMapper.java @@ -19,7 +19,7 @@ public interface CategoryAttributeGroupMapper extends BaseMapper selectCategoryAttributeGroupList(CategoryAttributeGroup categoryAttributeGroup); + List selectCategoryAttributeGroupList(CategoryAttributeGroup categoryAttributeGroup); /** * 新增品类属性组中间 @@ -35,7 +35,7 @@ public interface CategoryAttributeGroupMapper extends BaseMapper * @param id 品类属性中间主键 * @return 品类属性中间 */ - public CategoryAttribute selectCategoryAttributeById(Long id); + CategoryAttribute selectCategoryAttributeById(Long id); /** * 查询品类属性中间列表 @@ -27,7 +27,7 @@ public interface CategoryAttributeMapper extends BaseMapper * @param categoryAttribute 品类属性中间 * @return 品类属性中间集合 */ - public List selectCategoryAttributeList(CategoryAttribute categoryAttribute); + List selectCategoryAttributeList(CategoryAttribute categoryAttribute); /** * 新增品类属性中间 @@ -35,7 +35,7 @@ public interface CategoryAttributeMapper extends BaseMapper * @param categoryAttribute 品类属性中间 * @return 结果 */ - public int insertCategoryAttribute(CategoryAttribute categoryAttribute); + int insertCategoryAttribute(CategoryAttribute categoryAttribute); /** * 修改品类属性中间 @@ -43,7 +43,7 @@ public interface CategoryAttributeMapper extends BaseMapper * @param categoryAttribute 品类属性中间 * @return 结果 */ - public int updateCategoryAttribute(CategoryAttribute categoryAttribute); + int updateCategoryAttribute(CategoryAttribute categoryAttribute); /** * 删除品类属性中间 @@ -51,7 +51,7 @@ public interface CategoryAttributeMapper extends BaseMapper * @param id 品类属性中间主键 * @return 结果 */ - public int deleteCategoryAttributeById(Long id); + int deleteCategoryAttributeById(Long id); /** * 批量删除品类属性中间 @@ -59,5 +59,5 @@ public interface CategoryAttributeMapper extends BaseMapper * @param ids 需要删除的数据主键集合 * @return 结果 */ - public int deleteCategoryAttributeByIds(Long[] ids); + int deleteCategoryAttributeByIds(Long[] ids); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/CategoryInfoMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/CategoryInfoMapper.java index 54671ed..1378d82 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/CategoryInfoMapper.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/CategoryInfoMapper.java @@ -19,7 +19,7 @@ public interface CategoryInfoMapper extends BaseMapper * @param id 品类信息主键 * @return 品类信息 */ - public CategoryInfo selectCategoryInfoById(Long id); + CategoryInfo selectCategoryInfoById(Long id); /** * 查询品类信息列表 @@ -27,7 +27,7 @@ public interface CategoryInfoMapper extends BaseMapper * @param categoryInfo 品类信息 * @return 品类信息集合 */ - public List selectCategoryInfoList(CategoryInfo categoryInfo); + List selectCategoryInfoList(CategoryInfo categoryInfo); /** * 新增品类信息 @@ -35,7 +35,7 @@ public interface CategoryInfoMapper extends BaseMapper * @param categoryInfo 品类信息 * @return 结果 */ - public int insertCategoryInfo(CategoryInfo categoryInfo); + int insertCategoryInfo(CategoryInfo categoryInfo); /** * 修改品类信息 @@ -43,7 +43,7 @@ public interface CategoryInfoMapper extends BaseMapper * @param categoryInfo 品类信息 * @return 结果 */ - public int updateCategoryInfo(CategoryInfo categoryInfo); + int updateCategoryInfo(CategoryInfo categoryInfo); /** * 删除品类信息 @@ -51,7 +51,7 @@ public interface CategoryInfoMapper extends BaseMapper * @param id 品类信息主键 * @return 结果 */ - public int deleteCategoryInfoById(Long id); + int deleteCategoryInfoById(Long id); /** * 批量删除品类信息 @@ -59,5 +59,5 @@ public interface CategoryInfoMapper extends BaseMapper * @param ids 需要删除的数据主键集合 * @return 结果 */ - public int deleteCategoryInfoByIds(Long[] ids); + int deleteCategoryInfoByIds(Long[] ids); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductCategoryMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductCategoryMapper.java index ad39119..edfcd45 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductCategoryMapper.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductCategoryMapper.java @@ -19,7 +19,7 @@ public interface ProductCategoryMapper extends BaseMapper * @param id 品类商品中间主键 * @return 品类商品中间 */ - public ProductCategory selectProductCategoryById(Long id); + ProductCategory selectProductCategoryById(Long id); /** * 查询品类商品中间列表 @@ -27,7 +27,7 @@ public interface ProductCategoryMapper extends BaseMapper * @param productCategory 品类商品中间 * @return 品类商品中间集合 */ - public List selectProductCategoryList(ProductCategory productCategory); + List selectProductCategoryList(ProductCategory productCategory); /** * 新增品类商品中间 @@ -35,7 +35,7 @@ public interface ProductCategoryMapper extends BaseMapper * @param productCategory 品类商品中间 * @return 结果 */ - public int insertProductCategory(ProductCategory productCategory); + int insertProductCategory(ProductCategory productCategory); /** * 修改品类商品中间 @@ -43,7 +43,7 @@ public interface ProductCategoryMapper extends BaseMapper * @param productCategory 品类商品中间 * @return 结果 */ - public int updateProductCategory(ProductCategory productCategory); + int updateProductCategory(ProductCategory productCategory); /** * 删除品类商品中间 @@ -51,7 +51,7 @@ public interface ProductCategoryMapper extends BaseMapper * @param id 品类商品中间主键 * @return 结果 */ - public int deleteProductCategoryById(Long id); + int deleteProductCategoryById(Long id); /** * 批量删除品类商品中间 @@ -59,5 +59,5 @@ public interface ProductCategoryMapper extends BaseMapper * @param ids 需要删除的数据主键集合 * @return 结果 */ - public int deleteProductCategoryByIds(Long[] ids); + int deleteProductCategoryByIds(Long[] ids); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductInfoMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductInfoMapper.java index 29f1acb..3a97f7f 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductInfoMapper.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductInfoMapper.java @@ -19,7 +19,7 @@ public interface ProductInfoMapper extends BaseMapper * @param id 商品;主键 * @return 商品; */ - public ProductInfo selectProductInfoById(Long id); + ProductInfo selectProductInfoById(Long id); /** * 查询商品;列表 @@ -27,7 +27,7 @@ public interface ProductInfoMapper extends BaseMapper * @param productInfo 商品; * @return 商品;集合 */ - public List selectProductInfoList(ProductInfo productInfo); + List selectProductInfoList(ProductInfo productInfo); /** * 新增商品; @@ -35,7 +35,7 @@ public interface ProductInfoMapper extends BaseMapper * @param productInfo 商品; * @return 结果 */ - public int insertProductInfo(ProductInfo productInfo); + int insertProductInfo(ProductInfo productInfo); /** * 修改商品; @@ -43,7 +43,7 @@ public interface ProductInfoMapper extends BaseMapper * @param productInfo 商品; * @return 结果 */ - public int updateProductInfo(ProductInfo productInfo); + int updateProductInfo(ProductInfo productInfo); /** * 删除商品; @@ -51,7 +51,7 @@ public interface ProductInfoMapper extends BaseMapper * @param id 商品;主键 * @return 结果 */ - public int deleteProductInfoById(Long id); + int deleteProductInfoById(Long id); /** * 批量删除商品; @@ -59,5 +59,5 @@ public interface ProductInfoMapper extends BaseMapper * @param ids 需要删除的数据主键集合 * @return 结果 */ - public int deleteProductInfoByIds(Long[] ids); + int deleteProductInfoByIds(Long[] ids); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/RuleMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/RuleMapper.java index e67ad24..cb96a54 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/RuleMapper.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/RuleMapper.java @@ -19,7 +19,7 @@ public interface RuleMapper extends BaseMapper * @param id 规格主键 * @return 规格 */ - public Rule selectRuleById(Long id); + Rule selectRuleById(Long id); /** * 查询规格列表 @@ -27,7 +27,7 @@ public interface RuleMapper extends BaseMapper * @param rule 规格 * @return 规格集合 */ - public List selectRuleList(Rule rule); + List selectRuleList(Rule rule); /** * 新增规格 @@ -35,7 +35,7 @@ public interface RuleMapper extends BaseMapper * @param rule 规格 * @return 结果 */ - public int insertRule(Rule rule); + int insertRule(Rule rule); /** * 修改规格 @@ -43,7 +43,7 @@ public interface RuleMapper extends BaseMapper * @param rule 规格 * @return 结果 */ - public int updateRule(Rule rule); + int updateRule(Rule rule); /** * 删除规格 @@ -51,7 +51,7 @@ public interface RuleMapper extends BaseMapper * @param id 规格主键 * @return 结果 */ - public int deleteRuleById(Long id); + int deleteRuleById(Long id); /** * 批量删除规格 @@ -59,5 +59,5 @@ public interface RuleMapper extends BaseMapper * @param ids 需要删除的数据主键集合 * @return 结果 */ - public int deleteRuleByIds(Long[] ids); + int deleteRuleByIds(Long[] ids); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/RuleProductMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/RuleProductMapper.java index 25c42b8..485d007 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/RuleProductMapper.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/RuleProductMapper.java @@ -19,7 +19,7 @@ public interface RuleProductMapper extends BaseMapper * @param id 规格商品中间主键 * @return 规格商品中间 */ - public RuleProduct selectRuleProductById(Long id); + RuleProduct selectRuleProductById(Long id); /** * 查询规格商品中间列表 @@ -27,7 +27,7 @@ public interface RuleProductMapper extends BaseMapper * @param ruleProduct 规格商品中间 * @return 规格商品中间集合 */ - public List selectRuleProductList(RuleProduct ruleProduct); + List selectRuleProductList(RuleProduct ruleProduct); /** * 新增规格商品中间 @@ -35,7 +35,7 @@ public interface RuleProductMapper extends BaseMapper * @param ruleProduct 规格商品中间 * @return 结果 */ - public int insertRuleProduct(RuleProduct ruleProduct); + int insertRuleProduct(RuleProduct ruleProduct); /** * 修改规格商品中间 @@ -43,7 +43,7 @@ public interface RuleProductMapper extends BaseMapper * @param ruleProduct 规格商品中间 * @return 结果 */ - public int updateRuleProduct(RuleProduct ruleProduct); + int updateRuleProduct(RuleProduct ruleProduct); /** * 删除规格商品中间 @@ -51,7 +51,7 @@ public interface RuleProductMapper extends BaseMapper * @param id 规格商品中间主键 * @return 结果 */ - public int deleteRuleProductById(Long id); + int deleteRuleProductById(Long id); /** * 批量删除规格商品中间 @@ -59,5 +59,5 @@ public interface RuleProductMapper extends BaseMapper * @param ids 需要删除的数据主键集合 * @return 结果 */ - public int deleteRuleProductByIds(Long[] ids); + int deleteRuleProductByIds(Long[] ids); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAddressService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAddressService.java index 1742997..9f43d9c 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAddressService.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAddressService.java @@ -20,7 +20,7 @@ public interface IAddressService extends IService
* @param id 地区主键 * @return 地区 */ - public Address selectAddressById(Long id); + Address selectAddressById(Long id); /** * 查询地区列表 @@ -28,7 +28,7 @@ public interface IAddressService extends IService
* @param address 地区 * @return 地区集合 */ - public List
selectAddressList(Address address); + List
selectAddressList(Address address); /** * 新增地区 @@ -36,7 +36,7 @@ public interface IAddressService extends IService
* @param address 地区 * @return 结果 */ - public int insertAddress(Address address); + int insertAddress(Address address); /** * 修改地区 @@ -44,7 +44,7 @@ public interface IAddressService extends IService
* @param address 地区 * @return 结果 */ - public int updateAddress(Address address); + int updateAddress(Address address); /** * 批量删除地区 @@ -52,7 +52,7 @@ public interface IAddressService extends IService
* @param ids 需要删除的地区主键集合 * @return 结果 */ - public int deleteAddressByIds(Long[] ids); + int deleteAddressByIds(Long[] ids); /** * 删除地区信息 @@ -60,5 +60,5 @@ public interface IAddressService extends IService
* @param id 地区主键 * @return 结果 */ - public int deleteAddressById(Long id); + int deleteAddressById(Long id); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAsAttributeGroupService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAsAttributeGroupService.java index 1a0943f..83e893d 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAsAttributeGroupService.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAsAttributeGroupService.java @@ -19,7 +19,7 @@ public interface IAsAttributeGroupService extends IService * @param id 属性组中间主键 * @return 属性组中间 */ - public AsAttributeGroup selectAsAttributeGroupById(Long id); + AsAttributeGroup selectAsAttributeGroupById(Long id); /** * 查询属性组中间列表 @@ -27,7 +27,7 @@ public interface IAsAttributeGroupService extends IService * @param asAttributeGroup 属性组中间 * @return 属性组中间集合 */ - public List selectAsAttributeGroupList(AsAttributeGroup asAttributeGroup); + List selectAsAttributeGroupList(AsAttributeGroup asAttributeGroup); /** * 新增属性组中间 @@ -35,7 +35,7 @@ public interface IAsAttributeGroupService extends IService * @param asAttributeGroup 属性组中间 * @return 结果 */ - public int insertAsAttributeGroup(AsAttributeGroup asAttributeGroup); + int insertAsAttributeGroup(AsAttributeGroup asAttributeGroup); /** * 修改属性组中间 @@ -43,7 +43,7 @@ public interface IAsAttributeGroupService extends IService * @param asAttributeGroup 属性组中间 * @return 结果 */ - public int updateAsAttributeGroup(AsAttributeGroup asAttributeGroup); + int updateAsAttributeGroup(AsAttributeGroup asAttributeGroup); /** * 批量删除属性组中间 @@ -51,7 +51,7 @@ public interface IAsAttributeGroupService extends IService * @param ids 需要删除的属性组中间主键集合 * @return 结果 */ - public int deleteAsAttributeGroupByIds(Long[] ids); + int deleteAsAttributeGroupByIds(Long[] ids); /** * 删除属性组中间信息 @@ -59,7 +59,7 @@ public interface IAsAttributeGroupService extends IService * @param id 属性组中间主键 * @return 结果 */ - public int deleteAsAttributeGroupById(Long id); + int deleteAsAttributeGroupById(Long id); - public int deleteAsAttributeGroupByGroupId(Long id); + int deleteAsAttributeGroupByGroupId(Long id); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAttributeGroupService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAttributeGroupService.java index cea9b3e..d1bb525 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAttributeGroupService.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAttributeGroupService.java @@ -21,7 +21,7 @@ public interface IAttributeGroupService extends IService * @param id 属性组主键 * @return 属性组 */ - public AttributeGroup selectAttributeGroupById(Long id); + AttributeGroup selectAttributeGroupById(Long id); /** * 查询属性组列表 @@ -29,7 +29,7 @@ public interface IAttributeGroupService extends IService * @param attributeGroup 属性组 * @return 属性组集合 */ - public List selectAttributeGroupList(AttributeGroup attributeGroup); + List selectAttributeGroupList(AttributeGroup attributeGroup); /** * 新增属性组 @@ -37,7 +37,7 @@ public interface IAttributeGroupService extends IService * @param attributeGroupReq 属性组 * @return 结果 */ - public int insertAttributeGroup(AttributeGroupReq attributeGroupReq); + int insertAttributeGroup(AttributeGroupReq attributeGroupReq); /** * 修改属性组 @@ -45,7 +45,7 @@ public interface IAttributeGroupService extends IService * @param attributeGroupReq 属性组 * @return 结果 */ - public int updateAttributeGroup(AttributeGroupReq attributeGroupReq); + int updateAttributeGroup(AttributeGroupReq attributeGroupReq); /** * 批量删除属性组 @@ -53,7 +53,7 @@ public interface IAttributeGroupService extends IService * @param ids 需要删除的属性组主键集合 * @return 结果 */ - public int deleteAttributeGroupByIds(Long[] ids); + int deleteAttributeGroupByIds(Long[] ids); /** * 删除属性组信息 @@ -61,5 +61,5 @@ public interface IAttributeGroupService extends IService * @param id 属性组主键 * @return 结果 */ - public int deleteAttributeGroupById(Long id); + int deleteAttributeGroupById(Long id); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAttributeProductService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAttributeProductService.java index 8ac4f84..d9506b2 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAttributeProductService.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAttributeProductService.java @@ -20,7 +20,7 @@ public interface IAttributeProductService extends IService * @param id 商品属性中间表主键 * @return 商品属性中间表 */ - public AttributeProduct selectAttributeProductById(Long id); + AttributeProduct selectAttributeProductById(Long id); /** * 查询商品属性中间表列表 @@ -28,7 +28,7 @@ public interface IAttributeProductService extends IService * @param attributeProduct 商品属性中间表 * @return 商品属性中间表集合 */ - public List selectAttributeProductList(AttributeProduct attributeProduct); + List selectAttributeProductList(AttributeProduct attributeProduct); /** * 新增商品属性中间表 @@ -36,7 +36,7 @@ public interface IAttributeProductService extends IService * @param attributeProduct 商品属性中间表 * @return 结果 */ - public int insertAttributeProduct(AttributeProduct attributeProduct); + int insertAttributeProduct(AttributeProduct attributeProduct); /** * 修改商品属性中间表 @@ -44,7 +44,7 @@ public interface IAttributeProductService extends IService * @param attributeProduct 商品属性中间表 * @return 结果 */ - public int updateAttributeProduct(AttributeProduct attributeProduct); + int updateAttributeProduct(AttributeProduct attributeProduct); /** * 批量删除商品属性中间表 @@ -52,7 +52,7 @@ public interface IAttributeProductService extends IService * @param ids 需要删除的商品属性中间表主键集合 * @return 结果 */ - public int deleteAttributeProductByIds(Long[] ids); + int deleteAttributeProductByIds(Long[] ids); /** * 删除商品属性中间表信息 @@ -60,5 +60,5 @@ public interface IAttributeProductService extends IService * @param id 商品属性中间表主键 * @return 结果 */ - public int deleteAttributeProductById(Long id); + int deleteAttributeProductById(Long id); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAttributeService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAttributeService.java index 9ea7eb0..0c02ea6 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAttributeService.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAttributeService.java @@ -20,7 +20,7 @@ public interface IAttributeService extends IService * @param id 属性主键 * @return 属性 */ - public Attribute selectAttributeById(Long id); + Attribute selectAttributeById(Long id); /** * 查询属性列表 @@ -28,7 +28,7 @@ public interface IAttributeService extends IService * @param attribute 属性 * @return 属性集合 */ - public List selectAttributeList(Attribute attribute); + List selectAttributeList(Attribute attribute); /** * 新增属性 @@ -36,7 +36,7 @@ public interface IAttributeService extends IService * @param attribute 属性 * @return 结果 */ - public int insertAttribute(Attribute attribute); + int insertAttribute(Attribute attribute); /** * 修改属性 @@ -44,7 +44,7 @@ public interface IAttributeService extends IService * @param attribute 属性 * @return 结果 */ - public int updateAttribute(Attribute attribute); + int updateAttribute(Attribute attribute); /** * 批量删除属性 @@ -52,7 +52,7 @@ public interface IAttributeService extends IService * @param ids 需要删除的属性主键集合 * @return 结果 */ - public int deleteAttributeByIds(Long[] ids); + int deleteAttributeByIds(Long[] ids); /** * 删除属性信息 @@ -60,5 +60,5 @@ public interface IAttributeService extends IService * @param id 属性主键 * @return 结果 */ - public int deleteAttributeById(Long id); + int deleteAttributeById(Long id); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IBrandCategoryService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IBrandCategoryService.java index 3533c8d..0d4feeb 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IBrandCategoryService.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IBrandCategoryService.java @@ -20,7 +20,7 @@ public interface IBrandCategoryService extends IService * @param id 品牌品类中间主键 * @return 品牌品类中间 */ - public BrandCategory selectBrandCategoryById(Long id); + BrandCategory selectBrandCategoryById(Long id); /** * 查询品牌品类中间列表 @@ -28,7 +28,7 @@ public interface IBrandCategoryService extends IService * @param brandCategory 品牌品类中间 * @return 品牌品类中间集合 */ - public List selectBrandCategoryList(BrandCategory brandCategory); + List selectBrandCategoryList(BrandCategory brandCategory); /** * 新增品牌品类中间 @@ -36,7 +36,7 @@ public interface IBrandCategoryService extends IService * @param brandCategory 品牌品类中间 * @return 结果 */ - public int insertBrandCategory(BrandCategory brandCategory); + int insertBrandCategory(BrandCategory brandCategory); /** * 修改品牌品类中间 @@ -44,7 +44,7 @@ public interface IBrandCategoryService extends IService * @param brandCategory 品牌品类中间 * @return 结果 */ - public int updateBrandCategory(BrandCategory brandCategory); + int updateBrandCategory(BrandCategory brandCategory); /** * 批量删除品牌品类中间 @@ -52,7 +52,7 @@ public interface IBrandCategoryService extends IService * @param ids 需要删除的品牌品类中间主键集合 * @return 结果 */ - public int deleteBrandCategoryByIds(Long[] ids); + int deleteBrandCategoryByIds(Long[] ids); /** * 删除品牌品类中间信息 @@ -60,5 +60,5 @@ public interface IBrandCategoryService extends IService * @param id 品牌品类中间主键 * @return 结果 */ - public int deleteBrandCategoryById(Long id); + int deleteBrandCategoryById(Long id); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IBrandService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IBrandService.java index 4540265..e1172e1 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IBrandService.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IBrandService.java @@ -21,7 +21,7 @@ public interface IBrandService extends IService * @param id 品牌主键 * @return 品牌 */ - public Brand selectBrandById(Long id); + Brand selectBrandById(Long id); /** * 查询品牌列表 @@ -29,7 +29,7 @@ public interface IBrandService extends IService * @param brand 品牌 * @return 品牌集合 */ - public List selectBrandList(Brand brand); + List selectBrandList(Brand brand); /** * 新增品牌 @@ -37,7 +37,7 @@ public interface IBrandService extends IService * @param brand 品牌 * @return 结果 */ - public int insertBrand(Brand brand); + int insertBrand(Brand brand); /** * 修改品牌 @@ -45,7 +45,7 @@ public interface IBrandService extends IService * @param brand 品牌 * @return 结果 */ - public int updateBrand(Brand brand); + int updateBrand(Brand brand); /** * 批量删除品牌 @@ -53,7 +53,7 @@ public interface IBrandService extends IService * @param ids 需要删除的品牌主键集合 * @return 结果 */ - public int deleteBrandByIds(Long[] ids); + int deleteBrandByIds(Long[] ids); /** * 删除品牌信息 @@ -61,5 +61,5 @@ public interface IBrandService extends IService * @param id 品牌主键 * @return 结果 */ - public int deleteBrandById(Long id); + int deleteBrandById(Long id); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ICategoryAttributeGroupService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ICategoryAttributeGroupService.java index 14183cd..f73a08b 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ICategoryAttributeGroupService.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ICategoryAttributeGroupService.java @@ -20,7 +20,7 @@ public interface ICategoryAttributeGroupService extends IService selectCategoryAttributeGroupList(CategoryAttributeGroup categoryAttributeGroup); + List selectCategoryAttributeGroupList(CategoryAttributeGroup categoryAttributeGroup); /** * 新增品类属性组中间 @@ -36,7 +36,7 @@ public interface ICategoryAttributeGroupService extends IService * @param id 品类属性中间主键 * @return 品类属性中间 */ - public CategoryAttribute selectCategoryAttributeById(Long id); + CategoryAttribute selectCategoryAttributeById(Long id); /** * 查询品类属性中间列表 @@ -27,7 +27,7 @@ public interface ICategoryAttributeService extends IService * @param categoryAttribute 品类属性中间 * @return 品类属性中间集合 */ - public List selectCategoryAttributeList(CategoryAttribute categoryAttribute); + List selectCategoryAttributeList(CategoryAttribute categoryAttribute); /** * 新增品类属性中间 @@ -35,7 +35,7 @@ public interface ICategoryAttributeService extends IService * @param categoryAttribute 品类属性中间 * @return 结果 */ - public int insertCategoryAttribute(CategoryAttribute categoryAttribute); + int insertCategoryAttribute(CategoryAttribute categoryAttribute); /** * 修改品类属性中间 @@ -43,7 +43,7 @@ public interface ICategoryAttributeService extends IService * @param categoryAttribute 品类属性中间 * @return 结果 */ - public int updateCategoryAttribute(CategoryAttribute categoryAttribute); + int updateCategoryAttribute(CategoryAttribute categoryAttribute); /** * 批量删除品类属性中间 @@ -51,7 +51,7 @@ public interface ICategoryAttributeService extends IService * @param ids 需要删除的品类属性中间主键集合 * @return 结果 */ - public int deleteCategoryAttributeByIds(Long[] ids); + int deleteCategoryAttributeByIds(Long[] ids); /** * 删除品类属性中间信息 @@ -59,5 +59,5 @@ public interface ICategoryAttributeService extends IService * @param id 品类属性中间主键 * @return 结果 */ - public int deleteCategoryAttributeById(Long id); + int deleteCategoryAttributeById(Long id); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ICategoryInfoService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ICategoryInfoService.java index 1328c54..90d1f8e 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ICategoryInfoService.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ICategoryInfoService.java @@ -5,6 +5,7 @@ import java.util.List; import com.baomidou.mybatisplus.extension.service.IService; import com.muyu.product.domain.Address; import com.muyu.product.domain.CategoryInfo; +import com.muyu.product.domain.model.CategoryInfoSaveModel; /** * 品类信息Service接口 @@ -20,7 +21,7 @@ public interface ICategoryInfoService extends IService * @param id 品类信息主键 * @return 品类信息 */ - public CategoryInfo selectCategoryInfoById(Long id); + CategoryInfo selectCategoryInfoById(Long id); /** * 查询品类信息列表 @@ -28,7 +29,7 @@ public interface ICategoryInfoService extends IService * @param categoryInfo 品类信息 * @return 品类信息集合 */ - public List selectCategoryInfoList(CategoryInfo categoryInfo); + List selectCategoryInfoList(CategoryInfo categoryInfo); /** * 新增品类信息 @@ -36,7 +37,7 @@ public interface ICategoryInfoService extends IService * @param categoryInfo 品类信息 * @return 结果 */ - public int insertCategoryInfo(CategoryInfo categoryInfo); + int insertCategoryInfo(CategoryInfo categoryInfo); /** * 修改品类信息 @@ -44,7 +45,7 @@ public interface ICategoryInfoService extends IService * @param categoryInfo 品类信息 * @return 结果 */ - public int updateCategoryInfo(CategoryInfo categoryInfo); + int updateCategoryInfo(CategoryInfo categoryInfo); /** * 批量删除品类信息 @@ -52,7 +53,7 @@ public interface ICategoryInfoService extends IService * @param ids 需要删除的品类信息主键集合 * @return 结果 */ - public int deleteCategoryInfoByIds(Long[] ids); + int deleteCategoryInfoByIds(Long[] ids); /** * 删除品类信息信息 @@ -60,5 +61,7 @@ public interface ICategoryInfoService extends IService * @param id 品类信息主键 * @return 结果 */ - public int deleteCategoryInfoById(Long id); + int deleteCategoryInfoById(Long id); + + boolean save(CategoryInfoSaveModel categoryInfoSaveModel); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IProductCategoryService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IProductCategoryService.java index f093c1d..fb42254 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IProductCategoryService.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IProductCategoryService.java @@ -20,7 +20,7 @@ public interface IProductCategoryService extends IService * @param id 品类商品中间主键 * @return 品类商品中间 */ - public ProductCategory selectProductCategoryById(Long id); + ProductCategory selectProductCategoryById(Long id); /** * 查询品类商品中间列表 @@ -28,7 +28,7 @@ public interface IProductCategoryService extends IService * @param productCategory 品类商品中间 * @return 品类商品中间集合 */ - public List selectProductCategoryList(ProductCategory productCategory); + List selectProductCategoryList(ProductCategory productCategory); /** * 新增品类商品中间 @@ -36,7 +36,7 @@ public interface IProductCategoryService extends IService * @param productCategory 品类商品中间 * @return 结果 */ - public int insertProductCategory(ProductCategory productCategory); + int insertProductCategory(ProductCategory productCategory); /** * 修改品类商品中间 @@ -44,7 +44,7 @@ public interface IProductCategoryService extends IService * @param productCategory 品类商品中间 * @return 结果 */ - public int updateProductCategory(ProductCategory productCategory); + int updateProductCategory(ProductCategory productCategory); /** * 批量删除品类商品中间 @@ -52,7 +52,7 @@ public interface IProductCategoryService extends IService * @param ids 需要删除的品类商品中间主键集合 * @return 结果 */ - public int deleteProductCategoryByIds(Long[] ids); + int deleteProductCategoryByIds(Long[] ids); /** * 删除品类商品中间信息 @@ -60,5 +60,5 @@ public interface IProductCategoryService extends IService * @param id 品类商品中间主键 * @return 结果 */ - public int deleteProductCategoryById(Long id); + int deleteProductCategoryById(Long id); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IProductInfoService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IProductInfoService.java index 52de858..315d580 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IProductInfoService.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IProductInfoService.java @@ -20,7 +20,7 @@ public interface IProductInfoService extends IService * @param id 商品;主键 * @return 商品; */ - public ProductInfo selectProductInfoById(Long id); + ProductInfo selectProductInfoById(Long id); /** * 查询商品;列表 @@ -28,7 +28,7 @@ public interface IProductInfoService extends IService * @param productInfo 商品; * @return 商品;集合 */ - public List selectProductInfoList(ProductInfo productInfo); + List selectProductInfoList(ProductInfo productInfo); /** * 新增商品; @@ -36,7 +36,7 @@ public interface IProductInfoService extends IService * @param productInfo 商品; * @return 结果 */ - public int insertProductInfo(ProductInfo productInfo); + int insertProductInfo(ProductInfo productInfo); /** * 修改商品; @@ -44,7 +44,7 @@ public interface IProductInfoService extends IService * @param productInfo 商品; * @return 结果 */ - public int updateProductInfo(ProductInfo productInfo); + int updateProductInfo(ProductInfo productInfo); /** * 批量删除商品; @@ -52,7 +52,7 @@ public interface IProductInfoService extends IService * @param ids 需要删除的商品;主键集合 * @return 结果 */ - public int deleteProductInfoByIds(Long[] ids); + int deleteProductInfoByIds(Long[] ids); /** * 删除商品;信息 @@ -60,5 +60,5 @@ public interface IProductInfoService extends IService * @param id 商品;主键 * @return 结果 */ - public int deleteProductInfoById(Long id); + int deleteProductInfoById(Long id); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IRuleProductService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IRuleProductService.java index defe28b..bfddc83 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IRuleProductService.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IRuleProductService.java @@ -20,7 +20,7 @@ public interface IRuleProductService extends IService * @param id 规格商品中间主键 * @return 规格商品中间 */ - public RuleProduct selectRuleProductById(Long id); + RuleProduct selectRuleProductById(Long id); /** * 查询规格商品中间列表 @@ -28,7 +28,7 @@ public interface IRuleProductService extends IService * @param ruleProduct 规格商品中间 * @return 规格商品中间集合 */ - public List selectRuleProductList(RuleProduct ruleProduct); + List selectRuleProductList(RuleProduct ruleProduct); /** * 新增规格商品中间 @@ -36,7 +36,7 @@ public interface IRuleProductService extends IService * @param ruleProduct 规格商品中间 * @return 结果 */ - public int insertRuleProduct(RuleProduct ruleProduct); + int insertRuleProduct(RuleProduct ruleProduct); /** * 修改规格商品中间 @@ -44,7 +44,7 @@ public interface IRuleProductService extends IService * @param ruleProduct 规格商品中间 * @return 结果 */ - public int updateRuleProduct(RuleProduct ruleProduct); + int updateRuleProduct(RuleProduct ruleProduct); /** * 批量删除规格商品中间 @@ -52,7 +52,7 @@ public interface IRuleProductService extends IService * @param ids 需要删除的规格商品中间主键集合 * @return 结果 */ - public int deleteRuleProductByIds(Long[] ids); + int deleteRuleProductByIds(Long[] ids); /** * 删除规格商品中间信息 @@ -60,5 +60,5 @@ public interface IRuleProductService extends IService * @param id 规格商品中间主键 * @return 结果 */ - public int deleteRuleProductById(Long id); + int deleteRuleProductById(Long id); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IRuleService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IRuleService.java index 8f0294f..5c8c63d 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IRuleService.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IRuleService.java @@ -20,7 +20,7 @@ public interface IRuleService extends IService * @param id 规格主键 * @return 规格 */ - public Rule selectRuleById(Long id); + Rule selectRuleById(Long id); /** * 查询规格列表 @@ -28,7 +28,7 @@ public interface IRuleService extends IService * @param rule 规格 * @return 规格集合 */ - public List selectRuleList(Rule rule); + List selectRuleList(Rule rule); /** * 新增规格 @@ -36,7 +36,7 @@ public interface IRuleService extends IService * @param rule 规格 * @return 结果 */ - public int insertRule(Rule rule); + int insertRule(Rule rule); /** * 修改规格 @@ -44,7 +44,7 @@ public interface IRuleService extends IService * @param rule 规格 * @return 结果 */ - public int updateRule(Rule rule); + int updateRule(Rule rule); /** * 批量删除规格 @@ -52,7 +52,7 @@ public interface IRuleService extends IService * @param ids 需要删除的规格主键集合 * @return 结果 */ - public int deleteRuleByIds(Long[] ids); + int deleteRuleByIds(Long[] ids); /** * 删除规格信息 @@ -60,5 +60,5 @@ public interface IRuleService extends IService * @param id 规格主键 * @return 结果 */ - public int deleteRuleById(Long id); + int deleteRuleById(Long id); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/CategoryInfoServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/CategoryInfoServiceImpl.java index cf2ca41..7681a3d 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/CategoryInfoServiceImpl.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/CategoryInfoServiceImpl.java @@ -4,6 +4,10 @@ import java.util.List; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.muyu.common.core.utils.DateUtils; +import com.muyu.product.domain.CategoryAttribute; +import com.muyu.product.domain.CategoryAttributeGroup; +import com.muyu.product.domain.model.CategoryInfoSaveModel; +import com.muyu.product.service.ICategoryAttributeService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -23,9 +27,11 @@ public class CategoryInfoServiceImpl extends ServiceImpl checkedAttributeIds = categoryInfoSaveModel.getCheckedAttributeIds(); + //判断已选属性集是否为空 + if (checkedAttributeIds != null && !checkedAttributeIds.isEmpty()){ + categoryAttributeService.saveBatch( + checkedAttributeIds.stream() + .map(attributeId -> CategoryAttribute.categoryBuilder(id,attributeId)).toList() + ); + } + List attributeGroupIds = categoryInfoSaveModel.getAttributeGroupIds(); + if (attributeGroupIds != null && !attributeGroupIds.isEmpty()){ + categoryAttributeGroupService.saveBatch( + attributeGroupIds.stream(). + map(groupId -> CategoryAttributeGroup.saveBuilder(id,groupId)).toList() + ); + } + return save; + } } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDeptMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDeptMapper.java index 5ef9ab4..70db361 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDeptMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDeptMapper.java @@ -19,7 +19,7 @@ public interface SysDeptMapper extends BaseMapper { * * @return 部门信息集合 */ - public List selectDeptList (SysDept dept); + List selectDeptList(SysDept dept); /** * 根据角色ID查询部门树信息 @@ -29,7 +29,7 @@ public interface SysDeptMapper extends BaseMapper { * * @return 选中部门列表 */ - public List selectDeptListByRoleId (@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly); + List selectDeptListByRoleId(@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly); /** * 根据部门ID查询信息 @@ -38,7 +38,7 @@ public interface SysDeptMapper extends BaseMapper { * * @return 部门信息 */ - public SysDept selectDeptById (Long deptId); + SysDept selectDeptById(Long deptId); /** * 根据ID查询所有子部门 @@ -47,7 +47,7 @@ public interface SysDeptMapper extends BaseMapper { * * @return 部门列表 */ - public List selectChildrenDeptById (Long deptId); + List selectChildrenDeptById(Long deptId); /** * 根据ID查询所有子部门(正常状态) @@ -56,7 +56,7 @@ public interface SysDeptMapper extends BaseMapper { * * @return 子部门数 */ - public int selectNormalChildrenDeptById (Long deptId); + int selectNormalChildrenDeptById(Long deptId); /** * 是否存在子节点 @@ -65,7 +65,7 @@ public interface SysDeptMapper extends BaseMapper { * * @return 结果 */ - public int hasChildByDeptId (Long deptId); + int hasChildByDeptId(Long deptId); /** * 查询部门是否存在用户 @@ -74,7 +74,7 @@ public interface SysDeptMapper extends BaseMapper { * * @return 结果 */ - public int checkDeptExistUser (Long deptId); + int checkDeptExistUser(Long deptId); /** * 校验部门名称是否唯一 @@ -84,7 +84,7 @@ public interface SysDeptMapper extends BaseMapper { * * @return 结果 */ - public SysDept checkDeptNameUnique (@Param("deptName") String deptName, @Param("parentId") Long parentId); + SysDept checkDeptNameUnique(@Param("deptName") String deptName, @Param("parentId") Long parentId); /** * 新增部门信息 @@ -93,7 +93,7 @@ public interface SysDeptMapper extends BaseMapper { * * @return 结果 */ - public int insertDept (SysDept dept); + int insertDept(SysDept dept); /** * 修改部门信息 @@ -102,14 +102,14 @@ public interface SysDeptMapper extends BaseMapper { * * @return 结果 */ - public int updateDept (SysDept dept); + int updateDept(SysDept dept); /** * 修改所在部门正常状态 * * @param deptIds 部门ID组 */ - public void updateDeptStatusNormal (Long[] deptIds); + void updateDeptStatusNormal(Long[] deptIds); /** * 修改子元素关系 @@ -118,7 +118,7 @@ public interface SysDeptMapper extends BaseMapper { * * @return 结果 */ - public int updateDeptChildren (@Param("depts") List depts); + int updateDeptChildren(@Param("depts") List depts); /** * 删除部门管理信息 @@ -127,5 +127,5 @@ public interface SysDeptMapper extends BaseMapper { * * @return 结果 */ - public int deleteDeptById (Long deptId); + int deleteDeptById(Long deptId); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDictDataMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDictDataMapper.java index 1e87a7e..f5cdc5d 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDictDataMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDictDataMapper.java @@ -19,7 +19,7 @@ public interface SysDictDataMapper extends BaseMapper { * * @return 字典数据集合信息 */ - public List selectDictDataList (SysDictData dictData); + List selectDictDataList(SysDictData dictData); /** * 根据字典类型查询字典数据 @@ -28,7 +28,7 @@ public interface SysDictDataMapper extends BaseMapper { * * @return 字典数据集合信息 */ - public List selectDictDataByType (String dictType); + List selectDictDataByType(String dictType); /** * 根据字典类型和字典键值查询字典数据信息 @@ -38,7 +38,7 @@ public interface SysDictDataMapper extends BaseMapper { * * @return 字典标签 */ - public String selectDictLabel (@Param("dictType") String dictType, @Param("dictValue") String dictValue); + String selectDictLabel(@Param("dictType") String dictType, @Param("dictValue") String dictValue); /** * 根据字典数据ID查询信息 @@ -47,7 +47,7 @@ public interface SysDictDataMapper extends BaseMapper { * * @return 字典数据 */ - public SysDictData selectDictDataById (Long dictCode); + SysDictData selectDictDataById(Long dictCode); /** * 查询字典数据 @@ -56,7 +56,7 @@ public interface SysDictDataMapper extends BaseMapper { * * @return 字典数据 */ - public int countDictDataByType (String dictType); + int countDictDataByType(String dictType); /** * 通过字典ID删除字典数据信息 @@ -65,7 +65,7 @@ public interface SysDictDataMapper extends BaseMapper { * * @return 结果 */ - public int deleteDictDataById (Long dictCode); + int deleteDictDataById(Long dictCode); /** * 批量删除字典数据信息 @@ -74,7 +74,7 @@ public interface SysDictDataMapper extends BaseMapper { * * @return 结果 */ - public int deleteDictDataByIds (Long[] dictCodes); + int deleteDictDataByIds(Long[] dictCodes); /** * 新增字典数据信息 @@ -83,7 +83,7 @@ public interface SysDictDataMapper extends BaseMapper { * * @return 结果 */ - public int insertDictData (SysDictData dictData); + int insertDictData(SysDictData dictData); /** * 修改字典数据信息 @@ -92,7 +92,7 @@ public interface SysDictDataMapper extends BaseMapper { * * @return 结果 */ - public int updateDictData (SysDictData dictData); + int updateDictData(SysDictData dictData); /** * 同步修改字典类型 @@ -102,5 +102,5 @@ public interface SysDictDataMapper extends BaseMapper { * * @return 结果 */ - public int updateDictDataType (@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType); + int updateDictDataType(@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDictTypeMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDictTypeMapper.java index 0a4ffe6..3b8473f 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDictTypeMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDictTypeMapper.java @@ -18,14 +18,14 @@ public interface SysDictTypeMapper extends BaseMapper { * * @return 字典类型集合信息 */ - public List selectDictTypeList (SysDictType dictType); + List selectDictTypeList(SysDictType dictType); /** * 根据所有字典类型 * * @return 字典类型集合信息 */ - public List selectDictTypeAll (); + List selectDictTypeAll(); /** * 根据字典类型ID查询信息 @@ -34,7 +34,7 @@ public interface SysDictTypeMapper extends BaseMapper { * * @return 字典类型 */ - public SysDictType selectDictTypeById (Long dictId); + SysDictType selectDictTypeById(Long dictId); /** * 根据字典类型查询信息 @@ -43,7 +43,7 @@ public interface SysDictTypeMapper extends BaseMapper { * * @return 字典类型 */ - public SysDictType selectDictTypeByType (String dictType); + SysDictType selectDictTypeByType(String dictType); /** * 通过字典ID删除字典信息 @@ -52,7 +52,7 @@ public interface SysDictTypeMapper extends BaseMapper { * * @return 结果 */ - public int deleteDictTypeById (Long dictId); + int deleteDictTypeById(Long dictId); /** * 批量删除字典类型信息 @@ -61,7 +61,7 @@ public interface SysDictTypeMapper extends BaseMapper { * * @return 结果 */ - public int deleteDictTypeByIds (Long[] dictIds); + int deleteDictTypeByIds(Long[] dictIds); /** * 新增字典类型信息 @@ -70,7 +70,7 @@ public interface SysDictTypeMapper extends BaseMapper { * * @return 结果 */ - public int insertDictType (SysDictType dictType); + int insertDictType(SysDictType dictType); /** * 修改字典类型信息 @@ -79,7 +79,7 @@ public interface SysDictTypeMapper extends BaseMapper { * * @return 结果 */ - public int updateDictType (SysDictType dictType); + int updateDictType(SysDictType dictType); /** * 校验字典类型称是否唯一 @@ -88,5 +88,5 @@ public interface SysDictTypeMapper extends BaseMapper { * * @return 结果 */ - public SysDictType checkDictTypeUnique (String dictType); + SysDictType checkDictTypeUnique(String dictType); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysLogininforMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysLogininforMapper.java index 0f1f86a..0e88949 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysLogininforMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysLogininforMapper.java @@ -16,7 +16,7 @@ public interface SysLogininforMapper extends BaseMapper { * * @param logininfor 访问日志对象 */ - public int insertLogininfor (SysLogininfor logininfor); + int insertLogininfor(SysLogininfor logininfor); /** * 查询系统登录日志集合 @@ -25,7 +25,7 @@ public interface SysLogininforMapper extends BaseMapper { * * @return 登录记录集合 */ - public List selectLogininforList (SysLogininfor logininfor); + List selectLogininforList(SysLogininfor logininfor); /** * 批量删除系统登录日志 @@ -34,12 +34,12 @@ public interface SysLogininforMapper extends BaseMapper { * * @return 结果 */ - public int deleteLogininforByIds (Long[] infoIds); + int deleteLogininforByIds(Long[] infoIds); /** * 清空系统登录日志 * * @return 结果 */ - public int cleanLogininfor (); + int cleanLogininfor(); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysMenuMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysMenuMapper.java index 8ceaaa0..92a2a01 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysMenuMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysMenuMapper.java @@ -19,14 +19,14 @@ public interface SysMenuMapper extends BaseMapper { * * @return 菜单列表 */ - public List selectMenuList (SysMenu menu); + List selectMenuList(SysMenu menu); /** * 根据用户所有权限 * * @return 权限列表 */ - public List selectMenuPerms (); + List selectMenuPerms(); /** * 根据用户查询系统菜单列表 @@ -35,7 +35,7 @@ public interface SysMenuMapper extends BaseMapper { * * @return 菜单列表 */ - public List selectMenuListByUserId (SysMenu menu); + List selectMenuListByUserId(SysMenu menu); /** * 根据角色ID查询权限 @@ -44,7 +44,7 @@ public interface SysMenuMapper extends BaseMapper { * * @return 权限列表 */ - public List selectMenuPermsByRoleId (Long roleId); + List selectMenuPermsByRoleId(Long roleId); /** * 根据用户ID查询权限 @@ -53,14 +53,14 @@ public interface SysMenuMapper extends BaseMapper { * * @return 权限列表 */ - public List selectMenuPermsByUserId (Long userId); + List selectMenuPermsByUserId(Long userId); /** * 根据用户ID查询菜单 * * @return 菜单列表 */ - public List selectMenuTreeAll (); + List selectMenuTreeAll(); /** * 根据用户ID查询菜单 @@ -69,7 +69,7 @@ public interface SysMenuMapper extends BaseMapper { * * @return 菜单列表 */ - public List selectMenuTreeByUserId (Long userId); + List selectMenuTreeByUserId(Long userId); /** * 根据角色ID查询菜单树信息 @@ -79,7 +79,7 @@ public interface SysMenuMapper extends BaseMapper { * * @return 选中菜单列表 */ - public List selectMenuListByRoleId (@Param("roleId") Long roleId, @Param("menuCheckStrictly") boolean menuCheckStrictly); + List selectMenuListByRoleId(@Param("roleId") Long roleId, @Param("menuCheckStrictly") boolean menuCheckStrictly); /** * 根据菜单ID查询信息 @@ -88,7 +88,7 @@ public interface SysMenuMapper extends BaseMapper { * * @return 菜单信息 */ - public SysMenu selectMenuById (Long menuId); + SysMenu selectMenuById(Long menuId); /** * 是否存在菜单子节点 @@ -97,7 +97,7 @@ public interface SysMenuMapper extends BaseMapper { * * @return 结果 */ - public int hasChildByMenuId (Long menuId); + int hasChildByMenuId(Long menuId); /** * 新增菜单信息 @@ -106,7 +106,7 @@ public interface SysMenuMapper extends BaseMapper { * * @return 结果 */ - public int insertMenu (SysMenu menu); + int insertMenu(SysMenu menu); /** * 修改菜单信息 @@ -115,7 +115,7 @@ public interface SysMenuMapper extends BaseMapper { * * @return 结果 */ - public int updateMenu (SysMenu menu); + int updateMenu(SysMenu menu); /** * 删除菜单管理信息 @@ -124,7 +124,7 @@ public interface SysMenuMapper extends BaseMapper { * * @return 结果 */ - public int deleteMenuById (Long menuId); + int deleteMenuById(Long menuId); /** * 校验菜单名称是否唯一 @@ -134,5 +134,5 @@ public interface SysMenuMapper extends BaseMapper { * * @return 结果 */ - public SysMenu checkMenuNameUnique (@Param("menuName") String menuName, @Param("parentId") Long parentId); + SysMenu checkMenuNameUnique(@Param("menuName") String menuName, @Param("parentId") Long parentId); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysNoticeMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysNoticeMapper.java index fee9930..3d97964 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysNoticeMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysNoticeMapper.java @@ -18,7 +18,7 @@ public interface SysNoticeMapper extends BaseMapper { * * @return 公告信息 */ - public SysNotice selectNoticeById (Long noticeId); + SysNotice selectNoticeById(Long noticeId); /** * 查询公告列表 @@ -27,7 +27,7 @@ public interface SysNoticeMapper extends BaseMapper { * * @return 公告集合 */ - public List selectNoticeList (SysNotice notice); + List selectNoticeList(SysNotice notice); /** * 新增公告 @@ -36,7 +36,7 @@ public interface SysNoticeMapper extends BaseMapper { * * @return 结果 */ - public int insertNotice (SysNotice notice); + int insertNotice(SysNotice notice); /** * 修改公告 @@ -45,7 +45,7 @@ public interface SysNoticeMapper extends BaseMapper { * * @return 结果 */ - public int updateNotice (SysNotice notice); + int updateNotice(SysNotice notice); /** * 批量删除公告 @@ -54,7 +54,7 @@ public interface SysNoticeMapper extends BaseMapper { * * @return 结果 */ - public int deleteNoticeById (Long noticeId); + int deleteNoticeById(Long noticeId); /** * 批量删除公告信息 @@ -63,5 +63,5 @@ public interface SysNoticeMapper extends BaseMapper { * * @return 结果 */ - public int deleteNoticeByIds (Long[] noticeIds); + int deleteNoticeByIds(Long[] noticeIds); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysOperLogMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysOperLogMapper.java index 6ea1bcd..752bb6b 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysOperLogMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysOperLogMapper.java @@ -16,7 +16,7 @@ public interface SysOperLogMapper extends BaseMapper { * * @param operLog 操作日志对象 */ - public int insertOperlog (SysOperLog operLog); + int insertOperlog(SysOperLog operLog); /** * 查询系统操作日志集合 @@ -25,7 +25,7 @@ public interface SysOperLogMapper extends BaseMapper { * * @return 操作日志集合 */ - public List selectOperLogList (SysOperLog operLog); + List selectOperLogList(SysOperLog operLog); /** * 批量删除系统操作日志 @@ -34,7 +34,7 @@ public interface SysOperLogMapper extends BaseMapper { * * @return 结果 */ - public int deleteOperLogByIds (Long[] operIds); + int deleteOperLogByIds(Long[] operIds); /** * 查询操作日志详细 @@ -43,10 +43,10 @@ public interface SysOperLogMapper extends BaseMapper { * * @return 操作日志对象 */ - public SysOperLog selectOperLogById (Long operId); + SysOperLog selectOperLogById(Long operId); /** * 清空操作日志 */ - public void cleanOperLog (); + void cleanOperLog(); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysPostMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysPostMapper.java index 4bfd66d..b379183 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysPostMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysPostMapper.java @@ -18,14 +18,14 @@ public interface SysPostMapper extends BaseMapper { * * @return 岗位数据集合 */ - public List selectPostList (SysPost post); + List selectPostList(SysPost post); /** * 查询所有岗位 * * @return 岗位列表 */ - public List selectPostAll (); + List selectPostAll(); /** * 通过岗位ID查询岗位信息 @@ -34,7 +34,7 @@ public interface SysPostMapper extends BaseMapper { * * @return 角色对象信息 */ - public SysPost selectPostById (Long postId); + SysPost selectPostById(Long postId); /** * 根据用户ID获取岗位选择框列表 @@ -43,7 +43,7 @@ public interface SysPostMapper extends BaseMapper { * * @return 选中岗位ID列表 */ - public List selectPostListByUserId (Long userId); + List selectPostListByUserId(Long userId); /** * 查询用户所属岗位组 @@ -52,7 +52,7 @@ public interface SysPostMapper extends BaseMapper { * * @return 结果 */ - public List selectPostsByUserName (String userName); + List selectPostsByUserName(String userName); /** * 删除岗位信息 @@ -61,7 +61,7 @@ public interface SysPostMapper extends BaseMapper { * * @return 结果 */ - public int deletePostById (Long postId); + int deletePostById(Long postId); /** * 批量删除岗位信息 @@ -70,7 +70,7 @@ public interface SysPostMapper extends BaseMapper { * * @return 结果 */ - public int deletePostByIds (Long[] postIds); + int deletePostByIds(Long[] postIds); /** * 修改岗位信息 @@ -79,7 +79,7 @@ public interface SysPostMapper extends BaseMapper { * * @return 结果 */ - public int updatePost (SysPost post); + int updatePost(SysPost post); /** * 新增岗位信息 @@ -88,7 +88,7 @@ public interface SysPostMapper extends BaseMapper { * * @return 结果 */ - public int insertPost (SysPost post); + int insertPost(SysPost post); /** * 校验岗位名称 @@ -97,7 +97,7 @@ public interface SysPostMapper extends BaseMapper { * * @return 结果 */ - public SysPost checkPostNameUnique (String postName); + SysPost checkPostNameUnique(String postName); /** * 校验岗位编码 @@ -106,5 +106,5 @@ public interface SysPostMapper extends BaseMapper { * * @return 结果 */ - public SysPost checkPostCodeUnique (String postCode); + SysPost checkPostCodeUnique(String postCode); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysRoleDeptMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysRoleDeptMapper.java index 0e6dd4d..1df12da 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysRoleDeptMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysRoleDeptMapper.java @@ -19,7 +19,7 @@ public interface SysRoleDeptMapper extends BaseMapper { * * @return 结果 */ - public int deleteRoleDeptByRoleId (Long roleId); + int deleteRoleDeptByRoleId(Long roleId); /** * 批量删除角色部门关联信息 @@ -28,7 +28,7 @@ public interface SysRoleDeptMapper extends BaseMapper { * * @return 结果 */ - public int deleteRoleDept (Long[] ids); + int deleteRoleDept(Long[] ids); /** * 查询部门使用数量 @@ -37,7 +37,7 @@ public interface SysRoleDeptMapper extends BaseMapper { * * @return 结果 */ - public int selectCountRoleDeptByDeptId (Long deptId); + int selectCountRoleDeptByDeptId(Long deptId); /** * 批量新增角色部门信息 @@ -46,5 +46,5 @@ public interface SysRoleDeptMapper extends BaseMapper { * * @return 结果 */ - public int batchRoleDept (List roleDeptList); + int batchRoleDept(List roleDeptList); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysRoleMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysRoleMapper.java index 2b01dc3..bb2de63 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysRoleMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysRoleMapper.java @@ -18,7 +18,7 @@ public interface SysRoleMapper extends BaseMapper { * * @return 角色数据集合信息 */ - public List selectRoleList (SysRole role); + List selectRoleList(SysRole role); /** * 根据用户ID查询角色 @@ -27,14 +27,14 @@ public interface SysRoleMapper extends BaseMapper { * * @return 角色列表 */ - public List selectRolePermissionByUserId (Long userId); + List selectRolePermissionByUserId(Long userId); /** * 查询所有角色 * * @return 角色列表 */ - public List selectRoleAll (); + List selectRoleAll(); /** * 根据用户ID获取角色选择框列表 @@ -43,7 +43,7 @@ public interface SysRoleMapper extends BaseMapper { * * @return 选中角色ID列表 */ - public List selectRoleListByUserId (Long userId); + List selectRoleListByUserId(Long userId); /** * 通过角色ID查询角色 @@ -52,7 +52,7 @@ public interface SysRoleMapper extends BaseMapper { * * @return 角色对象信息 */ - public SysRole selectRoleById (Long roleId); + SysRole selectRoleById(Long roleId); /** * 根据用户ID查询角色 @@ -61,7 +61,7 @@ public interface SysRoleMapper extends BaseMapper { * * @return 角色列表 */ - public List selectRolesByUserName (String userName); + List selectRolesByUserName(String userName); /** * 校验角色名称是否唯一 @@ -70,7 +70,7 @@ public interface SysRoleMapper extends BaseMapper { * * @return 角色信息 */ - public SysRole checkRoleNameUnique (String roleName); + SysRole checkRoleNameUnique(String roleName); /** * 校验角色权限是否唯一 @@ -79,7 +79,7 @@ public interface SysRoleMapper extends BaseMapper { * * @return 角色信息 */ - public SysRole checkRoleKeyUnique (String roleKey); + SysRole checkRoleKeyUnique(String roleKey); /** * 修改角色信息 @@ -88,7 +88,7 @@ public interface SysRoleMapper extends BaseMapper { * * @return 结果 */ - public int updateRole (SysRole role); + int updateRole(SysRole role); /** * 新增角色信息 @@ -97,7 +97,7 @@ public interface SysRoleMapper extends BaseMapper { * * @return 结果 */ - public int insertRole (SysRole role); + int insertRole(SysRole role); /** * 通过角色ID删除角色 @@ -106,7 +106,7 @@ public interface SysRoleMapper extends BaseMapper { * * @return 结果 */ - public int deleteRoleById (Long roleId); + int deleteRoleById(Long roleId); /** * 批量删除角色信息 @@ -115,5 +115,5 @@ public interface SysRoleMapper extends BaseMapper { * * @return 结果 */ - public int deleteRoleByIds (Long[] roleIds); + int deleteRoleByIds(Long[] roleIds); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysRoleMenuMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysRoleMenuMapper.java index 664ce26..1978e2d 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysRoleMenuMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysRoleMenuMapper.java @@ -19,7 +19,7 @@ public interface SysRoleMenuMapper extends BaseMapper { * * @return 结果 */ - public int checkMenuExistRole (Long menuId); + int checkMenuExistRole(Long menuId); /** * 通过角色ID删除角色和菜单关联 @@ -28,7 +28,7 @@ public interface SysRoleMenuMapper extends BaseMapper { * * @return 结果 */ - public int deleteRoleMenuByRoleId (Long roleId); + int deleteRoleMenuByRoleId(Long roleId); /** * 批量删除角色菜单关联信息 @@ -37,7 +37,7 @@ public interface SysRoleMenuMapper extends BaseMapper { * * @return 结果 */ - public int deleteRoleMenu (Long[] ids); + int deleteRoleMenu(Long[] ids); /** * 批量新增角色菜单信息 @@ -46,5 +46,5 @@ public interface SysRoleMenuMapper extends BaseMapper { * * @return 结果 */ - public int batchRoleMenu (List roleMenuList); + int batchRoleMenu(List roleMenuList); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysUserMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysUserMapper.java index e037b34..76c8952 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysUserMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysUserMapper.java @@ -19,7 +19,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 用户信息集合信息 */ - public List selectUserList (SysUser sysUser); + List selectUserList(SysUser sysUser); /** * 根据条件分页查询已配用户角色列表 @@ -28,7 +28,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 用户信息集合信息 */ - public List selectAllocatedList (SysUser user); + List selectAllocatedList(SysUser user); /** * 根据条件分页查询未分配用户角色列表 @@ -37,7 +37,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 用户信息集合信息 */ - public List selectUnallocatedList (SysUser user); + List selectUnallocatedList(SysUser user); /** * 通过用户名查询用户 @@ -46,7 +46,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 用户对象信息 */ - public SysUser selectUserByUserName (String userName); + SysUser selectUserByUserName(String userName); /** * 通过用户ID查询用户 @@ -55,7 +55,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 用户对象信息 */ - public SysUser selectUserById (Long userId); + SysUser selectUserById(Long userId); /** * 新增用户信息 @@ -64,7 +64,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 结果 */ - public int insertUser (SysUser user); + int insertUser(SysUser user); /** * 修改用户信息 @@ -73,7 +73,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 结果 */ - public int updateUser (SysUser user); + int updateUser(SysUser user); /** * 修改用户头像 @@ -83,7 +83,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 结果 */ - public int updateUserAvatar (@Param("userName") String userName, @Param("avatar") String avatar); + int updateUserAvatar(@Param("userName") String userName, @Param("avatar") String avatar); /** * 重置用户密码 @@ -93,7 +93,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 结果 */ - public int resetUserPwd (@Param("userName") String userName, @Param("password") String password); + int resetUserPwd(@Param("userName") String userName, @Param("password") String password); /** * 通过用户ID删除用户 @@ -102,7 +102,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 结果 */ - public int deleteUserById (Long userId); + int deleteUserById(Long userId); /** * 批量删除用户信息 @@ -111,7 +111,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 结果 */ - public int deleteUserByIds (Long[] userIds); + int deleteUserByIds(Long[] userIds); /** * 校验用户名称是否唯一 @@ -120,7 +120,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 结果 */ - public SysUser checkUserNameUnique (String userName); + SysUser checkUserNameUnique(String userName); /** * 校验手机号码是否唯一 @@ -129,7 +129,7 @@ public interface SysUserMapper extends BaseMapper { * * @return 结果 */ - public SysUser checkPhoneUnique (String phonenumber); + SysUser checkPhoneUnique(String phonenumber); /** * 校验email是否唯一 @@ -138,5 +138,5 @@ public interface SysUserMapper extends BaseMapper { * * @return 结果 */ - public SysUser checkEmailUnique (String email); + SysUser checkEmailUnique(String email); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysUserPostMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysUserPostMapper.java index 8d09a47..db38b47 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysUserPostMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysUserPostMapper.java @@ -18,7 +18,7 @@ public interface SysUserPostMapper extends BaseMapper { * * @return 结果 */ - public int deleteUserPostByUserId (Long userId); + int deleteUserPostByUserId(Long userId); /** * 通过岗位ID查询岗位使用数量 @@ -27,7 +27,7 @@ public interface SysUserPostMapper extends BaseMapper { * * @return 结果 */ - public int countUserPostById (Long postId); + int countUserPostById(Long postId); /** * 批量删除用户和岗位关联 @@ -36,7 +36,7 @@ public interface SysUserPostMapper extends BaseMapper { * * @return 结果 */ - public int deleteUserPost (Long[] ids); + int deleteUserPost(Long[] ids); /** * 批量新增用户岗位信息 @@ -45,5 +45,5 @@ public interface SysUserPostMapper extends BaseMapper { * * @return 结果 */ - public int batchUserPost (List userPostList); + int batchUserPost(List userPostList); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysUserRoleMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysUserRoleMapper.java index 512adb8..c26f5fa 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysUserRoleMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysUserRoleMapper.java @@ -19,7 +19,7 @@ public interface SysUserRoleMapper extends BaseMapper { * * @return 结果 */ - public int deleteUserRoleByUserId (Long userId); + int deleteUserRoleByUserId(Long userId); /** * 批量删除用户和角色关联 @@ -28,7 +28,7 @@ public interface SysUserRoleMapper extends BaseMapper { * * @return 结果 */ - public int deleteUserRole (Long[] ids); + int deleteUserRole(Long[] ids); /** * 通过角色ID查询角色使用数量 @@ -37,7 +37,7 @@ public interface SysUserRoleMapper extends BaseMapper { * * @return 结果 */ - public int countUserRoleByRoleId (Long roleId); + int countUserRoleByRoleId(Long roleId); /** * 批量新增用户角色信息 @@ -46,7 +46,7 @@ public interface SysUserRoleMapper extends BaseMapper { * * @return 结果 */ - public int batchUserRole (List userRoleList); + int batchUserRole(List userRoleList); /** * 删除用户和角色关联信息 @@ -55,7 +55,7 @@ public interface SysUserRoleMapper extends BaseMapper { * * @return 结果 */ - public int deleteUserRoleInfo (SysUserRole userRole); + int deleteUserRoleInfo(SysUserRole userRole); /** * 批量取消授权用户角色 @@ -65,5 +65,5 @@ public interface SysUserRoleMapper extends BaseMapper { * * @return 结果 */ - public int deleteUserRoleInfos (@Param("roleId") Long roleId, @Param("userIds") Long[] userIds); + int deleteUserRoleInfos(@Param("roleId") Long roleId, @Param("userIds") Long[] userIds); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysConfigService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysConfigService.java index f23d67e..4ebc241 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysConfigService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysConfigService.java @@ -35,10 +35,10 @@ public interface SysConfigService extends IService { /** * 清空参数缓存数据 */ - public void clearConfigCache (); + void clearConfigCache(); /** * 加载参数缓存数据 */ - public void loadingConfigCache (); + void loadingConfigCache(); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDeptService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDeptService.java index 140cf91..e3d0b28 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDeptService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDeptService.java @@ -19,7 +19,7 @@ public interface SysDeptService extends IService { * * @return 部门信息集合 */ - public List selectDeptList (SysDept dept); + List selectDeptList(SysDept dept); /** * 查询部门树结构信息 @@ -28,7 +28,7 @@ public interface SysDeptService extends IService { * * @return 部门树信息集合 */ - public List selectDeptTreeList (SysDept dept); + List selectDeptTreeList(SysDept dept); /** * 构建前端所需要树结构 @@ -37,7 +37,7 @@ public interface SysDeptService extends IService { * * @return 树结构列表 */ - public List buildDeptTree (List depts); + List buildDeptTree(List depts); /** * 构建前端所需要下拉树结构 @@ -46,7 +46,7 @@ public interface SysDeptService extends IService { * * @return 下拉树结构列表 */ - public List buildDeptTreeSelect (List depts); + List buildDeptTreeSelect(List depts); /** * 根据角色ID查询部门树信息 @@ -55,7 +55,7 @@ public interface SysDeptService extends IService { * * @return 选中部门列表 */ - public List selectDeptListByRoleId (Long roleId); + List selectDeptListByRoleId(Long roleId); /** * 根据部门ID查询信息 @@ -64,7 +64,7 @@ public interface SysDeptService extends IService { * * @return 部门信息 */ - public SysDept selectDeptById (Long deptId); + SysDept selectDeptById(Long deptId); /** * 根据ID查询所有子部门(正常状态) @@ -73,7 +73,7 @@ public interface SysDeptService extends IService { * * @return 子部门数 */ - public int selectNormalChildrenDeptById (Long deptId); + int selectNormalChildrenDeptById(Long deptId); /** * 是否存在部门子节点 @@ -82,7 +82,7 @@ public interface SysDeptService extends IService { * * @return 结果 */ - public boolean hasChildByDeptId (Long deptId); + boolean hasChildByDeptId(Long deptId); /** * 查询部门是否存在用户 @@ -91,7 +91,7 @@ public interface SysDeptService extends IService { * * @return 结果 true 存在 false 不存在 */ - public boolean checkDeptExistUser (Long deptId); + boolean checkDeptExistUser(Long deptId); /** * 校验部门名称是否唯一 @@ -100,14 +100,14 @@ public interface SysDeptService extends IService { * * @return 结果 */ - public boolean checkDeptNameUnique (SysDept dept); + boolean checkDeptNameUnique(SysDept dept); /** * 校验部门是否有数据权限 * * @param deptId 部门id */ - public void checkDeptDataScope (Long deptId); + void checkDeptDataScope(Long deptId); /** * 新增保存部门信息 @@ -116,7 +116,7 @@ public interface SysDeptService extends IService { * * @return 结果 */ - public int insertDept (SysDept dept); + int insertDept(SysDept dept); /** * 修改保存部门信息 @@ -125,7 +125,7 @@ public interface SysDeptService extends IService { * * @return 结果 */ - public int updateDept (SysDept dept); + int updateDept(SysDept dept); /** * 删除部门管理信息 @@ -134,5 +134,5 @@ public interface SysDeptService extends IService { * * @return 结果 */ - public int deleteDeptById (Long deptId); + int deleteDeptById(Long deptId); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDictDataService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDictDataService.java index 47aae4b..9fae9bc 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDictDataService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDictDataService.java @@ -18,7 +18,7 @@ public interface SysDictDataService extends IService { * * @return 字典数据集合信息 */ - public List selectDictDataList (SysDictData dictData); + List selectDictDataList(SysDictData dictData); /** * 根据字典类型和字典键值查询字典数据信息 @@ -28,7 +28,7 @@ public interface SysDictDataService extends IService { * * @return 字典标签 */ - public String selectDictLabel (String dictType, String dictValue); + String selectDictLabel(String dictType, String dictValue); /** * 根据字典数据ID查询信息 @@ -37,14 +37,14 @@ public interface SysDictDataService extends IService { * * @return 字典数据 */ - public SysDictData selectDictDataById (Long dictCode); + SysDictData selectDictDataById(Long dictCode); /** * 批量删除字典数据信息 * * @param dictCodes 需要删除的字典数据ID */ - public void deleteDictDataByIds (Long[] dictCodes); + void deleteDictDataByIds(Long[] dictCodes); /** * 新增保存字典数据信息 @@ -53,7 +53,7 @@ public interface SysDictDataService extends IService { * * @return 结果 */ - public int insertDictData (SysDictData dictData); + int insertDictData(SysDictData dictData); /** * 修改保存字典数据信息 @@ -62,5 +62,5 @@ public interface SysDictDataService extends IService { * * @return 结果 */ - public int updateDictData (SysDictData dictData); + int updateDictData(SysDictData dictData); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDictTypeService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDictTypeService.java index 1b3212d..b78947e 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDictTypeService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDictTypeService.java @@ -19,14 +19,14 @@ public interface SysDictTypeService extends IService { * * @return 字典类型集合信息 */ - public List selectDictTypeList (SysDictType dictType); + List selectDictTypeList(SysDictType dictType); /** * 根据所有字典类型 * * @return 字典类型集合信息 */ - public List selectDictTypeAll (); + List selectDictTypeAll(); /** * 根据字典类型查询字典数据 @@ -35,7 +35,7 @@ public interface SysDictTypeService extends IService { * * @return 字典数据集合信息 */ - public List selectDictDataByType (String dictType); + List selectDictDataByType(String dictType); /** * 根据字典类型ID查询信息 @@ -44,7 +44,7 @@ public interface SysDictTypeService extends IService { * * @return 字典类型 */ - public SysDictType selectDictTypeById (Long dictId); + SysDictType selectDictTypeById(Long dictId); /** * 根据字典类型查询信息 @@ -53,29 +53,29 @@ public interface SysDictTypeService extends IService { * * @return 字典类型 */ - public SysDictType selectDictTypeByType (String dictType); + SysDictType selectDictTypeByType(String dictType); /** * 批量删除字典信息 * * @param dictIds 需要删除的字典ID */ - public void deleteDictTypeByIds (Long[] dictIds); + void deleteDictTypeByIds(Long[] dictIds); /** * 加载字典缓存数据 */ - public void loadingDictCache (); + void loadingDictCache(); /** * 清空字典缓存数据 */ - public void clearDictCache (); + void clearDictCache(); /** * 重置字典缓存数据 */ - public void resetDictCache (); + void resetDictCache(); /** * 新增保存字典类型信息 @@ -84,7 +84,7 @@ public interface SysDictTypeService extends IService { * * @return 结果 */ - public int insertDictType (SysDictType dictType); + int insertDictType(SysDictType dictType); /** * 修改保存字典类型信息 @@ -93,7 +93,7 @@ public interface SysDictTypeService extends IService { * * @return 结果 */ - public int updateDictType (SysDictType dictType); + int updateDictType(SysDictType dictType); /** * 校验字典类型称是否唯一 @@ -102,5 +102,5 @@ public interface SysDictTypeService extends IService { * * @return 结果 */ - public boolean checkDictTypeUnique (SysDictType dictType); + boolean checkDictTypeUnique(SysDictType dictType); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysLogininforService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysLogininforService.java index bb3031e..a94e129 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysLogininforService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysLogininforService.java @@ -16,7 +16,7 @@ public interface SysLogininforService extends IService { * * @param logininfor 访问日志对象 */ - public int insertLogininfor (SysLogininfor logininfor); + int insertLogininfor(SysLogininfor logininfor); /** * 查询系统登录日志集合 @@ -25,7 +25,7 @@ public interface SysLogininforService extends IService { * * @return 登录记录集合 */ - public List selectLogininforList (SysLogininfor logininfor); + List selectLogininforList(SysLogininfor logininfor); /** * 批量删除系统登录日志 @@ -34,10 +34,10 @@ public interface SysLogininforService extends IService { * * @return 结果 */ - public int deleteLogininforByIds (Long[] infoIds); + int deleteLogininforByIds(Long[] infoIds); /** * 清空系统登录日志 */ - public void cleanLogininfor (); + void cleanLogininfor(); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysMenuService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysMenuService.java index 29bfb07..70b7733 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysMenuService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysMenuService.java @@ -21,7 +21,7 @@ public interface SysMenuService extends IService { * * @return 菜单列表 */ - public List selectMenuList (Long userId); + List selectMenuList(Long userId); /** * 根据用户查询系统菜单列表 @@ -31,7 +31,7 @@ public interface SysMenuService extends IService { * * @return 菜单列表 */ - public List selectMenuList (SysMenu menu, Long userId); + List selectMenuList(SysMenu menu, Long userId); /** * 根据用户ID查询权限 @@ -40,7 +40,7 @@ public interface SysMenuService extends IService { * * @return 权限列表 */ - public Set selectMenuPermsByUserId (Long userId); + Set selectMenuPermsByUserId(Long userId); /** * 根据角色ID查询权限 @@ -49,7 +49,7 @@ public interface SysMenuService extends IService { * * @return 权限列表 */ - public Set selectMenuPermsByRoleId (Long roleId); + Set selectMenuPermsByRoleId(Long roleId); /** * 根据用户ID查询菜单树信息 @@ -58,7 +58,7 @@ public interface SysMenuService extends IService { * * @return 菜单列表 */ - public List selectMenuTreeByUserId (Long userId); + List selectMenuTreeByUserId(Long userId); /** * 根据角色ID查询菜单树信息 @@ -67,7 +67,7 @@ public interface SysMenuService extends IService { * * @return 选中菜单列表 */ - public List selectMenuListByRoleId (Long roleId); + List selectMenuListByRoleId(Long roleId); /** * 构建前端路由所需要的菜单 @@ -76,7 +76,7 @@ public interface SysMenuService extends IService { * * @return 路由列表 */ - public List buildMenus (List menus); + List buildMenus(List menus); /** * 构建前端所需要树结构 @@ -85,7 +85,7 @@ public interface SysMenuService extends IService { * * @return 树结构列表 */ - public List buildMenuTree (List menus); + List buildMenuTree(List menus); /** * 构建前端所需要下拉树结构 @@ -94,7 +94,7 @@ public interface SysMenuService extends IService { * * @return 下拉树结构列表 */ - public List buildMenuTreeSelect (List menus); + List buildMenuTreeSelect(List menus); /** * 根据菜单ID查询信息 @@ -103,7 +103,7 @@ public interface SysMenuService extends IService { * * @return 菜单信息 */ - public SysMenu selectMenuById (Long menuId); + SysMenu selectMenuById(Long menuId); /** * 是否存在菜单子节点 @@ -112,7 +112,7 @@ public interface SysMenuService extends IService { * * @return 结果 true 存在 false 不存在 */ - public boolean hasChildByMenuId (Long menuId); + boolean hasChildByMenuId(Long menuId); /** * 查询菜单是否存在角色 @@ -121,7 +121,7 @@ public interface SysMenuService extends IService { * * @return 结果 true 存在 false 不存在 */ - public boolean checkMenuExistRole (Long menuId); + boolean checkMenuExistRole(Long menuId); /** * 新增保存菜单信息 @@ -130,7 +130,7 @@ public interface SysMenuService extends IService { * * @return 结果 */ - public int insertMenu (SysMenu menu); + int insertMenu(SysMenu menu); /** * 修改保存菜单信息 @@ -139,7 +139,7 @@ public interface SysMenuService extends IService { * * @return 结果 */ - public int updateMenu (SysMenu menu); + int updateMenu(SysMenu menu); /** * 删除菜单管理信息 @@ -148,7 +148,7 @@ public interface SysMenuService extends IService { * * @return 结果 */ - public int deleteMenuById (Long menuId); + int deleteMenuById(Long menuId); /** * 校验菜单名称是否唯一 @@ -157,5 +157,5 @@ public interface SysMenuService extends IService { * * @return 结果 */ - public boolean checkMenuNameUnique (SysMenu menu); + boolean checkMenuNameUnique(SysMenu menu); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysNoticeService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysNoticeService.java index a1afe02..a58ad23 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysNoticeService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysNoticeService.java @@ -18,7 +18,7 @@ public interface SysNoticeService extends IService { * * @return 公告信息 */ - public SysNotice selectNoticeById (Long noticeId); + SysNotice selectNoticeById(Long noticeId); /** * 查询公告列表 @@ -27,7 +27,7 @@ public interface SysNoticeService extends IService { * * @return 公告集合 */ - public List selectNoticeList (SysNotice notice); + List selectNoticeList(SysNotice notice); /** * 新增公告 @@ -36,7 +36,7 @@ public interface SysNoticeService extends IService { * * @return 结果 */ - public int insertNotice (SysNotice notice); + int insertNotice(SysNotice notice); /** * 修改公告 @@ -45,7 +45,7 @@ public interface SysNoticeService extends IService { * * @return 结果 */ - public int updateNotice (SysNotice notice); + int updateNotice(SysNotice notice); /** * 删除公告信息 @@ -54,7 +54,7 @@ public interface SysNoticeService extends IService { * * @return 结果 */ - public int deleteNoticeById (Long noticeId); + int deleteNoticeById(Long noticeId); /** * 批量删除公告信息 @@ -63,5 +63,5 @@ public interface SysNoticeService extends IService { * * @return 结果 */ - public int deleteNoticeByIds (Long[] noticeIds); + int deleteNoticeByIds(Long[] noticeIds); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysOperLogService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysOperLogService.java index 70b63ee..96d5a7d 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysOperLogService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysOperLogService.java @@ -18,7 +18,7 @@ public interface SysOperLogService extends IService { * * @return 结果 */ - public int insertOperlog (SysOperLog operLog); + int insertOperlog(SysOperLog operLog); /** * 查询系统操作日志集合 @@ -27,7 +27,7 @@ public interface SysOperLogService extends IService { * * @return 操作日志集合 */ - public List selectOperLogList (SysOperLog operLog); + List selectOperLogList(SysOperLog operLog); /** * 批量删除系统操作日志 @@ -36,7 +36,7 @@ public interface SysOperLogService extends IService { * * @return 结果 */ - public int deleteOperLogByIds (Long[] operIds); + int deleteOperLogByIds(Long[] operIds); /** * 查询操作日志详细 @@ -45,10 +45,10 @@ public interface SysOperLogService extends IService { * * @return 操作日志对象 */ - public SysOperLog selectOperLogById (Long operId); + SysOperLog selectOperLogById(Long operId); /** * 清空操作日志 */ - public void cleanOperLog (); + void cleanOperLog(); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysPermissionService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysPermissionService.java index 02e9d14..ad49156 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysPermissionService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysPermissionService.java @@ -17,7 +17,7 @@ public interface SysPermissionService { * * @return 角色权限信息 */ - public Set getRolePermission (SysUser user); + Set getRolePermission(SysUser user); /** * 获取菜单数据权限 @@ -26,5 +26,5 @@ public interface SysPermissionService { * * @return 菜单权限信息 */ - public Set getMenuPermission (SysUser user); + Set getMenuPermission(SysUser user); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysPostService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysPostService.java index fbd8677..0589f0d 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysPostService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysPostService.java @@ -18,14 +18,14 @@ public interface SysPostService extends IService { * * @return 岗位列表 */ - public List selectPostList (SysPost post); + List selectPostList(SysPost post); /** * 查询所有岗位 * * @return 岗位列表 */ - public List selectPostAll (); + List selectPostAll(); /** * 通过岗位ID查询岗位信息 @@ -34,7 +34,7 @@ public interface SysPostService extends IService { * * @return 角色对象信息 */ - public SysPost selectPostById (Long postId); + SysPost selectPostById(Long postId); /** * 根据用户ID获取岗位选择框列表 @@ -43,7 +43,7 @@ public interface SysPostService extends IService { * * @return 选中岗位ID列表 */ - public List selectPostListByUserId (Long userId); + List selectPostListByUserId(Long userId); /** * 校验岗位名称 @@ -52,7 +52,7 @@ public interface SysPostService extends IService { * * @return 结果 */ - public boolean checkPostNameUnique (SysPost post); + boolean checkPostNameUnique(SysPost post); /** * 校验岗位编码 @@ -61,7 +61,7 @@ public interface SysPostService extends IService { * * @return 结果 */ - public boolean checkPostCodeUnique (SysPost post); + boolean checkPostCodeUnique(SysPost post); /** * 通过岗位ID查询岗位使用数量 @@ -70,7 +70,7 @@ public interface SysPostService extends IService { * * @return 结果 */ - public int countUserPostById (Long postId); + int countUserPostById(Long postId); /** * 删除岗位信息 @@ -79,7 +79,7 @@ public interface SysPostService extends IService { * * @return 结果 */ - public int deletePostById (Long postId); + int deletePostById(Long postId); /** * 批量删除岗位信息 @@ -88,7 +88,7 @@ public interface SysPostService extends IService { * * @return 结果 */ - public int deletePostByIds (Long[] postIds); + int deletePostByIds(Long[] postIds); /** * 新增保存岗位信息 @@ -97,7 +97,7 @@ public interface SysPostService extends IService { * * @return 结果 */ - public int insertPost (SysPost post); + int insertPost(SysPost post); /** * 修改保存岗位信息 @@ -106,5 +106,5 @@ public interface SysPostService extends IService { * * @return 结果 */ - public int updatePost (SysPost post); + int updatePost(SysPost post); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysRoleService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysRoleService.java index 47009f8..5e2463e 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysRoleService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysRoleService.java @@ -20,7 +20,7 @@ public interface SysRoleService extends IService { * * @return 角色数据集合信息 */ - public List selectRoleList (SysRole role); + List selectRoleList(SysRole role); /** * 根据用户ID查询角色列表 @@ -29,7 +29,7 @@ public interface SysRoleService extends IService { * * @return 角色列表 */ - public List selectRolesByUserId (Long userId); + List selectRolesByUserId(Long userId); /** * 根据用户ID查询角色权限 @@ -38,14 +38,14 @@ public interface SysRoleService extends IService { * * @return 权限列表 */ - public Set selectRolePermissionByUserId (Long userId); + Set selectRolePermissionByUserId(Long userId); /** * 查询所有角色 * * @return 角色列表 */ - public List selectRoleAll (); + List selectRoleAll(); /** * 根据用户ID获取角色选择框列表 @@ -54,7 +54,7 @@ public interface SysRoleService extends IService { * * @return 选中角色ID列表 */ - public List selectRoleListByUserId (Long userId); + List selectRoleListByUserId(Long userId); /** * 通过角色ID查询角色 @@ -63,7 +63,7 @@ public interface SysRoleService extends IService { * * @return 角色对象信息 */ - public SysRole selectRoleById (Long roleId); + SysRole selectRoleById(Long roleId); /** * 校验角色名称是否唯一 @@ -72,7 +72,7 @@ public interface SysRoleService extends IService { * * @return 结果 */ - public boolean checkRoleNameUnique (SysRole role); + boolean checkRoleNameUnique(SysRole role); /** * 校验角色权限是否唯一 @@ -81,21 +81,21 @@ public interface SysRoleService extends IService { * * @return 结果 */ - public boolean checkRoleKeyUnique (SysRole role); + boolean checkRoleKeyUnique(SysRole role); /** * 校验角色是否允许操作 * * @param role 角色信息 */ - public void checkRoleAllowed (SysRole role); + void checkRoleAllowed(SysRole role); /** * 校验角色是否有数据权限 * * @param roleId 角色id */ - public void checkRoleDataScope (Long roleId); + void checkRoleDataScope(Long roleId); /** * 通过角色ID查询角色使用数量 @@ -104,7 +104,7 @@ public interface SysRoleService extends IService { * * @return 结果 */ - public int countUserRoleByRoleId (Long roleId); + int countUserRoleByRoleId(Long roleId); /** * 新增保存角色信息 @@ -113,7 +113,7 @@ public interface SysRoleService extends IService { * * @return 结果 */ - public int insertRole (SysRole role); + int insertRole(SysRole role); /** * 修改保存角色信息 @@ -122,7 +122,7 @@ public interface SysRoleService extends IService { * * @return 结果 */ - public int updateRole (SysRole role); + int updateRole(SysRole role); /** * 修改角色状态 @@ -131,7 +131,7 @@ public interface SysRoleService extends IService { * * @return 结果 */ - public int updateRoleStatus (SysRole role); + int updateRoleStatus(SysRole role); /** * 修改数据权限信息 @@ -140,7 +140,7 @@ public interface SysRoleService extends IService { * * @return 结果 */ - public int authDataScope (SysRole role); + int authDataScope(SysRole role); /** * 通过角色ID删除角色 @@ -149,7 +149,7 @@ public interface SysRoleService extends IService { * * @return 结果 */ - public int deleteRoleById (Long roleId); + int deleteRoleById(Long roleId); /** * 批量删除角色信息 @@ -158,7 +158,7 @@ public interface SysRoleService extends IService { * * @return 结果 */ - public int deleteRoleByIds (Long[] roleIds); + int deleteRoleByIds(Long[] roleIds); /** * 取消授权用户角色 @@ -167,7 +167,7 @@ public interface SysRoleService extends IService { * * @return 结果 */ - public int deleteAuthUser (SysUserRole userRole); + int deleteAuthUser(SysUserRole userRole); /** * 批量取消授权用户角色 @@ -177,7 +177,7 @@ public interface SysRoleService extends IService { * * @return 结果 */ - public int deleteAuthUsers (Long roleId, Long[] userIds); + int deleteAuthUsers(Long roleId, Long[] userIds); /** * 批量选择授权用户角色 @@ -187,5 +187,5 @@ public interface SysRoleService extends IService { * * @return 结果 */ - public int insertAuthUsers (Long roleId, Long[] userIds); + int insertAuthUsers(Long roleId, Long[] userIds); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysUserOnlineService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysUserOnlineService.java index 531735b..4a1f7f3 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysUserOnlineService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysUserOnlineService.java @@ -18,7 +18,7 @@ public interface SysUserOnlineService { * * @return 在线用户信息 */ - public SysUserOnline selectOnlineByIpaddr (String ipaddr, LoginUser user); + SysUserOnline selectOnlineByIpaddr(String ipaddr, LoginUser user); /** * 通过用户名称查询信息 @@ -28,7 +28,7 @@ public interface SysUserOnlineService { * * @return 在线用户信息 */ - public SysUserOnline selectOnlineByUserName (String userName, LoginUser user); + SysUserOnline selectOnlineByUserName(String userName, LoginUser user); /** * 通过登录地址/用户名称查询信息 @@ -39,7 +39,7 @@ public interface SysUserOnlineService { * * @return 在线用户信息 */ - public SysUserOnline selectOnlineByInfo (String ipaddr, String userName, LoginUser user); + SysUserOnline selectOnlineByInfo(String ipaddr, String userName, LoginUser user); /** * 设置在线用户信息 @@ -48,5 +48,5 @@ public interface SysUserOnlineService { * * @return 在线用户 */ - public SysUserOnline loginUserToUserOnline (LoginUser user); + SysUserOnline loginUserToUserOnline(LoginUser user); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysUserService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysUserService.java index f4c6167..0e25340 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysUserService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysUserService.java @@ -18,7 +18,7 @@ public interface SysUserService extends IService { * * @return 用户信息集合信息 */ - public List selectUserList (SysUser user); + List selectUserList(SysUser user); /** * 根据条件分页查询已分配用户角色列表 @@ -27,7 +27,7 @@ public interface SysUserService extends IService { * * @return 用户信息集合信息 */ - public List selectAllocatedList (SysUser user); + List selectAllocatedList(SysUser user); /** * 根据条件分页查询未分配用户角色列表 @@ -36,7 +36,7 @@ public interface SysUserService extends IService { * * @return 用户信息集合信息 */ - public List selectUnallocatedList (SysUser user); + List selectUnallocatedList(SysUser user); /** * 通过用户名查询用户 @@ -45,7 +45,7 @@ public interface SysUserService extends IService { * * @return 用户对象信息 */ - public SysUser selectUserByUserName (String userName); + SysUser selectUserByUserName(String userName); /** * 通过用户ID查询用户 @@ -54,7 +54,7 @@ public interface SysUserService extends IService { * * @return 用户对象信息 */ - public SysUser selectUserById (Long userId); + SysUser selectUserById(Long userId); /** * 根据用户ID查询用户所属角色组 @@ -63,7 +63,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public String selectUserRoleGroup (String userName); + String selectUserRoleGroup(String userName); /** * 根据用户ID查询用户所属岗位组 @@ -72,7 +72,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public String selectUserPostGroup (String userName); + String selectUserPostGroup(String userName); /** * 校验用户名称是否唯一 @@ -81,7 +81,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public boolean checkUserNameUnique (SysUser user); + boolean checkUserNameUnique(SysUser user); /** * 校验手机号码是否唯一 @@ -90,7 +90,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public boolean checkPhoneUnique (SysUser user); + boolean checkPhoneUnique(SysUser user); /** * 校验email是否唯一 @@ -99,21 +99,21 @@ public interface SysUserService extends IService { * * @return 结果 */ - public boolean checkEmailUnique (SysUser user); + boolean checkEmailUnique(SysUser user); /** * 校验用户是否允许操作 * * @param user 用户信息 */ - public void checkUserAllowed (SysUser user); + void checkUserAllowed(SysUser user); /** * 校验用户是否有数据权限 * * @param userId 用户id */ - public void checkUserDataScope (Long userId); + void checkUserDataScope(Long userId); /** * 新增用户信息 @@ -122,7 +122,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public int insertUser (SysUser user); + int insertUser(SysUser user); /** * 注册用户信息 @@ -131,7 +131,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public boolean registerUser (SysUser user); + boolean registerUser(SysUser user); /** * 修改用户信息 @@ -140,7 +140,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public int updateUser (SysUser user); + int updateUser(SysUser user); /** * 用户授权角色 @@ -148,7 +148,7 @@ public interface SysUserService extends IService { * @param userId 用户ID * @param roleIds 角色组 */ - public void insertUserAuth (Long userId, Long[] roleIds); + void insertUserAuth(Long userId, Long[] roleIds); /** * 修改用户状态 @@ -157,7 +157,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public int updateUserStatus (SysUser user); + int updateUserStatus(SysUser user); /** * 修改用户基本信息 @@ -166,7 +166,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public int updateUserProfile (SysUser user); + int updateUserProfile(SysUser user); /** * 修改用户头像 @@ -176,7 +176,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public boolean updateUserAvatar (String userName, String avatar); + boolean updateUserAvatar(String userName, String avatar); /** * 重置用户密码 @@ -185,7 +185,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public int resetPwd (SysUser user); + int resetPwd(SysUser user); /** * 重置用户密码 @@ -195,7 +195,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public int resetUserPwd (String userName, String password); + int resetUserPwd(String userName, String password); /** * 通过用户ID删除用户 @@ -204,7 +204,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public int deleteUserById (Long userId); + int deleteUserById(Long userId); /** * 批量删除用户信息 @@ -213,7 +213,7 @@ public interface SysUserService extends IService { * * @return 结果 */ - public int deleteUserByIds (Long[] userIds); + int deleteUserByIds(Long[] userIds); /** * 导入用户数据 @@ -224,5 +224,5 @@ public interface SysUserService extends IService { * * @return 结果 */ - public String importUser (List userList, Boolean isUpdateSupport, String operName); + String importUser(List userList, Boolean isUpdateSupport, String operName); } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysDeptServiceImpl.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysDeptServiceImpl.java index a55301b..6775b95 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysDeptServiceImpl.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysDeptServiceImpl.java @@ -301,7 +301,7 @@ public class SysDeptServiceImpl extends ServiceImpl impl List tlist = new ArrayList(); Iterator it = list.iterator(); while (it.hasNext()) { - SysDept n = (SysDept) it.next(); + SysDept n = it.next(); if (StringUtils.isNotNull(n.getParentId()) && n.getParentId().longValue() == t.getDeptId().longValue()) { tlist.add(n); } @@ -313,6 +313,6 @@ public class SysDeptServiceImpl extends ServiceImpl impl * 判断是否有子节点 */ private boolean hasChild (List list, SysDept t) { - return getChildList(list, t).size() > 0 ? true : false; + return getChildList(list, t).size() > 0; } } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysMenuServiceImpl.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysMenuServiceImpl.java index e4e2ec8..ac2190f 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysMenuServiceImpl.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysMenuServiceImpl.java @@ -204,7 +204,7 @@ public class SysMenuServiceImpl extends ServiceImpl impl List returnList = new ArrayList(); List tempList = menus.stream().map(SysMenu::getMenuId).collect(Collectors.toList()); for (Iterator iterator = menus.iterator() ; iterator.hasNext() ; ) { - SysMenu menu = (SysMenu) iterator.next(); + SysMenu menu = iterator.next(); // 如果是顶级节点, 遍历该父节点的所有子节点 if (!tempList.contains(menu.getParentId())) { recursionFn(menus, menu); @@ -426,7 +426,7 @@ public class SysMenuServiceImpl extends ServiceImpl impl public List getChildPerms (List list, int parentId) { List returnList = new ArrayList(); for (Iterator iterator = list.iterator() ; iterator.hasNext() ; ) { - SysMenu t = (SysMenu) iterator.next(); + SysMenu t = iterator.next(); // 一、根据传入的某个父节点ID,遍历该父节点的所有子节点 if (t.getParentId() == parentId) { recursionFn(list, t); @@ -460,7 +460,7 @@ public class SysMenuServiceImpl extends ServiceImpl impl List tlist = new ArrayList(); Iterator it = list.iterator(); while (it.hasNext()) { - SysMenu n = (SysMenu) it.next(); + SysMenu n = it.next(); if (n.getParentId().longValue() == t.getMenuId().longValue()) { tlist.add(n); }