feat: user info

This commit is contained in:
zzw
2026-10-19 17:30:45 +08:00
parent 46d3f672bf
commit 8d7b543dc2
57 changed files with 2836 additions and 251 deletions
@@ -55,20 +55,34 @@ func (l *GetInfoByIdLogic) GetInfoById(in *store.IdRequest) (*store.InfoResponse
return &store.InfoResponse{
Id: info.Id,
Name: info.Name,
UserName: info.UserName,
Contact: info.Contact,
UserMobile: info.UserMobile,
IdCard: info.IdCard,
BusinessLicense: info.BusinessLicense,
Images: info.Images,
StoreImages: info.StoreImages,
Content: info.Content,
OpenTime: info.OpenTime,
Address: info.Address,
Province: info.Province,
ProvinceName: info.ProvinceName,
City: info.City,
CityName: info.CityName,
County: info.County,
CountyName: info.CountyName,
DistrictIds: info.District,
Area: info.Area,
BankInfo: info.BankInfo,
Type: info.Type,
SaleId: info.SaleId,
LongitudeWgs84: info.LongitudeWgs84,
LatitudeWgs84: info.LatitudeWgs84,
LongitudeGcj02: info.LongitudeGcj02,
LatitudeGcj02: info.LatitudeGcj02,
BuyAmount: info.BuyAmount,
ResidualNumber: info.ResidualNumber,
Status: info.Status,
CreateTime: info.CreateTime.String(),
}, nil
}
@@ -54,21 +54,35 @@ func (l *GetInfoByIdsLogic) GetInfoByIds(in *store.IdsRequest) (*store.ItemsResp
items = append(items, &store.InfoResponse{
Id: item.Id,
Name: item.Name,
UserName: item.UserName,
Contact: item.Contact,
UserMobile: mobile,
IdCard: item.IdCard,
BusinessLicense: item.BusinessLicense,
Images: item.Images,
StoreImages: item.StoreImages,
Content: item.Content,
OpenTime: item.OpenTime,
Address: item.Address,
Province: item.Province,
ProvinceName: item.ProvinceName,
City: item.City,
CityName: item.CityName,
County: item.County,
CountyName: item.CountyName,
DistrictIds: item.District,
Area: item.Area,
BankInfo: item.BankInfo,
Type: item.Type,
SaleId: item.SaleId,
LongitudeWgs84: item.LongitudeWgs84,
LatitudeWgs84: item.LatitudeWgs84,
LongitudeGcj02: item.LongitudeGcj02,
LatitudeGcj02: item.LatitudeGcj02,
BuyAmount: item.BuyAmount,
ResidualNumber: item.ResidualNumber,
Status: item.Status,
CreateTime: item.CreateTime.String(),
})
}
@@ -4,11 +4,11 @@ import (
"context"
"lone-services/pkg/modelbase"
"lone-services/pkg/utils"
store "lone-services/rpc/store/pb"
"lone-services/services/store/internal/dao"
"lone-services/services/store/internal/model"
"strconv"
"lone-services/rpc/store/pb"
"lone-services/services/store/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
@@ -36,7 +36,7 @@ func (l *WebCheckPayPasswordLogic) WebCheckPayPassword(in *store.EmptyRequest) (
}
var info dao.StoreWebPassword
w := modelbase.Params{Eq: map[string]string{"id": strconv.FormatInt(adminInfo.ID, utils.NumberTen)}}
w := modelbase.Params{Eq: map[string]string{"id": strconv.FormatInt(adminInfo.BizId, utils.NumberTen)}}
err := model.StoreModel{}.Init().GetOne(w, &info)
if err != nil {
l.Logger.Error(err)
@@ -7,7 +7,7 @@ import (
"lone-services/services/store/internal/model"
"lone-services/services/store/validator"
"lone-services/rpc/store/pb"
store "lone-services/rpc/store/pb"
"lone-services/services/store/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
@@ -39,7 +39,7 @@ func (l *WebDepositCreateLogic) WebDepositCreate(in *store.WebDepositCreateReque
}
info := dao.DepositCreate{
StoreId: adminInfo.ID,
StoreId: adminInfo.BizId,
Amount: in.Amount,
Bill: in.Bill,
Status: utils.StatusWaitPass,
@@ -4,7 +4,7 @@ import (
"context"
"lone-services/pkg/modelbase"
"lone-services/pkg/utils"
"lone-services/rpc/store/pb"
store "lone-services/rpc/store/pb"
"lone-services/services/store/internal/dao"
"lone-services/services/store/internal/model"
"lone-services/services/store/internal/svc"
@@ -41,7 +41,7 @@ func (l *WebDepositItemsLogic) WebDepositItems(in *store.WebDepositItemsRequest)
var info []dao.DepositWebInfo
w := modelbase.Params{
Eq: map[string]string{"store_id": strconv.FormatInt(adminInfo.ID, utils.NumberTen)},
Eq: map[string]string{"store_id": strconv.FormatInt(adminInfo.BizId, utils.NumberTen)},
Page: int(in.Page),
Size: int(in.Size),
Order: "id desc",
@@ -8,7 +8,7 @@ import (
"lone-services/services/store/internal/model"
"strconv"
"lone-services/rpc/store/pb"
store "lone-services/rpc/store/pb"
"lone-services/services/store/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
@@ -36,7 +36,7 @@ func (l *WebInfoLogic) WebInfo(in *store.EmptyRequest) (*store.Response, error)
}
var info dao.StoreInfo
modelObj := model.StoreModel{}.Init()
w := modelbase.Params{Eq: map[string]string{"id": strconv.FormatInt(adminInfo.ID, utils.NumberTen)}}
w := modelbase.Params{Eq: map[string]string{"id": strconv.FormatInt(adminInfo.BizId, utils.NumberTen)}}
err := modelObj.GetOne(w, &info)
if err != nil {
l.Logger.Error(err)
@@ -11,7 +11,7 @@ import (
"strconv"
"strings"
"lone-services/rpc/store/pb"
store "lone-services/rpc/store/pb"
"lone-services/services/store/internal/svc"
"github.com/samber/lo"
@@ -46,7 +46,7 @@ func (l *WebLowerStoreItemsLogic) WebLowerStoreItems(in *store.WebLowerStoreItem
return l.fail(utils.ErrorNoLogin)
}
saleId := adminInfo.ID
saleId := adminInfo.BizId
if in.SaleId > utils.NumberZero {
saleId = in.SaleId
}
@@ -4,11 +4,11 @@ import (
"context"
"lone-services/pkg/modelbase"
"lone-services/pkg/utils"
store "lone-services/rpc/store/pb"
"lone-services/services/store/internal/dao"
"lone-services/services/store/internal/model"
"strconv"
"lone-services/rpc/store/pb"
"lone-services/services/store/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
@@ -36,7 +36,7 @@ func (l *WebPayMoneyLogic) WebPayMoney(in *store.EmptyRequest) (*store.Response,
}
var info dao.StoreInfo
modelObj := model.StoreModel{}.Init()
w := modelbase.Params{Eq: map[string]string{"id": strconv.FormatInt(adminInfo.ID, utils.NumberTen)}}
w := modelbase.Params{Eq: map[string]string{"id": strconv.FormatInt(adminInfo.BizId, utils.NumberTen)}}
err := modelObj.GetOne(w, &info)
if err != nil {
l.Logger.Error(err)
@@ -9,7 +9,7 @@ import (
"lone-services/services/store/validator"
"strconv"
"lone-services/rpc/store/pb"
store "lone-services/rpc/store/pb"
"lone-services/services/store/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
@@ -41,7 +41,7 @@ func (l *WebSetPayPasswordLogic) WebSetPayPassword(in *store.WebSetPayPasswordRe
}
var info dao.StoreWebPassword
w := modelbase.Params{Eq: map[string]string{"id": strconv.FormatInt(adminInfo.ID, utils.NumberTen)}}
w := modelbase.Params{Eq: map[string]string{"id": strconv.FormatInt(adminInfo.BizId, utils.NumberTen)}}
modelObj := model.StoreModel{}.Init()
err := modelObj.GetOne(w, &info)
if err != nil {
@@ -6,7 +6,7 @@ import (
"lone-services/pkg/wecomrpc"
chore "lone-services/rpc/chore/pb"
sale "lone-services/rpc/sale/pb"
"lone-services/rpc/store/pb"
store "lone-services/rpc/store/pb"
user "lone-services/rpc/user/pb"
"lone-services/services/store/internal/dao"
"lone-services/services/store/internal/model"
@@ -72,7 +72,7 @@ func (l *WebStoreAddLogic) WebStoreAdd(in *store.WebStoreAddReq) (*store.Respons
return l.fail(utils.SetError(utils.Fail, cErr.GetMsg()))
}
groupId, sErr := l.getSaleInfo(adminInfo.ID)
groupId, sErr := l.getSaleInfo(adminInfo.BizId)
if sErr != utils.Ok {
return l.fail(sErr)
}
@@ -96,7 +96,7 @@ func (l *WebStoreAddLogic) WebStoreAdd(in *store.WebStoreAddReq) (*store.Respons
LatitudeWgs84: v.LatitudeWgs84,
LongitudeGcj02: v.LongitudeGcj02,
LatitudeGcj02: v.LatitudeGcj02,
SaleId: adminInfo.ID,
SaleId: adminInfo.BizId,
UserMobile: encryptMobile,
Name: v.Name,
BankInfo: v.BankInfo,