|
@@ -8,7 +8,9 @@ import com.ruoyi.common.core.exception.ServiceException;
|
|
|
import com.ruoyi.common.core.utils.StringUtils;
|
|
|
import com.ruoyi.common.security.utils.SecurityUtils;
|
|
|
import com.ruoyi.system.domain.SysDeptJl;
|
|
|
+import com.ruoyi.system.domain.SysHljndsSqwh;
|
|
|
import com.ruoyi.system.mapper.SysDeptJlMapper;
|
|
|
+import com.ruoyi.system.mapper.SysHljndsSqwhMapper;
|
|
|
import com.ruoyi.system.utils.SubCodeUtil;
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -32,6 +34,9 @@ public class ZwywHldsXsxxServiceImpl implements IZwywHldsXsxxService
|
|
|
@Autowired
|
|
|
private SysDeptJlMapper sysDeptJlMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private SysHljndsSqwhMapper sysHljndsSqwhMapper;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 查询选手基础信息
|
|
@@ -43,7 +48,11 @@ public class ZwywHldsXsxxServiceImpl implements IZwywHldsXsxxService
|
|
|
public ZwywHldsXsxx selectZwywHldsXsxxById(String id)
|
|
|
{
|
|
|
ZwywHldsXsxx res = zwywHldsXsxxMapper.selectById(id);
|
|
|
-
|
|
|
+ SysHljndsSqwh sysHljndsSqwh = sysHljndsSqwhMapper.selectById(res.getSqwhId());
|
|
|
+ res.setMc(sysHljndsSqwh.getMc());
|
|
|
+ if (!res.getCreateUserId().equals(String.valueOf(SecurityUtils.getUserId()))){
|
|
|
+ throw new ServiceException("只允许维护自己创建的数据");
|
|
|
+ }
|
|
|
res.setSqMc(sysDeptJlMapper.getXzqhNames(res.getSq()));
|
|
|
res.setSq(sysDeptJlMapper.getXzqhCodes(res.getSq()));
|
|
|
return res;
|
|
@@ -63,7 +72,12 @@ public class ZwywHldsXsxxServiceImpl implements IZwywHldsXsxxService
|
|
|
}
|
|
|
zwywHldsXsxx.setCreateAreaCode(SubCodeUtil.getSubCode(SecurityUtils.getAreaCode()).get("level").toString());
|
|
|
List<ZwywHldsXsxx> res = zwywHldsXsxxMapper.selectZwywHldsXsxxList(zwywHldsXsxx);
|
|
|
- res.forEach(r -> r.setSqMc(sysDeptJlMapper.getXzqhNames(r.getSq()) + "赛区"));
|
|
|
+ res.forEach(r ->{
|
|
|
+ r.setSqMc(sysDeptJlMapper.getXzqhNames(r.getSq()) + "赛区");
|
|
|
+ ZwywHldsXsxx zwywHldsXsxx1 = zwywHldsXsxxMapper.selectById(r.getId());
|
|
|
+ r.setCjrId(zwywHldsXsxx1.getCreateUserId());
|
|
|
+ }
|
|
|
+ );
|
|
|
return res;
|
|
|
}
|
|
|
|