|
@@ -60,6 +60,8 @@ func (n *network) AddOrUpdate(in *types.AddOrUpdateReq) *types.Reply {
|
|
|
var saveIntroduce = func(tx *sql.Tx, cid int64, isUpdate bool) bool {
|
|
|
if in.Type != "middleman" {
|
|
|
return true
|
|
|
+ } else if in.Introduce_owner_id == "" && in.Introduce_project_id == "" {
|
|
|
+ return false
|
|
|
}
|
|
|
values := []interface{}{}
|
|
|
if in.Introduce_owner_id != "" {
|
|
@@ -72,9 +74,6 @@ func (n *network) AddOrUpdate(in *types.AddOrUpdateReq) *types.Reply {
|
|
|
values = append(values, in.PositionId, in.EntId, in.EntDeptId, in.EntUserId, cid, v, strings.Split(in.Introduce_project_name, ",")[k], 2, nowFormat)
|
|
|
}
|
|
|
}
|
|
|
- if len(values) == 0 {
|
|
|
- return false
|
|
|
- }
|
|
|
var r2 int64
|
|
|
if isUpdate {
|
|
|
r2 = CrmMysql.UpdateOrDeleteBySqlByTx(tx, `delete from crm.connection_introduce where connection_id=? and position_id=?`, in.Id, in.PositionId)
|