wuxw
2021-04-23 fdf45f690fa4eca9191aa0fb6abf077e7b36ce06
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
43
44
45
46
47
48
49
50
51
package com.java110.front.components.room;
 
 
import com.alibaba.fastjson.JSONObject;
import com.java110.core.context.IPageData;
import com.java110.front.smo.IRoomServiceSMO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
 
/**
 * @ClassName RoomComponent
 * @Description TODO 选择房屋组件
 * @Author wuxw
 * @Date 2019/5/7 23:40
 * @Version 1.0
 * add by wuxw 2019/5/7
 **/
@Component("searchRoom")
public class SearchRoomComponent {
 
 
    @Autowired
    private IRoomServiceSMO roomServiceSMOImpl;
 
    /**
     * 显示房屋信息
     *
     * @param pd 页面信息封装
     * @return ResponseEntity对象
     */
    public ResponseEntity<String> listRoom(IPageData pd) {
        JSONObject paramIn = JSONObject.parseObject(pd.getReqData());
        if (paramIn.containsKey("roomFlag") && "1".equals(paramIn.getString("roomFlag"))) {
            return roomServiceSMOImpl.listRoomWithSell(pd);
        } else if (paramIn.containsKey("roomFlag") && "2".equals(paramIn.getString("roomFlag"))) {
            return roomServiceSMOImpl.listRoomWithOutSell(pd);
        } else {
            return roomServiceSMOImpl.listRoom(pd);
        }
    }
 
 
    public IRoomServiceSMO getRoomServiceSMOImpl() {
        return roomServiceSMOImpl;
    }
 
    public void setRoomServiceSMOImpl(IRoomServiceSMO roomServiceSMOImpl) {
        this.roomServiceSMOImpl = roomServiceSMOImpl;
    }
}