AdminUtilsController.cs 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483
  1. using System.Collections.Generic;
  2. using System.IO;
  3. using System.Threading.Tasks;
  4. using GxPress.Common.Tools;
  5. using GxPress.EnumConst;
  6. using GxPress.Repository.Interface;
  7. using GxPress.Repository.Interface.WorkFlow;
  8. using GxPress.Repository.Interface.WorkProcess;
  9. using GxPress.Request.GroupChat;
  10. using GxPress.Service.Interface.IM;
  11. using Microsoft.AspNetCore.Hosting;
  12. using Microsoft.AspNetCore.Mvc;
  13. using Newtonsoft.Json;
  14. using Datory;
  15. using GxPress.Repository.Interface.AdminVerify;
  16. using GxPress.Repository.Interface.AppReport;
  17. using GxPress.Service.Interface.ElasticSearch;
  18. using GxPress.Repository.Interface.Collection;
  19. using GxPress.Repository.Interface.Missive;
  20. using GxPress.Repository.Interface.Note;
  21. using GxPress.Repository.Interface.Topic;
  22. using GxPress.Repository.Interface.WaitHandle;
  23. using GxPress.Repository.Interface.WorkCar;
  24. using GxPress.Repository.Interface.WorkMeeting;
  25. using GxPress.Repository.Interface.Visit;
  26. using GxPress.Repository.Interface.Analyze;
  27. using GxPress.Repository.Interface.UserMiddle;
  28. using GxPress.Repository.Interface.ArticleLabel;
  29. using GxPress.Repository.Interface.VerificationCode;
  30. using GxPress.Repository.Interface.FlowAttachment;
  31. using GxPress.Repository.Interface.MeetingSummaryTodo;
  32. using GxPress.Repository.Interface.RecordFolder;
  33. namespace GxPress.Api.AdminControllers
  34. {
  35. /// <summary>
  36. /// Utils
  37. /// </summary>
  38. [Route("api/admin/utils")]
  39. [ApiController]
  40. public class AdminUtilsController : ControllerBase
  41. {
  42. private readonly IWebHostEnvironment _environment;
  43. private readonly IFlowFieldValueRepository _flowFieldValueRepository;
  44. private readonly IFlowRepository _flowRepository;
  45. private readonly IFlowMessageRepository _flowMessageRepository;
  46. private readonly IFlowTodoRepository _flowTodoRepository;
  47. private readonly IProcessFieldRepository _processFieldRepository;
  48. private readonly IProcessGroupRepository _processGroupRepository;
  49. private readonly IProcessNodeRepository _processNodeRepository;
  50. private readonly IProcessRepository _processRepository;
  51. private readonly IProcessRequestLimitRepository _processRequestLimitRepository;
  52. private readonly IRuleApproverCheckRepository _ruleApproverCheckRepository;
  53. private readonly IRuleCarbonCopyRepository _ruleCarbonCopyRepository;
  54. private readonly IRuleConditionRepository _ruleConditionRuleRepository;
  55. private readonly IMeetingLocationRepository _meetingLocationRepository;
  56. private readonly IMeetingOrderRepository _meetingOrderRepository;
  57. private readonly IMeetingRepository _meetingRepository;
  58. private readonly IMeetingRoomRepository _meetingRoomRepository;
  59. private readonly IMeetingSummaryRepository _meetingSummaryRepository;
  60. private readonly ICarOrderRepository _carOrderRepository;
  61. private readonly ICarRepository _carRepository;
  62. private readonly ICarTypeRepository _carTypeRepository;
  63. private readonly IAdminRepository _adminRepository;
  64. private readonly IArticleGroupRepository _articleGroupRepository;
  65. private readonly IArticleRepository _articleRepository;
  66. private readonly IDepartmentRepository _departmentRepository;
  67. private readonly IRoleGroupRepository _roleGroupRepository;
  68. private readonly IRoleRepository _roleRepository;
  69. private readonly ISlideRepository _slideRepository;
  70. private readonly IUserRepository _userRepository;
  71. private readonly ICommentRepository _commentRepository;
  72. private readonly IAppVersionRepository _appVersionRepository;
  73. private readonly IFeedbackRepository _feedbackRepository;
  74. private readonly IBlacklistArticleRepository _blacklistArticleRepository;
  75. private readonly IThesaurusRepository _thesaurusRepository;
  76. private readonly IArticleGroupUserRepository _articleGroupUserRepository;
  77. private readonly IAddressBookGroupRepository _addressBookGroupRepository;
  78. private readonly IAddressBookGroupUserRepository _addressBookGroupUserRepository;
  79. private readonly IGroupChatRepository _groupChatRepository;
  80. private readonly IGroupChatUserRepository _groupChatUserRepository;
  81. private readonly INoticeRepository _noticeRepository;
  82. private readonly INoticeAddresseeRepository _noticeAddresseeRepository;
  83. private readonly INoticeCcRepository _noticeCcRepository;
  84. private readonly INoticeFolderRepository _noticeFolderRepository;
  85. private readonly IBlacklistUserRepository _blacklistUserRepository;
  86. private readonly IFinanceRepository _financeRepository;
  87. private readonly IPrintRepository _printRepository;
  88. private readonly ISellRepository _sellRepository;
  89. private readonly IStorehouseRepository _storehouseRepository;
  90. private readonly IHumanAffairsRepository _humanAffairsRepository;
  91. private readonly IOftenContactRepository _oftenContactRepository;
  92. private readonly IChatRecordRepository _chatRecordRepository;
  93. private readonly ITopicRepository _topicRepository;
  94. private readonly ITopicAddresseeRepository _topicAddresseeRepository;
  95. private readonly ITopicAnalyzeRepository _topicAnalyzeRepository;
  96. private readonly ITopicCommentRepository _topicCommentRepository;
  97. private readonly IFileLibraryRepository _fileLibraryRepository;
  98. private readonly IIMService _imService;
  99. private readonly IGroupRepository _groupRepository;
  100. private readonly IGroupUserRepository _groupUserRepository;
  101. private readonly IGroupFolderRepository _groupFolderRepository;
  102. private readonly IMiddleRepository _middleRepository;
  103. private readonly IElasticSearchService _elasticSearchService;
  104. private readonly ICollectionRepository _collectionRepository;
  105. private readonly INoteRepository _noteRepository;
  106. private readonly IAppReportRepository _appReportRepository;
  107. private readonly ITopicGroupRepository _topicGroupRepository;
  108. private readonly ITopicGroupUserRepository _topicGroupUserRepository;
  109. private readonly IAdminVerifyRepository _adminVerifyRepository;
  110. private readonly IMissiveRepository _missiveRepository;
  111. private readonly IMissiveAddresseeRepository _missiveAddresseeRepository;
  112. private readonly IMissiveCcRepository _missiveCcRepository;
  113. private readonly IMissiveAnalyzeRepository _missiveAnalyzeRepository;
  114. private readonly IFolderUserRepository _folderUserRepository;
  115. private readonly IWaitHandleLabelRepository _waitHandleLabelRepository;
  116. private readonly IWaitHandleRepository _waitHandleRepository;
  117. private readonly IVisitRepository _vsitRepository;
  118. private readonly IAnalyzeRepository _analyzeRepository;
  119. private readonly IUserMiddleRepository _userMiddleRepository;
  120. private readonly IArticleInnerLabelRepository _articleInnerLabelRepository;
  121. private readonly IArticleLabelRepository _articleLabelRepository;
  122. private readonly IVerificationCodeRepository verificationCodeRepository;
  123. private readonly IFlowAttachmentRepository flowAttachmentRepository;
  124. private readonly IMeetingSummaryTodoRepository meetingSummaryTodoRepository;
  125. private readonly IRecordFolderRepository recordFolderRepository;
  126. public AdminUtilsController(IWebHostEnvironment environment, IFlowFieldValueRepository flowFieldValueRepository,
  127. IFlowRepository flowRepository, IFlowMessageRepository flowMessageRepository,
  128. IFlowTodoRepository flowTodoRepository, IAdminRepository adminRepository,
  129. IArticleGroupRepository articleGroupRepository,
  130. IArticleRepository articleRepository,
  131. IDepartmentRepository departmentRepository,
  132. IProcessFieldRepository processFieldRepository, IProcessGroupRepository processGroupRepository,
  133. IProcessNodeRepository processNodeRepository, IProcessRepository processRepository,
  134. IProcessRequestLimitRepository processRequestLimitRepository,
  135. IRuleApproverCheckRepository ruleApproverCheckRepository,
  136. IRuleCarbonCopyRepository ruleCarbonCopyRepository, IRuleConditionRepository ruleConditionRuleRepository,
  137. IMeetingLocationRepository meetingLocationRepository, IMeetingOrderRepository meetingOrderRepository,
  138. IMeetingRepository meetingRepository, IMeetingRoomRepository meetingRoomRepository,
  139. IMeetingSummaryRepository meetingSummaryRepository,
  140. ICarOrderRepository carOrderRepository, ICarRepository carRepository, ICarTypeRepository carTypeRepository,
  141. IRoleGroupRepository roleGroupRepository,
  142. IRoleRepository roleRepository, IUserRepository userRepository, ISlideRepository slideRepository,
  143. ICommentRepository commentRepository, IAppVersionRepository appVersionRepository,
  144. IFeedbackRepository feedbackRepository, IBlacklistArticleRepository blacklistArticleRepository,
  145. IThesaurusRepository thesaurusRepository, IArticleGroupUserRepository articleGroupUserRepository,
  146. IAddressBookGroupRepository addressBookGroupRepository,
  147. IAddressBookGroupUserRepository addressBookGroupUserRepository, IGroupChatRepository groupChatRepository,
  148. IGroupChatUserRepository groupChatUserRepository, INoticeRepository noticeRepository,
  149. INoticeAddresseeRepository noticeAddresseeRepository, INoticeCcRepository noticeCcRepository, INoticeFolderRepository noticeFolderRepository, IBlacklistUserRepository blacklistUserRepository,
  150. IFinanceRepository financeRepository, IPrintRepository printRepository, ISellRepository sellRepository,
  151. IStorehouseRepository storehouseRepository, IHumanAffairsRepository humanAffairsRepository,
  152. IOftenContactRepository oftenContactRepository, IChatRecordRepository chatRecordRepository,
  153. ITopicRepository topicRepository, ITopicAddresseeRepository topicAddresseeRepository,
  154. ITopicAnalyzeRepository topicAnalyzeRepository, ITopicCommentRepository topicCommentRepository,
  155. IFileLibraryRepository fileLibraryRepository, IIMService imService, IGroupRepository groupRepository,
  156. IGroupFolderRepository groupFolderRepository, IGroupUserRepository groupUserRepository,
  157. IMiddleRepository middleRepository, IElasticSearchService elasticSearchService,
  158. ICollectionRepository collectionRepository, INoteRepository noteRepository,
  159. IAppReportRepository appReportRepository, ITopicGroupRepository topicGroupRepository,
  160. ITopicGroupUserRepository topicGroupUserRepository, IAdminVerifyRepository adminVerifyRepository,
  161. IMissiveRepository missiveRepository, IMissiveAddresseeRepository missiveAddresseeRepository,
  162. IMissiveCcRepository missiveCcRepository, IMissiveAnalyzeRepository missiveAnalyzeRepository, IWaitHandleLabelRepository waitHandleLabelRepository,
  163. IWaitHandleRepository waitHandleRepository, IVisitRepository visitRepository, IAnalyzeRepository analyzeRepository, IUserMiddleRepository userMiddleRepository, IArticleInnerLabelRepository articleInnerLabelRepository, IArticleLabelRepository articleLabelRepository, IVerificationCodeRepository verificationCodeRepository, IFlowAttachmentRepository flowAttachmentRepository, IMeetingSummaryTodoRepository meetingSummaryTodoRepository, IFolderUserRepository folderUserRepository, IRecordFolderRepository recordFolderRepository)
  164. {
  165. _environment = environment;
  166. _flowFieldValueRepository = flowFieldValueRepository;
  167. _flowRepository = flowRepository;
  168. _flowMessageRepository = flowMessageRepository;
  169. _flowTodoRepository = flowTodoRepository;
  170. _processFieldRepository = processFieldRepository;
  171. _processGroupRepository = processGroupRepository;
  172. _processNodeRepository = processNodeRepository;
  173. _processRepository = processRepository;
  174. _processRequestLimitRepository = processRequestLimitRepository;
  175. _ruleApproverCheckRepository = ruleApproverCheckRepository;
  176. _ruleCarbonCopyRepository = ruleCarbonCopyRepository;
  177. _ruleConditionRuleRepository = ruleConditionRuleRepository;
  178. _adminRepository = adminRepository;
  179. _articleGroupRepository = articleGroupRepository;
  180. _articleRepository = articleRepository;
  181. _departmentRepository = departmentRepository;
  182. _meetingLocationRepository = meetingLocationRepository;
  183. _meetingOrderRepository = meetingOrderRepository;
  184. _meetingRepository = meetingRepository;
  185. _meetingRoomRepository = meetingRoomRepository;
  186. _meetingSummaryRepository = meetingSummaryRepository;
  187. _carOrderRepository = carOrderRepository;
  188. _carRepository = carRepository;
  189. _carTypeRepository = carTypeRepository;
  190. _roleGroupRepository = roleGroupRepository;
  191. _roleRepository = roleRepository;
  192. _userRepository = userRepository;
  193. _slideRepository = slideRepository;
  194. _commentRepository = commentRepository;
  195. _appVersionRepository = appVersionRepository;
  196. _feedbackRepository = feedbackRepository;
  197. _blacklistArticleRepository = blacklistArticleRepository;
  198. _thesaurusRepository = thesaurusRepository;
  199. _articleGroupUserRepository = articleGroupUserRepository;
  200. _addressBookGroupRepository = addressBookGroupRepository;
  201. _addressBookGroupUserRepository = addressBookGroupUserRepository;
  202. _groupChatRepository = groupChatRepository;
  203. _groupChatUserRepository = groupChatUserRepository;
  204. _noticeRepository = noticeRepository;
  205. _noticeAddresseeRepository = noticeAddresseeRepository;
  206. _noticeCcRepository = noticeCcRepository;
  207. _noticeFolderRepository = noticeFolderRepository;
  208. _blacklistUserRepository = blacklistUserRepository;
  209. _humanAffairsRepository = humanAffairsRepository;
  210. _financeRepository = financeRepository;
  211. _sellRepository = sellRepository;
  212. _storehouseRepository = storehouseRepository;
  213. _printRepository = printRepository;
  214. _oftenContactRepository = oftenContactRepository;
  215. _chatRecordRepository = chatRecordRepository;
  216. _topicAddresseeRepository = topicAddresseeRepository;
  217. _topicCommentRepository = topicCommentRepository;
  218. _topicAnalyzeRepository = topicAnalyzeRepository;
  219. _topicRepository = topicRepository;
  220. _fileLibraryRepository = fileLibraryRepository;
  221. _imService = imService;
  222. _groupFolderRepository = groupFolderRepository;
  223. _groupUserRepository = groupUserRepository;
  224. _groupRepository = groupRepository;
  225. _middleRepository = middleRepository;
  226. _elasticSearchService = elasticSearchService;
  227. _collectionRepository = collectionRepository;
  228. _noteRepository = noteRepository;
  229. _appReportRepository = appReportRepository;
  230. _topicGroupRepository = topicGroupRepository;
  231. _topicGroupUserRepository = topicGroupUserRepository;
  232. _adminVerifyRepository = adminVerifyRepository;
  233. _missiveRepository = missiveRepository;
  234. _missiveAddresseeRepository = missiveAddresseeRepository;
  235. _missiveCcRepository = missiveCcRepository;
  236. _missiveAnalyzeRepository = missiveAnalyzeRepository;
  237. _folderUserRepository = folderUserRepository;
  238. _waitHandleRepository = waitHandleRepository;
  239. _waitHandleLabelRepository = waitHandleLabelRepository;
  240. _vsitRepository = visitRepository;
  241. _analyzeRepository = analyzeRepository;
  242. _userMiddleRepository = userMiddleRepository;
  243. _articleInnerLabelRepository = articleInnerLabelRepository;
  244. _articleLabelRepository = articleLabelRepository;
  245. this.verificationCodeRepository = verificationCodeRepository;
  246. this.flowAttachmentRepository = flowAttachmentRepository;
  247. this.meetingSummaryTodoRepository = meetingSummaryTodoRepository;
  248. this.recordFolderRepository = recordFolderRepository;
  249. }
  250. [HttpGet("works")]
  251. public async Task<string> WorksAsync()
  252. {
  253. var retVal = await _adminRepository.Database.IsConnectionWorksAsync();
  254. return retVal.IsConnectionWorks ? "Database Connection Works" : retVal.ErrorMessage;
  255. }
  256. [HttpGet("sync_database")]
  257. public async Task<string> SyncDatabase()
  258. {
  259. var database = _adminRepository.Database;
  260. var repositories = new List<IRepository>
  261. {
  262. _adminRepository,
  263. _flowFieldValueRepository,
  264. _flowRepository,
  265. _flowMessageRepository,
  266. _flowTodoRepository,
  267. _processFieldRepository,
  268. _processGroupRepository,
  269. _processNodeRepository,
  270. _processRepository,
  271. _processRequestLimitRepository,
  272. _ruleApproverCheckRepository,
  273. _ruleCarbonCopyRepository,
  274. _ruleConditionRuleRepository,
  275. _articleGroupRepository,
  276. _articleRepository,
  277. _departmentRepository,
  278. _meetingLocationRepository,
  279. _meetingOrderRepository,
  280. _meetingRepository,
  281. _meetingRoomRepository,
  282. _meetingSummaryRepository,
  283. _carOrderRepository,
  284. _carRepository,
  285. _carTypeRepository,
  286. _roleGroupRepository,
  287. _roleRepository,
  288. _slideRepository,
  289. _userRepository,
  290. _commentRepository,
  291. _appVersionRepository,
  292. _feedbackRepository,
  293. _blacklistArticleRepository,
  294. _thesaurusRepository,
  295. _articleGroupUserRepository,
  296. _addressBookGroupRepository,
  297. _addressBookGroupUserRepository,
  298. _groupChatRepository,
  299. _groupChatUserRepository,
  300. _noticeRepository,
  301. _noticeAddresseeRepository,
  302. _noticeCcRepository,
  303. _noticeFolderRepository,
  304. _blacklistUserRepository,
  305. _humanAffairsRepository,
  306. _financeRepository,
  307. _sellRepository,
  308. _storehouseRepository,
  309. _printRepository,
  310. _chatRecordRepository,
  311. _oftenContactRepository,
  312. _topicAddresseeRepository,
  313. _topicAnalyzeRepository,
  314. _topicCommentRepository,
  315. _topicRepository,
  316. _fileLibraryRepository,
  317. _groupFolderRepository,
  318. _groupUserRepository,
  319. _groupRepository,
  320. _middleRepository,
  321. _collectionRepository,
  322. _noteRepository,
  323. _appReportRepository,
  324. _topicGroupRepository,
  325. _topicGroupUserRepository,
  326. _adminVerifyRepository,
  327. _missiveRepository,
  328. _missiveAddresseeRepository,
  329. _missiveCcRepository,
  330. _missiveAnalyzeRepository,
  331. _folderUserRepository,
  332. _waitHandleRepository,
  333. _waitHandleLabelRepository,
  334. _vsitRepository,
  335. _analyzeRepository,
  336. _userMiddleRepository,
  337. _articleInnerLabelRepository,
  338. _articleLabelRepository,
  339. verificationCodeRepository,
  340. flowAttachmentRepository,
  341. meetingSummaryTodoRepository,
  342. recordFolderRepository
  343. };
  344. var alterCount = 0;
  345. var createCount = 0;
  346. foreach (var repository in repositories)
  347. {
  348. if (await database.IsTableExistsAsync(repository.TableName))
  349. {
  350. await database.AlterTableAsync(repository.TableName, repository.TableColumns);
  351. alterCount++;
  352. }
  353. else
  354. {
  355. await database.CreateTableAsync(repository.TableName, repository.TableColumns);
  356. createCount++;
  357. }
  358. }
  359. //var database = new Database();
  360. //database.IsTableExistsAsync()
  361. return $"alter: {alterCount}, create: {createCount}";
  362. }
  363. [HttpGet("qrcoder")]
  364. public async Task<bool> SendQRCode()
  365. {
  366. var users = await _userRepository.FindAllUserAsync(Q.Where(nameof(Entity.User.Id), ">", 0));
  367. foreach (var user in users)
  368. {
  369. if (string.IsNullOrEmpty(user.QRCoder))
  370. {
  371. //生成二维码
  372. var qrCodeData = new { key = QRCodeTypeConst.UserInfo, value = user.Guid };
  373. var resultPath =
  374. FileHelper.SaveQRCodeFile(StringUtils.GetWebRootPath(_environment.WebRootPath),
  375. JsonConvert.SerializeObject(qrCodeData));
  376. user.QRCoder = resultPath.RelativePath;
  377. await _userRepository.UpdateAsync(user);
  378. }
  379. }
  380. var groupChats = await _groupChatRepository.GetAllGroupChatAsync();
  381. foreach (var groupChat in groupChats)
  382. {
  383. if (string.IsNullOrEmpty(groupChat.QRCoder))
  384. {
  385. //生成二维码
  386. var qrCodeData = new { key = QRCodeTypeConst.GroupChatInfo, value = groupChat.Guid };
  387. var resultPath =
  388. FileHelper.SaveQRCodeFile(StringUtils.GetWebRootPath(_environment.WebRootPath),
  389. JsonConvert.SerializeObject(qrCodeData));
  390. groupChat.QRCoder = resultPath.RelativePath;
  391. var request = new GroupChatUpRequest { Id = groupChat.Id, QrCode = groupChat.QRCoder };
  392. await _groupChatRepository.UpdateAsync(request);
  393. }
  394. }
  395. return true;
  396. }
  397. [HttpGet("test")]
  398. public async Task<bool> Test()
  399. {
  400. //return await new MinIOHelper().PutObjectAsync("test", "1234.jpeg", "C:\\Users\\zuoxi\\Desktop\\1234.jpeg", "application/octet-stream");
  401. //return await _imService.GetTokenImAsync();
  402. return await _elasticSearchService.ElasticSearchData();
  403. }
  404. [HttpGet("im-token")]
  405. public async Task<bool> SetImToken()
  406. {
  407. return await _imService.GetTokenImAsync();
  408. }
  409. /// <summary>
  410. /// 插入环信用户
  411. /// </summary>
  412. /// <returns></returns>
  413. [HttpGet("im-user")]
  414. public async Task<bool> SetImUser()
  415. {
  416. var users = await _userRepository.GetAllUserIm();
  417. foreach (var item in users)
  418. {
  419. await _userRepository.CreateMiUserAsync(item);
  420. }
  421. return true;
  422. }
  423. /// <summary>
  424. /// 设置图片
  425. /// </summary>
  426. /// <returns></returns>
  427. [HttpGet("set-img")]
  428. public async Task<bool> SetImg()
  429. {
  430. //获取文章
  431. var articles = await _articleRepository.GetAllAsync();
  432. foreach (var article in articles)
  433. {
  434. var strings = StringUtils.StringCollectionToStringList(article.ImageUrls);
  435. foreach (var imageUrl in strings)
  436. {
  437. var imageUrlFullName = imageUrl.Split('/')[imageUrl.Split('/').Length - 1];
  438. //获取文件路径
  439. var file = StringUtils.GetWebRootPath(_environment.WebRootPath + "\\cache");
  440. DirectoryInfo info = new DirectoryInfo(file);
  441. foreach (var item in info.GetFileSystemInfos())
  442. {
  443. //判读是否是文件夹
  444. if (Directory.Exists(item.FullName))
  445. {
  446. //获取文件夹下面的文件
  447. var infos = new DirectoryInfo(item.FullName);
  448. foreach (var fileIo in infos.GetFileSystemInfos())
  449. {
  450. if (fileIo.FullName.Contains(imageUrlFullName))
  451. {
  452. //压缩图片
  453. CompressImage.Execute(fileIo.FullName);
  454. //压缩图片
  455. CompressImage.Execute(fileIo.FullName, 100);
  456. }
  457. }
  458. }
  459. }
  460. }
  461. }
  462. return true;
  463. }
  464. [HttpGet("send-sms")]
  465. public void SendSms()
  466. {
  467. var phones = new List<string>() { "17311267313", "13699447785" };
  468. Common.Sms.MasSms.SendSmsTemplate(phones, "dd01d79af7ec46a289cd0fca0cb3b149");
  469. }
  470. }
  471. }