智慧食堂-队列消费项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

svc_supply_basic_setting.go 1.1 KiB

2 months ago
12345678910111213141516171819202122232425262728293031
  1. package svc
  2. import (
  3. "applet/supply/db/model"
  4. "errors"
  5. "github.com/gin-gonic/gin"
  6. )
  7. func GetSupplyBasicSetting(c *gin.Context) (setting *model.SupplyBasicSetting, err error) {
  8. setting = &model.SupplyBasicSetting{}
  9. //get, _ := db.Db.Get(&setting)
  10. //if get {
  11. aliCloudChainFenXiaoAccessToken, aliCloudChainFenXiaoAppkey, aliCloudChainFenXiaoAppSecret, aliCloudChainAppkey, aliCloudChainAppSecret, aliCloudChainAccessToken := JudgeFenXiaoChannel(c)
  12. if aliCloudChainFenXiaoAccessToken != "" {
  13. setting.AliCloudChainFenXiaoAppkey = aliCloudChainFenXiaoAppkey
  14. setting.AliCloudChainFenXiaoAppsecret = aliCloudChainFenXiaoAppSecret
  15. setting.AliCloudChainFenXiaoAccesstoken = aliCloudChainFenXiaoAccessToken
  16. } else {
  17. err = errors.New("暂未配置《阿里巴巴云链精选》")
  18. return nil, err
  19. }
  20. if aliCloudChainAccessToken != "" {
  21. setting.AliCloudChainAppkey = aliCloudChainAppkey
  22. setting.AliCloudChainAppsecret = aliCloudChainAppSecret
  23. setting.AliCloudChainAccesstoken = aliCloudChainAccessToken
  24. } else {
  25. err = errors.New("暂未配置《阿里巴巴云链》")
  26. return nil, err
  27. }
  28. return
  29. }