package com.boying.controller.phone; import com.boying.common.BaseController; import com.boying.entity.UpdateApp; import com.boying.service.UpdateAppService; import org.springframework.beans.factory.annotation.Autowired; 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("updateApp") public class UpdateAppController extends BaseController { @Autowired private UpdateAppService updateAppService; @PostMapping("getUpdateApp") public Object getUpdateApp(){ List all = updateAppService.findAll(); if(all.size()==0){ return error("没有版本更新数据,联系管理员维护数据。"); } return success("请求成功",all.get(0)); } }