public async Task <MessageModel <string> > Post([FromBody] ORDTASK request) { var data = new MessageModel <string>(); var id = await _ORDTASKServices.Add(request); data.success = id > 0; if (data.success) { data.response = id.ObjToString(); data.msg = "添加成功"; } return(data); }
public async Task <MessageModel <string> > Put([FromBody] ORDTASK request) { var data = new MessageModel <string>(); if (request.ORIGREC > 0) { data.success = await _ORDTASKServices.Update(request); if (data.success) { data.msg = "更新成功"; data.response = request?.ORIGREC.ObjToString(); } } return(data); }