|
@@ -85,7 +85,7 @@ func (n *network) AddOrUpdate(in *types.AddOrUpdateReq) *types.Reply {
|
|
|
if in.Id > 0 {
|
|
|
if CrmMysql.ExecTx("更新人脉", func(tx *sql.Tx) bool {
|
|
|
if in.Company_id != "" {
|
|
|
- count := CrmMysql.CountBySql(`select count(1) as count from crm.connection where position_id=? and company_id=? and itype=? and id<>?`, in.PositionId, in.Company_id, itype, in.Id)
|
|
|
+ count := CrmMysql.CountBySql(`select count(1) as count from crm.connection where position_id=? and company_id=? and itype=? and id<>? and status=1`, in.PositionId, in.Company_id, itype, in.Id)
|
|
|
if count == -1 {
|
|
|
return false
|
|
|
} else if count > 0 {
|
|
@@ -104,7 +104,7 @@ func (n *network) AddOrUpdate(in *types.AddOrUpdateReq) *types.Reply {
|
|
|
}
|
|
|
} else {
|
|
|
if in.Company_id != "" {
|
|
|
- count := CrmMysql.CountBySql(`select count(1) as count from crm.connection where position_id=? and company_id=? and itype=?`, in.PositionId, in.Company_id, itype)
|
|
|
+ count := CrmMysql.CountBySql(`select count(1) as count from crm.connection where position_id=? and company_id=? and itype=? and status=1`, in.PositionId, in.Company_id, itype)
|
|
|
if count == -1 {
|
|
|
return reply
|
|
|
} else if count > 0 {
|