2023-01-06 15:17:37 +08:00
|
|
|
package com.ai.da.service;
|
|
|
|
|
|
2024-11-13 15:44:48 +08:00
|
|
|
import com.ai.da.common.response.PageBaseResponse;
|
2024-01-19 16:36:34 +08:00
|
|
|
import com.ai.da.mapper.primary.entity.Account;
|
2024-12-19 13:31:01 +08:00
|
|
|
import com.ai.da.mapper.primary.entity.AccountExtend;
|
2024-01-19 16:36:34 +08:00
|
|
|
import com.ai.da.mapper.primary.entity.TrialOrder;
|
2023-01-06 15:17:37 +08:00
|
|
|
import com.ai.da.model.dto.*;
|
|
|
|
|
import com.ai.da.model.vo.AccountLoginVO;
|
|
|
|
|
import com.ai.da.model.vo.AccountPreLoginVO;
|
2025-02-04 11:39:42 +08:00
|
|
|
import com.ai.da.model.vo.BindEmailVO;
|
2024-08-21 10:23:55 +08:00
|
|
|
import com.ai.da.model.vo.PersonalHomepageVO;
|
2023-12-11 16:59:05 +08:00
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
2023-01-06 15:17:37 +08:00
|
|
|
import com.baomidou.mybatisplus.extension.service.IService;
|
2024-08-19 15:10:41 +08:00
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
2023-01-06 15:17:37 +08:00
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
2025-04-11 10:10:38 +08:00
|
|
|
import javax.servlet.http.HttpServletResponse;
|
2024-11-11 16:04:26 +08:00
|
|
|
import javax.servlet.http.HttpSession;
|
2025-08-26 23:53:40 +08:00
|
|
|
import java.math.BigDecimal;
|
2023-12-11 16:59:05 +08:00
|
|
|
import java.util.List;
|
2024-08-01 10:00:26 +08:00
|
|
|
import java.util.Map;
|
2025-04-11 10:10:38 +08:00
|
|
|
import java.util.Set;
|
2023-01-06 15:17:37 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 服务类
|
|
|
|
|
*
|
|
|
|
|
* @author easy-generator
|
|
|
|
|
* @since 2022-08-11
|
|
|
|
|
*/
|
|
|
|
|
public interface AccountService extends IService<Account> {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 账户预先登入
|
2023-10-20 14:47:18 +08:00
|
|
|
*
|
2023-01-06 15:17:37 +08:00
|
|
|
* @param accountDTO
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
AccountPreLoginVO preLogin(AccountPreLoginDTO accountDTO);
|
2023-10-20 14:47:18 +08:00
|
|
|
|
2023-01-06 15:17:37 +08:00
|
|
|
/**
|
|
|
|
|
* 账户登入
|
2023-10-20 14:47:18 +08:00
|
|
|
*
|
2023-01-06 15:17:37 +08:00
|
|
|
* @param accountLoginDTO
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
AccountLoginVO login(AccountLoginDTO accountLoginDTO, HttpServletRequest request);
|
2023-10-20 14:47:18 +08:00
|
|
|
|
2023-01-06 15:17:37 +08:00
|
|
|
/**
|
|
|
|
|
* 绑定邮箱
|
2023-10-20 14:47:18 +08:00
|
|
|
*
|
2023-01-06 15:17:37 +08:00
|
|
|
* @param accountBindEmailDTO
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
2025-02-05 14:20:22 +08:00
|
|
|
BindEmailVO bindEmail(AccountBindEmailDTO accountBindEmailDTO, HttpServletRequest request);
|
2025-01-10 16:54:44 +08:00
|
|
|
|
2025-02-04 11:39:42 +08:00
|
|
|
BindEmailVO bindEmail(String email);
|
2023-01-06 15:17:37 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 忘记密码
|
2023-10-20 14:47:18 +08:00
|
|
|
*
|
2023-01-06 15:17:37 +08:00
|
|
|
* @param accountDTO
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
Boolean forgetPwd(AccountRegisterDTO accountDTO);
|
2023-10-20 14:47:18 +08:00
|
|
|
|
2023-01-06 15:17:37 +08:00
|
|
|
/**
|
|
|
|
|
* 发送邮件
|
2023-10-20 14:47:18 +08:00
|
|
|
*
|
2023-01-06 15:17:37 +08:00
|
|
|
* @param emailSendDTO
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
Boolean sendEmail(EmailSendDTO emailSendDTO);
|
2023-10-20 14:47:18 +08:00
|
|
|
|
2023-01-06 15:17:37 +08:00
|
|
|
/**
|
|
|
|
|
* 登出
|
2023-10-20 14:47:18 +08:00
|
|
|
*
|
2023-01-06 15:17:37 +08:00
|
|
|
* @param accountLogoutDTO
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
Boolean logout(AccountLogoutDTO accountLogoutDTO);
|
2023-10-20 14:47:18 +08:00
|
|
|
|
2023-01-06 15:17:37 +08:00
|
|
|
/**
|
|
|
|
|
* 判断是否登出 Boolean为登入
|
2023-10-20 14:47:18 +08:00
|
|
|
*
|
2023-01-06 15:17:37 +08:00
|
|
|
* @param accountLogoutDTO
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
Boolean isLogin(AccountLogoutDTO accountLogoutDTO);
|
2023-10-20 14:47:18 +08:00
|
|
|
|
2023-01-06 15:17:37 +08:00
|
|
|
/**
|
|
|
|
|
* 添加用户信息
|
2023-10-20 14:47:18 +08:00
|
|
|
*
|
2023-01-06 15:17:37 +08:00
|
|
|
* @param accountAddDTO
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
Boolean addUser(AccountAddDTO accountAddDTO);
|
2023-10-20 14:47:18 +08:00
|
|
|
|
2023-01-06 15:17:37 +08:00
|
|
|
/**
|
|
|
|
|
* 编辑用户信息
|
2023-10-20 14:47:18 +08:00
|
|
|
*
|
2023-01-06 15:17:37 +08:00
|
|
|
* @param accountEditDTO
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
2023-10-20 14:47:18 +08:00
|
|
|
Boolean editUser(AccountEditDTO accountEditDTO);
|
2023-10-31 15:05:27 +08:00
|
|
|
|
2023-11-09 17:13:33 +08:00
|
|
|
String getUserLanguage();
|
2023-10-31 15:28:37 +08:00
|
|
|
|
|
|
|
|
String changeUserLanguage(String language);
|
2023-11-20 15:06:15 +08:00
|
|
|
|
|
|
|
|
Boolean trialUserLogout();
|
2023-11-29 14:37:32 +08:00
|
|
|
|
|
|
|
|
Boolean completeGuidance();
|
2023-12-06 15:58:57 +08:00
|
|
|
|
2024-04-02 10:15:35 +08:00
|
|
|
Boolean addTrialUser(AccountTrialDTO accountTrialDTO, HttpServletRequest request);
|
2023-12-11 16:59:05 +08:00
|
|
|
|
|
|
|
|
IPage<TrialOrder> trialOrderList(TrialOrderDTO trialOrderDTO);
|
|
|
|
|
|
|
|
|
|
Boolean trialOrderApproval(List<Long> ids);
|
2023-12-14 16:33:57 +08:00
|
|
|
|
|
|
|
|
Boolean getIsAutoApproval();
|
|
|
|
|
|
|
|
|
|
Boolean switchIsAutoApproval();
|
|
|
|
|
|
|
|
|
|
Boolean trialOrderRefuse(List<Long> ids);
|
2024-01-04 15:22:38 +08:00
|
|
|
|
|
|
|
|
Long getExpiredTime();
|
2024-01-15 15:06:48 +08:00
|
|
|
|
|
|
|
|
Boolean addNoLoginRequired(NoLoginRequiredDTO noLoginRequiredDTO);
|
|
|
|
|
|
|
|
|
|
Boolean deleteNoLoginRequired(NoLoginRequiredDTO noLoginRequiredDTO);
|
|
|
|
|
|
2024-01-17 17:49:40 +08:00
|
|
|
AccountLoginVO noLoginRequired(NoLoginRequiredDTO noLoginRequiredDTO, HttpServletRequest request);
|
2024-01-15 16:33:23 +08:00
|
|
|
|
2024-01-17 17:49:40 +08:00
|
|
|
Boolean existNoLoginRequired(NoLoginRequiredDTO noLoginRequiredDTO, HttpServletRequest request);
|
|
|
|
|
|
|
|
|
|
String addNoLoginRequiredNew(NoLoginRequiredDTO noLoginRequiredDTO, HttpServletRequest request);
|
|
|
|
|
|
|
|
|
|
Boolean deleteNoLoginRequiredNew(NoLoginRequiredDTO noLoginRequiredDTO, HttpServletRequest request);
|
2024-01-19 16:36:34 +08:00
|
|
|
|
2024-01-26 13:17:59 +08:00
|
|
|
void upgradeNotification();
|
|
|
|
|
|
|
|
|
|
void moveLibraryDate();
|
2024-03-06 20:56:22 +08:00
|
|
|
|
2025-08-26 23:53:40 +08:00
|
|
|
void updateCreditsAndEndTime(Long accountId, String value, Long endTime, BigDecimal creditsUsage);
|
2024-06-12 09:47:55 +08:00
|
|
|
|
|
|
|
|
Boolean designWorksRegister(AccountDesignWorksRegisterDTO accountDesignWorksRegisterDTO);
|
2024-06-17 09:34:48 +08:00
|
|
|
|
2025-06-24 17:53:52 +08:00
|
|
|
AccountLoginVO designWorksRegisterCode(AccountDesignWorksRegisterDTO accountDesignWorksRegisterDTO,
|
|
|
|
|
HttpServletRequest request);
|
2024-06-20 10:27:04 +08:00
|
|
|
|
2024-06-21 15:11:31 +08:00
|
|
|
Boolean extendValidityForCC();
|
|
|
|
|
|
2024-06-20 10:27:04 +08:00
|
|
|
Boolean collectQuestionnaires(String questionnaireInfo);
|
2024-06-21 15:11:31 +08:00
|
|
|
|
2025-08-25 15:02:34 +08:00
|
|
|
void refreshCreditsMonthly();
|
2024-07-19 15:40:54 +08:00
|
|
|
|
|
|
|
|
List<Account> getExpiredUserBySystemUser(Integer systemUserNum);
|
|
|
|
|
|
|
|
|
|
String getActivityBenefits();
|
|
|
|
|
|
|
|
|
|
void toVisitor(Account account);
|
|
|
|
|
|
|
|
|
|
List<Long> setUserValidToDayEnd();
|
2024-08-01 10:00:26 +08:00
|
|
|
|
|
|
|
|
IPage<Account> getPageByDateAndUserType(String startTime, String endTime, Integer type, int pageNum, int size);
|
|
|
|
|
|
|
|
|
|
Map<String, Long> getByDateAndUserType(String startTime, String endTime, Integer type);
|
|
|
|
|
|
|
|
|
|
IPage<Account> getPageByIds(List<Long> ids, int pageNum, int size);
|
|
|
|
|
List<Account> getByIds(List<Long> ids);
|
2024-08-19 15:10:41 +08:00
|
|
|
|
|
|
|
|
String uploadAvatar(MultipartFile file);
|
2024-08-21 10:23:55 +08:00
|
|
|
|
|
|
|
|
PersonalHomepageVO getPersonalHomepage(Long accountId);
|
|
|
|
|
|
|
|
|
|
Boolean viewsIncrease(Long id);
|
2024-08-27 11:27:05 +08:00
|
|
|
|
|
|
|
|
void registerUserToVisitor();
|
2024-09-27 14:42:30 +08:00
|
|
|
|
2025-01-08 14:20:12 +08:00
|
|
|
Long getNicknameModifyTimes();
|
2024-09-25 16:15:18 +08:00
|
|
|
|
|
|
|
|
void editUserName(String newUserName);
|
|
|
|
|
|
2025-01-02 17:32:49 +08:00
|
|
|
/*void verifyUserEmail(String verifyCode);
|
2024-09-25 16:15:18 +08:00
|
|
|
|
|
|
|
|
void changeUserEmail(String newMailbox);
|
|
|
|
|
|
2025-01-02 17:32:49 +08:00
|
|
|
void activateNewEmail(String token);*/
|
2024-09-29 17:56:49 +08:00
|
|
|
|
2024-09-13 11:13:23 +08:00
|
|
|
String updateNoLoginRequiredNew(NoLoginRequiredDTO noLoginRequiredDTO, HttpServletRequest request);
|
2024-10-03 12:14:30 +08:00
|
|
|
|
|
|
|
|
void halfPricePromotion();
|
2024-11-11 16:04:26 +08:00
|
|
|
|
|
|
|
|
String googleCallback(String code, HttpSession session);
|
2024-11-11 16:06:21 +08:00
|
|
|
|
2024-11-06 17:27:16 +08:00
|
|
|
List<String> getPaidCustomerEmail();
|
2024-11-13 15:44:48 +08:00
|
|
|
|
2024-12-02 12:02:19 +08:00
|
|
|
void temporaryUpgrade();
|
2024-12-09 13:44:07 +08:00
|
|
|
|
2025-04-11 10:10:38 +08:00
|
|
|
AccountPreLoginVO enterpriseLogin(AccountLoginDTO accountDTO);
|
2024-11-13 15:44:48 +08:00
|
|
|
|
2025-04-11 10:10:38 +08:00
|
|
|
AccountPreLoginVO schoolLogin(AccountLoginDTO accountDTO);
|
2024-11-13 15:44:48 +08:00
|
|
|
|
|
|
|
|
Boolean addSubAccount(AddSubAccountDTO addSubAccountDTO);
|
|
|
|
|
|
|
|
|
|
Boolean deleteSubAccount(AddSubAccountDTO addSubAccountDTO);
|
|
|
|
|
|
2025-08-13 16:45:30 +08:00
|
|
|
void removeSubAccount(AddSubAccountDTO addSubAccountDTO, boolean returnCredits);
|
|
|
|
|
|
2024-11-13 15:44:48 +08:00
|
|
|
PageBaseResponse<Account> subAccountList(SubAccountPageDTO subAccountPageDTO);
|
|
|
|
|
|
|
|
|
|
Account accountDetail(Long id);
|
|
|
|
|
|
2025-02-05 12:04:53 +08:00
|
|
|
AccountLoginVO parseGoogleCredential(String credential, Integer type);
|
2024-12-09 13:31:30 +08:00
|
|
|
|
2025-02-05 12:04:53 +08:00
|
|
|
AccountLoginVO parseWeChatCode(String code, Integer type);
|
2024-12-09 13:31:30 +08:00
|
|
|
|
|
|
|
|
AccountLoginVO getAccountDetail();
|
2024-12-11 14:21:29 +08:00
|
|
|
|
2024-12-19 13:31:01 +08:00
|
|
|
AccountExtend bindGoogle(String credential);
|
2024-12-11 14:21:29 +08:00
|
|
|
|
2024-12-19 13:31:01 +08:00
|
|
|
AccountExtend bindWeChat(String code);
|
2024-12-13 16:07:21 +08:00
|
|
|
|
|
|
|
|
Boolean unbindWeChat();
|
|
|
|
|
|
|
|
|
|
Boolean unbindGoogle();
|
2024-12-27 14:29:07 +08:00
|
|
|
|
2025-02-06 18:39:06 +08:00
|
|
|
boolean updateAccountValidity(Long accountId, Long currentPeriodEnd);
|
2024-12-27 14:29:07 +08:00
|
|
|
|
2025-08-25 15:02:34 +08:00
|
|
|
void updateUserRoleAndCredits(Long accountId, String orderNo);
|
2025-01-10 16:13:45 +08:00
|
|
|
|
2025-02-11 11:27:08 +08:00
|
|
|
Boolean updateUserInfo(UpdateUserInfoDTO updateUserInfoDTO);
|
2025-04-11 10:10:38 +08:00
|
|
|
|
|
|
|
|
void subAccountImportExcelDownload(HttpServletResponse response);
|
|
|
|
|
|
2025-08-15 17:44:45 +08:00
|
|
|
void exportAccountsToExcel(HttpServletResponse response);
|
|
|
|
|
|
2025-04-11 10:10:38 +08:00
|
|
|
Boolean subAccountImport(MultipartFile file);
|
|
|
|
|
|
|
|
|
|
Set<String> organizationNameSearch(String type, String name);
|
2025-06-19 17:16:48 +08:00
|
|
|
|
2025-06-19 17:22:43 +08:00
|
|
|
/*void send618PromotionEmailTemp();*/
|
2023-01-06 15:17:37 +08:00
|
|
|
}
|