|
@@ -21,6 +21,7 @@ import com.zanxiang.game.module.mybatis.mapper.GamePolicyConfigMapper;
|
|
|
import com.zanxiang.module.util.JsonUtil;
|
|
|
import com.zanxiang.module.util.exception.BaseException;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -83,6 +84,7 @@ public class GamePolicyConfigServiceImpl extends ServiceImpl<GamePolicyConfigMap
|
|
|
.type(param.getType())
|
|
|
.configParam(configParam)
|
|
|
.configExplain(param.getConfigExplain())
|
|
|
+ .userIds(CollectionUtils.isEmpty(param.getUserIds()) ? null : StringUtils.join(param.getUserIds().toArray(), ","))
|
|
|
.updateBy(sysUserId)
|
|
|
.updateTime(now)
|
|
|
.build();
|
|
@@ -130,6 +132,17 @@ public class GamePolicyConfigServiceImpl extends ServiceImpl<GamePolicyConfigMap
|
|
|
GameSupper gameSupper = gameSupperService.getById(vo.getSuperGameId());
|
|
|
GameDTO game = gameService.getById(vo.getSuperGameId());
|
|
|
String superGameName = null == gameSupper ? (null == game ? null : game.getName()) : gameSupper.getName();
|
|
|
+ //告警人员名称
|
|
|
+ StringBuilder userNameStr = new StringBuilder();
|
|
|
+ if (StringUtils.isNotBlank(vo.getUserIds())) {
|
|
|
+ String[] userIds = vo.getUserIds().split(",");
|
|
|
+ for (int i = 0; i < userIds.length; i++) {
|
|
|
+ userNameStr.append(sysUserRpc.getById(Long.valueOf(userIds[i])).getData().getNickname());
|
|
|
+ if (i != userIds.length -1) {
|
|
|
+ userNameStr.append(",");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
return GamePolicyConfigListVO.builder()
|
|
|
.id(vo.getId())
|
|
|
.superGameId(vo.getSuperGameId())
|
|
@@ -140,6 +153,7 @@ public class GamePolicyConfigServiceImpl extends ServiceImpl<GamePolicyConfigMap
|
|
|
.time(StringUtils.isBlank(time) ? null : Long.valueOf(time))
|
|
|
.timeCondition(StringUtils.isBlank(timeCondition) ? null : timeCondition)
|
|
|
.configExplain(vo.getConfigExplain())
|
|
|
+ .userNameStr(StringUtils.isBlank(userNameStr.toString()) ? null : userNameStr.toString())
|
|
|
.createBy(vo.getCreateBy())
|
|
|
.createName(sysUserRpc.getById(vo.getCreateBy()).getData().getNickname())
|
|
|
.createTime(vo.getCreateTime())
|