|
@@ -73,11 +73,20 @@ public class PaymentRequestsDao extends BaseDao<PaymentRequestsMapper, PaymentRe
|
|
public PaymentRequestsVo getDetail(Long id) {
|
|
public PaymentRequestsVo getDetail(Long id) {
|
|
PaymentRequestsTable pr = PaymentRequestsTable.pr;
|
|
PaymentRequestsTable pr = PaymentRequestsTable.pr;
|
|
|
|
|
|
|
|
+ // 部门
|
|
|
|
+ SysDeptTable sd = SysDeptTable.sd;
|
|
|
|
+ // 用户
|
|
|
|
+ SysUserTable su = SysUserTable.su;
|
|
|
|
+
|
|
return sql(PaymentRequestsVo.class)
|
|
return sql(PaymentRequestsVo.class)
|
|
.select(
|
|
.select(
|
|
- pr.all
|
|
|
|
|
|
+ pr.all,
|
|
|
|
+ sd.name.as(PaymentRequestsVo::getDeptName),
|
|
|
|
+ su.nickname.as(PaymentRequestsVo::getUserName)
|
|
)
|
|
)
|
|
.from(pr)
|
|
.from(pr)
|
|
|
|
+ .leftJoin(sd).on(pr.deptId.eq(sd.id))
|
|
|
|
+ .leftJoin(su).on(pr.createUser.eq(su.id))
|
|
.where(
|
|
.where(
|
|
pr.id.eq(id)
|
|
pr.id.eq(id)
|
|
)
|
|
)
|