kongdeqiang
2024-09-26 1d42efe4cbd6b1028a28ff7f3ef2b3d721051c2f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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<UpdateApp> all = updateAppService.list();
        if(all.size()==0){
            return R.failed("没有版本更新数据,联系管理员维护数据。");
        }
        return R.ok(all.get(0));
    }
}