作者 yangfu

机会补充修改

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