company.go 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. package tmp
  2. //万一以后用到了呢,文件保留吧
  3. //
  4. //import (
  5. // companyResp "hongze/hongze_open_api/models/response/company"
  6. // "hongze/hongze_open_api/models/tables/company"
  7. // "hongze/hongze_open_api/utils"
  8. //)
  9. //
  10. //// Company 客户模块
  11. //type Company struct {
  12. // BaseAuth
  13. //}
  14. //
  15. //// GetList
  16. //// @Title 获取客户数据报表
  17. //// @Description 客户数据接口
  18. //// @Param company_name query string true "客户名称,模糊匹配"
  19. //// @Param credit_code query string true "客户组织社会信用码,全等匹配"
  20. //// @Success 200 {object} company.CompanyListResp
  21. //func (c *Company) GetList() {
  22. // pageSize := c.PageSize
  23. // startSize := c.StartSize
  24. // currentIndex := c.StartPage
  25. //
  26. // var condition string
  27. // var pars []interface{}
  28. // //客户名称
  29. // companyName := c.GetString("company_name")
  30. // if companyName!=""{
  31. // condition += ` a.company_name like "%`+companyName+`" `
  32. // }
  33. // //组织社会信用码
  34. // creditCode := c.GetString("credit_code")
  35. // if creditCode!=""{
  36. // condition += ` a.credit_code = ? `
  37. // pars = append(pars,creditCode)
  38. // }
  39. //
  40. // total, list,err := company.GetList(condition,pars,startSize,pageSize)
  41. // if err != nil {
  42. // c.FailWithMessage("获取失败")
  43. // return
  44. // }
  45. //
  46. // page := utils.GetPaging(currentIndex, pageSize, total)
  47. // resp := companyResp.CompanyListResp{
  48. // List: list,
  49. // Paging: page,
  50. // }
  51. // c.OkDetailed(resp,"获取成功")
  52. //}