Ejemplo n.º 1
0
        public HackResponse Post([FromBody] DriverInfoParam param)
        {
            DriverInfo driverInfo = service.GetDriverInfo(param);

            if (driverInfo == null)
            {
                bool isSuc = service.AddDriverInfo(param);
                return
                    (new HackResponse
                         (HackResType.Success, HackRspCode.HackRspCode_0000, "查询成功",
                         new { isSucess = isSuc }));
            }
            else
            {
                return
                    (new HackResponse
                         (HackResType.DataError, HackRspCode.HackRspCode_3000,
                         "重复添加", new { }));
            }
        }