|
|
@@ -93,7 +93,7 @@ type QhjMgrCustomer struct {
|
|
|
LOGINCODE string `json:"logincode" xorm:"'LOGINCODE'"` // 登录账号(代码)
|
|
|
BROKERID int64 `json:"brokerid" xorm:"'BROKERID'"` // 所属客户经理id
|
|
|
BROKERNAME string `json:"brokername" xorm:"'BROKERNAME'"` // 所属客户经理名称
|
|
|
- BIRTHDAY string `json:"birthday" xorm:"'BIRTHDAY'"` // 生日
|
|
|
+ BIRTHDAY string `json:"birthday" xorm:"'BIRTHDAY'" form:"birthday"` // 生日
|
|
|
SEX int32 `json:"sex" xorm:"'SEX'"` // 性别 0-女 1-男
|
|
|
|
|
|
COUNTRYNAME string `json:"countryname"` // 国家名称
|
|
|
@@ -206,7 +206,8 @@ select u.accountname brokername, a.*
|
|
|
t.usertype,
|
|
|
t.sex,
|
|
|
to_char(t.birthday, 'yyyy-mm-dd hh24:mi:ss') birthday,
|
|
|
- to_number(t.brokerid) brokerid
|
|
|
+ to_number(t.brokerid) brokerid,
|
|
|
+ t.birthday birthday2
|
|
|
from wskh_userinfo t
|
|
|
start with t.areaid = %v
|
|
|
connect by prior t.userid = t.areaid
|
|
|
@@ -224,6 +225,11 @@ select u.accountname brokername, a.*
|
|
|
sqlId.JoinEx(len(r.CUSTOMERNAME) > 0, fmt.Sprintf(` and a.customername like '%%%v%%'`, r.CUSTOMERNAME))
|
|
|
sqlId.JoinEx(len(r.NICKNAME) > 0, fmt.Sprintf(` and a.nickname like '%%%v%%'`, r.NICKNAME))
|
|
|
sqlId.JoinEx(len(r.BROKERNAME) > 0, fmt.Sprintf(` and u.accountname like '%%%v%%'`, r.BROKERNAME))
|
|
|
+ if len(r.BIRTHDAY) == 2 {
|
|
|
+ sqlId.JoinFormat(" and to_char(a.birthday2, 'mm') = '%v'", r.BIRTHDAY)
|
|
|
+ } else if len(r.BIRTHDAY) == 4 {
|
|
|
+ sqlId.JoinFormat(" and to_char(a.birthday2, 'mmdd') = '%v'", r.BIRTHDAY)
|
|
|
+ }
|
|
|
return sqlId.String()
|
|
|
}
|
|
|
|
|
|
@@ -291,6 +297,11 @@ select a.*,
|
|
|
sqlId.JoinEx(len(r.CUSTOMERNAME) > 0, fmt.Sprintf(` and u.customername like '%%%v%%'`, r.CUSTOMERNAME))
|
|
|
sqlId.JoinEx(len(r.NICKNAME) > 0, fmt.Sprintf(` and u.nickname like '%%%v%%'`, r.NICKNAME))
|
|
|
sqlId.JoinEx(len(r.BROKERNAME) > 0, fmt.Sprintf(` and u2.accountname like '%%%v%%'`, r.BROKERNAME))
|
|
|
+ if len(r.BIRTHDAY) == 2 {
|
|
|
+ sqlId.JoinFormat(" and to_char(u.birthday, 'mm') = '%v'", r.BIRTHDAY)
|
|
|
+ } else if len(r.BIRTHDAY) == 4 {
|
|
|
+ sqlId.JoinFormat(" and to_char(u.birthday, 'mmdd') = '%v'", r.BIRTHDAY)
|
|
|
+ }
|
|
|
return sqlId.String()
|
|
|
}
|
|
|
|