fix(team): 修复集体列表不显示的问题,设置createUser字段
This commit is contained in:
@@ -16,6 +16,7 @@ import org.springblade.modules.martial.service.IMartialTeamService;
|
|||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springblade.core.secure.utils.AuthUtil;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -34,6 +35,7 @@ public class MartialTeamServiceImpl extends ServiceImpl<MartialTeamMapper, Marti
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean saveTeamWithMembers(MartialTeam team, List<Long> memberIds) {
|
public boolean saveTeamWithMembers(MartialTeam team, List<Long> memberIds) {
|
||||||
team.setMemberCount(memberIds != null ? memberIds.size() : 0);
|
team.setMemberCount(memberIds != null ? memberIds.size() : 0);
|
||||||
|
team.setCreateUser(AuthUtil.getUserId());
|
||||||
boolean saved = this.save(team);
|
boolean saved = this.save(team);
|
||||||
|
|
||||||
if (saved && memberIds != null && !memberIds.isEmpty()) {
|
if (saved && memberIds != null && !memberIds.isEmpty()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user