导出功能修改关联salesman关联关系
This commit is contained in:
parent
3540209b26
commit
2c9d475a45
@ -196,11 +196,11 @@ var VipOrderCtr = Ctr{
|
||||
// " ON usr.id = vo.user_id\nLEFT JOIN company cp ON cp.id = vo.company_id\nWHERE" +
|
||||
// " vo.`status` = 1 AND vo.create_time >= ? \nORDER BY vo.create_time",buy_date)
|
||||
|
||||
data := that.Db.Select("vip_order", Map{"[>]salesman": "salesman.id=vip_order.id",
|
||||
data := that.Db.Select("vip_order", Map{"[>]salesman": "salesman.id=vip_order.salesman_id",
|
||||
"[>]provider": "provider.id = vip_order.provider_id",
|
||||
"[>]user": "user.id = vip_order.user_id",
|
||||
"[>]company": "company.id = vip_order.company_id",
|
||||
}, "vip_order.sn 订单号, vip_order.`name` 订单名, vip_order.user_id 购买用户ID,user.`name` 购买用户名, user.phone 购买用户电话, company.id 企业ID, company.`name` 企业名,\nvip_order.expiration_time 过期时间, vip_order.old_expiration_time 订购前到期时间, vip_order.amount `订单金额_单位(分)`,\nvip_order.salesman_id 业务员ID,salesman.`name` 业务员名, salesman.phone 业务员电话, provider.`name` 服务商名",
|
||||
}, "vip_order.sn 订单号, vip_order.`name` 订单名, vip_order.user_id 购买用户ID,user.`name` 购买用户名, user.phone 购买用户电话, company.id 企业ID, company.`name` 企业名,\nvip_order.expiration_time 过期时间, vip_order.amount `订单金额_单位(分)`,\nvip_order.salesman_id 业务员ID,salesman.`name` 业务员名, salesman.phone 业务员电话, provider.`name` 服务商名",
|
||||
Map{"AND": Map{"vip_order.status": 1, "vip_order.create_time[>=]": buy_date}, "ORDER": "vip_order.create_time DESC"})
|
||||
|
||||
if len(data) == 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user