作者 yangfu

机会补充修改

@@ -134,7 +134,7 @@ func GetUserAllCompany(uid int64) (v []*UserCompany, err error) { @@ -134,7 +134,7 @@ func GetUserAllCompany(uid int64) (v []*UserCompany, err error) {
134 //@key CompanyId NickName 134 //@key CompanyId NickName
135 func GetUserCompanyIdAllBy(options map[string]interface{}) (v []int64, err error) { 135 func GetUserCompanyIdAllBy(options map[string]interface{}) (v []int64, err error) {
136 o := orm.NewOrm() 136 o := orm.NewOrm()
137 - sql := "select id from user_company where enable=1" 137 + sql := "select id from user_company "
138 if _, ok := options["CompanyId"]; ok { 138 if _, ok := options["CompanyId"]; ok {
139 sql += fmt.Sprintf(" and company_id=%v ", options["CompanyId"]) 139 sql += fmt.Sprintf(" and company_id=%v ", options["CompanyId"])
140 } 140 }
@@ -869,7 +869,7 @@ func CheckChanceDifferent(header *protocol.RequestHeader, chance *models.Chance, @@ -869,7 +869,7 @@ func CheckChanceDifferent(header *protocol.RequestHeader, chance *models.Chance,
869 if src[i].Value != v.Value { 869 if src[i].Value != v.Value {
870 isDiff = true 870 isDiff = true
871 } 871 }
872 - if len(src[i].Data) > 0 { 872 + if len(src[i].Data) > 0 || len(v.Data) > 0 {
873 if !reflect.DeepEqual(src[i].Data, v.Data) { 873 if !reflect.DeepEqual(src[i].Data, v.Data) {
874 isDiff = true 874 isDiff = true
875 } 875 }
@@ -881,7 +881,7 @@ func CheckChanceDifferent(header *protocol.RequestHeader, chance *models.Chance, @@ -881,7 +881,7 @@ func CheckChanceDifferent(header *protocol.RequestHeader, chance *models.Chance,
881 881
882 if isDiff { 882 if isDiff {
883 c := protocol.ReviseContent{ 883 c := protocol.ReviseContent{
884 - Content: fmt.Sprintf("将“%v”由“%v”改为 “%v”", src[i].Label, srcValue, src[i].Value), 884 + Content: fmt.Sprintf("将“%v”由“%v”改为“%v”", src[i].Label, srcValue, src[i].Value),
885 Label: src[i].Label, 885 Label: src[i].Label,
886 InputType: src[i].InputType, 886 InputType: src[i].InputType,
887 Data: src[i].Data, 887 Data: src[i].Data,