You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- using BPA.SAAS.Manage.Application.Org.Dtos.Users;
- using BPA.SAAS.Manage.Application.Org.Interface;
- using BPA.SAAS.Manage.Application.Org.Interface;
- using BPA.SAAS.Manage.Comm.Const;
- using BPA.SAAS.Manage.Core.Org;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace BPA.SAAS.Manage.Application.Org.Services
- {
- public class UserService : IUserService, ITransient
- {
- private readonly ISqlSugarClient _db;
- public UserService(ISqlSugarClient db)
- {
- _db=db;
- }
- public async Task<bool> AddUser(UserDtoInput input)
- {
- var user = input.Adapt<BPA_Users>();
- user.Id= Guid.NewGuid().ToString();
- user.Password = MD5Encryption.Encrypt("123456").ToLower();
- user.CreateAt=DateTime.Now;
- user.CreateBy = App.User?.FindFirst(ClaimConst.CLAINM_USERID)?.Value;
- var check = _db.Queryable<BPA_Users>().First(t => t.Account == user.Account);
- if (check != null)
- return false;
- return await _db.Insertable(user).ExecuteCommandAsync()> 0;
- }
- }
- }
|