puzhibing
2024-03-15 41156504948b983a3273ef3a5641932ac80dfd76
cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/controller/WorldCupController.java
@@ -656,9 +656,10 @@
     */
    @ResponseBody
    @PostMapping("/worldCup/editWorldCup")
    public Integer editWorldCup(@RequestBody WorldCup worldCup){
        String lon = worldCup.getLon();
        String lat = worldCup.getLat();
    public Integer editWorldCup(@RequestBody String worldCup){
        WorldCup worldCup2 = JSON.parseObject(worldCup, WorldCup.class);
        String lon = worldCup2.getLon();
        String lat = worldCup2.getLat();
        Map<String, String> geocode = null;
        try {
            geocode = gdMapGeocodingUtil.geocode(lon, lat);
@@ -669,15 +670,15 @@
        String provinceCode = geocode.get("provinceCode");
        String city = geocode.get("city");
        String cityCode = geocode.get("cityCode");
        worldCup.setProvince(province.replace("省", ""));
        worldCup.setProvinceCode(provinceCode);
        worldCup.setCity(city.replace("市", ""));
        worldCup.setCityCode(cityCode);
        WorldCup worldCup1 = worldCupService.getById(worldCup.getId());
        worldCup.setCreateTime(worldCup1.getCreateTime());
        worldCup.setMatchNumber(worldCup1.getMatchNumber());
        worldCupService.updateWorldCupAll(worldCup);
        return worldCup.getId();
        worldCup2.setProvince(province.replace("省", ""));
        worldCup2.setProvinceCode(provinceCode);
        worldCup2.setCity(city.replace("市", ""));
        worldCup2.setCityCode(cityCode);
        WorldCup worldCup1 = worldCupService.getById(worldCup2.getId());
        worldCup2.setCreateTime(worldCup1.getCreateTime());
        worldCup2.setMatchNumber(worldCup1.getMatchNumber());
        worldCupService.updateWorldCupAll(worldCup2);
        return worldCup2.getId();
    }
@@ -887,8 +888,9 @@
    public List<WorldCupPayment> getWorldCupPayment(@RequestBody GetWorldCupPayment getWorldCupPayment){
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String payType = getWorldCupPayment.getPayType();
        return worldCupPaymentService.list(new QueryWrapper<WorldCupPayment>().eq("appUserId", getWorldCupPayment.getAppUserId())
        List<WorldCupPayment> list = worldCupPaymentService.list(new QueryWrapper<WorldCupPayment>().eq("appUserId", getWorldCupPayment.getAppUserId())
                .in("payType", Arrays.asList(payType.split(","))).ne("payStatus", 1).eq("state", 1)
                .last(" and createTime between '" + sdf.format(getWorldCupPayment.getStartTime()) + "' and  '" + sdf.format(getWorldCupPayment.getEndTime()) + "' order by createTime desc"));
        return list;
    }
}