diff --git a/Myshipping.Application/Service/BookingGoodsStatusConfig/BookingGoodsStatusConfigService.cs b/Myshipping.Application/Service/BookingGoodsStatusConfig/BookingGoodsStatusConfigService.cs index 509304b6..a3fb9d24 100644 --- a/Myshipping.Application/Service/BookingGoodsStatusConfig/BookingGoodsStatusConfigService.cs +++ b/Myshipping.Application/Service/BookingGoodsStatusConfig/BookingGoodsStatusConfigService.cs @@ -52,7 +52,7 @@ namespace Myshipping.Application public async Task Page([FromQuery] QueryBookingGoodsStatusConfigInput input) { //初次使用没有数据,进行初始化 - InitGoodsStatusConfig(UserManager.UserId); + InitGoodsStatusConfig(UserManager.UserId,UserManager.Name); var entities = await _rep.AsQueryable() .Where(m => m.CreatedUserId == UserManager.UserId) @@ -127,7 +127,7 @@ namespace Myshipping.Application /// 初始化当前用户的货物状态配置 /// [NonAction] - public async void InitGoodsStatusConfig(long userid) + public async void InitGoodsStatusConfig(long userid,string username) { if (_rep.AsQueryable().Count(x => x.CreatedUserId == userid) == 0) { @@ -139,7 +139,11 @@ namespace Myshipping.Application { StatusName = itm.Value, Sort = itm.Sort, - SystemCode = itm.Code + SystemCode = itm.Code, + CreatedUserId=userid, + TenantId=UserManager.TENANT_ID, + CreatedUserName= username, + CreatedTime=DateTime.Now }); }); } diff --git a/Myshipping.Application/Service/BookingGoodsStatusConfig/IBookingGoodsStatusConfigService.cs b/Myshipping.Application/Service/BookingGoodsStatusConfig/IBookingGoodsStatusConfigService.cs index e2bf32ec..7254a737 100644 --- a/Myshipping.Application/Service/BookingGoodsStatusConfig/IBookingGoodsStatusConfigService.cs +++ b/Myshipping.Application/Service/BookingGoodsStatusConfig/IBookingGoodsStatusConfigService.cs @@ -11,6 +11,6 @@ namespace Myshipping.Application Task Save(SaveBookingGoodsStatusConfigInput input); Task Delete(long id); Task Get(long id); - void InitGoodsStatusConfig( long userid); + void InitGoodsStatusConfig( long userid,string username); } } \ No newline at end of file diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index d52dc484..d9085704 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -5181,10 +5181,12 @@ namespace Myshipping.Application allData.log = list; - var userid = _rep.Where(x => x.Id == bookingId).Select(x => x.CreatedUserId).First(); + var order = _rep.Where(x => x.Id == bookingId).First(); + var userid = order.CreatedUserId; + var username = order.CreatedUserName; if (userid != null) { - _GoodsConfig.InitGoodsStatusConfig( Convert.ToInt64(userid)); + _GoodsConfig.InitGoodsStatusConfig( Convert.ToInt64(userid),username); var GoodsStatus = await _goodsStatus.AsQueryable().LeftJoin(_goodsStatusConfig.AsQueryable(),