|
@@ -43,11 +43,19 @@ func (l *CreateAgentBaseLogic) CreateAgentBase(req *types.CreateDataInfoReq) (*t
|
|
|
}
|
|
|
|
|
|
if resp.Code == 200 {
|
|
|
- return &types.BaseDataInfo{
|
|
|
- Code: 0,
|
|
|
- Msg: errormsg.Success,
|
|
|
- Data: fmt.Sprintf("Insert %d rows", resp.Data.InsertLen),
|
|
|
- }, nil
|
|
|
+ if resp.Data.InsertLen > 0 {
|
|
|
+ return &types.BaseDataInfo{
|
|
|
+ Code: 0,
|
|
|
+ Msg: errormsg.Success,
|
|
|
+ Data: fmt.Sprintf("Insert %d rows", resp.Data.InsertLen),
|
|
|
+ }, nil
|
|
|
+ } else {
|
|
|
+ return &types.BaseDataInfo{
|
|
|
+ Code: 0,
|
|
|
+ Msg: "插入失败,请修改后重试",
|
|
|
+ Data: fmt.Sprintf("Insert %d rows", resp.Data.InsertLen),
|
|
|
+ }, nil
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return nil, errorx.NewInvalidArgumentError(resp.StatusText)
|