|
|
@@ -0,0 +1,54 @@
|
|
|
+package com.zksy.controller.property;
|
|
|
+
|
|
|
+import com.zksy.property.domain.AHouseType;
|
|
|
+import com.zksy.property.service.AHouseTypeService;
|
|
|
+import com.zksy.utils.AjaxResult;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+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;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author Administrator
|
|
|
+ * @version 1.0
|
|
|
+ * @project enterprise-assets-service
|
|
|
+ * @description 户型控制层
|
|
|
+ * @date 2025/6/24 14:33:13
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/houseType")
|
|
|
+@Api(value = "户型控制层")
|
|
|
+public class AHouseTypeController {
|
|
|
+ @Autowired
|
|
|
+ private AHouseTypeService service;
|
|
|
+ @GetMapping("/getList")
|
|
|
+ @ApiOperation(value = "户型查询所有")
|
|
|
+ public AjaxResult getList(String accountNumber) {
|
|
|
+ return AjaxResult.success(service.getHouseTypeList(accountNumber));
|
|
|
+ }
|
|
|
+ @GetMapping("/findByPage")
|
|
|
+ @ApiOperation(value = "户型查询分页")
|
|
|
+ public AjaxResult findByPage(long pageNum, long pageSize, String accountNumber){
|
|
|
+ return AjaxResult.success(service.findByPage(pageNum, pageSize, accountNumber));
|
|
|
+ }
|
|
|
+ @PostMapping("/save")
|
|
|
+ @ApiOperation(value = "户型保存")
|
|
|
+ public AjaxResult save(AHouseType houseType) {
|
|
|
+ return service.save(houseType)? AjaxResult.success(houseType): AjaxResult.error("保存失败");
|
|
|
+ }
|
|
|
+ @PostMapping("/update")
|
|
|
+ @ApiOperation(value = "户型修改")
|
|
|
+ public AjaxResult update(AHouseType houseType) {
|
|
|
+ return service.updateById(houseType)? AjaxResult.success(houseType): AjaxResult.error("修改失败");
|
|
|
+ }
|
|
|
+ @PostMapping("/deleteBatch")
|
|
|
+ @ApiOperation(value = "户型删除")
|
|
|
+ public AjaxResult delete(List<String> ids) {
|
|
|
+ return service.removeBatchByIds(ids)? AjaxResult.success(): AjaxResult.error("删除失败");
|
|
|
+ }
|
|
|
+}
|