Commit 10837540 by baochunxin

#G:通知组修改路径

parent 022470b2
......@@ -59,7 +59,7 @@ public class SchoolNotificationGroupController extends BaseController {
* @param schoolNotificationGroup 查询实体
* @return 所有数据
*/
@GetMapping("list")
@GetMapping("/list")
public TableDataInfo selectAll(SchoolNotificationGroup schoolNotificationGroup) {
startPage();
QueryWrapper<SchoolNotificationGroup> schooWrapper = new QueryWrapper<>(
......@@ -73,8 +73,9 @@ public class SchoolNotificationGroupController extends BaseController {
* 根据分组id查询人员信息
*/
@GetMapping("getUserList/{notificationId}")
public AjaxResult selectOne(@PathVariable("notificationId") Long notificationId) {
@GetMapping("/getUserList/{notificationId}")
public TableDataInfo selectOne(@PathVariable("notificationId") Long notificationId) {
startPage();
LambdaQueryWrapper<SchoolNotificationUser> lqw = new LambdaQueryWrapper<>();
lqw.eq(SchoolNotificationUser::getNotificationId, notificationId);
List<SchoolNotificationUser> list = this.schoolNotificationUserService.list(lqw);
......@@ -83,7 +84,7 @@ public class SchoolNotificationGroupController extends BaseController {
SysUser sysUser = sysUserService.selectUserById(data.getUserId());
userList.add(sysUser);
});
return AjaxResult.success(userList);
return getDataTable(userList);
}
/**
......@@ -92,7 +93,7 @@ public class SchoolNotificationGroupController extends BaseController {
* @param id 主键
* @return 单条数据
*/
@GetMapping("selectOne/{id}")
@GetMapping("/selectOne/{id}")
public AjaxResult selectOne(@PathVariable Serializable id) {
return AjaxResult.success(this.schoolNotificationGroupService.getById(id));
}
......@@ -159,6 +160,12 @@ public class SchoolNotificationGroupController extends BaseController {
*/
@DeleteMapping("/deletes")
public AjaxResult delete(@RequestParam("idList") List<Long> idList) {
for (Long id :idList){
//1.删除相关人员
LambdaQueryWrapper<SchoolNotificationUser> user = new LambdaQueryWrapper<>();
user.eq(SchoolNotificationUser::getNotificationId,id);
schoolNotificationUserService.remove(user);
}
return AjaxResult.success(this.schoolNotificationGroupService.removeByIds(idList));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment