|
@@ -146,7 +146,7 @@ public class TbGroupController {
|
|
@SaCheckPermission(TbGroup.PERMISSION_CODE_EDIT)
|
|
@SaCheckPermission(TbGroup.PERMISSION_CODE_EDIT)
|
|
public AjaxJson setLeader(Long groupId,Long leaderId){
|
|
public AjaxJson setLeader(Long groupId,Long leaderId){
|
|
|
|
|
|
- Long loginId = StpUtil.getLoginIdAsLong();
|
|
|
|
|
|
+ Long loginId = StpUserUtil.getLoginIdAsLong();
|
|
|
|
|
|
TbGroup tbGroup = tbGroupService.getById(groupId);
|
|
TbGroup tbGroup = tbGroupService.getById(groupId);
|
|
TbPeople tbPeople = tbPeopleService.getById(leaderId);
|
|
TbPeople tbPeople = tbPeopleService.getById(leaderId);
|
|
@@ -179,9 +179,9 @@ public class TbGroupController {
|
|
*/
|
|
*/
|
|
@RequestMapping("groupAddPeople")
|
|
@RequestMapping("groupAddPeople")
|
|
@SaCheckPermission(TbGroup.PERMISSION_CODE_EDIT)
|
|
@SaCheckPermission(TbGroup.PERMISSION_CODE_EDIT)
|
|
- public AjaxJson GroupAddPeople(Long groupId,Long []peopleIds){
|
|
|
|
|
|
+ public AjaxJson AddGroupPeople(Long groupId,Long [] peopleIds){
|
|
|
|
|
|
- Long loginId = StpUtil.getLoginIdAsLong();
|
|
|
|
|
|
+ Long loginId = StpUserUtil.getLoginIdAsLong();
|
|
|
|
|
|
TbGroup tbGroup = tbGroupService.getById(groupId);
|
|
TbGroup tbGroup = tbGroupService.getById(groupId);
|
|
if (Objects.isNull(tbGroup)){
|
|
if (Objects.isNull(tbGroup)){
|
|
@@ -196,7 +196,7 @@ public class TbGroupController {
|
|
TbPeople tbPeople = tbPeopleService.getById(peopleId);
|
|
TbPeople tbPeople = tbPeopleService.getById(peopleId);
|
|
tbPeople.setGroupId(tbGroup.getId());
|
|
tbPeople.setGroupId(tbGroup.getId());
|
|
tbPeople.setGroupName(tbGroup.getName());
|
|
tbPeople.setGroupName(tbGroup.getName());
|
|
- tbGroup.setUpdateBy(String.valueOf(loginId));
|
|
|
|
|
|
+ tbPeople.setUpdateBy(String.valueOf(loginId));
|
|
tbPeopleService.updateById(tbPeople);
|
|
tbPeopleService.updateById(tbPeople);
|
|
});
|
|
});
|
|
return AjaxJson.getSuccess();
|
|
return AjaxJson.getSuccess();
|
|
@@ -209,9 +209,9 @@ public class TbGroupController {
|
|
*/
|
|
*/
|
|
@RequestMapping("groupDelPeople")
|
|
@RequestMapping("groupDelPeople")
|
|
@SaCheckPermission(TbGroup.PERMISSION_CODE_EDIT)
|
|
@SaCheckPermission(TbGroup.PERMISSION_CODE_EDIT)
|
|
- public AjaxJson GroupDelPeople(Long groupId,Long []peopleIds){
|
|
|
|
|
|
+ public AjaxJson DelGroupPeople(Long groupId,Long [] peopleIds){
|
|
|
|
|
|
- Long loginId = StpUtil.getLoginIdAsLong();
|
|
|
|
|
|
+ Long loginId = StpUserUtil.getLoginIdAsLong();
|
|
|
|
|
|
TbGroup tbGroup = tbGroupService.getById(groupId);
|
|
TbGroup tbGroup = tbGroupService.getById(groupId);
|
|
if (Objects.isNull(tbGroup)){
|
|
if (Objects.isNull(tbGroup)){
|
|
@@ -226,7 +226,7 @@ public class TbGroupController {
|
|
TbPeople tbPeople = tbPeopleService.getById(peopleId);
|
|
TbPeople tbPeople = tbPeopleService.getById(peopleId);
|
|
tbPeople.setGroupId(0L);
|
|
tbPeople.setGroupId(0L);
|
|
tbPeople.setGroupName("");
|
|
tbPeople.setGroupName("");
|
|
- tbGroup.setUpdateBy(String.valueOf(loginId));
|
|
|
|
|
|
+ tbPeople.setUpdateBy(String.valueOf(loginId));
|
|
tbPeopleService.updateById(tbPeople);
|
|
tbPeopleService.updateById(tbPeople);
|
|
});
|
|
});
|
|
return AjaxJson.getSuccess();
|
|
return AjaxJson.getSuccess();
|
|
@@ -239,15 +239,15 @@ public class TbGroupController {
|
|
*/
|
|
*/
|
|
@RequestMapping("isLock")
|
|
@RequestMapping("isLock")
|
|
@SaCheckPermission(TbGroup.PERMISSION_CODE_EDIT)
|
|
@SaCheckPermission(TbGroup.PERMISSION_CODE_EDIT)
|
|
- public AjaxJson isLock(Long id, Integer isLock) {
|
|
|
|
- Long loginId = StpUtil.getLoginIdAsLong();
|
|
|
|
- TbGroup tbGroup = tbGroupService.getById(id);
|
|
|
|
|
|
+ public AjaxJson isLock(TbGroup t) {
|
|
|
|
+ Long loginId = StpUserUtil.getLoginIdAsLong();
|
|
|
|
+ TbGroup tbGroup = tbGroupService.getById(t.getId());
|
|
if (Objects.isNull(tbGroup)) {
|
|
if (Objects.isNull(tbGroup)) {
|
|
return AjaxJson.getSuccess("该互助组不存在");
|
|
return AjaxJson.getSuccess("该互助组不存在");
|
|
}
|
|
}
|
|
- int line = SP.publicMapper.updateColumnById(TbGroup.TABLE_NAME, "is_lock", isLock, id);
|
|
|
|
tbGroup.setUpdateBy(String.valueOf(loginId));
|
|
tbGroup.setUpdateBy(String.valueOf(loginId));
|
|
- return AjaxJson.getByLine(line);
|
|
|
|
|
|
+ tbGroupService.update(t);
|
|
|
|
+ return AjaxJson.getSuccess();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|