无关风月
2025-04-10 75e610720fbd3655d7a2b13012949cb018174fd8
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
34
35
36
37
38
39
40
41
42
package com.ruoyi.web.controller.api;
 
 
import com.ruoyi.common.constant.DictConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.utils.DictUtils;
import com.ruoyi.system.model.THouse;
import com.ruoyi.system.service.THouseService;
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.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
 
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * <p>
 * 房屋管理 前端控制器
 * </p>
 *
 * @author xiaochen
 * @since 2025-01-17
 */
@Api(tags = "房屋管理")
@RestController
@RequestMapping("/t-house")
public class THouseController {
    @Autowired
    private THouseService tHouseService;
    @ApiOperation(value = "查询房屋信息")
    @GetMapping(value = "/getHouseById")
    public R<THouse> getHouseById(@RequestParam String id) {
        THouse tHouse = tHouseService.getById(id);
        tHouse.setLeaseStatus(DictUtils.getDictLabel(DictConstants.DICT_TYPE_LEASE_STATUS,tHouse.getLeaseStatus()));
        tHouse.setBusinessAttributes(DictUtils.getDictLabel(DictConstants.DICT_TYPE_BUSINESS_ATTRIBUTES,tHouse.getBusinessAttributes()));
        return R.ok(tHouse);
    }
 
}