|
@@ -27,25 +27,25 @@ func NewSurplusDetailLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Sur
|
|
|
//资源剩余详情
|
|
|
func (l *SurplusDetailLogic) SurplusDetail(req *types.SurplusReq) (resp *types.Reply, err error) {
|
|
|
resp = &types.Reply{}
|
|
|
- if req.Appid == "" {
|
|
|
- resp.Err_msg = "无效的参数appid"
|
|
|
- l.Error(fmt.Sprintf("%+v", req), resp.Err_msg)
|
|
|
+ if req.AppId == "" {
|
|
|
+ resp.Error_msg = "无效的参数appid"
|
|
|
+ l.Error(fmt.Sprintf("%+v", req), resp.Error_msg)
|
|
|
return resp, nil
|
|
|
} else if req.Function_code == "" {
|
|
|
- resp.Err_msg = "无效的参数function_code"
|
|
|
- l.Error(fmt.Sprintf("%+v", req), resp.Err_msg)
|
|
|
+ resp.Error_msg = "无效的参数function_code"
|
|
|
+ l.Error(fmt.Sprintf("%+v", req), resp.Error_msg)
|
|
|
return resp, nil
|
|
|
} else if req.User_id == 0 && req.Ent_id == 0 && req.Ent_user_id == 0 {
|
|
|
- resp.Err_msg = "无效的参数user_id、ent_id、ent_user_id"
|
|
|
- l.Error(fmt.Sprintf("%+v", req), resp.Err_msg)
|
|
|
+ resp.Error_msg = "无效的参数user_id、ent_id、ent_user_id"
|
|
|
+ l.Error(fmt.Sprintf("%+v", req), resp.Error_msg)
|
|
|
return resp, nil
|
|
|
}
|
|
|
- status, total, surplus, err := Surplus(req.Appid, req.Function_code, req.User_id, req.Ent_id, req.Ent_user_id)
|
|
|
+ status, total, surplus, err := Surplus(req.AppId, req.Function_code, req.User_id, req.Ent_id, req.Ent_user_id)
|
|
|
if err != nil {
|
|
|
- resp.Err_msg = err.Error()
|
|
|
- l.Error(fmt.Sprintf("%+v", req), resp.Err_msg)
|
|
|
+ resp.Error_msg = err.Error()
|
|
|
+ l.Error(fmt.Sprintf("%+v", req), resp.Error_msg)
|
|
|
}
|
|
|
- resp.Err_code = status
|
|
|
+ resp.Error_code = status
|
|
|
resp.Data = &types.SurplusData{
|
|
|
Total: total,
|
|
|
Surplus: surplus,
|