activity_special.go 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589
  1. package controllers
  2. import (
  3. "encoding/json"
  4. "github.com/rdlucklib/rdluck_tools/paging"
  5. "hongze/hongze_clpt/models"
  6. "hongze/hongze_clpt/services"
  7. "hongze/hongze_clpt/utils"
  8. "strconv"
  9. "time"
  10. )
  11. // 专项调研活动
  12. type ActivitySpecialController struct {
  13. BaseAuthController
  14. }
  15. // @Title 专项产业调研列表
  16. // @Description 获取专项产业调研列表接口
  17. // @Param PageSize query int true "每页数据条数"
  18. // @Param CurrentIndex query int true "当前页页码,从1开始"
  19. // @Param ChartPermissionIds query string false "行业id 多个用 , 隔开"
  20. // @Param ActiveState query string false "活动进行状态 未开始:1、进行中2、已结束3"
  21. // @Param WhichDay query string false "哪一天 今天:1、明天:2, 本周:3 上周:4,本月:5上月:6多个用 , 隔开"
  22. // @Success 200 {object} models.GetCygxActivitySpecialDetailListResp
  23. // @router /list [get]
  24. func (this *ActivitySpecialController) SpecialList() {
  25. br := new(models.BaseResponse).Init()
  26. defer func() {
  27. this.Data["json"] = br
  28. this.ServeJSON()
  29. }()
  30. user := this.User
  31. if user == nil {
  32. br.Msg = "请登录"
  33. br.ErrMsg = "请登录,SysUser Is Empty"
  34. return
  35. }
  36. pageSize, _ := this.GetInt("PageSize")
  37. currentIndex, _ := this.GetInt("CurrentIndex")
  38. chartPermissionIds := this.GetString("ChartPermissionIds")
  39. whichDay := this.GetString("WhichDay")
  40. activeState := this.GetString("ActiveState")
  41. if pageSize <= 0 {
  42. pageSize = utils.PageSize20
  43. }
  44. if currentIndex <= 0 {
  45. currentIndex = 1
  46. }
  47. if activeState == "1" {
  48. activeState = ""
  49. }
  50. conditionActivity := services.ActivityLabelSpecialSql(chartPermissionIds, whichDay, activeState)
  51. list, total, errList := services.GetActivitySpecialList(user, currentIndex, pageSize, "", conditionActivity, activeState)
  52. if errList != nil {
  53. br.Msg = "获取失败"
  54. br.ErrMsg = "获取失败,Err:" + errList.Error()
  55. return
  56. }
  57. page := paging.GetPaging(currentIndex, pageSize, total)
  58. resp := new(models.GetCygxActivitySpecialDetailListResp)
  59. count, err := models.GetCygxUserFollowSpecial(user.UserId)
  60. if err != nil {
  61. br.Msg = "获取数据失败!"
  62. br.ErrMsg = "获取客户详情失败,Err:" + err.Error()
  63. return
  64. }
  65. if count == 1 && user.UserId > 0 {
  66. resp.IsFollow = true
  67. }
  68. if user.Mobile != "" {
  69. resp.IsBindingMobile = true
  70. }
  71. if len(list) == 0 {
  72. list = make([]*models.CygxActivitySpecialDetail, 0)
  73. }
  74. resp.List = list
  75. resp.Paging = page
  76. br.Ret = 200
  77. br.Success = true
  78. br.Msg = "获取成功"
  79. br.Data = resp
  80. }
  81. // @Title 专项产业调研详情
  82. // @Description 获取专项产业调研详情接口
  83. // @Param ActivityId query int true "活动ID"
  84. // @Success Ret=200 {object} models.CygxActivitySpecialResp
  85. // @router /detail [get]
  86. func (this *ActivitySpecialController) SpecialDetail() {
  87. br := new(models.BaseResponse).Init()
  88. defer func() {
  89. this.Data["json"] = br
  90. this.ServeJSON()
  91. }()
  92. user := this.User
  93. if user == nil {
  94. br.Msg = "请登录"
  95. br.ErrMsg = "请登录,用户信息为空"
  96. br.Ret = 408
  97. return
  98. }
  99. uid := user.UserId
  100. activityId, _ := this.GetInt("ActivityId")
  101. if activityId < 1 {
  102. br.Msg = "请输入活动ID"
  103. return
  104. }
  105. resp := new(models.CygxActivitySpecialResp)
  106. activityInfo, err := models.GetCygxActivitySpecialDetailById(uid, activityId)
  107. if err != nil && err.Error() != utils.ErrNoRow() {
  108. br.Msg = "获取信息失败"
  109. br.ErrMsg = "活动ID错误,Err:" + "activityId:" + strconv.Itoa(activityId)
  110. return
  111. }
  112. if activityInfo == nil {
  113. br.Msg = "活动不存在"
  114. br.ErrMsg = "活动ID错误,Err:" + "activityId:" + strconv.Itoa(activityId)
  115. return
  116. }
  117. havePower, err := services.GetSpecialDetailUserPower(user, activityInfo)
  118. if err != nil {
  119. br.Msg = "获取信息失败"
  120. br.ErrMsg = "判断是否已申请过试用失败,Err:" + err.Error()
  121. return
  122. }
  123. //判断有没有对应的权限,如果没有则给出对应的状态码
  124. if havePower {
  125. resp.HasPermission = 1
  126. count, err := models.GetCygxUserFollowSpecial(user.UserId)
  127. if err != nil {
  128. br.Msg = "获取数据失败!"
  129. br.ErrMsg = "获取客户详情失败,Err:" + err.Error()
  130. return
  131. }
  132. if count == 1 {
  133. resp.IsFollow = true
  134. }
  135. activityInfo, err := services.HandleActivitySpecialShow(activityInfo, user)
  136. if err != nil {
  137. br.Msg = "获取数据失败!"
  138. br.ErrMsg = "HandleActivitySpecialShow,Err:" + err.Error()
  139. return
  140. }
  141. var condition string
  142. var pars []interface{}
  143. condition += ` AND t.activity_id = ? AND t.is_cancel = 0 `
  144. pars = append(pars, activityInfo.ActivityId)
  145. tripTota, err := models.GetActivitySpecialTripCountByActivityId(condition, pars)
  146. if err != nil {
  147. br.Msg = "获取数据失败!"
  148. br.ErrMsg = "GetActivitySpecialTripCountByActivityId,Err:" + err.Error()
  149. return
  150. }
  151. activityInfo.TripNum = tripTota
  152. activityInfo.ActivityTypeName = "专项调研"
  153. resp.Detail = activityInfo
  154. resp.Detail = activityInfo
  155. } else {
  156. hasPermission, sellerName, sellerMobile, popupMsg, err := services.GetUserHasPermission(user)
  157. if err != nil {
  158. br.Msg = "获取信息失败"
  159. br.ErrMsg = "判断是否已申请过试用失败,Err:" + err.Error()
  160. return
  161. }
  162. resp.PopupMsg = popupMsg
  163. resp.HasPermission = hasPermission
  164. resp.SellerName = sellerName
  165. resp.SellerMobile = sellerMobile
  166. }
  167. br.Ret = 200
  168. br.Success = true
  169. br.Msg = "获取成功"
  170. br.Data = resp
  171. }
  172. // @Title报名
  173. // @Description 报名
  174. // @Param request body models.ActivityIdRep true "type json string"
  175. // @Success Ret=200 {object} models.SignupSpecialStatus
  176. // @router /trip/add [post]
  177. func (this *ActivitySpecialController) SpecialTripAdd() {
  178. br := new(models.BaseResponse).Init()
  179. defer func() {
  180. this.Data["json"] = br
  181. this.ServeJSON()
  182. }()
  183. user := this.User
  184. if user == nil {
  185. br.Msg = "请登录"
  186. br.ErrMsg = "请登录,用户信息为空"
  187. br.Ret = 408
  188. return
  189. }
  190. uid := user.UserId
  191. var req models.ActivityIdRep
  192. resp := new(models.SignupSpecialStatus)
  193. err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
  194. if err != nil {
  195. br.Msg = "参数解析异常!"
  196. br.ErrMsg = "参数解析失败,Err:" + err.Error()
  197. return
  198. }
  199. activityId := req.ActivityId
  200. activityInfo, errInfo := models.GetCygxActivitySpecialDetail(activityId)
  201. if activityInfo == nil {
  202. br.Msg = "操作失败"
  203. br.ErrMsg = "活动ID错误,不存在activityId:" + strconv.Itoa(activityId)
  204. return
  205. }
  206. if errInfo != nil {
  207. br.Msg = "操作失败"
  208. br.ErrMsg = "操作失败,Err:" + errInfo.Error()
  209. return
  210. }
  211. havePower, err := services.GetSpecialDetailUserPower(user, activityInfo)
  212. if err != nil {
  213. br.Msg = "获取信息失败"
  214. br.ErrMsg = "判断是否已申请过试用失败,Err:" + err.Error()
  215. return
  216. }
  217. //判断有没有对应的权限,如果没有则给出对应的状态码
  218. if havePower {
  219. resp.HasPermission = 1
  220. signupStatus, popupMsg, popupMsg2, err := services.SpecialTripPopupMsg(activityInfo, user)
  221. if err != nil {
  222. br.Msg = "获取信息失败"
  223. br.ErrMsg = "SpecialTripPopupMsg,Err:" + err.Error()
  224. return
  225. }
  226. resp.PopupMsg = popupMsg
  227. resp.PopupMsg2 = popupMsg2
  228. resp.SignupStatus = signupStatus
  229. if signupStatus == 1 {
  230. total, err := models.GetUserActivitySpecialTripCount(user.UserId, activityId)
  231. if err != nil {
  232. br.Msg = "获取信息失败"
  233. br.ErrMsg = "获取日程数量信息失败,Err:" + err.Error()
  234. return
  235. }
  236. //流水记录表
  237. itemBill := new(models.CygxActivitySpecialTripBill)
  238. itemBill.UserId = user.UserId
  239. itemBill.ActivityId = activityInfo.ActivityId
  240. itemBill.CreateTime = time.Now()
  241. itemBill.Mobile = user.Mobile
  242. itemBill.Email = user.Email
  243. itemBill.CompanyId = user.CompanyId
  244. itemBill.CompanyName = user.CompanyName
  245. itemBill.RealName = user.RealName
  246. itemBill.Source = 1
  247. itemBill.DoType = 1
  248. itemBill.BillDetailed = -1 // 流水减一
  249. itemBill.RegisterPlatform = 1
  250. itemBill.ChartPermissionId = activityInfo.ChartPermissionId
  251. go services.ActivitySpecialUserRmind(user, activityId, 2)
  252. //判断是删除还是添加
  253. if total == 0 {
  254. //获取销售信息
  255. sellerItem, err := models.GetSellerByCompanyIdCheckFicc(user.CompanyId, 2)
  256. if err != nil {
  257. br.Msg = "操作失败"
  258. br.ErrMsg = "获取销售信息失败,Err:" + err.Error()
  259. return
  260. }
  261. item := new(models.CygxActivitySpecialTrip)
  262. item.UserId = uid
  263. item.RealName = user.RealName
  264. item.ActivityId = activityId
  265. item.CreateTime = time.Now()
  266. item.Mobile = user.Mobile
  267. item.Email = user.Email
  268. item.CompanyId = user.CompanyId
  269. item.CompanyName = user.CompanyName
  270. item.IsValid = 1
  271. if sellerItem != nil {
  272. item.SellerName = sellerItem.RealName
  273. }
  274. err = models.AddCygxActivitySpecialTrip(item)
  275. if err != nil {
  276. br.Msg = "操作失败"
  277. br.ErrMsg = "操作失败,Err:" + err.Error()
  278. return
  279. }
  280. //SignupStatus int `description:"返回状态:1:成功 、2 :人数已满 、3:调研次数已用完、 4:超时"`
  281. } else {
  282. updateParams := make(map[string]interface{})
  283. updateParams["IsValid"] = 1
  284. updateParams["CreateTime"] = time.Now()
  285. updateParams["IsCancel"] = 0
  286. whereParam := map[string]interface{}{"user_id": user.UserId, "activity_id": activityId}
  287. err = models.UpdateByExpr(models.CygxActivitySpecialTrip{}, whereParam, updateParams)
  288. if err != nil {
  289. br.Msg = "报名失败,"
  290. br.ErrMsg = "二次报名,更改报名是否有效状态失败,Err:" + err.Error()
  291. return
  292. }
  293. resultTime := utils.StrTimeToTime(activityInfo.ActivityTime)
  294. //48小时之内的取消也扣除一次参会记录
  295. if time.Now().Add(+time.Hour * 48).After(resultTime) {
  296. itemBill.BillDetailed = 0 //48小时之内,取消报名之后二次报名,不扣除流水记录
  297. }
  298. }
  299. go models.AddCygxActivitySpecialTripBill(itemBill)
  300. }
  301. } else {
  302. hasPermission, sellerName, sellerMobile, popupMsg, err := services.GetUserHasPermission(user)
  303. if err != nil {
  304. br.Msg = "获取信息失败"
  305. br.ErrMsg = "判断是否已申请过试用失败,Err:" + err.Error()
  306. return
  307. }
  308. resp.PopupMsg = popupMsg
  309. resp.HasPermission = hasPermission
  310. resp.SellerName = sellerName
  311. resp.SellerMobile = sellerMobile
  312. }
  313. resp.ActivityId = activityId
  314. br.Ret = 200
  315. br.Success = true
  316. br.Msg = "操作成功"
  317. br.Data = resp
  318. }
  319. // @Title 取消报名
  320. // @Description 取消报名
  321. // @Param request body models.ActivityIdRep true "type json string"
  322. // @Success Ret=200 {object} models.SignupStatus
  323. // @router /trip/cancel [post]
  324. func (this *ActivitySpecialController) Tripcancel() {
  325. br := new(models.BaseResponse).Init()
  326. defer func() {
  327. this.Data["json"] = br
  328. this.ServeJSON()
  329. }()
  330. user := this.User
  331. if user == nil {
  332. br.Msg = "请登录"
  333. br.ErrMsg = "请登录,用户信息为空"
  334. br.Ret = 408
  335. return
  336. }
  337. uid := user.UserId
  338. var req models.ActivityIdRep
  339. err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
  340. if err != nil {
  341. br.Msg = "参数解析异常!"
  342. br.ErrMsg = "参数解析失败,Err:" + err.Error()
  343. return
  344. }
  345. activityId := req.ActivityId
  346. activityInfo, errInfo := models.GetCygxActivitySpecialDetailById(uid, activityId)
  347. if activityInfo == nil {
  348. br.Msg = "操作失败"
  349. br.ErrMsg = "活动ID错误,不存在activityId:" + strconv.Itoa(activityId)
  350. return
  351. }
  352. if errInfo != nil {
  353. br.Msg = "操作失败"
  354. br.ErrMsg = "操作失败,Err:" + errInfo.Error()
  355. return
  356. }
  357. //流水记录表
  358. itemBill := new(models.CygxActivitySpecialTripBill)
  359. itemBill.UserId = user.UserId
  360. itemBill.ActivityId = activityInfo.ActivityId
  361. itemBill.CreateTime = time.Now()
  362. itemBill.Mobile = user.Mobile
  363. itemBill.Email = user.Email
  364. itemBill.CompanyId = user.CompanyId
  365. itemBill.CompanyName = user.CompanyName
  366. itemBill.RealName = user.RealName
  367. itemBill.Source = 1
  368. itemBill.DoType = 2
  369. itemBill.BillDetailed = 1 // 流水加一
  370. itemBill.RegisterPlatform = 1
  371. itemBill.ChartPermissionId = activityInfo.ChartPermissionId
  372. resultTime := utils.StrTimeToTime(activityInfo.ActivityTime)
  373. //48小时之内的取消也扣除一次参会记录
  374. var isValid int
  375. if time.Now().Add(+time.Hour * 48).After(resultTime) {
  376. isValid = 1
  377. itemBill.BillDetailed = 0 //48小时之内取消的活动扣点不返回
  378. }
  379. err = models.CancelActivitySpecialTripIsValid(isValid, activityInfo.ActivityId, uid)
  380. if err != nil {
  381. br.Msg = "操作失败"
  382. br.ErrMsg = "CancelActivitySpecialTrip,Err:" + err.Error()
  383. return
  384. }
  385. go models.AddCygxActivitySpecialTripBill(itemBill)
  386. br.Ret = 200
  387. br.Success = true
  388. br.Msg = "已取消"
  389. }
  390. // @Title 感兴趣、不感兴趣
  391. // @Description 感兴趣、不感兴趣接口
  392. // @Param request body models.ActivityIdRep true "type json string"
  393. // @Success Ret=200 {object} models.SignupSpecialStatus
  394. // @router /signup/add [post]
  395. func (this *ActivitySpecialController) SpecialSignupAdd() {
  396. br := new(models.BaseResponse).Init()
  397. defer func() {
  398. this.Data["json"] = br
  399. this.ServeJSON()
  400. }()
  401. user := this.User
  402. if user == nil {
  403. br.Msg = "请登录"
  404. br.ErrMsg = "请登录,用户信息为空"
  405. br.Ret = 408
  406. return
  407. }
  408. uid := user.UserId
  409. var req models.ActivityIdRep
  410. resp := new(models.SignupSpecialStatus)
  411. err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
  412. if err != nil {
  413. br.Msg = "参数解析异常!"
  414. br.ErrMsg = "参数解析失败,Err:" + err.Error()
  415. return
  416. }
  417. activityId := req.ActivityId
  418. activityInfo, errInfo := models.GetCygxActivitySpecialDetail(activityId)
  419. if activityInfo == nil {
  420. br.Msg = "操作失败"
  421. br.ErrMsg = "活动ID错误,不存在activityId:" + strconv.Itoa(activityId)
  422. return
  423. }
  424. if errInfo != nil {
  425. br.Msg = "操作失败"
  426. br.ErrMsg = "操作失败,Err:" + errInfo.Error()
  427. return
  428. }
  429. havePower, err := services.GetSpecialDetailUserPower(user, activityInfo)
  430. if err != nil {
  431. br.Msg = "获取信息失败"
  432. br.ErrMsg = "判断是否已申请过试用失败,Err:" + err.Error()
  433. return
  434. }
  435. //判断有没有对应的权限,如果没有则给出对应的状态码
  436. if havePower {
  437. resp.HasPermission = 1
  438. total, err := models.GetUserCygxActivitySpecialSignup(user.UserId, activityId)
  439. if err != nil {
  440. br.Msg = "获取信息失败"
  441. br.ErrMsg = "获取日程数量信息失败,Err:" + err.Error()
  442. return
  443. }
  444. resp.SignupStatus = 1
  445. //判断是删除还是添加
  446. if total == 0 {
  447. //获取销售信息
  448. sellerItem, err := models.GetSellerByCompanyIdCheckFicc(user.CompanyId, 2)
  449. if err != nil {
  450. br.Msg = "操作失败"
  451. br.ErrMsg = "获取销售信息失败,Err:" + err.Error()
  452. return
  453. }
  454. item := new(models.CygxActivitySpecialSignup)
  455. item.RegisterPlatform = utils.REGISTER_PLATFORM
  456. item.UserId = uid
  457. item.RealName = user.RealName
  458. item.ActivityId = activityId
  459. item.CreateTime = time.Now()
  460. item.Mobile = user.Mobile
  461. item.Email = user.Email
  462. item.CompanyId = user.CompanyId
  463. item.CompanyName = user.CompanyName
  464. if sellerItem != nil {
  465. item.SellerName = sellerItem.RealName
  466. }
  467. err = models.AddCygxActivitySpecialSignup(item)
  468. if err != nil {
  469. br.Msg = "操作失败"
  470. br.ErrMsg = "操作失败,Err:" + err.Error()
  471. return
  472. }
  473. resp.Status = 1
  474. resp.PopupMsg = "感谢反馈"
  475. resp.PopupMsg2 = "此调研具体行程尚未确认,待预报名人数满10人后弘则会确定行程并推送给您活动日期,只有在确认行程中再次报名才完成占位。"
  476. //给所属销售发送消息
  477. //if sellerItem.Mobile != "" {
  478. // openIpItem, _ := models.GetUserRecordByMobile(4, sellerItem.Mobile)
  479. // if openIpItem != nil && openIpItem.OpenId != "" {
  480. // if sellerItem != nil {
  481. // //go services.SendSpecialTemplateMsg(user.RealName+"【"+user.CompanyName+"】", time.Now().Format(utils.FormatDateTime), user.Mobile, activityInfo.ResearchTheme, "sale", openIpItem)
  482. // }
  483. // }
  484. //}
  485. // 给芳姐发消息
  486. actList, _ := models.GetActivityListSpecialByActivityId(activityId)
  487. if len(actList) == 10 {
  488. go services.SendWxMsgActivitySpecial10(activityInfo)
  489. }
  490. //用户专项调研操作行为,模板消息推送
  491. //go services.SpecialActivityUserRemind(user, activityInfo, 1)
  492. } else {
  493. err = models.DeleteCygxActivitySpecialSignup(user.UserId, activityId)
  494. if err != nil {
  495. br.Msg = "操作失败"
  496. br.ErrMsg = "操作失败,Err:" + err.Error()
  497. return
  498. }
  499. resp.Status = 2
  500. }
  501. } else {
  502. hasPermission, sellerName, sellerMobile, popupMsg, err := services.GetUserHasPermission(user)
  503. if err != nil {
  504. br.Msg = "获取信息失败"
  505. br.ErrMsg = "判断是否已申请过试用失败,Err:" + err.Error()
  506. return
  507. }
  508. resp.PopupMsg = popupMsg
  509. resp.HasPermission = hasPermission
  510. resp.SellerName = sellerName
  511. resp.SellerMobile = sellerMobile
  512. }
  513. br.Ret = 200
  514. br.Success = true
  515. br.Msg = "操作成功"
  516. br.Data = resp
  517. }
  518. // @Title 新调研通知取消跟添加
  519. // @Description 新调研通知取消跟添加接口
  520. // @Param request body models.ArticleCollectResp true "type json string"
  521. // @Success 200
  522. // @router /follow [post]
  523. func (this *ActivitySpecialController) SpecialMsg() {
  524. br := new(models.BaseResponse).Init()
  525. defer func() {
  526. this.Data["json"] = br
  527. this.ServeJSON()
  528. }()
  529. user := this.User
  530. if user == nil {
  531. br.Msg = "请重新登录"
  532. br.Ret = 408
  533. return
  534. }
  535. resp := new(models.ArticleCollectResp)
  536. count, err := models.GetCygxUserFollowSpecial(user.UserId)
  537. if err != nil {
  538. br.Msg = "获取数据失败!"
  539. br.ErrMsg = "获取客户详情失败,Err:" + err.Error()
  540. return
  541. }
  542. if count == 0 {
  543. item := new(models.CygxUserFollowSpecial)
  544. item.UserId = user.UserId
  545. item.RealName = user.RealName
  546. item.CreateTime = time.Now()
  547. item.Mobile = user.Mobile
  548. item.Email = user.Email
  549. item.CompanyId = user.CompanyId
  550. item.CompanyName = user.CompanyName
  551. item.CreateTime = time.Now()
  552. err := models.AddUserFollowSpecial(item)
  553. if err != nil {
  554. br.Msg = "操作失败!"
  555. br.ErrMsg = "获取客户详情失败,Err:" + err.Error()
  556. return
  557. }
  558. resp.Status = 1
  559. } else {
  560. err := models.DeleteCygxUserFollowSpecial(user.UserId)
  561. if err != nil {
  562. br.Msg = "操作失败!"
  563. br.ErrMsg = "获取客户详情失败,Err:" + err.Error()
  564. return
  565. }
  566. resp.Status = 2
  567. }
  568. br.Ret = 200
  569. br.Data = resp
  570. br.Success = true
  571. br.Msg = "操作成功!"
  572. }