|
@@ -100,6 +100,7 @@ type PushSet struct {
|
|
|
EntInfo *PushSetChild //企业情报监控-企业工商变动推送设置
|
|
|
FollowProject *PushSetChild //项目进度监控推送设置
|
|
|
FollowEnt *PushSetChild //企业情报监控-企业中标动态推送设置
|
|
|
+ OwnerMonitor *PushSetChild //业主监控推送设置
|
|
|
}
|
|
|
|
|
|
func (p *PushSet) Reset() {
|
|
@@ -156,6 +157,16 @@ func (p *PushSet) Reset() {
|
|
|
p.FollowEnt.Times = append(p.FollowEnt.Times, "09:00")
|
|
|
}
|
|
|
sort.Strings(p.FollowEnt.Times)
|
|
|
+ //
|
|
|
+ if p.OwnerMonitor.RateMode < 1 || p.OwnerMonitor.RateMode > 4 {
|
|
|
+ p.OwnerMonitor.RateMode = 1
|
|
|
+ if len(p.OwnerMonitor.Times) == 0 {
|
|
|
+ p.OwnerMonitor.Times = append(p.OwnerMonitor.Times, "09:00", "14:00")
|
|
|
+ }
|
|
|
+ } else if p.OwnerMonitor.RateMode == 2 && len(p.OwnerMonitor.Times) == 0 {
|
|
|
+ p.OwnerMonitor.Times = append(p.OwnerMonitor.Times, "09:00")
|
|
|
+ }
|
|
|
+ sort.Strings(p.OwnerMonitor.Times)
|
|
|
}
|
|
|
|
|
|
type PushSetChild struct {
|
|
@@ -282,6 +293,8 @@ func (u *UserInfo) GetPushSet(obj map[string]interface{}) {
|
|
|
followProject_times, _ := followProject["a_times"].([]interface{})
|
|
|
followEnt, _ := obj["o_follow_ent"].(map[string]interface{})
|
|
|
followEnt_times, _ := followEnt["a_times"].([]interface{})
|
|
|
+ ownerMonitor, _ := obj["o_owner_monitor"].(map[string]interface{})
|
|
|
+ ownerMonitor_times, _ := ownerMonitor["a_times"].([]interface{})
|
|
|
u.PushSet = &PushSet{
|
|
|
Email: strings.TrimSpace(util.ObjToString(obj["s_email"])),
|
|
|
SubSet: &PushSetChild{
|
|
@@ -330,6 +343,13 @@ func (u *UserInfo) GetPushSet(obj map[string]interface{}) {
|
|
|
RateMode: util.IntAll(followEnt["i_ratemode"]),
|
|
|
Times: util.ObjArrToStringArr(followEnt_times),
|
|
|
},
|
|
|
+ OwnerMonitor: &PushSetChild{
|
|
|
+ WxPush: util.IntAllDef(ownerMonitor["i_wxpush"], 1),
|
|
|
+ AppPush: util.IntAllDef(ownerMonitor["i_apppush"], 1),
|
|
|
+ MailPush: util.IntAll(ownerMonitor["i_mailpush"]),
|
|
|
+ RateMode: util.IntAll(ownerMonitor["i_ratemode"]),
|
|
|
+ Times: util.ObjArrToStringArr(ownerMonitor_times),
|
|
|
+ },
|
|
|
}
|
|
|
u.PushSet.Reset()
|
|
|
}
|
|
@@ -884,3 +904,16 @@ type BiddingInfo struct {
|
|
|
Toptype string
|
|
|
Infotype string
|
|
|
}
|
|
|
+
|
|
|
+type OwnerMonitorInfo struct {
|
|
|
+ *UserInfo
|
|
|
+ OwnerMonitor []*OwnerMonitor //关注
|
|
|
+}
|
|
|
+
|
|
|
+//
|
|
|
+type OwnerMonitor struct {
|
|
|
+ Id string //关注id
|
|
|
+ EntName string //企业名称
|
|
|
+ CreateTime int64 //关注时间
|
|
|
+ Infos CSortList //匹配上的信息
|
|
|
+}
|