|
@@ -161,11 +161,13 @@ func EmployUpdate(tx *sql.Tx, employ_info_id, employ_custom_id, positionId int64
|
|
|
tablename = entity.EMPLOY_INFO
|
|
|
id = employ_info_id
|
|
|
}
|
|
|
+ fmt.Println(tablename, id)
|
|
|
if tablename == "" || id == 0 {
|
|
|
return employ_info_id, employ_custom_id
|
|
|
}
|
|
|
//判断该条信息是不是当前资讯分配员的
|
|
|
d := cm.CrmMysql.SelectBySqlByTx(tx, fmt.Sprintf(`select * from %v where id = ?`, tablename), id)
|
|
|
+ fmt.Println(d)
|
|
|
if d != nil && len(*d) > 0 {
|
|
|
data := (*d)[0]
|
|
|
position_id := gconv.Int64(data["position_id"])
|
|
@@ -176,13 +178,14 @@ func EmployUpdate(tx *sql.Tx, employ_info_id, employ_custom_id, positionId int64
|
|
|
d2 := cm.CrmMysql.SelectBySqlByTx(tx, fmt.Sprintf(`select * from %v where source_id = ? and position_id =?`, tablename), data["source_id"], positionId)
|
|
|
if d2 != nil && len(*d2) > 0 {
|
|
|
//已创建
|
|
|
- cm.CrmMysql.UpdateByTx(tx, tablename, map[string]interface{}{
|
|
|
+ qwe := cm.CrmMysql.UpdateByTx(tx, tablename, map[string]interface{}{
|
|
|
"source_id": data["source_id"],
|
|
|
"position_id": positionId,
|
|
|
}, map[string]interface{}{
|
|
|
key: 1,
|
|
|
"status": 1,
|
|
|
})
|
|
|
+ log.Println(qwe, data["source_id"], positionId)
|
|
|
} else {
|
|
|
data["position_id"] = positionId
|
|
|
data["ent_id"] = entId
|