12.08版本

development
温天培 12 months ago
parent 9a9d0ca17f
commit 1335d5eacc

@ -46,7 +46,7 @@ namespace GDZZ.Application.Entity
/// <summary> /// <summary>
/// 公司ID /// 公司ID
/// </summary> /// </summary>
public long CompanyID { get; set; } public long? CompanyID { get; set; }
/// <summary> /// <summary>
/// 描述 /// 描述
/// </summary> /// </summary>

@ -30,18 +30,34 @@ namespace GDZZ.Application.Entity
/// <summary> /// <summary>
/// 审核状态 /// 审核状态
/// </summary> /// </summary>
public int ApprovalStatus { get; set; } public CompanyEnum ApprovalStatus { get; set; }
/// <summary> /// <summary>
/// 审核人 /// 审核人
/// </summary> /// </summary>
public string Approver { get; set; } public string? Approver { get; set; }
/// <summary> /// <summary>
/// 审核时间 /// 审核时间
/// </summary> /// </summary>
public DateTime ApprovalTime { get; set; } public DateTime? ApprovalTime { get; set; }
/// <summary> /// <summary>
/// 公司地址 /// 公司地址
/// </summary> /// </summary>
public string Address { get; set; } public string Address { get; set; }
/// <summary>
/// 执照图片地址
/// </summary>
public string? LicenseUrl { get; set; }
/// <summary>
/// 机构代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 企业电话
/// </summary>
public string Phone { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
} }
} }

@ -0,0 +1,23 @@
using System;
using SqlSugar;
using System.ComponentModel;
using GDZZ.Core.Entity;
namespace GDZZ.Application.Entity
{
/// <summary>
/// 公司数据范围表
/// </summary>
[SugarTable("mini_company_user_scope")]
[Description("公司数据范围表")]
public class CompanyUserScope
{
/// <summary>
/// 用户ID
/// </summary>
public long MiniUserID { get; set; }
/// <summary>
/// 公司ID
/// </summary>
public long MiniCompanyID { get; set; }
}
}

@ -32,7 +32,7 @@ namespace GDZZ.Application.Entity
/// <summary> /// <summary>
/// 所属公司 /// 所属公司
/// </summary> /// </summary>
public long CompanyID { get; set; } public long? CompanyID { get; set; }
/// <summary> /// <summary>
/// 地区ID /// 地区ID
/// </summary> /// </summary>

