Merge branch 'develop' of git.ailuowan.com:zzw/lone-services into develop
CI / changes (push) Successful in 1m32s
CI / ad (push) Successful in 1s
CI / admin (push) Successful in 0s
CI / aiserver (push) Successful in 0s
CI / analysis (push) Successful in 40s
CI / bff (push) Successful in 22s
CI / chore (push) Successful in 1s
CI / equipment (push) Successful in 0s
CI / express (push) Successful in 0s
CI / factory (push) Successful in 0s
CI / message (push) Successful in 1s
CI / order (push) Successful in 0s
CI / payment (push) Successful in 1s
CI / percutaneous (push) Successful in 0s
CI / record (push) Successful in 0s
CI / product (push) Successful in 0s
CI / store (push) Successful in 1s
CI / sale (push) Successful in 0s
CI / support (push) Successful in 0s
CI / task (push) Successful in 0s
CI / user (push) Successful in 28s
CI / water (push) Successful in 0s
CI / wecom (push) Successful in 0s
CI / ws (push) Successful in 0s

This commit is contained in:
zzw
2026-11-03 10:25:23 +08:00
12 changed files with 162 additions and 43 deletions
+25 -21
View File
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.36.11 // protoc-gen-go v1.36.12
// protoc v4.25.8 // protoc v3.19.4
// source: water/water.proto // source: water/water.proto
package water package water
@@ -924,7 +924,8 @@ const file_water_water_proto_rawDesc = "" +
"\n" + "\n" +
"use_number\x18\x05 \x01(\x05R\tuseNumber\x12\x16\n" + "use_number\x18\x05 \x01(\x05R\tuseNumber\x12\x16\n" +
"\x06soften\x18\x06 \x01(\x05R\x06soften\x12#\n" + "\x06soften\x18\x06 \x01(\x05R\x06soften\x12#\n" +
"\rno_disturbing\x18\a \x01(\tR\fnoDisturbing2\xfd\t\n" + "\rno_disturbing\x18\a \x01(\tR\fnoDisturbing2\xdc\n" +
"\n" +
"\x05Water\x12Z\n" + "\x05Water\x12Z\n" +
"\tWifiCheck\x12\x17.water.WifiCheckRequest\x1a\x0f.water.Response\"#\x82\xd3\xe4\x93\x02\x1d:\x01*\x12\x18/api/v3/water/wifi/check\x12T\n" + "\tWifiCheck\x12\x17.water.WifiCheckRequest\x1a\x0f.water.Response\"#\x82\xd3\xe4\x93\x02\x1d:\x01*\x12\x18/api/v3/water/wifi/check\x12T\n" +
"\aWifiSet\x12\x15.water.WifiSetRequest\x1a\x0f.water.Response\"!\x82\xd3\xe4\x93\x02\x1b:\x01*\"\x16/api/v3/water/wifi/set\x12Q\n" + "\aWifiSet\x12\x15.water.WifiSetRequest\x1a\x0f.water.Response\"!\x82\xd3\xe4\x93\x02\x1b:\x01*\"\x16/api/v3/water/wifi/set\x12Q\n" +
@@ -941,7 +942,8 @@ const file_water_water_proto_rawDesc = "" +
"\rWarningStatus\x12\x1b.water.WarningStatusRequest\x1a\x0f.water.Response\"'\x82\xd3\xe4\x93\x02!:\x01*\"\x1c/api/v3/water/warning/status\x12U\n" + "\rWarningStatus\x12\x1b.water.WarningStatusRequest\x1a\x0f.water.Response\"'\x82\xd3\xe4\x93\x02!:\x01*\"\x1c/api/v3/water/warning/status\x12U\n" +
"\tApplyUser\x12\x17.water.ApplyUserRequest\x1a\x0f.water.Response\"\x1e\x82\xd3\xe4\x93\x02\x18:\x01*\"\x13/api/v3/water/apply\x12`\n" + "\tApplyUser\x12\x17.water.ApplyUserRequest\x1a\x0f.water.Response\"\x1e\x82\xd3\xe4\x93\x02\x18:\x01*\"\x13/api/v3/water/apply\x12`\n" +
"\vApplyStatus\x12\x19.water.ApplyStatusRequest\x1a\x0f.water.Response\"%\x82\xd3\xe4\x93\x02\x1f:\x01*\"\x1a/api/v3/water/apply/status\x12`\n" + "\vApplyStatus\x12\x19.water.ApplyStatusRequest\x1a\x0f.water.Response\"%\x82\xd3\xe4\x93\x02\x1f:\x01*\"\x1a/api/v3/water/apply/status\x12`\n" +
"\vchangeAdmin\x12\x19.water.changeAdminRequest\x1a\x0f.water.Response\"%\x82\xd3\xe4\x93\x02\x1f:\x01*\"\x1a/api/v3/water/change/admin\x12M\n" + "\vchangeAdmin\x12\x19.water.changeAdminRequest\x1a\x0f.water.Response\"%\x82\xd3\xe4\x93\x02\x1f:\x01*\"\x1a/api/v3/water/change/admin\x12]\n" +
"\x0fUsersApplyItems\x12\x13.water.UsersRequest\x1a\x0f.water.Response\"$\x82\xd3\xe4\x93\x02\x1e:\x01*\x12\x19/api/v3/water/users/apply\x12M\n" +
"\x05Users\x12\x13.water.UsersRequest\x1a\x0f.water.Response\"\x1e\x82\xd3\xe4\x93\x02\x18:\x01*\"\x13/api/v3/water/usersB\tZ\a./waterb\x06proto3" "\x05Users\x12\x13.water.UsersRequest\x1a\x0f.water.Response\"\x1e\x82\xd3\xe4\x93\x02\x18:\x01*\"\x13/api/v3/water/usersB\tZ\a./waterb\x06proto3"
var ( var (
@@ -988,23 +990,25 @@ var file_water_water_proto_depIdxs = []int32{
12, // 10: water.Water.ApplyUser:input_type -> water.ApplyUserRequest 12, // 10: water.Water.ApplyUser:input_type -> water.ApplyUserRequest
13, // 11: water.Water.ApplyStatus:input_type -> water.ApplyStatusRequest 13, // 11: water.Water.ApplyStatus:input_type -> water.ApplyStatusRequest
10, // 12: water.Water.changeAdmin:input_type -> water.changeAdminRequest 10, // 12: water.Water.changeAdmin:input_type -> water.changeAdminRequest
11, // 13: water.Water.Users:input_type -> water.UsersRequest 11, // 13: water.Water.UsersApplyItems:input_type -> water.UsersRequest
5, // 14: water.Water.WifiCheck:output_type -> water.Response 11, // 14: water.Water.Users:input_type -> water.UsersRequest
5, // 15: water.Water.WifiSet:output_type -> water.Response 5, // 15: water.Water.WifiCheck:output_type -> water.Response
5, // 16: water.Water.AddLog:output_type -> water.Response 5, // 16: water.Water.WifiSet:output_type -> water.Response
5, // 17: water.Water.LogItems:output_type -> water.Response 5, // 17: water.Water.AddLog:output_type -> water.Response
5, // 18: water.Water.Setting:output_type -> water.Response 5, // 18: water.Water.LogItems:output_type -> water.Response
5, // 19: water.Water.GetSetting:output_type -> water.Response 5, // 19: water.Water.Setting:output_type -> water.Response
5, // 20: water.Water.GetWaterInfo:output_type -> water.Response 5, // 20: water.Water.GetSetting:output_type -> water.Response
5, // 21: water.Water.GetWarning:output_type -> water.Response 5, // 21: water.Water.GetWaterInfo:output_type -> water.Response
5, // 22: water.Water.AddWarning:output_type -> water.Response 5, // 22: water.Water.GetWarning:output_type -> water.Response
5, // 23: water.Water.WarningStatus:output_type -> water.Response 5, // 23: water.Water.AddWarning:output_type -> water.Response
5, // 24: water.Water.ApplyUser:output_type -> water.Response 5, // 24: water.Water.WarningStatus:output_type -> water.Response
5, // 25: water.Water.ApplyStatus:output_type -> water.Response 5, // 25: water.Water.ApplyUser:output_type -> water.Response
5, // 26: water.Water.changeAdmin:output_type -> water.Response 5, // 26: water.Water.ApplyStatus:output_type -> water.Response
5, // 27: water.Water.Users:output_type -> water.Response 5, // 27: water.Water.changeAdmin:output_type -> water.Response
14, // [14:28] is the sub-list for method output_type 5, // 28: water.Water.UsersApplyItems:output_type -> water.Response
0, // [0:14] is the sub-list for method input_type 5, // 29: water.Water.Users:output_type -> water.Response
15, // [15:30] is the sub-list for method output_type
0, // [0:15] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name 0, // [0:0] is the sub-list for field type_name
+53 -15
View File
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.6.2 // - protoc-gen-go-grpc v1.6.2
// - protoc v4.25.8 // - protoc v3.19.4
// source: water/water.proto // source: water/water.proto
package water package water
@@ -19,20 +19,21 @@ import (
const _ = grpc.SupportPackageIsVersion9 const _ = grpc.SupportPackageIsVersion9
const ( const (
Water_WifiCheck_FullMethodName = "/water.Water/WifiCheck" Water_WifiCheck_FullMethodName = "/water.Water/WifiCheck"
Water_WifiSet_FullMethodName = "/water.Water/WifiSet" Water_WifiSet_FullMethodName = "/water.Water/WifiSet"
Water_AddLog_FullMethodName = "/water.Water/AddLog" Water_AddLog_FullMethodName = "/water.Water/AddLog"
Water_LogItems_FullMethodName = "/water.Water/LogItems" Water_LogItems_FullMethodName = "/water.Water/LogItems"
Water_Setting_FullMethodName = "/water.Water/Setting" Water_Setting_FullMethodName = "/water.Water/Setting"
Water_GetSetting_FullMethodName = "/water.Water/GetSetting" Water_GetSetting_FullMethodName = "/water.Water/GetSetting"
Water_GetWaterInfo_FullMethodName = "/water.Water/GetWaterInfo" Water_GetWaterInfo_FullMethodName = "/water.Water/GetWaterInfo"
Water_GetWarning_FullMethodName = "/water.Water/GetWarning" Water_GetWarning_FullMethodName = "/water.Water/GetWarning"
Water_AddWarning_FullMethodName = "/water.Water/AddWarning" Water_AddWarning_FullMethodName = "/water.Water/AddWarning"
Water_WarningStatus_FullMethodName = "/water.Water/WarningStatus" Water_WarningStatus_FullMethodName = "/water.Water/WarningStatus"
Water_ApplyUser_FullMethodName = "/water.Water/ApplyUser" Water_ApplyUser_FullMethodName = "/water.Water/ApplyUser"
Water_ApplyStatus_FullMethodName = "/water.Water/ApplyStatus" Water_ApplyStatus_FullMethodName = "/water.Water/ApplyStatus"
Water_ChangeAdmin_FullMethodName = "/water.Water/changeAdmin" Water_ChangeAdmin_FullMethodName = "/water.Water/changeAdmin"
Water_Users_FullMethodName = "/water.Water/Users" Water_UsersApplyItems_FullMethodName = "/water.Water/UsersApplyItems"
Water_Users_FullMethodName = "/water.Water/Users"
) )
// WaterClient is the client API for Water service. // WaterClient is the client API for Water service.
@@ -59,6 +60,7 @@ type WaterClient interface {
ApplyStatus(ctx context.Context, in *ApplyStatusRequest, opts ...grpc.CallOption) (*Response, error) ApplyStatus(ctx context.Context, in *ApplyStatusRequest, opts ...grpc.CallOption) (*Response, error)
// 转移管理人 // 转移管理人
ChangeAdmin(ctx context.Context, in *ChangeAdminRequest, opts ...grpc.CallOption) (*Response, error) ChangeAdmin(ctx context.Context, in *ChangeAdminRequest, opts ...grpc.CallOption) (*Response, error)
UsersApplyItems(ctx context.Context, in *UsersRequest, opts ...grpc.CallOption) (*Response, error)
// 管理人列表 // 管理人列表
Users(ctx context.Context, in *UsersRequest, opts ...grpc.CallOption) (*Response, error) Users(ctx context.Context, in *UsersRequest, opts ...grpc.CallOption) (*Response, error)
} }
@@ -201,6 +203,16 @@ func (c *waterClient) ChangeAdmin(ctx context.Context, in *ChangeAdminRequest, o
return out, nil return out, nil
} }
func (c *waterClient) UsersApplyItems(ctx context.Context, in *UsersRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, Water_UsersApplyItems_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *waterClient) Users(ctx context.Context, in *UsersRequest, opts ...grpc.CallOption) (*Response, error) { func (c *waterClient) Users(ctx context.Context, in *UsersRequest, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response) out := new(Response)
@@ -235,6 +247,7 @@ type WaterServer interface {
ApplyStatus(context.Context, *ApplyStatusRequest) (*Response, error) ApplyStatus(context.Context, *ApplyStatusRequest) (*Response, error)
// 转移管理人 // 转移管理人
ChangeAdmin(context.Context, *ChangeAdminRequest) (*Response, error) ChangeAdmin(context.Context, *ChangeAdminRequest) (*Response, error)
UsersApplyItems(context.Context, *UsersRequest) (*Response, error)
// 管理人列表 // 管理人列表
Users(context.Context, *UsersRequest) (*Response, error) Users(context.Context, *UsersRequest) (*Response, error)
mustEmbedUnimplementedWaterServer() mustEmbedUnimplementedWaterServer()
@@ -286,6 +299,9 @@ func (UnimplementedWaterServer) ApplyStatus(context.Context, *ApplyStatusRequest
func (UnimplementedWaterServer) ChangeAdmin(context.Context, *ChangeAdminRequest) (*Response, error) { func (UnimplementedWaterServer) ChangeAdmin(context.Context, *ChangeAdminRequest) (*Response, error) {
return nil, status.Error(codes.Unimplemented, "method ChangeAdmin not implemented") return nil, status.Error(codes.Unimplemented, "method ChangeAdmin not implemented")
} }
func (UnimplementedWaterServer) UsersApplyItems(context.Context, *UsersRequest) (*Response, error) {
return nil, status.Error(codes.Unimplemented, "method UsersApplyItems not implemented")
}
func (UnimplementedWaterServer) Users(context.Context, *UsersRequest) (*Response, error) { func (UnimplementedWaterServer) Users(context.Context, *UsersRequest) (*Response, error) {
return nil, status.Error(codes.Unimplemented, "method Users not implemented") return nil, status.Error(codes.Unimplemented, "method Users not implemented")
} }
@@ -544,6 +560,24 @@ func _Water_ChangeAdmin_Handler(srv interface{}, ctx context.Context, dec func(i
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Water_UsersApplyItems_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UsersRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WaterServer).UsersApplyItems(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Water_UsersApplyItems_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WaterServer).UsersApplyItems(ctx, req.(*UsersRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Water_Users_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _Water_Users_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UsersRequest) in := new(UsersRequest)
if err := dec(in); err != nil { if err := dec(in); err != nil {
@@ -621,6 +655,10 @@ var Water_ServiceDesc = grpc.ServiceDesc{
MethodName: "changeAdmin", MethodName: "changeAdmin",
Handler: _Water_ChangeAdmin_Handler, Handler: _Water_ChangeAdmin_Handler,
}, },
{
MethodName: "UsersApplyItems",
Handler: _Water_UsersApplyItems_Handler,
},
{ {
MethodName: "Users", MethodName: "Users",
Handler: _Water_Users_Handler, Handler: _Water_Users_Handler,
Binary file not shown.
+7
View File
@@ -182,6 +182,13 @@ service Water {
}; };
} }
rpc UsersApplyItems(UsersRequest) returns (Response) {
option (google.api.http) = {
get: "/api/v3/water/users/apply"
body: "*"
};
}
// 管理人列表 // 管理人列表
rpc Users(UsersRequest) returns (Response) { rpc Users(UsersRequest) returns (Response) {
option (google.api.http) = { option (google.api.http) = {
+4
View File
@@ -20,3 +20,7 @@ type UsersInfo struct {
UpdateTime utils.CustomTime `json:"update_time" gorm:"update_time"` UpdateTime utils.CustomTime `json:"update_time" gorm:"update_time"`
CarteTime utils.CustomTime `json:"carte_time" gorm:"carte_time"` CarteTime utils.CustomTime `json:"carte_time" gorm:"carte_time"`
} }
type UsersStatus struct {
Status int32 `gorm:"column:status;type:tinyint(1);not null;default:3" json:"status"` // 状态:1为正常,2为禁用,3为申请
}
@@ -7,6 +7,7 @@ import (
"lone-services/services/water/internal/dao" "lone-services/services/water/internal/dao"
"lone-services/services/water/model" "lone-services/services/water/model"
"lone-services/services/water/validator" "lone-services/services/water/validator"
"strconv"
"lone-services/rpc/water/pb" "lone-services/rpc/water/pb"
"lone-services/services/water/internal/svc" "lone-services/services/water/internal/svc"
@@ -40,7 +41,7 @@ func (l *ApplyStatusLogic) ApplyStatus(in *water.ApplyStatusRequest) (*water.Res
return l.fail(utils.ErrorNoLoginInfo) return l.fail(utils.ErrorNoLoginInfo)
} }
w := modelbase.Params{Eq: map[string]string{"id": string(in.Id)}} w := modelbase.Params{Eq: map[string]string{"id": strconv.FormatInt(in.Id, utils.NumberTen)}}
var info dao.UsersInfo var info dao.UsersInfo
err := model.UsersModel{}.Init().GetOne(w, &info) err := model.UsersModel{}.Init().GetOne(w, &info)
@@ -51,9 +52,9 @@ func (l *ApplyStatusLogic) ApplyStatus(in *water.ApplyStatusRequest) (*water.Res
return l.fail(utils.ErrorNotFund) return l.fail(utils.ErrorNotFund)
} }
info.Status = in.Status up := dao.UsersStatus{Status: in.Status}
_, err = model.UsersModel{}.Init().Edit(w, &info) _, err = model.UsersModel{}.Init().Edit(w, &up)
if err != nil { if err != nil {
return l.fail(utils.Fail) return l.fail(utils.Fail)
} }
@@ -7,6 +7,7 @@ import (
"lone-services/services/water/internal/dao" "lone-services/services/water/internal/dao"
"lone-services/services/water/model" "lone-services/services/water/model"
"lone-services/services/water/validator" "lone-services/services/water/validator"
"strconv"
"lone-services/rpc/water/pb" "lone-services/rpc/water/pb"
"lone-services/services/water/internal/svc" "lone-services/services/water/internal/svc"
@@ -29,7 +30,7 @@ func NewApplyUserLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ApplyUs
} }
} }
// 申请 // ApplyUser 申请
func (l *ApplyUserLogic) ApplyUser(in *water.ApplyUserRequest) (*water.Response, error) { func (l *ApplyUserLogic) ApplyUser(in *water.ApplyUserRequest) (*water.Response, error) {
var v validator.UserApplyValidator var v validator.UserApplyValidator
if fail := l.checkParams(in, &v); fail != nil { if fail := l.checkParams(in, &v); fail != nil {
@@ -40,7 +41,7 @@ func (l *ApplyUserLogic) ApplyUser(in *water.ApplyUserRequest) (*water.Response,
return l.fail(utils.ErrorNoLoginInfo) return l.fail(utils.ErrorNoLoginInfo)
} }
w := modelbase.Params{Eq: map[string]string{"user_id": string(in.UserId), "status": utils.StringStatusOk}} w := modelbase.Params{Eq: map[string]string{"user_id": strconv.FormatInt(in.UserId, utils.NumberTen), "status": utils.StringStatusOk}}
var info dao.UsersCreate var info dao.UsersCreate
err := model.UsersModel{}.Init().GetOne(w, &info) err := model.UsersModel{}.Init().GetOne(w, &info)
@@ -6,6 +6,7 @@ import (
"lone-services/pkg/utils" "lone-services/pkg/utils"
"lone-services/services/water/internal/dao" "lone-services/services/water/internal/dao"
"lone-services/services/water/model" "lone-services/services/water/model"
"strconv"
"lone-services/rpc/water/pb" "lone-services/rpc/water/pb"
"lone-services/services/water/internal/svc" "lone-services/services/water/internal/svc"
@@ -44,7 +45,7 @@ func (l *GetWarningLogic) GetWarning(in *water.GetWarningItemsRequest) (*water.R
w.Eq["host_code"] = in.HostCode w.Eq["host_code"] = in.HostCode
} }
if in.Type > utils.NumberZero { if in.Type > utils.NumberZero {
w.Eq["type"] = string(in.Type) w.Eq["type"] = strconv.Itoa(int(in.Type))
} }
var info []dao.WarningInfo var info []dao.WarningInfo
@@ -0,0 +1,51 @@
package logic
import (
"context"
"lone-services/pkg/modelbase"
"lone-services/pkg/utils"
"lone-services/services/water/internal/dao"
"lone-services/services/water/model"
"lone-services/services/water/validator"
"lone-services/rpc/water/pb"
"lone-services/services/water/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
)
type UsersApplyItemsLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
BaseLogic
}
func NewUsersApplyItemsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UsersApplyItemsLogic {
return &UsersApplyItemsLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *UsersApplyItemsLogic) UsersApplyItems(in *water.UsersRequest) (*water.Response, error) {
var v validator.UserItemsValidator
if fail := l.checkParams(in, &v); fail != nil {
return fail, nil
}
adminInfo := utils.GetUserFromCtx(l.ctx)
if adminInfo.ID < utils.NumberOne {
return l.fail(utils.ErrorNoLoginInfo)
}
w := modelbase.Params{Eq: map[string]string{"host_code": in.HostCode, "status": utils.StatusForbiddenString}}
var info []dao.UsersInfo
items, err := model.UsersModel{}.Init().Page(w, &info)
if err != nil {
return l.fail(utils.Fail)
}
return l.ok(items)
}
@@ -7,6 +7,7 @@ import (
"lone-services/services/water/internal/dao" "lone-services/services/water/internal/dao"
"lone-services/services/water/model" "lone-services/services/water/model"
"lone-services/services/water/validator" "lone-services/services/water/validator"
"strconv"
"lone-services/rpc/water/pb" "lone-services/rpc/water/pb"
"lone-services/services/water/internal/svc" "lone-services/services/water/internal/svc"
@@ -40,7 +41,7 @@ func (l *WarningStatusLogic) WarningStatus(in *water.WarningStatusRequest) (*wat
return l.fail(utils.ErrorNoLoginInfo) return l.fail(utils.ErrorNoLoginInfo)
} }
w := modelbase.Params{Eq: map[string]string{"id": string(in.Id)}} w := modelbase.Params{Eq: map[string]string{"id": strconv.FormatInt(in.Id, utils.NumberTen)}}
var info dao.WarningInfo var info dao.WarningInfo
err := model.WarningModel{}.Init().GetOne(w, &info) err := model.WarningModel{}.Init().GetOne(w, &info)
@@ -95,6 +95,11 @@ func (s *WaterServer) ChangeAdmin(ctx context.Context, in *water.ChangeAdminRequ
return l.ChangeAdmin(in) return l.ChangeAdmin(in)
} }
func (s *WaterServer) UsersApplyItems(ctx context.Context, in *water.UsersRequest) (*water.Response, error) {
l := logic.NewUsersApplyItemsLogic(ctx, s.svcCtx)
return l.UsersApplyItems(in)
}
// 管理人列表 // 管理人列表
func (s *WaterServer) Users(ctx context.Context, in *water.UsersRequest) (*water.Response, error) { func (s *WaterServer) Users(ctx context.Context, in *water.UsersRequest) (*water.Response, error) {
l := logic.NewUsersLogic(ctx, s.svcCtx) l := logic.NewUsersLogic(ctx, s.svcCtx)
+6
View File
@@ -51,6 +51,7 @@ type (
ApplyStatus(ctx context.Context, in *ApplyStatusRequest, opts ...grpc.CallOption) (*Response, error) ApplyStatus(ctx context.Context, in *ApplyStatusRequest, opts ...grpc.CallOption) (*Response, error)
// 转移管理人 // 转移管理人
ChangeAdmin(ctx context.Context, in *ChangeAdminRequest, opts ...grpc.CallOption) (*Response, error) ChangeAdmin(ctx context.Context, in *ChangeAdminRequest, opts ...grpc.CallOption) (*Response, error)
UsersApplyItems(ctx context.Context, in *UsersRequest, opts ...grpc.CallOption) (*Response, error)
// 管理人列表 // 管理人列表
Users(ctx context.Context, in *UsersRequest, opts ...grpc.CallOption) (*Response, error) Users(ctx context.Context, in *UsersRequest, opts ...grpc.CallOption) (*Response, error)
} }
@@ -138,6 +139,11 @@ func (m *defaultWater) ChangeAdmin(ctx context.Context, in *ChangeAdminRequest,
return client.ChangeAdmin(ctx, in, opts...) return client.ChangeAdmin(ctx, in, opts...)
} }
func (m *defaultWater) UsersApplyItems(ctx context.Context, in *UsersRequest, opts ...grpc.CallOption) (*Response, error) {
client := water.NewWaterClient(m.cli.Conn())
return client.UsersApplyItems(ctx, in, opts...)
}
// 管理人列表 // 管理人列表
func (m *defaultWater) Users(ctx context.Context, in *UsersRequest, opts ...grpc.CallOption) (*Response, error) { func (m *defaultWater) Users(ctx context.Context, in *UsersRequest, opts ...grpc.CallOption) (*Response, error) {
client := water.NewWaterClient(m.cli.Conn()) client := water.NewWaterClient(m.cli.Conn())