rk
9 小时以前 7eebfc8a64d2cbbd73453a2b653d5a5bfd66a32f
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
33
package com.doumee.api.web;
 
import com.doumee.core.model.ApiResponse;
import com.doumee.dao.business.model.AppVersion;
import com.doumee.service.business.AppVersionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
/**
 * APP版本(小程序端)
 * @author rk
 * @date 2026/04/10
 */
@Api(tags = "APP版本")
@RestController
@RequestMapping("/web/appVersion")
public class AppVersionApi extends ApiController {
 
    @Autowired
    private AppVersionService appVersionService;
 
    @ApiOperation("获取最新版本")
    @GetMapping("/latest")
    public ApiResponse<AppVersion> latest(
            @ApiParam(value = "平台类型 0=Android 1=IOS", required = true, example = "0")
            @RequestParam Integer type) {
        return ApiResponse.success(appVersionService.getLatestVersion(type));
    }
 
}