From 0f636caea5a7d52f1ebd6db69eca34b91cb7793d Mon Sep 17 00:00:00 2001 From: jeesun Date: Wed, 12 Jun 2019 16:30:19 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=B8=80=E4=BA=9B=E7=BB=86=E8=8A=82?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/simon/common/domain/ResultCode.java | 3 +- .../simon/common/service/BasicService.java | 1 + .../main/java/com/simon/model/OauthUser.java | 34 ++++++++++-- .../com/simon/service/OauthUserService.java | 12 +++++ .../service/impl/OauthUserServiceImpl.java | 27 +++++++++- pom.xml | 4 +- .../common/aspect/UrlAuthorityAspect.java | 50 ++++++++++++++++-- .../com/simon/controller/BillController.java | 2 + .../simon/controller/OauthUserController.java | 33 ++++++++++-- .../simon/controller/SideMenuController.java | 11 +--- web/src/main/resources/messages.properties | 2 + .../main/resources/messages_en_US.properties | 2 + .../main/resources/messages_zh_CN.properties | 2 + web/src/main/resources/static/1.xlsx | Bin 4347 -> 4405 bytes .../templates/vue/authority/add.html | 13 +++-- .../templates/vue/authority/edit.html | 13 +++-- .../resources/templates/vue/bill/list.html | 4 +- .../templates/vue/fontAwesome/list.html | 2 +- .../templates/vue/newsInfo/list.html | 4 +- .../templates/vue/quartzJob/list.html | 4 +- .../resources/templates/vue/sideMenu/add.html | 24 ++++----- .../templates/vue/sideMenu/edit.html | 21 ++++---- .../templates/vue/sideMenu/list.html | 8 +-- .../templates/vue/sideMenu/subAdd.html | 45 ++++++++-------- .../templates/vue/sideMenu/subEdit.html | 40 +++++++------- 25 files changed, 256 insertions(+), 105 deletions(-) diff --git a/common/src/main/java/com/simon/common/domain/ResultCode.java b/common/src/main/java/com/simon/common/domain/ResultCode.java index 395a741..4f73945 100644 --- a/common/src/main/java/com/simon/common/domain/ResultCode.java +++ b/common/src/main/java/com/simon/common/domain/ResultCode.java @@ -19,7 +19,8 @@ public enum ResultCode { FAIL_PHONE_OR_EMAIL_EXISTS(500004, "手机号或邮箱已存在"), FAIL_INCORRECT_PASSWORD(500005, "密码错误"), ERROR_VERI_CODE(404001, "验证码错误"), - ERROR_INVALID_PHONE(404002, "手机号格式不正确"); + ERROR_INVALID_PHONE(404002, "手机号格式不正确"), + ERROR_FILE_NOT_FOUND(404003, "文件不存在"); private final int code; private final String msg; diff --git a/common/src/main/java/com/simon/common/service/BasicService.java b/common/src/main/java/com/simon/common/service/BasicService.java index fd115e1..622cf02 100644 --- a/common/src/main/java/com/simon/common/service/BasicService.java +++ b/common/src/main/java/com/simon/common/service/BasicService.java @@ -33,6 +33,7 @@ public interface BasicService { * @param modelList 记录列表 * @return 保存后的记录列表 */ + @Deprecated List save(List modelList); /** diff --git a/common/src/main/java/com/simon/model/OauthUser.java b/common/src/main/java/com/simon/model/OauthUser.java index e69bb55..ff7cc2a 100644 --- a/common/src/main/java/com/simon/model/OauthUser.java +++ b/common/src/main/java/com/simon/model/OauthUser.java @@ -3,6 +3,10 @@ package com.simon.model; import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson.serializer.ToStringSerializer; import com.fasterxml.jackson.annotation.JsonFormat; +import com.github.liaochong.myexcel.core.WorkbookType; +import com.github.liaochong.myexcel.core.annotation.ExcelColumn; +import com.github.liaochong.myexcel.core.annotation.ExcelTable; +import com.github.liaochong.myexcel.core.annotation.ExcludeColumn; import com.simon.common.config.AppConfig; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -20,16 +24,17 @@ import java.time.LocalDateTime; * @author SimonSun * @date 2018-09-12 **/ +@ExcelTable(sheetName = "用户", workbookType = WorkbookType.SXLSX, rowAccessWindowSize = 100, useFieldNameAsTitle = true) @ApiModel(description = "用户") @Data @EqualsAndHashCode(callSuper = false) @Entity @Table(name="t_users") public class OauthUser implements Serializable{ + @ExcludeColumn private static final long serialVersionUID = 4898481229724057581L; - private static final String TABLE_TITLE = "用户"; - + @ExcelColumn(title = "id", index = 0, convertToString = true) @JSONField(serializeUsing = ToStringSerializer.class) @ApiModelProperty(value = "id") @Id @@ -37,60 +42,73 @@ public class OauthUser implements Serializable{ @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; + @ExcludeColumn @JSONField(serializeUsing = ToStringSerializer.class) @ApiModelProperty(value = "创建人id") @Column(name = "create_by") private Long createBy; + @ExcludeColumn @JSONField(format = AppConfig.DATE_PATTERN_DATETIME) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = AppConfig.DATE_PATTERN_DATETIME, timezone = AppConfig.DATE_TIMEZONE) @ApiModelProperty(value = "创建时间") @Column(name = "create_date") private LocalDateTime createDate; + @ExcludeColumn @JSONField(serializeUsing = ToStringSerializer.class) @ApiModelProperty(value = "更新人id") @Column(name = "update_by") private Long updateBy; + @ExcludeColumn @JSONField(format = AppConfig.DATE_PATTERN_DATETIME) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = AppConfig.DATE_PATTERN_DATETIME, timezone = AppConfig.DATE_TIMEZONE) @ApiModelProperty(value = "更新时间") @Column(name = "update_date") private LocalDateTime updateDate; + @ExcelColumn(title = "用户名", index = 1) @ApiModelProperty(value = "用户名(昵称)") @Column(name = "username", nullable = false) private String username; + @ExcludeColumn @ApiModelProperty(value = "密码") @Column(name = "password", nullable = false) private String password; - @ApiModelProperty(value = "有效") + @ExcelColumn(title = "账号状态", index = 2) + @ApiModelProperty(value = "账号状态") @Column(name = "enabled", nullable = false) private Boolean enabled; + @ExcelColumn(title = "手机区号", index = 3) @ApiModelProperty(value = "手机区号") @Column(name = "area_code") private String areaCode; + @ExcelColumn(title = "手机号", index = 4) @ApiModelProperty(value = "手机号") @Column(name = "phone") private String phone; + @ExcelColumn(title = "邮箱", index = 5) @ApiModelProperty(value = "邮箱") @Column(name = "email") private String email; + @ExcelColumn(title = "地址", index = 6) @ApiModelProperty(value = "地址") @Column(name = "address") private String address; + @ExcelColumn(title = "年龄", index = 7) @ApiModelProperty(value = "年龄") @Column(name = "age") private Integer age; + @ExcelColumn(title = "生日", index = 8, dateFormatPattern = AppConfig.DATE_PATTERN_DAY) @JSONField(format = AppConfig.DATE_PATTERN_DAY) @DateTimeFormat(pattern = AppConfig.DATE_PATTERN_DAY) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = AppConfig.DATE_PATTERN_DAY, timezone = AppConfig.DATE_TIMEZONE) @@ -98,44 +116,54 @@ public class OauthUser implements Serializable{ @Column(name = "birth") private LocalDate birth; + @ExcelColumn(title = "头像", index = 9) @ApiModelProperty(value = "头像") @Column(name = "head_photo") private String headPhoto; + @ExcelColumn(title = "个人简介", index = 10) @ApiModelProperty(value = "个人简介") @Column(name = "person_brief") private String personBrief; + @ExcelColumn(title = "性别", index = 11) @ApiModelProperty(value = "性别[0:女,1:男]") @Column(name = "sex") private Boolean sex; + @ExcludeColumn @ApiModelProperty(value = "邀请码") @Column(name = "visit_card") private String visitCard; + @ExcludeColumn @ApiModelProperty(value = "登录方式") @Column(name = "login_type") private Integer loginType; + @ExcludeColumn @ApiModelProperty(value = "登录状态") @Column(name = "login_status") private String loginStatus; + @ExcludeColumn @JSONField(format = AppConfig.DATE_PATTERN_DATETIME) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = AppConfig.DATE_PATTERN_DATETIME, timezone = AppConfig.DATE_TIMEZONE) @ApiModelProperty(value = "登录时间") @Column(name = "login_date") private LocalDateTime loginDate; + @ExcludeColumn @ApiModelProperty(value = "角色") @Transient private String authorities; + @ExcludeColumn @ApiModelProperty(value = "创建人名称") @Transient private String createUser; + @ExcludeColumn @ApiModelProperty(value = "更新人名称") @Transient private String updateUser; diff --git a/common/src/main/java/com/simon/service/OauthUserService.java b/common/src/main/java/com/simon/service/OauthUserService.java index be589b8..4401a55 100644 --- a/common/src/main/java/com/simon/service/OauthUserService.java +++ b/common/src/main/java/com/simon/service/OauthUserService.java @@ -87,4 +87,16 @@ public interface OauthUserService extends BasicService { * @return 影响行数 */ int updatePasswordByUserId(Long userId, String newPassword); + + /** + * 批量保存 + * @param oauthUserList + */ + void batchSave(List oauthUserList); + + /** + * 批量更新 + * @param oauthUserList + */ + void batchUpdate(List oauthUserList); } diff --git a/common/src/main/java/com/simon/service/impl/OauthUserServiceImpl.java b/common/src/main/java/com/simon/service/impl/OauthUserServiceImpl.java index bf11f83..b8d3bdd 100644 --- a/common/src/main/java/com/simon/service/impl/OauthUserServiceImpl.java +++ b/common/src/main/java/com/simon/service/impl/OauthUserServiceImpl.java @@ -12,7 +12,6 @@ import com.simon.common.utils.BeanUtils; import com.simon.common.utils.UsernameUtil; import com.simon.common.utils.ValidUtil; import com.simon.dto.AuthorityDto; -import com.simon.dto.StatisticDto; import com.simon.mapper.AuthorityMapper; import com.simon.mapper.OauthUserMapper; import com.simon.model.Authority; @@ -24,6 +23,9 @@ import com.simon.service.SmsService; import lombok.extern.slf4j.Slf4j; import lombok.var; import org.apache.commons.lang3.StringUtils; +import org.apache.ibatis.session.ExecutorType; +import org.apache.ibatis.session.SqlSession; +import org.apache.ibatis.session.SqlSessionFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.cache.Cache; @@ -49,6 +51,9 @@ import java.util.Map; @Service @Transactional(rollbackFor = {Exception.class}) public class OauthUserServiceImpl implements OauthUserService { + @Autowired + private SqlSessionFactory sqlSessionFactory; + @Autowired private OauthUserMapper oauthUserMapper; @@ -421,4 +426,24 @@ public class OauthUserServiceImpl implements OauthUserService { public int updatePasswordByUserId(Long userId, String newPassword) { return oauthUserMapper.updatePasswordByUserId(userId, newPassword); } + + @Override + public void batchSave(List oauthUserList) { + SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH); + OauthUserMapper mapper = sqlSession.getMapper(OauthUserMapper.class); + for (OauthUser oauthUser : oauthUserList) { + mapper.insert(oauthUser); + } + sqlSession.commit(); + } + + @Override + public void batchUpdate(List oauthUserList) { + SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH); + OauthUserMapper mapper = sqlSession.getMapper(OauthUserMapper.class); + for (OauthUser oauthUser : oauthUserList) { + mapper.updateByPrimaryKeySelective(oauthUser); + } + sqlSession.commit(); + } } \ No newline at end of file diff --git a/pom.xml b/pom.xml index 75c15f8..81ceaef 100644 --- a/pom.xml +++ b/pom.xml @@ -310,7 +310,7 @@ com.github.pagehelper pagehelper-spring-boot-starter - 1.2.10 + 1.2.12 @@ -465,7 +465,7 @@ com.github.liaochong myexcel - 2.4.0-1 + 2.5.0 diff --git a/web/src/main/java/com/simon/common/aspect/UrlAuthorityAspect.java b/web/src/main/java/com/simon/common/aspect/UrlAuthorityAspect.java index 907c0b8..c7315a7 100644 --- a/web/src/main/java/com/simon/common/aspect/UrlAuthorityAspect.java +++ b/web/src/main/java/com/simon/common/aspect/UrlAuthorityAspect.java @@ -45,23 +45,63 @@ public class UrlAuthorityAspect { /** * 创建Pointcut表示式,表示所有controller请求 */ - @Pointcut("execution(* com..*.controller..*(..)) && (@annotation(org.springframework.web.bind.annotation.GetMapping))") + @Pointcut("execution(* com..*.controller..*(..))" + + " && (@annotation(org.springframework.web.bind.annotation.GetMapping))" + + " && (!@annotation(javax.annotation.security.PermitAll))" + + " && (!@annotation(javax.annotation.security.RolesAllowed))" + + " && (!@annotation(javax.annotation.security.DenyAll))" + + " && (!@annotation(org.springframework.security.access.prepost.PreAuthorize))" + + " && (!@annotation(org.springframework.security.access.prepost.PostAuthorize))" + + " && (!@annotation(org.springframework.security.access.prepost.PreFilter))" + + " && (!@annotation(org.springframework.security.access.annotation.Secured))") private void getMappingAspect() { }// 请求method前打印内容 - @Pointcut("execution(* com..*.controller..*(..)) && (@annotation(org.springframework.web.bind.annotation.PostMapping))") + @Pointcut("execution(* com..*.controller..*(..))" + + " && (@annotation(org.springframework.web.bind.annotation.PostMapping))" + + " && (!@annotation(javax.annotation.security.PermitAll))" + + " && (!@annotation(javax.annotation.security.RolesAllowed))" + + " && (!@annotation(javax.annotation.security.DenyAll))" + + " && (!@annotation(org.springframework.security.access.prepost.PreAuthorize))" + + " && (!@annotation(org.springframework.security.access.prepost.PostAuthorize))" + + " && (!@annotation(org.springframework.security.access.prepost.PreFilter))" + + " && (!@annotation(org.springframework.security.access.annotation.Secured))") private void postMappingAspect() { } - @Pointcut("execution(* com..*.controller..*(..)) && (@annotation(org.springframework.web.bind.annotation.DeleteMapping))") + @Pointcut("execution(* com..*.controller..*(..))" + + " && (@annotation(org.springframework.web.bind.annotation.DeleteMapping))" + + " && (!@annotation(javax.annotation.security.PermitAll))" + + " && (!@annotation(javax.annotation.security.RolesAllowed))" + + " && (!@annotation(javax.annotation.security.DenyAll))" + + " && (!@annotation(org.springframework.security.access.prepost.PreAuthorize))" + + " && (!@annotation(org.springframework.security.access.prepost.PostAuthorize))" + + " && (!@annotation(org.springframework.security.access.prepost.PreFilter))" + + " && (!@annotation(org.springframework.security.access.annotation.Secured))") private void deleteMappingAspect() { } - @Pointcut("execution(* com..*.controller..*(..)) && (@annotation(org.springframework.web.bind.annotation.PatchMapping))") + @Pointcut("execution(* com..*.controller..*(..))" + + " && (@annotation(org.springframework.web.bind.annotation.PatchMapping))" + + " && (!@annotation(javax.annotation.security.PermitAll))" + + " && (!@annotation(javax.annotation.security.RolesAllowed))" + + " && (!@annotation(javax.annotation.security.DenyAll))" + + " && (!@annotation(org.springframework.security.access.prepost.PreAuthorize))" + + " && (!@annotation(org.springframework.security.access.prepost.PostAuthorize))" + + " && (!@annotation(org.springframework.security.access.prepost.PreFilter))" + + " && (!@annotation(org.springframework.security.access.annotation.Secured))") private void patchMappingAspect() { } - @Pointcut("execution(* com..*.controller..*(..)) && (@annotation(org.springframework.web.bind.annotation.RequestMapping))") + @Pointcut("execution(* com..*.controller..*(..))" + + " && (@annotation(org.springframework.web.bind.annotation.RequestMapping))" + + " && (!@annotation(javax.annotation.security.PermitAll))" + + " && (!@annotation(javax.annotation.security.RolesAllowed))" + + " && (!@annotation(javax.annotation.security.DenyAll))" + + " && (!@annotation(org.springframework.security.access.prepost.PreAuthorize))" + + " && (!@annotation(org.springframework.security.access.prepost.PostAuthorize))" + + " && (!@annotation(org.springframework.security.access.prepost.PreFilter))" + + " && (!@annotation(org.springframework.security.access.annotation.Secured))") private void requestMappingAspect() { } diff --git a/web/src/main/java/com/simon/controller/BillController.java b/web/src/main/java/com/simon/controller/BillController.java index d8c3c0e..51d34c4 100644 --- a/web/src/main/java/com/simon/controller/BillController.java +++ b/web/src/main/java/com/simon/controller/BillController.java @@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import springfox.documentation.annotations.ApiIgnore; +import javax.annotation.security.PermitAll; import java.util.LinkedHashMap; import java.util.Locale; import java.util.Map; @@ -48,6 +49,7 @@ public class BillController extends BaseController { return "vue/bill/list"; } + @PermitAll @ApiIgnore @ApiOperation(value = "列表数据") @GetMapping("data") diff --git a/web/src/main/java/com/simon/controller/OauthUserController.java b/web/src/main/java/com/simon/controller/OauthUserController.java index 6fdc8b5..c53842c 100644 --- a/web/src/main/java/com/simon/controller/OauthUserController.java +++ b/web/src/main/java/com/simon/controller/OauthUserController.java @@ -1,5 +1,8 @@ package com.simon.controller; +import com.github.liaochong.myexcel.core.DefaultExcelBuilder; +import com.github.liaochong.myexcel.core.DefaultExcelReader; +import com.github.liaochong.myexcel.utils.AttachmentExportUtil; import com.simon.common.config.AppConfig; import com.simon.common.controller.BaseController; import com.simon.common.domain.EasyUIDataGridResult; @@ -17,6 +20,7 @@ import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import lombok.extern.slf4j.Slf4j; import lombok.var; +import org.apache.poi.ss.usermodel.Workbook; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -33,8 +37,13 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.io.IOException; +import java.nio.file.Path; +import java.nio.file.Paths; import java.time.LocalDateTime; -import java.util.*; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; /** * 用户表 @@ -187,16 +196,30 @@ public class OauthUserController extends BaseController { @ApiIgnore @ApiOperation(value = "导出") @GetMapping("export") - public void exportExcel(HttpServletRequest request, HttpServletResponse response) { - + public void exportExcel(HttpServletRequest request, HttpServletResponse response) throws IOException { + List oauthUsers = oauthUserService.findAll(); + Workbook workbook = DefaultExcelBuilder.of(OauthUser.class) + .build(oauthUsers); + AttachmentExportUtil.export(workbook, "用户信息", response); } @ApiIgnore @ApiOperation(value = "导入") @GetMapping("import") @ResponseBody - public ResultMsg importExcel() { - return ResultMsg.success(); + public ResponseEntity importExcel() throws Exception { + /*Resource resource = new ClassPathResource("static/1.xlsx"); + if (!resource.exists()) { + return ResponseEntity.status(HttpStatus.NOT_FOUND).body(ResultMsg.fail(ResultCode.ERROR_FILE_NOT_FOUND)); + } + Path path = Paths.get(resource.getURI());*/ + Path path = Paths.get("D:\\1.xlsx"); + List result = DefaultExcelReader.of(OauthUser.class) + .sheet(0) + .rowFilter(row -> row.getRowNum() > 0) + .read(path.toFile()); + oauthUserService.batchUpdate(result); + return ResponseEntity.ok(ResultMsg.success()); } @ApiIgnore diff --git a/web/src/main/java/com/simon/controller/SideMenuController.java b/web/src/main/java/com/simon/controller/SideMenuController.java index 4610d1d..84f207b 100644 --- a/web/src/main/java/com/simon/controller/SideMenuController.java +++ b/web/src/main/java/com/simon/controller/SideMenuController.java @@ -156,20 +156,13 @@ public class SideMenuController extends BaseController { return ResultMsg.success(easyUiList); } - @DeleteMapping("/id/{id}") + @DeleteMapping("/delete") @ResponseBody - public ResultMsg deleteById(@PathVariable Long id) { + public ResultMsg deleteByIds(@RequestParam Long id) { sideMenuService.delete(id); return ResultMsg.success(); } - @DeleteMapping("/ids/{ids}") - @ResponseBody - public ResultMsg deleteByIds(@PathVariable String ids) { - sideMenuService.deleteByIds(ids); - return ResultMsg.success(); - } - @PatchMapping("edit") @ResponseBody public ResultMsg updateById(@RequestBody SideMenu body, Authentication authentication, Locale locale) { diff --git a/web/src/main/resources/messages.properties b/web/src/main/resources/messages.properties index 8ad8d21..46859f5 100644 --- a/web/src/main/resources/messages.properties +++ b/web/src/main/resources/messages.properties @@ -182,6 +182,8 @@ sideMenu.authorityName=\u83dc\u5355\u6743\u9650 sideMenu.level1Menu=\u4e00\u7ea7\u83dc\u5355\u540d\u79f0 sideMenu.addMenuGroup=\u65b0\u589e\u83dc\u5355\u7ec4 sideMenu.addChildMenu=\u65b0\u589e\u5b50\u83dc\u5355 +sideMenu.parentMenuName=\u7236\u83dc\u5355\u540d\u79f0 +sideMenu.authorities=\u83dc\u5355\u6743\u9650 dictType.name=\u5b57\u5178\u540d\u79f0 dictType.code=\u5b57\u5178\u7f16\u7801 diff --git a/web/src/main/resources/messages_en_US.properties b/web/src/main/resources/messages_en_US.properties index 7b9239e..8033490 100644 --- a/web/src/main/resources/messages_en_US.properties +++ b/web/src/main/resources/messages_en_US.properties @@ -182,6 +182,8 @@ sideMenu.authorityName=authority sideMenu.level1Menu=level1 menu sideMenu.addMenuGroup=add menu group sideMenu.addChildMenu=add child menu +sideMenu.parentMenuName=parent menu +sideMenu.authorities=authority dictType.name=dict name dictType.code=dict code diff --git a/web/src/main/resources/messages_zh_CN.properties b/web/src/main/resources/messages_zh_CN.properties index 8ad8d21..46859f5 100644 --- a/web/src/main/resources/messages_zh_CN.properties +++ b/web/src/main/resources/messages_zh_CN.properties @@ -182,6 +182,8 @@ sideMenu.authorityName=\u83dc\u5355\u6743\u9650 sideMenu.level1Menu=\u4e00\u7ea7\u83dc\u5355\u540d\u79f0 sideMenu.addMenuGroup=\u65b0\u589e\u83dc\u5355\u7ec4 sideMenu.addChildMenu=\u65b0\u589e\u5b50\u83dc\u5355 +sideMenu.parentMenuName=\u7236\u83dc\u5355\u540d\u79f0 +sideMenu.authorities=\u83dc\u5355\u6743\u9650 dictType.name=\u5b57\u5178\u540d\u79f0 dictType.code=\u5b57\u5178\u7f16\u7801 diff --git a/web/src/main/resources/static/1.xlsx b/web/src/main/resources/static/1.xlsx index 76329159a18c9c2de060f8077cf0c724fbfd25cb..22f4930f870287ad5433cdbd7f9fad8084d6a766 100644 GIT binary patch delta 2276 zcmZ8i2{ap67mf&$c0w|iu~v(yB?Qx0OHMPYBqyypi2=>grr?J*Bse(9%E$|3{T8-K? zml!NYlh5F$Rky1@;(NDOS><}UWALspvE~Aipm1o^>?HMq6tye=%08= z>82fGucurK&y%bY-o4lh=ka2BKOZ5^I;#>Vte7v{(Z(D^PVRjxGpd}l*O=W@3yUbUbUBddk}|cT^Lf3P~&Nsy!}24T;58n#Gd|6+8ofE(;}7o@v|YG$>e1*AJp&tI7DnS61)j9-dLK*U=|_ z3AF2%Pq)=1yDq}Xb-+$wyL|TZl~ggiQn3#yrFRo$;$QoP#O)4N;N;rx7f8UjQGsEz zZQqtHL-KQQHd}V0jO$z#cjxpdArrL6zj1Y!ukX6WU;^k3BT9vY@p{}%qvz_>`H3Bg z74}Pi6g*tFn7VO4*`}$B%_(03^p|n!q)wj{)pQ#&1V`M`sOS-_V`@rsAAbwBeGy_( zwqO2u<33y7M&K_>^tBDCZI$L!mgM4>QcyF~*h#a~UL#0ea>s1R{K4AnNC~0wP=uik zfPv?hfRC`(AE|T@`YtPZ%{Y5r{27R#BHqx3;&JnEIZH$xaK-jYeWblhJ$3Trm1 zKmeeJ<%j;NQD@}=p77BMj3O|DFLMTJxx`} zP7>_7!rS+`2)Zh_*k{kjChq5|o9ciecH3<-oe?;o> zDM>z1{O2Z;B&~_z27f{jw#HC@CTRGf2Aj?N^!d&GrJfJAz6|C;6z%r1gg!)m8~|%rQbMh5rDaHTjG;oDeP1p#={ea}j3-}|s94f1^?R=v zs(v?*alvi)I%)wc)MO!Px20vpu%t)`N0fHW{Z7N*Q*=c=cpWNEoiN+y=>xR zm7tw(hh(XBZ`Sh5MqH+9FU;p~bgot@mnXWzXM0VeTQfF^DLh%o6txz;A#d4QvRjh6 zo>6#O2{zp~bbW9_{fi9B0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xh=m({lL2ru==St>6b>xz zO}Md?@bH~jxdOPsF`=oB%ocgEouD5K07z~V&G&_c003dsy`l7Q>d8>OFdFs8+W+Pz z`1iPN?I4uPM(p}_k3xhZkS@-Rk@$%_f!Ki&mi+g7Q2&Wbli=pT&|GCC0&+u2==lpk C;=zXi diff --git a/web/src/main/resources/templates/vue/authority/add.html b/web/src/main/resources/templates/vue/authority/add.html index c285473..10fe494 100644 --- a/web/src/main/resources/templates/vue/authority/add.html +++ b/web/src/main/resources/templates/vue/authority/add.html @@ -7,7 +7,7 @@ - + - + - + - + - - + - + diff --git a/web/src/main/resources/templates/vue/newsInfo/list.html b/web/src/main/resources/templates/vue/newsInfo/list.html index 24c7cac..d600a2f 100644 --- a/web/src/main/resources/templates/vue/newsInfo/list.html +++ b/web/src/main/resources/templates/vue/newsInfo/list.html @@ -35,8 +35,8 @@ - - + - - + --> - - + + - - + + - - + + - - + + @@ -84,16 +84,16 @@ }, rules: { name: [ - {required: true, message: '菜单名称不能为空', trigger: 'blur'} + {required: true, message: [[#{sideMenu.name}]] + [[#{notEmpty}]], trigger: 'blur'} ], icon: [ - {required: true, message: '菜单图标不能为空', trigger: 'blur'} + {required: true, message: [[#{sideMenu.icon}]] + [[#{notEmpty}]], trigger: 'blur'} ], orderNum: [ - {required: true, message: '排序不能为空', trigger: 'blur'} + {required: true, message: [[#{orderNum}]] + [[#{notEmpty}]], trigger: 'blur'} ], authorities: [ - {required: true, message: "权限不能为空", trigger: "blur"} + {required: true, message: [[#{sideMenu.authorities}]] + [[#{notEmpty}]], trigger: "blur"} ] } }, diff --git a/web/src/main/resources/templates/vue/sideMenu/edit.html b/web/src/main/resources/templates/vue/sideMenu/edit.html index 6f431d3..881d0e0 100644 --- a/web/src/main/resources/templates/vue/sideMenu/edit.html +++ b/web/src/main/resources/templates/vue/sideMenu/edit.html @@ -10,14 +10,14 @@ - - + + - - + + - - + + @@ -68,13 +68,16 @@ }, rules: { name: [ - {required: true, message: '菜单名称不能为空', trigger: 'blur'} + {required: true, message: [[#{sideMenu.name}]] + [[#{notEmpty}]], trigger: 'blur'} ], icon: [ - {required: true, message: '菜单图标不能为空', trigger: 'blur'} + {required: true, message: [[#{sideMenu.icon}]] + [[#{notEmpty}]], trigger: 'blur'} ], orderNum: [ - {required: true, message: '排序不能为空', trigger: 'blur'} + {required: true, message: [[#{orderNum}]] + [[#{notEmpty}]], trigger: 'blur'} + ], + authorities: [ + {required: true, message: [[#{sideMenu.authorities}]] + [[#{notEmpty}]], trigger: "blur"} ] } }, diff --git a/web/src/main/resources/templates/vue/sideMenu/list.html b/web/src/main/resources/templates/vue/sideMenu/list.html index 9880a75..2f24dd8 100644 --- a/web/src/main/resources/templates/vue/sideMenu/list.html +++ b/web/src/main/resources/templates/vue/sideMenu/list.html @@ -1,6 +1,6 @@ - +