chanjs 1.1.8 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/lib/service.js +9 -0
- package/core/lib/task.js +1 -1
- package/package.json +1 -1
package/core/lib/service.js
CHANGED
@@ -196,5 +196,14 @@ class BaseService {
|
|
196
196
|
return result.total || 0;
|
197
197
|
}
|
198
198
|
|
199
|
+
error(err) {
|
200
|
+
console.error(err);
|
201
|
+
return {
|
202
|
+
code: 500,
|
203
|
+
msg: "数据库操作失败",
|
204
|
+
data: { sql: err.sql, sqlMessage: err.sqlMessage },
|
205
|
+
};
|
206
|
+
}
|
207
|
+
|
199
208
|
}
|
200
209
|
export default BaseService;
|
package/core/lib/task.js
CHANGED