Forráskód Böngészése

Merge branch 'master' of http://47.100.37.243:10080/wutt/childrenLibraryBMS

sunyadv 5 éve
szülő
commit
c6f31f3077

+ 2 - 2
bms/src/main/java/com/hssx/bms/controller/InstitutionalInformationController.java

@@ -87,14 +87,14 @@ public class InstitutionalInformationController {
 
 
     /**
-     * 教育机构信息的背景图片的删除
+     * 教育机构信息列表
      * 参数:pageNum 当前页码,pageSize 每页条数
      * @return
      */
     @ApiOperation(value = "教育机构信息列表", notes = "教育机构信息列表方法")
     @RequestMapping("/list")
     @ResponseBody
-    public HttpRespMsg list(@RequestParam(required = false) PageUtil page){
+    public HttpRespMsg list(PageUtil page){
         HttpRespMsg msg = institutionalService.getInstitutionList(page);
         return msg;
     }

+ 6 - 1
bms/src/main/java/com/hssx/bms/service/impl/InstitutionalInformationServiceImpl.java

@@ -44,13 +44,18 @@ public class InstitutionalInformationServiceImpl extends ServiceImpl<Institution
     private String path;
     @Override
     public HttpRespMsg add(InstitutionalInformationVO institutionalInformationVO) {
+        HttpRespMsg msg = new HttpRespMsg();
         SystemUser institution = new SystemUser();
+        Integer count = systemUserMapper.selectCount(new QueryWrapper<SystemUser>().eq("account", institutionalInformationVO.getAccount()));
+        if(count > 0){
+            msg.setError("账号已存在!");
+            return msg;
+        }
         institution.setAccount(institutionalInformationVO.getAccount());
         institution.setRoleName(institutionalInformationVO.getName());
         institution.setPassword(MD5Util.getPassword("000000"));
         institution.setRoleType(1);
         systemUserMapper.insert(institution);
-        HttpRespMsg msg = new HttpRespMsg();
         InstitutionalInformation information = new InstitutionalInformation();
         BeanUtils.copyProperties(institutionalInformationVO,information);
         information.setSysId(institution.getId());

+ 1 - 0
bms/src/main/java/com/hssx/bms/until/MD5Util.java

@@ -26,6 +26,7 @@ public class MD5Util {
         int i = b.compareTo(a);
         int i1 = a.compareTo(b);
         System.out.println(i+":"+i1);
+        System.out.println(MD5Util.getPassword("000000"));
 //        zip4jDemo();
 
 //        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");