| | |
| | | using cylsg.Core; |
| | | using cylsg.Model.OrderModel; |
| | | using cylsg.Model.TransferOrder; |
| | | using cylsg.Model.UserModel; |
| | | using cylsg.Model.utilityViewModel; |
| | |
| | | { |
| | | throw Oops.Oh("该用户没有收入"); |
| | | } |
| | | if ((uw.TiXianZonge - uw.YiTiXianJine) < Money) |
| | | |
| | | bool IsGuDing = false; |
| | | var bdct = new BaseRepository<OrderBidding>(); |
| | | if (bdct == null) |
| | | { |
| | | var userBd= await bdct.GetFirstAsync(x=>x.WorkerUserId==userid); |
| | | if(userBd != null) |
| | | { |
| | | IsGuDing = userBd.IsGuding??false; |
| | | } |
| | | } |
| | | |
| | | if ((uw.TiXianZonge - uw.YiTiXianJine-(IsGuDing?300:0)) < Money) |
| | | { |
| | | if(IsGuDing) |
| | | { |
| | | throw Oops.Oh("用户余额不足,灵活用工宿舍押金300元"); |
| | | } |
| | | else |
| | | throw Oops.Oh("用户余额不足"); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取为支付列表 |
| | | /// 获取为未付列表 |
| | | /// </summary> |
| | | [AllowAnonymous] |
| | | [HttpPost] |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 重新创建新的支付单 |
| | | /// 创建新的支付单 |
| | | /// </summary> |
| | | /// <param name="ids"></param> |
| | | /// <returns></returns> |
| | |
| | | [ApiExplorerSettings(IgnoreApi = true)] |
| | | public async Task<WeChatTransferOrder> CreateTransferOder(CreatTransferOderIN Param) |
| | | { |
| | | |
| | | if(Param.Key!= DateTime.Now.ToString("yyyy-MM-dd:HH")+"CreatTransfer") |
| | | { |
| | | //key 错误 |
| | |
| | | { |
| | | throw Oops.Oh("一天转账金额必须小于2000"); |
| | | } |
| | | |
| | | |
| | | var totle = _redisService.Get<decimal>(StaticStringDef.TransferMoneyManKey + Param.UserID.ToString()); |
| | | if (totle + Param.Money > 2000) |
| | | { |