class.go 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // Package postgre
  2. /**
  3. * @ File:
  4. * @ Date: 2021/4/26 11:26
  5. * @ Author: JYQ
  6. * @ Description:
  7. */
  8. package postgre
  9. type PGClass struct {
  10. }
  11. func (PGClass) ClassQuery(optUserId int64, objectShopId int64, jsonStr string, verfStr string) (result string, err error) {
  12. err = getClient().Raw("select fn_class_List_query(? ,? ,? )", optUserId, objectShopId, jsonStr, verfStr).
  13. Scan(&result).Error
  14. return
  15. }
  16. func (PGClass) ClassAdd(optUserId int64, objectShopId int64, jsonStr string, verfStr string) (result string, err error) {
  17. err = getClient().Raw("select fn_class_Add(? ,? ,? )", optUserId, objectShopId, jsonStr, verfStr).
  18. Scan(&result).Error
  19. return
  20. }
  21. func (PGClass) ClassEdit(optUserId int64, objectShopId int64, jsonStr string, verfStr string) (result string, err error) {
  22. err = getClient().Raw("select fn_class_edit(? ,? ,? )", optUserId, objectShopId, jsonStr, verfStr).
  23. Scan(&result).Error
  24. return
  25. }
  26. func (PGClass) ClassStatusEdit(optUserId int64, objectShopId int64, jsonStr string, verfStr string) (result string, err error) {
  27. err = getClient().Raw("select fn_class_status_edit(? ,? ,? )", optUserId, objectShopId, jsonStr, verfStr).
  28. Scan(&result).Error
  29. return
  30. }
  31. func (PGClass) ClassColorEdit(optUserId int64, objectShopId int64, jsonStr string, verfStr string) (result string, err error) {
  32. err = getClient().Raw("select fn_class_color_edit(? ,? ,? )", optUserId, objectShopId, jsonStr, verfStr).
  33. Scan(&result).Error
  34. return
  35. }
  36. func (PGClass) ClassVisibleStatusEdit(optUserId int64, objectShopId int64, jsonStr string, verfStr string) (result string, err error) {
  37. err = getClient().Raw("select fn_class_visible_status_edit(? ,? ,? )", optUserId, objectShopId, jsonStr, verfStr).
  38. Scan(&result).Error
  39. return
  40. }
  41. func (PGClass) ClassVipUserEdit(optUserId int64, objectShopId int64, jsonStr string, verfStr string) (result string, err error) {
  42. err = getClient().Raw("select fn_class_vip_user_edit(? ,? ,? )", optUserId, objectShopId, jsonStr, verfStr).
  43. Scan(&result).Error
  44. return
  45. }