@ -139,6 +139,41 @@
公司地址 公司地址
</summary> </summary>
</member> </member>
<member name="P:GDZZ.Application.Entity.Company.LicenseUrl">
<summary>
执照图片地址
</summary>
</member>
<member name="P:GDZZ.Application.Entity.Company.Code">
<summary>
机构代码
</summary>
</member>
<member name="P:GDZZ.Application.Entity.Company.Phone">
<summary>
企业电话
</summary>
</member>
<member name="P:GDZZ.Application.Entity.Company.Remark">
<summary>
备注
</summary>
</member>
<member name="T:GDZZ.Application.Entity.CompanyUserScope">
<summary>
公司数据范围表
</summary>
</member>
<member name="P:GDZZ.Application.Entity.CompanyUserScope.MiniUserID">
<summary>
用户ID
</summary>
</member>
<member name="P:GDZZ.Application.Entity.CompanyUserScope.MiniCompanyID">
<summary>
公司ID
</summary>
</member>
<member name="T:GDZZ.Application.Entity.Consume"> <member name="T:GDZZ.Application.Entity.Consume">
<summary> <summary>
消费记录 消费记录
@ -904,6 +939,11 @@
AccessToken AccessToken
</summary> </summary>
</member> </member>
<member name="F:GDZZ.Application.SystemConst.MINI_QRCODE">
<summary>
二维码生成
</summary>
</member>
<member name="T:GDZZ.Application.UserEnum"> <member name="T:GDZZ.Application.UserEnum">
<summary> <summary>
用户类型枚举 用户类型枚举
@ -1026,6 +1066,18 @@
</summary> </summary>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:GDZZ.Application.Help.ICacheService.GetQRCodeAsync(System.Int64)">
<summary>
存储二维码bate[]
</summary>
<returns></returns>
</member>
<member name="M:GDZZ.Application.Help.ICacheService.SetQRCodeAsync(System.Int64,System.String)">
<summary>
存储二维码bate[]
</summary>
<returns></returns>
</member>
<member name="M:GDZZ.Application.Help.TencentCloudExamples.SendTextMessage(TencentCloud.Sms.V20210111.Models.SendSmsRequest,TencentCloud.Common.Credential)"> <member name="M:GDZZ.Application.Help.TencentCloudExamples.SendTextMessage(TencentCloud.Sms.V20210111.Models.SendSmsRequest,TencentCloud.Common.Credential)">
<summary> <summary>
发送验证码 发送验证码
@ -1409,6 +1461,12 @@
退款回调 退款回调
</summary> </summary>
</member> </member>
<member name="M:GDZZ.Application.Service.WXPay.WXPayService.MerchantTransfer(GDZZ.Application.TransferInput)">
<summary>
商户转账
</summary>
<returns></returns>
</member>
<member name="P:GDZZ.Application.AuthUserInput.Discount"> <member name="P:GDZZ.Application.AuthUserInput.Discount">
<summary> <summary>
折扣 折扣
@ -1494,6 +1552,16 @@
退款消息 退款消息
</summary> </summary>
</member> </member>
<member name="P:GDZZ.Application.TransferInput.MerchantID">
<summary>
商户ID
</summary>
</member>
<member name="P:GDZZ.Application.TransferInput.TransferAmount">
<summary>
转账金额
</summary>
</member>
<member name="T:GDZZ.Application.BaseUserService"> <member name="T:GDZZ.Application.BaseUserService">
<summary> <summary>
基础用户服务 基础用户服务
@ -1771,7 +1839,7 @@
</member> </member>
<member name="M:GDZZ.Application.CompanyService.Page(GDZZ.Application.CompanyInput)"> <member name="M:GDZZ.Application.CompanyService.Page(GDZZ.Application.CompanyInput)">
<summary> <summary>
分页查询套餐管理 分页查询公司
</summary> </summary>
<param name="input"></param> <param name="input"></param>
<returns></returns> <returns></returns>
@ -1783,13 +1851,27 @@
<param name="input"></param> <param name="input"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:GDZZ.Application.CompanyService.Get(GDZZ.Application.QueryeCompanyInput)"> <member name="M:GDZZ.Application.CompanyService.Get">
<summary> <summary>
获取公司属性 获取公司属性
</summary> </summary>
<param name="input"></param> <param name="input"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:GDZZ.Application.CompanyService.InstallAsync(GDZZ.Application.AddCompanyInput)">
<summary>
创建公司
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.CompanyService.BingCompany(GDZZ.Application.AddCompanyInput)">
<summary>
绑定公司
</summary>
<param name="input">公司信息</param>
<returns></returns>
</member>
<member name="T:GDZZ.Application.CompanyDto"> <member name="T:GDZZ.Application.CompanyDto">
<summary> <summary>
公司属性输出参数 公司属性输出参数
@ -1865,6 +1947,51 @@
公司地址 公司地址
</summary> </summary>
</member> </member>
<member name="P:GDZZ.Application.CompanyInput.ApprovalStatus">
<summary>
审核状态
</summary>
</member>
<member name="P:GDZZ.Application.CompanyInput.Approver">
<summary>
审核人
</summary>
</member>
<member name="P:GDZZ.Application.CompanyInput.ApprovalTime">
<summary>
审核时间
</summary>
</member>
<member name="P:GDZZ.Application.CompanyInput.LicenseUrl">
<summary>
执照图片地址
</summary>
</member>
<member name="P:GDZZ.Application.CompanyInput.Code">
<summary>
机构代码
</summary>
</member>
<member name="P:GDZZ.Application.CompanyInput.Phone">
<summary>
企业电话
</summary>
</member>
<member name="P:GDZZ.Application.CompanyInput.Remark">
<summary>
备注
</summary>
</member>
<member name="P:GDZZ.Application.AddCompanyInput.Id">
<summary>
主键Id
</summary>
</member>
<member name="P:GDZZ.Application.AddCompanyInput.Checking">
<summary>
验证码
</summary>
</member>
<member name="P:GDZZ.Application.DeleteCompanyInput.Id"> <member name="P:GDZZ.Application.DeleteCompanyInput.Id">
<summary> <summary>
主键Id 主键Id

