123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- package logic
- import (
- "context"
- "bp.jydev.jianyu360.cn/CRM/application/api/internal/svc"
- "bp.jydev.jianyu360.cn/CRM/application/api/internal/types"
- "bp.jydev.jianyu360.cn/CRM/application/service"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type CustomAddLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
- }
- func NewCustomAddLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CustomAddLogic {
- return &CustomAddLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
- }
- func (l *CustomAddLogic) CustomAdd(req *types.CustomAddReq) (resp *types.Reply, err error) {
- // todo: add your logic here and delete this line
- resp = &types.Reply{}
- custom := &service.CustomService{
- BaseUserId: req.BaseUserId,
- PositionId: req.PositionId,
- EntUserId: req.EntUserId,
- EntId: req.EntId,
- AppId: req.AppId,
- AccountId: req.AccountId,
- CustomType: req.CustomType, //客户类型
- Summary: req.Summary, //概要信息
- CustomAllName: req.CustomAllName, //客户全称
- CustomAbbreviation: req.CustomAbbreviation, //客户简称
- CustomLevel: req.CustomLevel, //客户级别
- CustomIndustry: req.CustomIndustry, //客户行业
- CustomDetailIndustry: req.CustomDetailIndustry, //客户细分行业
- Province: req.Province, //省份
- City: req.City, //城市
- District: req.District, //地区
- Address: req.Address, //详细地址
- CompanyPhone: req.CompanyPhone, //公司电话
- NextfollowUpTime: req.NextfollowUpTime, //下次跟进时间戳
- Types: req.Types, //处理方式 1自办;2转办
- User: req.User, //转办用户
- EmployCustomId: req.EmployCustomId, //客户收录id
- EmployInfoId: req.EmployInfoId, //资讯收录id
- Remarks: req.Remarks, //备注
- CreateName: req.CreateName, //创建人
- }
- status, groupId := custom.Add(l.ctx)
- resp.Data = map[string]interface{}{
- "status": status,
- "groupId": groupId,
- }
- return
- }
|