冷链药品配送

zoie 97ebed55fa update:修改本地内部库为线上引用 1 ay önce
app cb1c5db36e fix:添加运单删除发件人信息 1 ay önce
cmd 5322986733 ADD:冰排、冰柜管理 5 ay önce
common 92ad6fba1b update:优化接口文档 2 ay önce
conf 92ad6fba1b update:优化接口文档 2 ay önce
db 92ad6fba1b update:优化接口文档 2 ay önce
ssh e3366ae976 first commit 6 ay önce
static e3366ae976 first commit 6 ay önce
.gitignore 5322986733 ADD:冰排、冰柜管理 5 ay önce
Dockerfile e3366ae976 first commit 6 ay önce
Makefile e3366ae976 first commit 6 ay önce
README.md 97ebed55fa update:修改本地内部库为线上引用 1 ay önce
docker-compose.yml e3366ae976 first commit 6 ay önce
go.mod 97ebed55fa update:修改本地内部库为线上引用 1 ay önce
go.sum 97ebed55fa update:修改本地内部库为线上引用 1 ay önce
main.go e3366ae976 first commit 6 ay önce
openapi.md 92ad6fba1b update:优化接口文档 2 ay önce
setting.yml 1c1c6e11dc update:根据市场需求屏蔽冷冻柜管理/保温箱管理添加/编辑SN的验证,冰排管理新增冷冻要求,入库无需再重复填写冷冻要求 1 ay önce

README.md

冷链运输平台

环境要求

  • go 1.19
  • mysql 8.0+
  • redis 4.0+

关联工具库

导入线上库

go env -w GOPRIVATE=https://gogs.baozhida.cn git config --global url."admin@gogs.baozhida.cn:23".insteadOf "https://gogs.baozhida.cn"

导入本地库

go mod edit -replace gogs.baozhida.cn/zoie/OAuth-core=${Yours_Path}/OAuth-core

示列:
go mod edit -replace gogs.baozhida.cn/zoie/OAuth-core=/Users/work/bzd_project/OAuth-core

软件架构

go gorm

开发工具

开发前需要安装以下工具

  • cobra (optional): CLI tool, 可以生成 cmd.go 文件
  • gin-swagger (required): 生成swagger文档

配置

参考 conf/setting.yml

编译

# windows
go build main.go

# macOS or linux 
make build

交叉编译

# windows
env GOOS=windows GOARCH=amd64 go build main.go

# macOS or linux 
env GOOS=linux GOARCH=amd64 go build main.go

启动服务,也可以用IDE进行调试

启动冷链 FRPC

# macOS or linux 下使用
$ ./cold-delivery server -c conf/settings.yml


# 注意:windows 下使用
$ cold-delivery.exe server -c conf/settings.yml

接口文档

生成swag接口文档

./ssh/swag.sh

swag init --parseDependency --parseInternal
swag init --parseDependency --parseDepth=6

访问

http://localhost:port/swagger/index.html

角色数据权限

1 - 全部数据权限
3 - 本机构数据权限
4 - 本机构及以下数据权限
5 - 仅本人数据权限

开发库