123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- package logic
- import (
- IC "bp.jydev.jianyu360.cn/BaseService/biService/rpc/internal/config"
- "bp.jydev.jianyu360.cn/BaseService/biService/service"
- "context"
- "bp.jydev.jianyu360.cn/BaseService/biService/rpc/internal/svc"
- "bp.jydev.jianyu360.cn/BaseService/biService/rpc/pb"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type AddAcceptanceLogic struct {
- ctx context.Context
- svcCtx *svc.ServiceContext
- logx.Logger
- }
- func NewAddAcceptanceLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AddAcceptanceLogic {
- return &AddAcceptanceLogic{
- ctx: ctx,
- svcCtx: svcCtx,
- Logger: logx.WithContext(ctx),
- }
- }
- func (l *AddAcceptanceLogic) AddAcceptance(in *pb.AcceptanceReq) (*pb.AcceptanceResp, error) {
- // todo: add your logic here and delete this line
- productMap := map[string]string{}
- for _, v := range IC.IC.ProductArr {
- productMap[v] = "dk"
- }
- scProductMap := map[string]string{}
- for _, v := range IC.IC.ScProductArr {
- scProductMap[v] = "scdk"
- }
- return &pb.AcceptanceResp{
- ErrorCode: 0,
- Data: &pb.Acceptance{
- AcceptanceNo: service.AddAcceptance(in, IC.IC.DkPersonMap, IC.IC.ScDkPersonMap, IC.IC.EntId, productMap, scProductMap),
- },
- }, nil
- }
|