Giter VIP home page Giter VIP logo

go-tenancy's Introduction

GoTenancy

Wercker status Code Coverage Go Report Card GoDoc Licenses
多商户管理平台

注意:项目已经转为公司内部项目,项目更新将会暂停. 如果有问题和建议,可以发布到issues

价格逻辑

商品价格

  • 商品售价 price
  • 商品原价 ot_price
  • 商品成本价 cost

订单价格

  • 订单商品总价 total_price
  • 订单邮费 total_postage
  • 订单支付总价 pay_price = total_price+total_postage
  • 订单支付邮费 pay_postage = total_postage
  • 订单平台手续费 commission_rate
  • 订单成本价 cost = 商品成本价
支付宝沙箱调试
接口测试

GO TEST

在 tests 目录下增加 password.txt 文件,内容填写数据库密码,如果redis和mysql 密码不一样,需要处理一下获取到的文本内容;

 pwds := strings.Split(password, ";")
 // pwds[1] mysql密码
 // pwds[2] redis密码

全局测试

 go test -timeout 60s -run [^TestInitDB$] github.com/snowlyg/go-tenancy/tests 

迁移数据库,填充数据

使用 vscode 执行测试

  • 用 vscode 打开项目 =》 终端 =》 运行任务 =》 选择对应任务执行
  • init db 初始化数据库,填充数据
  • test all 执行接口单元测试
  • build linux 编译 linux 版本
  • apidoc 更新接口文档
使用第三方库

go-tenancy's People

Contributors

snowlyg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.