From 51883bd34e2d47db9b4b4d98d88e4181e062af2c Mon Sep 17 00:00:00 2001 From: clunt Date: Tue, 3 May 2022 01:24:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=88=E5=82=85=E7=AB=AF=E5=92=8C=E9=83=A8?= =?UTF-8?q?=E9=97=A8=E5=85=B3=E8=81=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/templates/worker/worker.html | 4 ++++ .../src/main/java/com/ghy/worker/domain/Worker.java | 6 ++++++ .../src/main/resources/mapper/worker/WorkerMapper.xml | 9 ++++++--- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ghy-admin/src/main/resources/templates/worker/worker.html b/ghy-admin/src/main/resources/templates/worker/worker.html index e670e54a..84a80071 100644 --- a/ghy-admin/src/main/resources/templates/worker/worker.html +++ b/ghy-admin/src/main/resources/templates/worker/worker.html @@ -115,6 +115,10 @@ field: 'account', title: '账户' }, + { + field: 'deptName', + title: '所属公司名称' + }, { field: 'phone', title: '手机号' diff --git a/ghy-worker/src/main/java/com/ghy/worker/domain/Worker.java b/ghy-worker/src/main/java/com/ghy/worker/domain/Worker.java index 71ffe6ba..7785ec2d 100644 --- a/ghy-worker/src/main/java/com/ghy/worker/domain/Worker.java +++ b/ghy-worker/src/main/java/com/ghy/worker/domain/Worker.java @@ -31,6 +31,12 @@ public class Worker extends BaseEntity { @Excel(name = "微信open_id", cellType = Excel.ColumnType.STRING) private String openId; + @Excel(name = "分公司名称", cellType = Excel.ColumnType.STRING) + private String deptName; + + @Excel(name = "分公司id", cellType = Excel.ColumnType.NUMERIC) + private Long deptId; + @Excel(name = "用户状态 0生效 1冻结 2删除", readConverterExp = "0=生效,1=冻结,2=删除") private Integer status; diff --git a/ghy-worker/src/main/resources/mapper/worker/WorkerMapper.xml b/ghy-worker/src/main/resources/mapper/worker/WorkerMapper.xml index afbbf2d1..b85660e1 100644 --- a/ghy-worker/src/main/resources/mapper/worker/WorkerMapper.xml +++ b/ghy-worker/src/main/resources/mapper/worker/WorkerMapper.xml @@ -10,6 +10,8 @@ + + @@ -22,9 +24,10 @@ SELECT - worker_id, name, account, phone, password, open_id, status, worker_logo_url, - leader_team_rate, leader_team_money, create_by, create_time, update_by, update_time, remark - FROM worker + w.worker_id, w.name, w.account, w.phone, w.password, w.open_id, w.dept_id, sd.dept_name, w.status, w.worker_logo_url, + w.leader_team_rate, w.leader_team_money, w.create_by, w.create_time, w.update_by, w.update_time, w.remark + FROM worker w + LEFT JOIN sys_dept sd ON w.dept_id = sd.dept_id