rk
9 小时以前 c9f0611f690b3fb0cb120f5b6799f94977d3f129
server/web/src/main/java/com/doumee/api/web/ConfigApi.java
@@ -3,21 +3,23 @@
import com.doumee.core.annotation.LoginRequired;
import com.doumee.core.annotation.trace.Trace;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.utils.Tencent.MapUtil;
import com.doumee.dao.business.model.Areas;
import com.doumee.dao.business.model.Banner;
import com.doumee.dao.business.model.Category;
import com.doumee.dao.dto.AreasDto;
import com.doumee.dao.dto.CalculateLocalPriceDTO;
import com.doumee.dao.dto.CalculateRemotePriceDTO;
import com.doumee.dao.vo.AccountResponse;
import com.doumee.dao.dto.SameCityCheckDTO;
import com.doumee.dao.vo.PriceCalculateVO;
import com.doumee.dao.vo.UserCenterVO;
import com.doumee.dao.vo.PlatformAboutVO;
import com.doumee.service.business.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -52,6 +54,15 @@
    @Autowired
    private MemberService memberService;
    @ApiOperation("全部区划树形查询")
    @PostMapping("/treeList")
    public ApiResponse<List<Areas>> treeList (@RequestBody AreasDto pageWrap) {
        Areas a = new Areas();
        BeanUtils.copyProperties(pageWrap,a);
        areasService.cacheData();
        return ApiResponse.success(areasService.findList(a));
    }
    @ApiOperation(value = "获取分类列表", notes = "小程序端")
    @GetMapping("/getCategoryList")
@@ -89,12 +100,9 @@
    @ApiOperation(value = "获取系统配置", notes = "小程序端")
    @GetMapping("/getPlatformAboutUs")
    public ApiResponse<UserCenterVO> getPlatformAboutUs() {
    public ApiResponse<PlatformAboutVO> getPlatformAboutUs() {
        return  ApiResponse.success("查询成功",memberService.getPlatformAboutUs());
    }
    @LoginRequired
    @ApiOperation(value = "计算保价费用", notes = "根据报价金额计算保价费用")
@@ -121,10 +129,20 @@
        return ApiResponse.success("操作成功", ordersService.calculateRemotePrice(dto));
    }
    @ApiOperation(value = "校验两个经纬度是否同城", notes = "传入两组经纬度,返回是否在同一城市")
    @PostMapping("/isSameCity")
    public ApiResponse<Boolean> isSameCity(@RequestBody SameCityCheckDTO dto) {
        return ApiResponse.success("操作成功", MapUtil.isSameCity(dto.getLat1(), dto.getLng1(), dto.getLat2(), dto.getLng2()));
    }
    @ApiOperation(value = "根据城市名称查询城市信息", notes = "仅返回已开通的城市,未开通返回空")
    @GetMapping("/getCityByName")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", dataType = "String", name = "cityName", value = "城市名称", required = true)
    })
    public ApiResponse<Areas> getCityByName(@RequestParam String cityName) {
        return ApiResponse.success("查询成功", areasService.getOpenedCityByName(cityName));
    }
}