```
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

feat(user): 添加申请商店功能

- 新增ReqShop接口用于用户申请成为商店角色
- 验证用户是否满足申请条件(任务完成状态)
- 将符合条件的用户分配到商店角色ID 27

feat(pet): 设置宠物价格最小值限制

- 为宠物价格设置最低5的限制
- 防止价格过低影响游戏平衡

feat(task): 实现商店申请条件检查

- 添加CanShop方法检查用户是否完成特定任务
- 使用位集验证任务ID 500
This commit is contained in:
昔念
2026-03-11 00:43:17 +08:00
parent ed8b1b71c1
commit b0130f39d5
3 changed files with 49 additions and 0 deletions

View File

@@ -94,6 +94,9 @@ func (c *PetBagController) ModPrise(ctx context.Context, req *PriseReq) (res *co
admin := cool.GetAdmin(ctx)
res = &cool.BaseRes{}
if req.Price < 5 {
req.Price = 5
}
service.NewPetService(uint32(admin.UserId)).UPdatePrice(req.Ctime, req.Price)
return