hr.go 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // Package postgre
  2. /**
  3. * @ File:
  4. * @ Date: 2021/5/6 11:30
  5. * @ Author: JYQ
  6. * @ Description:
  7. */
  8. package postgre
  9. type PGHr struct {
  10. }
  11. func (PGHr) PublicSensorQuery(optUserId int64, objectShopId int64, jsonStr string, verfStr string) (result string, err error) {
  12. err = getClient().Raw("select fn_public_sensor_query(? ,? ,? )", optUserId, objectShopId, jsonStr, verfStr).
  13. Scan(&result).Error
  14. return
  15. }
  16. func (PGHr) PrivateSensorQuery(optUserId int64, objectShopId int64, jsonStr string, verfStr string) (result string, err error) {
  17. err = getClient().Raw("select fn_private_sensor_query(? ,? ,? )", optUserId, objectShopId, jsonStr, verfStr).
  18. Scan(&result).Error
  19. return
  20. }
  21. func (PGHr) PublicSensorsAdd(optUserId int64, objectShopId int64, jsonStr string, verfStr string) (result string, err error) {
  22. err = getClient().Raw("select fn_public_sensor_add(? ,? ,? )", optUserId, objectShopId, jsonStr, verfStr).
  23. Scan(&result).Error
  24. return
  25. }
  26. func (PGHr) PrivateSensorsAdd(optUserId int64, objectShopId int64, jsonStr string, verfStr string) (result string, err error) {
  27. err = getClient().Raw("select fn_private_sensor_add(? ,? ,? )", optUserId, objectShopId, jsonStr, verfStr).
  28. Scan(&result).Error
  29. return
  30. }
  31. func (PGHr) SensorsEdit(optUserId int64, objectShopId int64, jsonStr string, verfStr string) (result string, err error) {
  32. err = getClient().Raw("select fn_sensor_edit(? ,? ,? )", optUserId, objectShopId, jsonStr, verfStr).
  33. Scan(&result).Error
  34. return
  35. }
  36. func (PGHr) SensorsDel(optUserId int64, objectShopId int64, jsonStr string, verfStr string) (result string, err error) {
  37. err = getClient().Raw("select fn_sensor_del(? ,? ,? )", optUserId, objectShopId, jsonStr, verfStr).
  38. Scan(&result).Error
  39. return
  40. }
  41. func (PGHr) PkGroupChg(optUserId int64, objectShopId int64, jsonStr string, verfStr string) (result string, err error) {
  42. err = getClient().Raw("select fn_pk_group_chg(? ,? ,? )", optUserId, objectShopId, jsonStr, verfStr).
  43. Scan(&result).Error
  44. return
  45. }
  46. func (PGHr) CrBind(optUserId int64, objectShopId int64, jsonStr string, verfStr string) (result string, err error) {
  47. err = getClient().Raw("select fn_cr_bind(? ,? ,? )", optUserId, objectShopId, jsonStr, verfStr).
  48. Scan(&result).Error
  49. return
  50. }
  51. func (PGHr) CrUnBind(optUserId int64, objectShopId int64, jsonStr string, verfStr string) (result string, err error) {
  52. err = getClient().Raw("select fn_cr_unbind(? ,? ,? )", optUserId, objectShopId, jsonStr, verfStr).
  53. Scan(&result).Error
  54. return
  55. }