Browse Source

机构的删除

5 years ago
parent
commit
bd363c6639

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

@@ -61,8 +61,8 @@ public class InstitutionalInformationController {
     }
     /**
      * 教育机构信息的修改
-     * 参数:id 机构信息id,name 名称,address 地址,lng 经度 lat 纬度
-     *      phone 电话,amTime 上午上课时间,pmTime 下午上课时间,briefIntroductionPic 简介图片
+     * 参数:id 机构信息id,name 名称,address 地址,lng 经度 lat 纬度, headIntroduction 头部简介
+     *      phone 电话,amTime 上午上课时间,pmTime 下午上课时间, (file 上传的文件)非必传(简介图片)
      *      classAdvantages 课程特色,briefIntroduction 机构简介说明,file 简介图片文件,chargingStandard 收费标准
      * @return
      */
@@ -81,7 +81,7 @@ public class InstitutionalInformationController {
     @ApiOperation(value = "教育机构信息的背景图片的修改", notes = "教育机构信息的背景图片的修改")
     @RequestMapping("/updatePics")
     @ResponseBody
-    public HttpRespMsg updateInstitutionPics(Integer id, @RequestParam(required = false) MultipartFile[] file){
+    public HttpRespMsg updateInstitutionPnteics(Integer id, @RequestParam(required = false) MultipartFile[] file){
         HttpRespMsg msg = institutionalPicService.institutionalPicService(id,file);
         return msg;
     }

+ 4 - 3
bms/src/main/java/com/hssx/bms/service/impl/InstitutionalInformationServiceImpl.java

@@ -89,9 +89,9 @@ public class InstitutionalInformationServiceImpl extends ServiceImpl<Institution
                     e.printStackTrace();
                 }
             }
-            institutionalMapper.updateById(institutionalInformation);
-            msg.data = institutionalInformation;
         }
+        institutionalMapper.updateById(institutionalInformation);
+        msg.data = institutionalInformation;
         return msg;
     }
 
@@ -120,6 +120,7 @@ public class InstitutionalInformationServiceImpl extends ServiceImpl<Institution
     public HttpRespMsg addAccount(SystemUser systemUser) {
         HttpRespMsg msg = new HttpRespMsg();
         InstitutionalInformation information = new InstitutionalInformation();
+        InstitutionalInformation instution = institutionalMapper.selectById(systemUser.getId());
         information.setId(systemUser.getId());
         Integer count = systemUserMapper.selectCount(new QueryWrapper<SystemUser>().eq("account", systemUser.getAccount()));
         if(count > 0){
@@ -129,6 +130,7 @@ public class InstitutionalInformationServiceImpl extends ServiceImpl<Institution
         systemUser.setPassword(MD5Util.getPassword("000000"));
         systemUser.setRoleType(1);
         systemUser.setId(null);
+        systemUser.setRoleName(instution.getName());
         systemUserMapper.insert(systemUser);
         information.setSysId(systemUser.getId());
         institutionalMapper.updateById(information);
@@ -150,5 +152,4 @@ public class InstitutionalInformationServiceImpl extends ServiceImpl<Institution
         }
         return msg;
     }
-
 }