12.08版本

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

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

@ -30,18 +30,34 @@ namespace GDZZ.Application.Entity
/// <summary>
/// 审核状态
/// </summary>
public int ApprovalStatus { get; set; }
public CompanyEnum ApprovalStatus { get; set; }
/// <summary>
/// 审核人
/// </summary>
public string Approver { get; set; }
public string? Approver { get; set; }
/// <summary>
/// 审核时间
/// </summary>
public DateTime ApprovalTime { get; set; }
public DateTime? ApprovalTime { get; set; }
/// <summary>
/// 公司地址
/// </summary>
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>
public long CompanyID { get; set; }
public long? CompanyID { get; set; }
/// <summary>
/// 地区ID
/// </summary>

@ -139,6 +139,41 @@
公司地址
</summary>
</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">
<summary>
消费记录
@ -904,6 +939,11 @@
AccessToken
</summary>
</member>
<member name="F:GDZZ.Application.SystemConst.MINI_QRCODE">
<summary>
二维码生成
</summary>
</member>
<member name="T:GDZZ.Application.UserEnum">
<summary>
用户类型枚举
@ -1026,6 +1066,18 @@
</summary>
<returns></returns>
</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)">
<summary>
发送验证码
@ -1409,6 +1461,12 @@
退款回调
</summary>
</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">
<summary>
折扣
@ -1494,6 +1552,16 @@
退款消息
</summary>
</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">
<summary>
基础用户服务
@ -1771,7 +1839,7 @@
</member>
<member name="M:GDZZ.Application.CompanyService.Page(GDZZ.Application.CompanyInput)">
<summary>
分页查询套餐管理
分页查询公司
</summary>
<param name="input"></param>
<returns></returns>
@ -1783,13 +1851,27 @@
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Application.CompanyService.Get(GDZZ.Application.QueryeCompanyInput)">
<member name="M:GDZZ.Application.CompanyService.Get">
<summary>
获取公司属性
</summary>
<param name="input"></param>
<returns></returns>
</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">
<summary>
公司属性输出参数
@ -1865,6 +1947,51 @@
公司地址
</summary>
</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">
<summary>
主键Id

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

@ -3,10 +3,15 @@ using Furion.DependencyInjection;
using Furion.DynamicApiController;
using Mapster;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using System.Linq;
using System.Threading.Tasks;
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
{
/// <summary>
@ -16,15 +21,21 @@ namespace GDZZ.Application
public class CompanyService : ICompanyService, IDynamicApiController, ITransient
{
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;
this.cacheService= cacheService;
this.companyUserRep= companyUserRep;
}
/// <summary>
/// 分页查询套餐管理
/// 分页查询公司
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
@ -33,17 +44,17 @@ namespace GDZZ.Application
{
var entities = await _rep.AsQueryable()
.WhereIF(!string.IsNullOrWhiteSpace(input.SearchValue), u => u.Name.Contains(input.SearchValue.Trim()))
.Select((u) => new MiniResumeOutput()
{
CompanyID = u.Id,
CompanyName = u.Name,
Logo = u.logo,
Id = u.Id,
Info = u.Info,
Title = u.Name,
Time = u.CreatedTime.Value.ToString("yyyy/MM/dd"),
})
.WhereIF(!string.IsNullOrWhiteSpace(input.SearchValue), u => u.Code.Contains(input.SearchValue.Trim()))
//.Select((u) => new CompanyInput()
//{
// CompanyID = u.Id,
// CompanyName = u.Name,
// Logo = u.logo,
// Id = u.Id,
// Info = u.Info,
// Title = u.Name,
// Time = u.CreatedTime.Value.ToString("yyyy/MM/dd"),
//})
.ToPagedListAsync(input.PageNo, input.PageSize);
return entities.XnPagedResult();
}
@ -67,15 +78,50 @@ namespace GDZZ.Application
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpGet("/Mini/CompanyDetail")]
public async Task<Company> Get([FromQuery] QueryeCompanyInput input)
[HttpGet("/Mini/Company/Detail")]
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>
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
{
/// <summary>
/// 主键Id
/// </summary>
[Required(ErrorMessage = "主键Id不能为空")]
public long Id { get; set; }
/// <summary>
/// 验证码
/// </summary>
public string Checking { get; set; }
}
public class DeleteCompanyInput

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

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

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

Loading…
Cancel
Save