修改 device
continuous-integration/drone/push Build is passing Details

main
rustdreamer 2 years ago
parent 2cfc69da4d
commit 1ffe9e7acb

@ -104,6 +104,28 @@ steps:
event: [push, pull_request] event: [push, pull_request]
branch: [development, main] branch: [development, main]
- name: notify
image: fifsky/drone-wechat-work
pull: if-not-exists
settings:
url: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=95507e79-9ef7-4cd7-a20a-562f0d75c738
msgtype: markdown
content: |
{{if eq .Status "success" }}
#### 🎉 ${DRONE_REPO} 构建成功
> Commit: ${DRONE_COMMIT_MESSAGE}
> Author: ${DRONE_COMMIT_AUTHOR}
{{else}}
#### ❌ ${DRONE_REPO} 构建失败
> Commit: ${DRONE_COMMIT_MESSAGE}
> Author: ${DRONE_COMMIT_AUTHOR}
> 请立即修复!!!
{{end}}
when:
status:
- failure
- success
# - name: notify # - name: notify
# image: fifsky/drone-wechat-work # image: fifsky/drone-wechat-work
# pull: if-not-exists # pull: if-not-exists

@ -879,17 +879,17 @@ export class AppController {
throw new BadRequestException("无权限, 请联系管理员") throw new BadRequestException("无权限, 请联系管理员")
} }
const where: any = {}; const where: any = {};
const query = this.areaRepository.createQueryBuilder('area'); const query = this.deviceRepository.createQueryBuilder('device');
query.where(where); query.where(where);
if (query_data.search) { if (query_data.search) {
const string = `%${query_data.search}%`; const string = `%${query_data.search}%`;
const fields = ['name']; const fields = ['name'];
const searchString = fields.join(' like :search OR area.'); const searchString = fields.join(' like :search OR device.');
query.where(`area.${searchString} like :search`, { query.where(`device.${searchString} like :search`, {
search: string, search: string,
}); });
} }
const order_key = 'area.created_date'; const order_key = 'device.created_date';
let order_value: any = 'DESC'; let order_value: any = 'DESC';
const [list, count] = await query const [list, count] = await query
.skip(query_data.skip) .skip(query_data.skip)

Loading…
Cancel
Save