示例#1
0
        /// <summary>
        /// 添加手机设备信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public async Task <int> AddRfPhoneDevice(RfPhoneDeviceEntity model)
        {
            var count = await _rfPhoneDeviceRepository.FindCountByFuncAsync(t => t.OpenId == model.OpenId);

            if (count <= 0)
            {
                return(await _rfPhoneDeviceRepository.InsertAsync(model));
            }
            return(0);
        }
示例#2
0
 public async Task <IActionResult> AddRfPhoneDevice([FromBody] RfPhoneDeviceEntity model)
 {
     return(OkResult(await _server.AddRfPhoneDevice(model)));
 }
示例#3
0
 /// <summary>
 /// 修改手机设备信息
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public Task <int> ModifyRfPhoneDevice(RfPhoneDeviceEntity model)
 {
     return(_rfPhoneDeviceRepository.UpdateAsync(model));
 }