puzhibing
2023-07-14 21a9ec4a797e26e49a14f386e054da3cb0afc376
cloud-server-other/src/main/java/com/dsh/other/controller/StoreController.java
@@ -6,6 +6,7 @@
import com.dsh.other.feignclient.model.*;
import com.dsh.other.model.BaseVo;
import com.dsh.other.model.QueryStoreList;
import com.dsh.other.model.StoreFreeBenefitVo;
import com.dsh.other.service.StoreService;
import com.dsh.other.util.GDMapGeocodingUtil;
import com.dsh.other.util.ResultUtil;
@@ -196,4 +197,25 @@
        }
    }
    @ResponseBody
    @PostMapping("/base/store/queryStoreFreeBenefit")
    @ApiOperation(value = "获取门店免费福利", tags = {"APP-免费福利"})
    @ApiImplicitParams({
            @ApiImplicitParam(value = "门店id", name = "id", dataType = "int", required = true),
    })
    public ResultUtil<StoreFreeBenefitVo> queryStoreFreeBenefit(Integer id){
        try {
            Store store = storeService.getById(id);
            StoreFreeBenefitVo storeFreeBenefitVo = new StoreFreeBenefitVo();
            storeFreeBenefitVo.setPhone(store.getPhone());
            storeFreeBenefitVo.setImg(store.getWelfarePicture());
            return ResultUtil.success(storeFreeBenefitVo);
        }catch (Exception e){
            e.printStackTrace();
            return ResultUtil.runErr();
        }
    }
}