nickchange
2023-11-09 c036557db88c6297b9a626a892dce35c14ab8ee5
cloud-server-account/src/main/java/com/dsh/account/controller/UseBenefitsController.java
@@ -55,14 +55,16 @@
    @ApiOperation(value = "福利主页", tags = {"APP-使用福利"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."),
            @ApiImplicitParam(name = "lat",value = "经度",dataType = "string"),
            @ApiImplicitParam(name = "lon",value = "纬度",dataType = "string")
    })
    public ResultUtil<IndexOfUserBenefirVo> queryAppUserUser(){
    public ResultUtil<IndexOfUserBenefirVo> queryAppUserUser(String lon,String lat){
        try {
            Integer appUserId = tokenUtil.getUserIdFormRedis();
            if(null == appUserId){
                return ResultUtil.tokenErr();
            }
            IndexOfUserBenefirVo indexOfUserBenefirVo = tauService.queryBenefitDetails(appUserId);
            IndexOfUserBenefirVo indexOfUserBenefirVo = tauService.queryBenefitDetails(appUserId,lon,lat);
            List<IntegralCommodity> commodities = indexOfUserBenefirVo.getCommodities();
            if (commodities.size() > 5) {
                commodities = commodities.subList(0, 5);
@@ -80,6 +82,9 @@
    @ApiOperation(value = "用户个人信息", tags = {"APP-使用福利"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."),
            @ApiImplicitParam(name = "lat",value = "经度",dataType = "string"),
            @ApiImplicitParam(name = "lon",value = "纬度",dataType = "string")
    })
    public ResultUtil<AppUserDetailsVo> queryAppUserDetails(){
        try {
@@ -89,6 +94,13 @@
                return ResultUtil.tokenErr();
            }
            TAppUser tAppUser = tauService.getBaseMapper().selectById(appUserId);
            if (tAppUser.getCode()==null){
                detailsVo.setNeedChange(1);
            }else {
                detailsVo.setNeedChange(0);
            }
            if (null != tAppUser){
                detailsVo.setUserId(appUserId);
                detailsVo.setUserImage(tAppUser.getHeadImg());