From 3cf63544fce320323d9959e2434988fc629b4829 Mon Sep 17 00:00:00 2001 From: “2926542760@qq.com” <2926542760@qq.com> Date: Tue, 3 Jan 2023 23:56:41 +0800 Subject: [PATCH] a --- antis-ncc-admin/.env.production | 4 ++-- antis-ncc-admin/src/utils/define.js | 3 ++- antis-ncc-admin/src/views/tbMemCode/index.vue | 2 +- antis-ncc-net-core/ClassLibrary1/打卡记录/Dto/TbPunchListOutput.cs | 20 +++++++++++++++++++- antis-ncc-net-core/ClassLibrary1/打卡记录/Dto/TbPunchListQueryInput.cs | 5 ++++- antis-ncc-net-core/ClassLibrary1/打卡资讯/Dto/TbPunchInfoListOutput.cs | 28 +++++++++++++++++++++++++++- antis-ncc-net-core/ClassLibrary1/测评信息/Dto/TbEvaluationListOutput.cs | 32 ++++++++++++++++++++++++++++++-- antis-ncc-net-core/ClassLibrary1/首页信息/Dto/TbHomeInfoListOutput.cs | 22 ++++++++++++++++++++-- antis-ncc-net-core/NCC.Education/打卡记录/TbPunchService.cs | 14 ++++++++++---- antis-ncc-net-core/NCC.Education/打卡资讯/TbPunchInfoService.cs | 2 ++ antis-ncc-net-core/NCC.Education/测评信息/TbEvaluationService.cs | 2 ++ antis-ncc-net-core/NCC.Education/首页信息/TbHomeInfoService.cs | 1 + antis-ncc-net-core/src/Application/NCC.API/appsettings.json | 10 +++++----- antis-ncc-net-core/src/Modularity/OAuth/NCC.OAuth/Service/OAuthService.cs | 7 ++++--- antis-ncc-net-core/src/Modularity/System/NCC.System/Service/Permission/UsersService.cs | 14 +++++++++++++- 15 files changed, 142 insertions(+), 24 deletions(-) diff --git a/antis-ncc-admin/.env.production b/antis-ncc-admin/.env.production index 1f5a0ae..d8be1da 100644 --- a/antis-ncc-admin/.env.production +++ b/antis-ncc-admin/.env.production @@ -1,5 +1,5 @@ # 生产默认配置 ENV = 'production' -VUE_APP_BASE_API = 'http://8.130.38.56:8066' -VUE_APP_BASE_WSS = 'ws://8.130.38.56:8066/websocket' +VUE_APP_BASE_API = 'https://www.xiaoxiangsuanshu.com' +VUE_APP_BASE_WSS = 'ws://www.xiaoxiangsuanshu.com/websocket' diff --git a/antis-ncc-admin/src/utils/define.js b/antis-ncc-admin/src/utils/define.js index ffe442c..b11c2f7 100644 --- a/antis-ncc-admin/src/utils/define.js +++ b/antis-ncc-admin/src/utils/define.js @@ -2,7 +2,8 @@ // JAVA Boot版本对应后端接口地址 // JAVA Cloud对应网关地址 // const APIURl = 'http://localhost:8061' -const APIURl = 'http://8.130.38.56:8066' +// const APIURl = 'http://8.130.38.56:8066' +const APIURl = 'https://www.xiaoxiangsuanshu.com' module.exports = { APIURl: APIURl, diff --git a/antis-ncc-admin/src/views/tbMemCode/index.vue b/antis-ncc-admin/src/views/tbMemCode/index.vue index 4a4649a..16b519a 100644 --- a/antis-ncc-admin/src/views/tbMemCode/index.vue +++ b/antis-ncc-admin/src/views/tbMemCode/index.vue @@ -51,7 +51,7 @@ - + diff --git a/antis-ncc-net-core/ClassLibrary1/打卡记录/Dto/TbPunchListOutput.cs b/antis-ncc-net-core/ClassLibrary1/打卡记录/Dto/TbPunchListOutput.cs index 8cec97f..6642c01 100644 --- a/antis-ncc-net-core/ClassLibrary1/打卡记录/Dto/TbPunchListOutput.cs +++ b/antis-ncc-net-core/ClassLibrary1/打卡记录/Dto/TbPunchListOutput.cs @@ -1,5 +1,9 @@ -using NCC.System.Entitys.Permission; +using Aspose.Words.Lists; +using NCC.Common.Model; +using NCC.System.Entitys.Permission; +using Newtonsoft.Json; using System; +using System.Collections.Generic; namespace NCC.Education.Entitys.Dto.TbPunch { @@ -27,6 +31,20 @@ namespace NCC.Education.Entitys.Dto.TbPunch /// public DateTime? exerciseDate { get; set; } + public string imgList { get; set; } + + public List ImgList { get + { + try + { + return JsonConvert.DeserializeObject>(imgList); + }catch(Exception ex) + { + return new List(); + } + } } + + /// /// 编号 /// diff --git a/antis-ncc-net-core/ClassLibrary1/打卡记录/Dto/TbPunchListQueryInput.cs b/antis-ncc-net-core/ClassLibrary1/打卡记录/Dto/TbPunchListQueryInput.cs index c139efe..396faec 100644 --- a/antis-ncc-net-core/ClassLibrary1/打卡记录/Dto/TbPunchListQueryInput.cs +++ b/antis-ncc-net-core/ClassLibrary1/打卡记录/Dto/TbPunchListQueryInput.cs @@ -38,6 +38,9 @@ namespace NCC.Education.Entitys.Dto.TbPunch /// 状态 1--已打卡 2--缺卡 /// public string type { get; set; } - + /// + /// 打卡时间 + /// + public string creatorTime { get; set; } } } diff --git a/antis-ncc-net-core/ClassLibrary1/打卡资讯/Dto/TbPunchInfoListOutput.cs b/antis-ncc-net-core/ClassLibrary1/打卡资讯/Dto/TbPunchInfoListOutput.cs index 128b6f0..0511264 100644 --- a/antis-ncc-net-core/ClassLibrary1/打卡资讯/Dto/TbPunchInfoListOutput.cs +++ b/antis-ncc-net-core/ClassLibrary1/打卡资讯/Dto/TbPunchInfoListOutput.cs @@ -1,4 +1,7 @@ -using System; +using NCC.Common.Model; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; namespace NCC.Education.Entitys.Dto.TbPunchInfo { @@ -26,6 +29,29 @@ namespace NCC.Education.Entitys.Dto.TbPunchInfo /// 修改时间 /// public DateTime? lastModifyTime { get; set; } + /// + /// 富文本 + /// + public string editors { get; set; } + /// + /// 图片 + /// + public string img { get; set; } + + public List Img + { + get + { + try + { + return JsonConvert.DeserializeObject>(img); + } + catch (Exception ex) + { + return new List(); + } + } + } /// /// 阅读量 diff --git a/antis-ncc-net-core/ClassLibrary1/测评信息/Dto/TbEvaluationListOutput.cs b/antis-ncc-net-core/ClassLibrary1/测评信息/Dto/TbEvaluationListOutput.cs index fee5413..8441fba 100644 --- a/antis-ncc-net-core/ClassLibrary1/测评信息/Dto/TbEvaluationListOutput.cs +++ b/antis-ncc-net-core/ClassLibrary1/测评信息/Dto/TbEvaluationListOutput.cs @@ -1,4 +1,8 @@ -using System; +using NCC.Common.Model; +using Newtonsoft.Json; +using SqlSugar; +using System; +using System.Collections.Generic; namespace NCC.Education.Entitys.Dto.TbEvaluation { @@ -16,7 +20,31 @@ namespace NCC.Education.Entitys.Dto.TbEvaluation /// 标题 /// public string title { get; set; } - + /// + /// 图文信息 + /// + public string editors { get; set; } + /// + /// 图片 + /// + public string img { get; set; } + + public List Img + { + get + { + try + { + return JsonConvert.DeserializeObject>(img); + } + catch (Exception ex) + { + return new List(); + } + } + } + + /// /// 创建时间 /// diff --git a/antis-ncc-net-core/ClassLibrary1/首页信息/Dto/TbHomeInfoListOutput.cs b/antis-ncc-net-core/ClassLibrary1/首页信息/Dto/TbHomeInfoListOutput.cs index 330c990..861418c 100644 --- a/antis-ncc-net-core/ClassLibrary1/首页信息/Dto/TbHomeInfoListOutput.cs +++ b/antis-ncc-net-core/ClassLibrary1/首页信息/Dto/TbHomeInfoListOutput.cs @@ -1,4 +1,7 @@ -using System; +using NCC.Common.Model; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; namespace NCC.Education.Entitys.Dto.TbHomeInfo { @@ -21,7 +24,22 @@ namespace NCC.Education.Entitys.Dto.TbHomeInfo /// 备注 /// public string remark { get; set; } - + /// + /// 图片 + /// + public string img { get; set; } + + public List Img { get + { + try + { + return JsonConvert.DeserializeObject>(img); + }catch(Exception ex) + { + return new List(); + } + } } + /// /// 创建时间 /// diff --git a/antis-ncc-net-core/NCC.Education/打卡记录/TbPunchService.cs b/antis-ncc-net-core/NCC.Education/打卡记录/TbPunchService.cs index aa77f9a..9bda19c 100644 --- a/antis-ncc-net-core/NCC.Education/打卡记录/TbPunchService.cs +++ b/antis-ncc-net-core/NCC.Education/打卡记录/TbPunchService.cs @@ -117,7 +117,7 @@ namespace NCC.Education.TbPunch /// /// 参数 /// - [HttpPost("TbPunchCrInput")] + [HttpPost("StartPunch")] public async Task StartPunch([FromBody] TbPunchCrInput input) { var dbLink = await _dbLinkService.GetInfo("218239598550058245"); @@ -157,7 +157,7 @@ namespace NCC.Education.TbPunch return new OutPutInfo() { SingleNum = model.Num.ToInt(), - BothNum = bothModel.Num.ToInt(), + BothNum =bothModel!=null?bothModel.Num.ToInt():0, Days = sum }; } @@ -175,7 +175,7 @@ namespace NCC.Education.TbPunch private void AddInterateNumBoth(TbBothSettingEntity model, TbPunchEntity entity) { //增加用户积分 - var result = _db.Updateable(it => new UserEntity { IntegralNum = it.IntegralNum.ToInt() + model.Num }).Where(o => o.Id == entity.UserId).ExecuteCommand(); + var result = _db.Updateable(it => new UserEntity { IntegralNum =SqlFunc.ToInt32(it.IntegralNum) + model.Num }).Where(o => o.Id == entity.UserId).ExecuteCommand(); //增加积分日志 var logResult = _db.Insertable(new TbMoneysLogEntity() { @@ -192,7 +192,7 @@ namespace NCC.Education.TbPunch private void AddInterateNumSinge(TbSingleSettingEntity model, TbPunchEntity entity) { //增加用户积分 - var result = _db.Updateable(it => new UserEntity { IntegralNum = it.IntegralNum.ToInt() + model.Num }).Where(o => o.Id == entity.UserId).ExecuteCommand(); + var result = _db.Updateable(it => new UserEntity { IntegralNum =SqlFunc.ToInt32(it.IntegralNum)+ model.Num }).Where(o => o.Id == entity.UserId).ExecuteCommand(); //增加积分日志 var logResult = _db.Insertable(new TbMoneysLogEntity() { @@ -283,10 +283,15 @@ namespace NCC.Education.TbPunch List queryExerciseDate = input.exerciseDate != null ? input.exerciseDate.Split(',').ToObeject>() : null; DateTime? startExerciseDate = queryExerciseDate != null ? Ext.GetDateTime(queryExerciseDate.First()) : null; DateTime? endExerciseDate = queryExerciseDate != null ? Ext.GetDateTime(queryExerciseDate.Last()) : null; + List creatorTimeDate = input.creatorTime != null ? input.creatorTime.Split(',').ToObeject>() : null; + DateTime? startcreatorTimeDate = creatorTimeDate != null ? Ext.GetDateTime(creatorTimeDate.First()) : null; + DateTime? endcreatorTimeDate = creatorTimeDate != null ? Ext.GetDateTime(creatorTimeDate.Last()) : null; var data = await _db.Queryable() .WhereIF(!string.IsNullOrEmpty(input.userId), p => p.UserId.Equals(input.userId)) .WhereIF(queryExerciseDate != null, p => p.ExerciseDate >= new DateTime(startExerciseDate.ToDate().Year, startExerciseDate.ToDate().Month, startExerciseDate.ToDate().Day, 0, 0, 0)) .WhereIF(queryExerciseDate != null, p => p.ExerciseDate <= new DateTime(endExerciseDate.ToDate().Year, endExerciseDate.ToDate().Month, endExerciseDate.ToDate().Day, 23, 59, 59)) + .WhereIF(creatorTimeDate != null, p => p.CreatorTime >= new DateTime(startcreatorTimeDate.ToDate().Year, startcreatorTimeDate.ToDate().Month, startcreatorTimeDate.ToDate().Day, 0, 0, 0)) + .WhereIF(creatorTimeDate != null, p => p.CreatorTime <= new DateTime(endcreatorTimeDate.ToDate().Year, endcreatorTimeDate.ToDate().Month, endcreatorTimeDate.ToDate().Day, 23, 59, 59)) .WhereIF(!string.IsNullOrEmpty(input.code), p => p.Code.Contains(input.code)) .WhereIF(!string.IsNullOrEmpty(input.type), p => p.Type.Equals(input.type)) .Select(it=> new TbPunchListOutput @@ -299,6 +304,7 @@ namespace NCC.Education.TbPunch creatorTime=it.CreatorTime, lastModifyTime=it.LastModifyTime, type=it.Type, + imgList=it.ImgList, }).MergeTable().Mapper(p => { p.user = _db.Queryable().Where(o => o.Id == p.userId).First(); }).OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); diff --git a/antis-ncc-net-core/NCC.Education/打卡资讯/TbPunchInfoService.cs b/antis-ncc-net-core/NCC.Education/打卡资讯/TbPunchInfoService.cs index 6b2f741..dd1ceea 100644 --- a/antis-ncc-net-core/NCC.Education/打卡资讯/TbPunchInfoService.cs +++ b/antis-ncc-net-core/NCC.Education/打卡资讯/TbPunchInfoService.cs @@ -105,6 +105,8 @@ namespace NCC.Education.TbPunchInfo title=it.Title, creatorTime=it.CreatorTime, lastModifyTime=it.LastModifyTime, + editors= it.Editors, + img=it.Img, }).MergeTable().Mapper(p => { //当前用户阅读数量 diff --git a/antis-ncc-net-core/NCC.Education/测评信息/TbEvaluationService.cs b/antis-ncc-net-core/NCC.Education/测评信息/TbEvaluationService.cs index ea8ed1b..c646030 100644 --- a/antis-ncc-net-core/NCC.Education/测评信息/TbEvaluationService.cs +++ b/antis-ncc-net-core/NCC.Education/测评信息/TbEvaluationService.cs @@ -105,6 +105,8 @@ namespace NCC.Education.TbEvaluation title=it.Title, creatorTime=it.CreatorTime, lastModifyTime=it.LastModifyTime, + editors = it.Editors, + img =it.Img, }).MergeTable().OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); return PageResult.SqlSugarPageResult(data); } diff --git a/antis-ncc-net-core/NCC.Education/首页信息/TbHomeInfoService.cs b/antis-ncc-net-core/NCC.Education/首页信息/TbHomeInfoService.cs index 8f825b6..5540df4 100644 --- a/antis-ncc-net-core/NCC.Education/首页信息/TbHomeInfoService.cs +++ b/antis-ncc-net-core/NCC.Education/首页信息/TbHomeInfoService.cs @@ -106,6 +106,7 @@ namespace NCC.Education.TbHomeInfo remark=it.Remark, creatorTime=it.CreatorTime, lastModifyTime=it.LastModifyTime, + img=it.Img, }).MergeTable().OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); return PageResult.SqlSugarPageResult(data); } diff --git a/antis-ncc-net-core/src/Application/NCC.API/appsettings.json b/antis-ncc-net-core/src/Application/NCC.API/appsettings.json index 042d691..ac45010 100644 --- a/antis-ncc-net-core/src/Application/NCC.API/appsettings.json +++ b/antis-ncc-net-core/src/Application/NCC.API/appsettings.json @@ -99,15 +99,15 @@ "WEPAY_APP_URL": "", "WEPAY_APP_KEY": "", //公众号平台配置 - "WEPAY_WEB_APPID": "wx2ad028e8f5a3e6c0", + "WEPAY_WEB_APPID": "wx5b2942cc4a832ca4", "WEPAY_WEB_MCH_ID": "1635119465", //商户号 "WEPAY_WEB_NOTIFY_URL": "http://localhost:8061/api/Hairdressing/tbuserorder/WePayNotifyUserOrder", //微信支付回调地址 "WEPAY_WEB_URL": "https://uu365.t1j2.com/", "WEPAY_WEB_KEY": "QvzO0StUx5hpvYsNY0sRMSldYmtGY2bE", //微信商户秘钥 //小程序 - "APPLETE_APPSECRET": "ca62af33bb382ac9688907db01740b15", - "APPLETE_APPID": "wx2ad028e8f5a3e6c0" + "APPLETE_APPSECRET": "f065790516f790f0ae935524d3fed203", + "APPLETE_APPID": "wx5b2942cc4a832ca4" }, /* 支付宝支付配置 */ @@ -164,8 +164,8 @@ "NCC_App": { "CodeAreasName": "Education", //系统文件路径(末尾必须带斜杆) - //"SystemPath": "C:\\web\\NCC\\uu-resources\\", - "SystemPath": "C:\\inetpub\\wwwroot\\教育小程序\\UploadFile\\", + "SystemPath": "C:\\web\\NCC\\uu-resources\\", + //"SystemPath": "C:\\inetpub\\wwwroot\\教育小程序\\UploadFile\\", //微信公众号允许上传文件类型 "MPUploadFileType": "bmp,png,jpeg,jpg,gif,mp3,wma,wav,amr,mp4", //微信允许上传文件类型 diff --git a/antis-ncc-net-core/src/Modularity/OAuth/NCC.OAuth/Service/OAuthService.cs b/antis-ncc-net-core/src/Modularity/OAuth/NCC.OAuth/Service/OAuthService.cs index 5b058f3..fc53d89 100644 --- a/antis-ncc-net-core/src/Modularity/OAuth/NCC.OAuth/Service/OAuthService.cs +++ b/antis-ncc-net-core/src/Modularity/OAuth/NCC.OAuth/Service/OAuthService.cs @@ -169,8 +169,8 @@ namespace NCC.OAuth.Service if (user.DeleteMark == 1) throw NCCException.Oh(ErrorCode.D1017); // app权限验证 - if (NetUtil.isMobileBrowser && user.IsAdministrator == 0 && !ExistRoleByApp(user.RoleId)) - throw NCCException.Oh(ErrorCode.D1022); + //if (NetUtil.isMobileBrowser && user.IsAdministrator == 0 && !ExistRoleByApp(user.RoleId)) + // throw NCCException.Oh(ErrorCode.D1022); //登录成功时 判断单点登录信息 @@ -259,7 +259,8 @@ namespace NCC.OAuth.Service return new LoginOutput() { theme = user.Theme == null ? "classic" : user.Theme, - token = "Bearer " + accessToken + token = "Bearer " + accessToken, + user=user }; } diff --git a/antis-ncc-net-core/src/Modularity/System/NCC.System/Service/Permission/UsersService.cs b/antis-ncc-net-core/src/Modularity/System/NCC.System/Service/Permission/UsersService.cs index 258e9a8..e05285f 100644 --- a/antis-ncc-net-core/src/Modularity/System/NCC.System/Service/Permission/UsersService.cs +++ b/antis-ncc-net-core/src/Modularity/System/NCC.System/Service/Permission/UsersService.cs @@ -31,6 +31,7 @@ using System.Threading.Tasks; using UAParser; using NCC.Common.Model; using Yitter.IdGenerator; +using NPOI.OpenXmlFormats; namespace NCC.System.Service.Permission { @@ -120,6 +121,14 @@ namespace NCC.System.Service.Permission /// 入学年份 /// public string year { get; set; } + /// + /// 头像 + /// + public string headIcon { get; set; } + /// + /// 是否首次登录 1--非首次登录 2--首次登录 + /// + public string status { get; set; } #endregion } /// @@ -130,6 +139,7 @@ namespace NCC.System.Service.Permission [HttpPost("GetUserInfoByUserId")] public async Task GetUserInfoByUserId(string UserId) { + var user = _userRepository.Context.Queryable().Where(o => o.Id == UserId).First(); var model = _userRepository.Context.Queryable().Where(o => o.Id == UserId).Select(it => new UserInfoCustom { id = it.Id, @@ -142,7 +152,9 @@ namespace NCC.System.Service.Permission postalAddress = it.PostalAddress, realName = it.RealName, type = it.Type, - year = it.Year.ToString() + year = it.Year.ToString(), + headIcon = it.HeadIcon, + status = user.Type == "1" ? "2" : "1" }).First(); return model; } -- libgit2 0.21.4