|
@@ -0,0 +1,50 @@
|
|
|
+package com.qmth.themis.admin.api;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.qmth.themis.business.constant.SystemConstant;
|
|
|
+import com.qmth.themis.business.entity.TBAppVersion;
|
|
|
+import com.qmth.themis.business.service.TBAppVersionService;
|
|
|
+import com.qmth.themis.common.util.Result;
|
|
|
+import com.qmth.themis.common.util.ResultUtil;
|
|
|
+import io.swagger.annotations.*;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import java.util.Collections;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @Description: 移动端 前端控制器
|
|
|
+ * @Param:
|
|
|
+ * @return:
|
|
|
+ * @Author: wangliang
|
|
|
+ * @Date: 2020/11/20
|
|
|
+ */
|
|
|
+@Api(tags = "移动端Controller")
|
|
|
+@RestController
|
|
|
+@RequestMapping("/${prefix.url.admin}/app")
|
|
|
+public class TBAppVersionController {
|
|
|
+ private final static Logger log = LoggerFactory.getLogger(TBAppVersionController.class);
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ TBAppVersionService tbAppVersionService;
|
|
|
+
|
|
|
+ @ApiOperation(value = "移动端版本新增/编辑接口")
|
|
|
+ @RequestMapping(value = "/save", method = RequestMethod.POST)
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
|
|
|
+ public Result save(@ApiParam(value = "移动端版本信息", required = true) @RequestBody TBAppVersion tbAppVersion) {
|
|
|
+ tbAppVersionService.saveOrUpdate(tbAppVersion);
|
|
|
+ QueryWrapper<TBAppVersion> tbAppVersionQueryWrapper = new QueryWrapper<>();
|
|
|
+ return ResultUtil.ok(Collections.singletonMap(SystemConstant.SUCCESS, true));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "移动端版本查询接口")
|
|
|
+ @RequestMapping(value = "/query", method = RequestMethod.POST)
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "移动端信息", response = TBAppVersion.class)})
|
|
|
+ public Result query(@ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber,
|
|
|
+ @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
|
|
|
+ return ResultUtil.ok(tbAppVersionService.appVersionQuery(new Page<>(pageNumber, pageSize)));
|
|
|
+ }
|
|
|
+}
|