|
@@ -678,8 +678,8 @@ func (this *EntFollow) GetFollowEntInfo() (used int64, surplus int64) {
|
|
|
|
|
|
func (this *EntFollow) GetLabelGroup() *[]map[string]interface{} {
|
|
func (this *EntFollow) GetLabelGroup() *[]map[string]interface{} {
|
|
if db.Base.Count("follow_ent_monitor_group", map[string]interface{}{
|
|
if db.Base.Count("follow_ent_monitor_group", map[string]interface{}{
|
|
- "user_id": this.UserId,
|
|
|
|
- "isDefGroup": 1,
|
|
|
|
|
|
+ "s_userid": this.UserId,
|
|
|
|
+ "isdefGoup": 1,
|
|
}) == 0 { //初始化默认分组
|
|
}) == 0 { //初始化默认分组
|
|
db.Base.SelectBySql(fmt.Sprintf(`INSERT INTO follow_ent_monitor_group (s_name, s_userid, create_time, update_time, isPut, isdefGoup) VALUES
|
|
db.Base.SelectBySql(fmt.Sprintf(`INSERT INTO follow_ent_monitor_group (s_name, s_userid, create_time, update_time, isPut, isdefGoup) VALUES
|
|
('默认分组', '%s', '2025-01-03 12:00:00', '2025-01-13 12:00:00', 0, 1),
|
|
('默认分组', '%s', '2025-01-03 12:00:00', '2025-01-13 12:00:00', 0, 1),
|
|
@@ -697,8 +697,8 @@ func (this *EntFollow) GetLabelGroup() *[]map[string]interface{} {
|
|
|
|
|
|
func (this *EntFollow) AddLabelGroup(name string) error {
|
|
func (this *EntFollow) AddLabelGroup(name string) error {
|
|
if db.Base.Count("follow_ent_monitor_group", map[string]interface{}{
|
|
if db.Base.Count("follow_ent_monitor_group", map[string]interface{}{
|
|
- "user_id": this.UserId,
|
|
|
|
- "isDefGroup": 1,
|
|
|
|
|
|
+ "user_id": this.UserId,
|
|
|
|
+ "isdefGoup": 1,
|
|
}) == 0 { //初始化默认分组
|
|
}) == 0 { //初始化默认分组
|
|
db.Base.SelectBySql(fmt.Sprintf(`INSERT INTO follow_ent_monitor_group (s_name, s_userid, create_time, update_time, isPut, isdefGoup) VALUES
|
|
db.Base.SelectBySql(fmt.Sprintf(`INSERT INTO follow_ent_monitor_group (s_name, s_userid, create_time, update_time, isPut, isdefGoup) VALUES
|
|
('默认分组', '%s', '2025-01-03 12:00:00', '2025-01-13 12:00:00', 0, 1),
|
|
('默认分组', '%s', '2025-01-03 12:00:00', '2025-01-13 12:00:00', 0, 1),
|
|
@@ -724,8 +724,8 @@ func (this *EntFollow) AddLabelGroup(name string) error {
|
|
|
|
|
|
func (this *EntFollow) PutLabelGroup(name string, groupId string) error {
|
|
func (this *EntFollow) PutLabelGroup(name string, groupId string) error {
|
|
if db.Base.Count("follow_ent_monitor_group", map[string]interface{}{
|
|
if db.Base.Count("follow_ent_monitor_group", map[string]interface{}{
|
|
- "user_id": this.UserId,
|
|
|
|
- "s_name": name,
|
|
|
|
|
|
+ "s_userid": this.UserId,
|
|
|
|
+ "s_name": name,
|
|
}) > 0 { //是否重名
|
|
}) > 0 { //是否重名
|
|
return errors.New("分组名称已存在")
|
|
return errors.New("分组名称已存在")
|
|
}
|
|
}
|