package com.boying.controller.phone; import com.boying.common.R; import com.boying.entity.UpdateApp; import com.boying.service.UpdateAppService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; @RestController @RequestMapping("ffzf/updateApp") @RequiredArgsConstructor @Tag(description = "ffzf/updateApp" , name = "app更新接口" ) public class UpdateAppController{ private final UpdateAppService updateAppService; @PostMapping("/getUpdateApp") @Operation(summary = "获取最新app版本" , description = "获取最新app版本" ) public Object getUpdateApp(){ List all = updateAppService.list(); if(all.size()==0){ return R.failed("没有版本更新数据,联系管理员维护数据。"); } return R.ok(all.get(0)); } }