@ -120,7 +120,6 @@ namespace GDZZ.Application.Service.Auth
//账号不存在 生成系统账号 //账号不存在 生成系统账号
if (sysUser.IsEmpty()) if (sysUser.IsEmpty())
{ {
@ -174,16 +173,16 @@ namespace GDZZ.Application.Service.Auth
else else
{ {
//如果是企业账号,应该是绑定了企业租户信息 //如果是企业账号,应该是绑定了企业租户信息
if (wxUser.IsEmpty()|| wxUser.CompanyID.IsNullOrZero()) wxUser.Type = (int)UserEnum.ADVERTISE;
throw Oops.Oh(ErrorCode.xg1002);
wxUser.Type= (int)UserEnum.ADVERTISE;
var bsUser = await this.Baseuser.UpdateAsync(wxUser); var bsUser = await this.Baseuser.UpdateAsync(wxUser);
//企业用户情况下,允许后续补充公司信息
//if (wxUser.IsEmpty()|| wxUser.CompanyID.IsNullOrZero())
// throw Oops.Oh(ErrorCode.xg1002);
//获取公司信息 ////获取公司信息
company = await this.CompanyRep.SingleAsync(x=>x.Id == wxUser.CompanyID); //company = await this.CompanyRep.SingleAsync(x=>x.Id == wxUser.CompanyID);
authUserOut.companyDto = company.Adapt<CompanyDto>(); //authUserOut.companyDto = company.Adapt<CompanyDto>();
} }

@ -3,10 +3,15 @@ using Furion.DependencyInjection;
using Furion.DynamicApiController; using Furion.DynamicApiController;
using Mapster; using Mapster;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using GDZZ.Application.Entity; using GDZZ.Application.Entity;
using GDZZ.Core.Entity;
using GDZZ.Core.OAuth;
using GDZZ.Application.Help;
using System;
using System.Collections.Generic;
namespace GDZZ.Application namespace GDZZ.Application
{ {
/// <summary> /// <summary>
@ -16,15 +21,21 @@ namespace GDZZ.Application
public class CompanyService : ICompanyService, IDynamicApiController, ITransient public class CompanyService : ICompanyService, IDynamicApiController, ITransient
{ {
private readonly SqlSugarRepository<Company> _rep; private readonly SqlSugarRepository<Company> _rep;
private readonly SqlSugarRepository<CompanyUserScope> companyUserRep;
private readonly ICacheService cacheService;
public CompanyService(SqlSugarRepository<Company> rep) public CompanyService(SqlSugarRepository<Company> rep,
ICacheService cacheService,
SqlSugarRepository<CompanyUserScope> companyUserRep)
{ {
_rep = rep; _rep = rep;
this.cacheService= cacheService;
this.companyUserRep= companyUserRep;
} }
/// <summary> /// <summary>
/// 分页查询套餐管理 /// 分页查询公司
/// </summary> /// </summary>
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
@ -33,17 +44,17 @@ namespace GDZZ.Application
{ {
var entities = await _rep.AsQueryable() var entities = await _rep.AsQueryable()
.WhereIF(!string.IsNullOrWhiteSpace(input.SearchValue), u => u.Name.Contains(input.SearchValue.Trim())) .WhereIF(!string.IsNullOrWhiteSpace(input.SearchValue), u => u.Name.Contains(input.SearchValue.Trim()))
.Select((u) => new MiniResumeOutput() .WhereIF(!string.IsNullOrWhiteSpace(input.SearchValue), u => u.Code.Contains(input.SearchValue.Trim()))
{ //.Select((u) => new CompanyInput()
CompanyID = u.Id, //{
CompanyName = u.Name, // CompanyID = u.Id,
Logo = u.logo, // CompanyName = u.Name,
Id = u.Id, // Logo = u.logo,
Info = u.Info, // Id = u.Id,
Title = u.Name, // Info = u.Info,
Time = u.CreatedTime.Value.ToString("yyyy/MM/dd"), // Title = u.Name,
// Time = u.CreatedTime.Value.ToString("yyyy/MM/dd"),
}) //})
.ToPagedListAsync(input.PageNo, input.PageSize); .ToPagedListAsync(input.PageNo, input.PageSize);
return entities.XnPagedResult(); return entities.XnPagedResult();
} }
@ -67,15 +78,50 @@ namespace GDZZ.Application
/// </summary> /// </summary>
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet("/Mini/CompanyDetail")] [HttpGet("/Mini/Company/Detail")]
public async Task<Company> Get([FromQuery] QueryeCompanyInput input) public async Task<Company> Get()
{ {
//获取公司相关的招聘信息 //获取公司相关的招聘信息
return await _rep.FirstOrDefaultAsync(u => u.Id == input.Id); return await _rep.FirstOrDefaultAsync(u => u.Id == UserManager.UserId);
} }
/// <summary>
/// 创建公司
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("/Mini/Company/install")]
public async Task InstallAsync(AddCompanyInput input)
{
var entity = input.Adapt<Company>();
await _rep.InsertAsync(entity);
}
/// <summary>
/// 绑定公司
/// </summary>
/// <param name="input">公司信息</param>
/// <returns></returns>
[HttpGet("/Mini/Comapany/Bing")]
public async Task BingCompany([FromQuery] AddCompanyInput input)
{
//验证电话和验证码一致
var verIfy = await this.cacheService.GetVerifyCode(input.Phone);
if (verIfy != input.Checking)
throw new Exception("验证码错误");
var companyUser = new CompanyUserScope
{
MiniCompanyID = input.Id,
MiniUserID = UserManager.UserId,
};
await this.companyUserRep.InsertAsync(companyUser);
//关系表插入信息
}
} }

@ -39,10 +39,49 @@ namespace GDZZ.Application
/// </summary> /// </summary>
public string Address { get; set; } public string Address { get; set; }
/// <summary>
/// 审核状态
/// </summary>
public CompanyEnum ApprovalStatus { get; set; }
/// <summary>
/// 审核人
/// </summary>
public string Approver { get; set; }
/// <summary>
/// 审核时间
/// </summary>
public DateTime ApprovalTime { get; set; }
/// <summary>
/// 执照图片地址
/// </summary>
public string LicenseUrl { get; set; }
/// <summary>
/// 机构代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 企业电话
/// </summary>
public string Phone { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
} }
public class AddCompanyInput : CompanyInput public class AddCompanyInput : CompanyInput
{ {
/// <summary>
/// 主键Id
/// </summary>
[Required(ErrorMessage = "主键Id不能为空")]
public long Id { get; set; }
/// <summary>
/// 验证码
/// </summary>
public string Checking { get; set; }
} }
public class DeleteCompanyInput public class DeleteCompanyInput

@ -7,7 +7,7 @@ namespace GDZZ.Application
public interface ICompanyService public interface ICompanyService
{ {
Task<Company> Get([FromQuery] QueryeCompanyInput input); Task<Company> Get();
Task Update(UpdateCompanyInput input); Task Update(UpdateCompanyInput input);
} }

@ -216,7 +216,6 @@ namespace GDZZ.Application
public async Task<dynamic> GetSelfResumeList([FromQuery] MiniResumeInput input) public async Task<dynamic> GetSelfResumeList([FromQuery] MiniResumeInput input)
{ {
var entities = await _rep.AsQueryable() var entities = await _rep.AsQueryable()
.LeftJoin<Company>((u, y) => u.CompanyID == y.Id) //关联公司信息 .LeftJoin<Company>((u, y) => u.CompanyID == y.Id) //关联公司信息
.Where(u => u.CreatedUserId == UserManager.UserId) .Where(u => u.CreatedUserId == UserManager.UserId)
.Select((u, y) => new MiniResumeOutput .Select((u, y) => new MiniResumeOutput

@ -357,6 +357,11 @@
默认 默认
</summary> </summary>
</member> </member>
<member name="P:GDZZ.Core.UploadFileOptions.QRCode">
<summary>
默认
</summary>
</member>
<member name="T:GDZZ.Core.ConnectionStringsOptions"> <member name="T:GDZZ.Core.ConnectionStringsOptions">
<summary> <summary>
数据库配置 数据库配置

Loading…
Cancel
Save