| | |
| | | Page<Competition> competitions = competitionClient.list(listQuery); |
| | | for (Competition competition : competitions.getRecords()) { |
| | | for (TStore tStore : list) { |
| | | if(competition.getStoreId().equals(tStore.getId())){ |
| | | competition.setStoreName(tStore.getName()); |
| | | String[] split = competition.getStoreId().split(","); |
| | | |
| | | for (String s : split) { |
| | | if(s.equals(String.valueOf(tStore.getId()))){ |
| | | if (competition.getStoreName()==null){ |
| | | competition.setStoreName(tStore.getName()); |
| | | }else { |
| | | competition.setStoreName(competition.getStoreName()+","+tStore.getName()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | competition.setAuditStatus(1); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | competition.setStartTime(format.parse(competition.getSTime())); |
| | | competition.setEndTime(format.parse(competition.getETime())); |
| | | SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd"); |
| | | competition.setStartTime(format1.parse(competition.getSTime())); |
| | | competition.setEndTime(format1.parse(competition.getETime())); |
| | | competition.setRegisterEndTime(format.parse(competition.getREndTime())); |
| | | competitionClient.add(competition); |
| | | return new SuccessTip<>(); |