|
|
@ -225,16 +225,14 @@ public class ProvinceService implements IProvinceService { |
|
|
|
if (ObjectUtil.isNull(competeCompany)){ |
|
|
|
competeCompany = new ProvinceCompeteVo.CompeteCompany(); |
|
|
|
} |
|
|
|
|
|
|
|
return competeCompany; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public ProvinceCompeteVo.CompeteCompany changeCompany(CompeteDto.CompeteCompany param) { |
|
|
|
public ProvinceCompeteVo.CompeteCompany changeCompany(CompeteDto.CompeteCompany param, Long userId) { |
|
|
|
//判断当前单位id是否为空,
|
|
|
|
Long companyid = param.getCompanyId(); |
|
|
|
CompeteCompany competeCompany = new CompeteCompany(); |
|
|
|
ProvinceCompeteVo.CompeteCompany competeCompany1 = new ProvinceCompeteVo.CompeteCompany(); |
|
|
|
//单位id为空,新增
|
|
|
|
if (ObjectUtil.isNull(companyid)){ |
|
|
|
Long id = snowflake.nextId(); |
|
|
@ -245,14 +243,16 @@ public class ProvinceService implements IProvinceService { |
|
|
|
competeCompany.setContactsPhone(param.getContactsPhone()); |
|
|
|
competeCompany.setLeaderNum(param.getGuideNum()); |
|
|
|
competeCompany.setJoinNum(param.getPlayerNum()); |
|
|
|
competeCompany.setUserId(userId); |
|
|
|
competeCompany.setCompeteTimeId(param.getCompeteTimeId()); |
|
|
|
competeCompanyDao.insertSelective(competeCompany); |
|
|
|
//
|
|
|
|
competeCompany1.setCompanyId(competeCompany.getId()); |
|
|
|
competeCompany1.setCoachNum(competeCompany.getCoachNum()); |
|
|
|
competeCompany1.setContactsName(competeCompany.getContactsName()); |
|
|
|
competeCompany1.setContactsPhone(competeCompany.getContactsPhone()); |
|
|
|
competeCompany1.setGuideNum(competeCompany.getLeaderNum()); |
|
|
|
competeCompany1.setPlayerNum(competeCompany.getJoinNum()); |
|
|
|
// //
|
|
|
|
// competeCompany1.setCompanyId(competeCompany.getId());
|
|
|
|
// competeCompany1.setCoachNum(competeCompany.getCoachNum());
|
|
|
|
// competeCompany1.setContactsName(competeCompany.getContactsName());
|
|
|
|
// competeCompany1.setContactsPhone(competeCompany.getContactsPhone());
|
|
|
|
// competeCompany1.setGuideNum(competeCompany.getLeaderNum());
|
|
|
|
// competeCompany1.setPlayerNum(competeCompany.getJoinNum());
|
|
|
|
}else { |
|
|
|
//不为空,根据单位id查出来修改 判断传进来的参数是否为空 为空则跳过 不为空则修改
|
|
|
|
competeCompany = competeCompanyDao.selectByPrimaryKey(companyid); |
|
|
@ -274,12 +274,17 @@ public class ProvinceService implements IProvinceService { |
|
|
|
if (ObjectUtil.isNotNull(param.getPlayerNum())) { |
|
|
|
competeCompany.setJoinNum(param.getPlayerNum()); |
|
|
|
} |
|
|
|
competeCompany1.setCompanyId(competeCompany.getId()); |
|
|
|
competeCompany1.setCoachNum(competeCompany.getCoachNum()); |
|
|
|
competeCompany1.setContactsName(competeCompany.getContactsName()); |
|
|
|
competeCompany1.setContactsPhone(competeCompany.getContactsPhone()); |
|
|
|
competeCompany1.setGuideNum(competeCompany.getLeaderNum()); |
|
|
|
competeCompany1.setPlayerNum(competeCompany.getJoinNum()); |
|
|
|
competeCompanyDao.updateByPrimaryKeySelective(competeCompany); |
|
|
|
// competeCompany1.setCompanyId(competeCompany.getId());
|
|
|
|
// competeCompany1.setCoachNum(competeCompany.getCoachNum());
|
|
|
|
// competeCompany1.setContactsName(competeCompany.getContactsName());
|
|
|
|
// competeCompany1.setContactsPhone(competeCompany.getContactsPhone());
|
|
|
|
// competeCompany1.setGuideNum(competeCompany.getLeaderNum());
|
|
|
|
// competeCompany1.setPlayerNum(competeCompany.getJoinNum());
|
|
|
|
} |
|
|
|
ProvinceCompeteVo.CompeteCompany competeCompany1 = competeCompanyDao.getCompany(param.getCompeteTimeId(),userId); |
|
|
|
if (ObjectUtil.isNull(competeCompany1)){ |
|
|
|
competeCompany1 = new ProvinceCompeteVo.CompeteCompany(); |
|
|
|
} |
|
|
|
return competeCompany1; |
|
|
|
} |
|
|
|