 
             var tenantsArray: [[String: Any]] = []
             for row in tenants.rows() {
-                tenantsArray.append(row.asDict() as [String : Any])
-            }
-            
-            var result = [String: Any]()
-            result.updateValue(200, forKey: "status")
-            result.updateValue(true, forKey: "message")
-            result.updateValue(tenantsArray, forKey: "data")
-            
-            try response.setBody(json: result)
+                tenantsArray.append(row.asDict() as [String: Any])
+            }
+            
+            try response.setBody(json: ["success": true, "status": 200, "data": tenantsArray])
             response.completed()
         } catch {
-            try! response.setBody(json: ["success":false, "status": 200])
+            try! response.setBody(json: ["success": false, "status": 200, "data": error])
             response.completed()
             Log.error(message: "queryRoomNo : \(error)")
         }

    ///   - response: 响应
    open static func rentlist(_ request: HTTPRequest, _ response: HTTPResponse) {
        do {
            var offset = 0
            if let page = request.param(name: "page") {
                offset = Int(page)!

        do {
            guard
                let json = request.postBodyString,
                let dict = try json.jsonDecode() as? [String: Any]
                else {
                    try response.setBody(json: ["success": false, "status": 200, "data": "请填写请求参数"])
                    response.completed()
                    return
            }
            
            guard let id: Int = dict["id"] as? Int else {
                try response.setBody(json: ["success": false, "status": 200, "data": "id 请求参数不正确"])
                response.completed()
                return
            }
            
            guard let month: String = dict["month"] as? String else {
                try response.setBody(json: ["success": false, "status": 200, "data": "month 请求参数不正确"])
                response.completed()
                return
            }
            
            guard let water: Int = dict["water"] as? Int else {
                try response.setBody(json: ["success": false, "status": 200, "data": "water 请求参数不正确"])
                response.completed()
                return
            }
            
            guard let electric: Int = dict["electric"] as? Int else {
                try response.setBody(json: ["success": false, "status": 200, "data": "electric 请求参数不正确"])
                response.completed()
                return
            }

            let date = Date()
