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