nickchange
2023-10-10 ee9cb0da4a43bcf523ebb157678f64a2895fba1a
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCompetitionController.java
@@ -131,8 +131,16 @@
        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());
                        }
                    }
                }
            }
        }
@@ -166,8 +174,9 @@
            }
            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<>();