|
@@ -0,0 +1,102 @@
|
|
|
+package com.zkqy.business.controller;
|
|
|
+
|
|
|
+import com.zkqy.business.entity.MobilePageData;
|
|
|
+import com.zkqy.business.service.IMobilePageDataService;
|
|
|
+import com.zkqy.common.annotation.Log;
|
|
|
+import com.zkqy.common.core.controller.BaseController;
|
|
|
+import com.zkqy.common.core.domain.AjaxResult;
|
|
|
+import com.zkqy.common.core.page.TableDataInfo;
|
|
|
+import com.zkqy.common.enums.BusinessType;
|
|
|
+
|
|
|
+import com.zkqy.common.utils.poi.ExcelUtil;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 移动端数据Controller
|
|
|
+ *
|
|
|
+ * @author zkqy
|
|
|
+ * @date 2024-04-18
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/system/mobilePageData")
|
|
|
+@Api(value = "/system/data", description = "移动端数据-接口")
|
|
|
+public class MobilePageDataController extends BaseController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IMobilePageDataService mobilePageDataService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询移动端数据列表
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:data:list')")
|
|
|
+ @GetMapping("/list")
|
|
|
+ @ApiOperation(value = "查询移动端数据列表")
|
|
|
+ public TableDataInfo list(MobilePageData mobilePageData) {
|
|
|
+ startPage();
|
|
|
+ List<MobilePageData> list = mobilePageDataService.selectMobilePageDataList(mobilePageData);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出移动端数据列表
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:data:export')")
|
|
|
+ @Log(title = "移动端数据", businessType = BusinessType.EXPORT)
|
|
|
+ @PostMapping("/export")
|
|
|
+ @ApiOperation(value = "导出移动端数据列表")
|
|
|
+ public void export(HttpServletResponse response, MobilePageData mobilePageData) {
|
|
|
+ List<MobilePageData> list = mobilePageDataService.selectMobilePageDataList(mobilePageData);
|
|
|
+ ExcelUtil<MobilePageData> util = new ExcelUtil<MobilePageData>(MobilePageData.class);
|
|
|
+ util.exportExcel(response, list, "移动端数据数据");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取移动端数据详细信息
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:data:query')")
|
|
|
+ @GetMapping(value = "/{id}")
|
|
|
+ @ApiOperation(value = "获取移动端数据详细信息")
|
|
|
+ public AjaxResult getInfo(@PathVariable("id") Long id) {
|
|
|
+ return success(mobilePageDataService.selectMobilePageDataById(id));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增移动端数据
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:data:add')")
|
|
|
+ @Log(title = "移动端数据", businessType = BusinessType.INSERT)
|
|
|
+ @PostMapping
|
|
|
+ @ApiOperation(value = "新增移动端数据")
|
|
|
+ public AjaxResult add(@RequestBody MobilePageData mobilePageData) {
|
|
|
+ return toAjax(mobilePageDataService.insertMobilePageData(mobilePageData));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改移动端数据
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:data:edit')")
|
|
|
+ @Log(title = "移动端数据", businessType = BusinessType.UPDATE)
|
|
|
+ @PutMapping
|
|
|
+ @ApiOperation(value = "修改移动端数据")
|
|
|
+ public AjaxResult edit(@RequestBody MobilePageData mobilePageData) {
|
|
|
+ return toAjax(mobilePageDataService.updateMobilePageData(mobilePageData));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除移动端数据
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:data:remove')")
|
|
|
+ @Log(title = "移动端数据", businessType = BusinessType.DELETE)
|
|
|
+ @DeleteMapping("/{ids}")
|
|
|
+ @ApiOperation(value = "删除移动端数据")
|
|
|
+ public AjaxResult remove(@PathVariable Long[] ids) {
|
|
|
+ return toAjax(mobilePageDataService.deleteMobilePageDataByIds(ids));
|
|
|
+ }
|
|
|
+}
|