From 6ae97d768948e197a89492239441feca04c1dbb9 Mon Sep 17 00:00:00 2001
From: zhengyuxuan <zhengyuxuan1995>
Date: 星期一, 07 四月 2025 17:16:02 +0800
Subject: [PATCH] fix:bug修复

---
 LifePayment/LifePayment.HttpApi/LifePay/UserRoleController.cs |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/LifePayment/LifePayment.HttpApi/LifePay/UserRoleController.cs b/LifePayment/LifePayment.HttpApi/LifePay/UserRoleController.cs
index 2be205b..fd05e4d 100644
--- a/LifePayment/LifePayment.HttpApi/LifePay/UserRoleController.cs
+++ b/LifePayment/LifePayment.HttpApi/LifePay/UserRoleController.cs
@@ -1,7 +1,9 @@
 锘縰sing LifePayment.Application.Contracts;
 using LifePayment.Domain.Shared;
 using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Identity;
 using Microsoft.AspNetCore.Mvc;
+using Nest;
 using System;
 using System.Collections.Generic;
 using System.Threading.Tasks;
@@ -128,8 +130,15 @@
                 Sequence = input.Sequence,
                 Note = input.Remark,
             });
-            var newInput = ObjectMapper.Map<CreateBaseRoleInput, CreateOrUpdateRoleInput>(input);
-            newInput.Id = res.Id;
+            CreateOrUpdateRoleInput newInput = new CreateOrUpdateRoleInput()
+            {
+                Id = res.Id,
+                Name = input.Name,
+                Sequence = input.Sequence,
+                DepartmentId = input.DepartmentId,
+                DataRange = input.DataRange,
+                Remark = input.Remark,
+            };
             await _userRoleService.CreateRole(newInput);
             return res.Id;
         }

--
Gitblit v1.9.1