|
|
@@ -33,23 +33,23 @@ func (l *AddMktLogic) AddMkt(in *transform.MktReq) (*transform.MktRes, error) {
|
|
|
if err == sqlc.ErrNotFound {
|
|
|
mkt := model.MktResource{}
|
|
|
mkt.DelFlag = 0
|
|
|
- mkt.CreateBy = sql.NullString{String: in.MkId}
|
|
|
- mkt.CreateTime = sql.NullTime{Time: utils.ParseTime(in.CreateTime)}
|
|
|
- mkt.LastUpdateTime = sql.NullTime{Time: utils.ParseTime(in.CreateTime)}
|
|
|
- mkt.LastUpdateBy = sql.NullString{String: in.MkId}
|
|
|
- mkt.StuName = sql.NullString{String: in.StuName}
|
|
|
- mkt.StuLinkPerson = sql.NullString{String: in.StuLinkPerson}
|
|
|
- mkt.StuPhone = sql.NullString{String: in.StuPhone}
|
|
|
- mkt.SchId = sql.NullInt64{Int64: in.SchId}
|
|
|
- mkt.StuAddress = sql.NullString{String: in.Address}
|
|
|
- mkt.AgeGroup = sql.NullInt64{Int64: in.AgeGroup}
|
|
|
+ mkt.CreateBy = sql.NullString{String: in.MkId, Valid: true}
|
|
|
+ mkt.CreateTime = sql.NullTime{Time: utils.ParseTime(in.CreateTime), Valid: true}
|
|
|
+ mkt.LastUpdateTime = sql.NullTime{Time: utils.ParseTime(in.CreateTime), Valid: true}
|
|
|
+ mkt.LastUpdateBy = sql.NullString{String: in.MkId, Valid: true}
|
|
|
+ mkt.StuName = sql.NullString{String: in.StuName, Valid: true}
|
|
|
+ mkt.StuLinkPerson = sql.NullString{String: in.StuLinkPerson, Valid: true}
|
|
|
+ mkt.StuPhone = sql.NullString{String: in.StuPhone, Valid: true}
|
|
|
+ mkt.SchId = sql.NullInt64{Int64: in.SchId, Valid: true}
|
|
|
+ mkt.StuAddress = sql.NullString{String: in.Address, Valid: true}
|
|
|
+ mkt.AgeGroup = sql.NullInt64{Int64: in.AgeGroup, Valid: true}
|
|
|
mkt.StuType = 8
|
|
|
- mkt.NetworkDetail = sql.NullInt64{Int64: in.NetworkDetailId}
|
|
|
- mkt.CallType = sql.NullInt64{Int64: in.CallType}
|
|
|
- mkt.MaType = sql.NullInt64{Int64: in.MaType}
|
|
|
- mkt.QuaoYji = sql.NullInt64{Int64: in.QuaoYji}
|
|
|
- mkt.LoadUser = sql.NullString{String: in.MkId}
|
|
|
- _, err = l.svcCtx.MktResourceModel.Insert(mkt)
|
|
|
+ mkt.NetworkDetail = sql.NullInt64{Int64: in.NetworkDetailId, Valid: true}
|
|
|
+ mkt.CallType = sql.NullInt64{Int64: in.CallType, Valid: true}
|
|
|
+ mkt.MaType = sql.NullInt64{Int64: in.MaType, Valid: true}
|
|
|
+ mkt.QuaoYji = sql.NullInt64{Int64: in.QuaoYji, Valid: true}
|
|
|
+ mkt.LoadUser = sql.NullString{String: in.MkId, Valid: true}
|
|
|
+ _, err := l.svcCtx.MktResourceModel.Insert(mkt)
|
|
|
if err != nil {
|
|
|
l.Logger.Error(err)
|
|
|
return &transform.MktRes{Status: 500}, nil
|