2023-01-06 15:17:37 +08:00
|
|
|
|
package com.ai.da.controller;
|
|
|
|
|
|
|
2024-08-19 15:10:41 +08:00
|
|
|
|
import com.ai.da.common.config.exception.BusinessException;
|
2023-12-11 16:59:05 +08:00
|
|
|
|
import com.ai.da.common.response.PageBaseResponse;
|
2023-01-06 15:17:37 +08:00
|
|
|
|
import com.ai.da.common.response.Response;
|
2024-11-13 15:44:48 +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-02-20 10:12:44 +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-01-06 15:17:37 +08:00
|
|
|
|
import com.ai.da.service.AccountService;
|
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
2023-12-29 13:48:42 +08:00
|
|
|
|
import org.springframework.http.HttpStatus;
|
2024-08-19 15:10:41 +08:00
|
|
|
|
import org.springframework.util.StringUtils;
|
2023-01-06 15:17:37 +08:00
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
2024-08-19 15:10:41 +08:00
|
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
2023-01-06 15:17:37 +08:00
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
2025-04-11 10:10:38 +08:00
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
2023-01-06 15:17:37 +08:00
|
|
|
|
import javax.validation.Valid;
|
2023-12-29 13:48:42 +08:00
|
|
|
|
import java.util.HashMap;
|
2023-12-11 16:59:05 +08:00
|
|
|
|
import java.util.List;
|
2023-12-29 13:48:42 +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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Api(tags = "Account模块")
|
|
|
|
|
|
@Slf4j
|
|
|
|
|
|
@RestController
|
|
|
|
|
|
@RequestMapping("/api/account")
|
|
|
|
|
|
public class AccountController {
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
private AccountService accountService;
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "预先登入")
|
|
|
|
|
|
@PostMapping("/preLogin")
|
|
|
|
|
|
public Response<AccountPreLoginVO> preLogin(@Valid @RequestBody AccountPreLoginDTO accountDTO) {
|
|
|
|
|
|
return Response.success(accountService.preLogin(accountDTO));
|
|
|
|
|
|
}
|
2023-10-20 14:47:18 +08:00
|
|
|
|
|
2023-01-06 15:17:37 +08:00
|
|
|
|
@ApiOperation(value = "登入")
|
|
|
|
|
|
@PostMapping("/login")
|
|
|
|
|
|
public Response<AccountLoginVO> login(@Valid @RequestBody AccountLoginDTO accountDTO, HttpServletRequest request) {
|
2023-10-20 14:47:18 +08:00
|
|
|
|
return Response.success(accountService.login(accountDTO, request));
|
2023-01-06 15:17:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "绑定邮箱")
|
|
|
|
|
|
@PostMapping("/bindEmail")
|
2025-02-05 14:20:22 +08:00
|
|
|
|
public Response<BindEmailVO> bindEmail(@Valid @RequestBody AccountBindEmailDTO accountBindEmailDTO, HttpServletRequest request) {
|
|
|
|
|
|
return Response.success(accountService.bindEmail(accountBindEmailDTO, request));
|
2023-01-06 15:17:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "忘记密码")
|
|
|
|
|
|
@PostMapping("/resetPwd")
|
|
|
|
|
|
public Response<Boolean> resetPwd(@Valid @RequestBody AccountRegisterDTO accountRegisterDTO) {
|
|
|
|
|
|
return Response.success(accountService.forgetPwd(accountRegisterDTO));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "发送邮件")
|
|
|
|
|
|
@PostMapping("/sendEmail")
|
|
|
|
|
|
public Response<Boolean> sendEmail(@Valid @RequestBody EmailSendDTO emailSendDTO) {
|
|
|
|
|
|
return Response.success(accountService.sendEmail(emailSendDTO));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "登出")
|
|
|
|
|
|
@PostMapping("/logout")
|
|
|
|
|
|
public Response<Boolean> logout(@Valid @RequestBody AccountLogoutDTO accountLogoutDTO) {
|
2023-10-20 14:47:18 +08:00
|
|
|
|
return Response.success(accountService.logout(accountLogoutDTO));
|
2023-01-06 15:17:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "是否登入")
|
|
|
|
|
|
@PostMapping("/isLogin")
|
|
|
|
|
|
public Response<Boolean> isLogin(@Valid @RequestBody AccountLogoutDTO accountLogoutDTO) {
|
2023-10-20 14:47:18 +08:00
|
|
|
|
return Response.success(accountService.isLogin(accountLogoutDTO));
|
2023-01-06 15:17:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2023-10-31 15:05:27 +08:00
|
|
|
|
@ApiOperation(value = "获取当前用户语言")
|
|
|
|
|
|
@PostMapping("/getUserLanguage")
|
2023-11-09 17:13:33 +08:00
|
|
|
|
public Response<String> getUserLanguage() {
|
2023-10-31 15:05:27 +08:00
|
|
|
|
return Response.success(accountService.getUserLanguage());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-11-07 11:32:03 +08:00
|
|
|
|
@ApiOperation(value = "切换当前用户语言")
|
2023-11-14 15:26:54 +08:00
|
|
|
|
@GetMapping("/changeUserLanguage")
|
2023-10-31 15:28:37 +08:00
|
|
|
|
public Response<String> changeUserLanguage(String language) {
|
|
|
|
|
|
return Response.success(accountService.changeUserLanguage(language));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-11-20 15:06:15 +08:00
|
|
|
|
@ApiOperation(value = "试用用户退出登录")
|
|
|
|
|
|
@GetMapping("/trialUserLogout")
|
|
|
|
|
|
public Response<Boolean> trialUserLogout() {
|
|
|
|
|
|
return Response.success(accountService.trialUserLogout());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-11-29 14:37:32 +08:00
|
|
|
|
@ApiOperation(value = "完成新手教程")
|
|
|
|
|
|
@PostMapping("/completeGuidance")
|
|
|
|
|
|
public Response<Boolean> completeGuidance() {
|
|
|
|
|
|
return Response.success(accountService.completeGuidance());
|
|
|
|
|
|
}
|
2023-12-11 16:59:05 +08:00
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "试用订单列表")
|
|
|
|
|
|
@PostMapping("/trialOrderList")
|
|
|
|
|
|
public Response<PageBaseResponse<TrialOrder>> trialOrderList(@Valid @RequestBody TrialOrderDTO trialOrderDTO) {
|
|
|
|
|
|
return Response.success(PageBaseResponse.success(accountService.trialOrderList(trialOrderDTO)));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "通过试用订单审批")
|
|
|
|
|
|
@PostMapping("/trialOrderApproval")
|
|
|
|
|
|
public Response<Boolean> trialOrderApproval(@RequestParam("ids") List<Long> ids) {
|
|
|
|
|
|
return Response.success(accountService.trialOrderApproval(ids));
|
|
|
|
|
|
}
|
2023-12-14 16:33:57 +08:00
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "拒绝试用订单审批")
|
|
|
|
|
|
@PostMapping("/trialOrderRefuse")
|
|
|
|
|
|
public Response<Boolean> trialOrderRefuse(@RequestParam("ids") List<Long> ids) {
|
|
|
|
|
|
return Response.success(accountService.trialOrderRefuse(ids));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "获取是否自动审评")
|
|
|
|
|
|
@PostMapping("/getIsAutoApproval")
|
|
|
|
|
|
public Response<Boolean> getIsAutoApproval() {
|
|
|
|
|
|
return Response.success(accountService.getIsAutoApproval());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "切换是否自动审评")
|
|
|
|
|
|
@PostMapping("/switchIsAutoApproval")
|
|
|
|
|
|
public Response<Boolean> switchIsAutoApproval() {
|
|
|
|
|
|
return Response.success(accountService.switchIsAutoApproval());
|
|
|
|
|
|
}
|
2023-12-29 13:48:42 +08:00
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "aws状态检测")
|
|
|
|
|
|
@GetMapping("/healthy")
|
|
|
|
|
|
@ResponseStatus(HttpStatus.OK)
|
|
|
|
|
|
public Response<Map<String,Integer>> checkStatus(){
|
|
|
|
|
|
Map<String,Integer> returnMap = new HashMap<>();
|
|
|
|
|
|
returnMap.put("code",200);
|
|
|
|
|
|
return Response.success(returnMap);
|
|
|
|
|
|
}
|
2024-01-04 15:22:38 +08:00
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "查询账号到期时间")
|
|
|
|
|
|
@PostMapping("/getExpiredTime")
|
|
|
|
|
|
public Response<Long> getExpiredTime(){
|
|
|
|
|
|
return Response.success(accountService.getExpiredTime());
|
|
|
|
|
|
}
|
2024-01-15 15:06:48 +08:00
|
|
|
|
|
2024-01-17 17:49:40 +08:00
|
|
|
|
@ApiOperation(value = "免密登录")
|
2024-01-15 15:06:48 +08:00
|
|
|
|
@PostMapping("/noLoginRequired")
|
2024-01-17 17:49:40 +08:00
|
|
|
|
public Response<AccountLoginVO> noLoginRequired(@RequestBody NoLoginRequiredDTO noLoginRequiredDTO, HttpServletRequest request){
|
|
|
|
|
|
return Response.success(accountService.noLoginRequired(noLoginRequiredDTO, request));
|
2024-01-15 15:06:48 +08:00
|
|
|
|
}
|
2024-01-26 13:17:59 +08:00
|
|
|
|
|
|
|
|
|
|
@PostMapping("upgradeNotification")
|
|
|
|
|
|
@ApiOperation(value = "升级邮件通知")
|
|
|
|
|
|
public Response<Boolean> upgradeNotification() {
|
|
|
|
|
|
accountService.upgradeNotification();
|
|
|
|
|
|
return Response.success(true);
|
|
|
|
|
|
}
|
2024-06-12 09:47:55 +08:00
|
|
|
|
|
2024-06-17 09:34:48 +08:00
|
|
|
|
@CrossOrigin
|
2024-06-12 09:47:55 +08:00
|
|
|
|
@ApiOperation(value = "广场用户注册")
|
|
|
|
|
|
@PostMapping("/designWorksRegister")
|
|
|
|
|
|
public Response<Boolean> designWorksRegister(@Valid @RequestBody AccountDesignWorksRegisterDTO accountDesignWorksRegisterDTO) {
|
|
|
|
|
|
return Response.success(accountService.designWorksRegister(accountDesignWorksRegisterDTO));
|
|
|
|
|
|
}
|
2024-06-17 09:34:48 +08:00
|
|
|
|
|
|
|
|
|
|
@CrossOrigin
|
|
|
|
|
|
@ApiOperation(value = "广场用户注册")
|
|
|
|
|
|
@PostMapping("/designWorksRegisterCode")
|
2025-06-24 17:53:52 +08:00
|
|
|
|
public Response<AccountLoginVO> designWorksRegisterCode(@Valid @RequestBody AccountDesignWorksRegisterDTO accountDesignWorksRegisterDTO,
|
|
|
|
|
|
HttpServletRequest request) {
|
|
|
|
|
|
return Response.success(accountService.designWorksRegisterCode(accountDesignWorksRegisterDTO, request));
|
2024-06-17 09:34:48 +08:00
|
|
|
|
}
|
2024-06-20 10:27:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 填写调查问卷
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@ApiOperation(value = "填写调查问卷")
|
|
|
|
|
|
@PostMapping("/questionnaire")
|
|
|
|
|
|
public Response<Boolean> questionnaire(@Valid @RequestBody String questionnaireInfo){
|
|
|
|
|
|
return Response.success(accountService.collectQuestionnaires(questionnaireInfo));
|
|
|
|
|
|
}
|
2024-07-19 15:40:54 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 参与活动 获取福利
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@ApiOperation(value = "参与活动 获取福利")
|
|
|
|
|
|
@GetMapping("/activity")
|
|
|
|
|
|
public Response<String> getActivityBenefits(){
|
|
|
|
|
|
return Response.success(accountService.getActivityBenefits());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "将用户账号过期时间设置为过期当天的23:59:59")
|
|
|
|
|
|
@GetMapping("/setUserValidToDayEnd")
|
|
|
|
|
|
public Response<List<Long>> setUserValidToDayEnd(){
|
|
|
|
|
|
return Response.success(accountService.setUserValidToDayEnd());
|
|
|
|
|
|
}
|
2024-08-19 15:10:41 +08:00
|
|
|
|
|
|
|
|
|
|
// 用户上传头像
|
|
|
|
|
|
@ApiOperation(value = "上传头像")
|
2024-08-21 10:23:55 +08:00
|
|
|
|
@PostMapping(path = "/uploadAvatar")
|
2024-08-19 15:10:41 +08:00
|
|
|
|
public Response<String> uploadAvatar(@RequestParam("file") MultipartFile file) {
|
|
|
|
|
|
if (null == file || StringUtils.isEmpty(file.getOriginalFilename())) {
|
|
|
|
|
|
throw new BusinessException("file.cannot.be.empty");
|
|
|
|
|
|
}
|
|
|
|
|
|
return Response.success(accountService.uploadAvatar(file));
|
|
|
|
|
|
}
|
2024-08-21 10:23:55 +08:00
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "个人主页浏览量增加")
|
|
|
|
|
|
@GetMapping("/viewsIncrease")
|
|
|
|
|
|
public Response<Boolean> viewsGet(@RequestParam("id") Long id) {
|
|
|
|
|
|
return Response.success(accountService.viewsIncrease(id));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "获取个人主页信息")
|
|
|
|
|
|
@GetMapping("/personalHomepage")
|
|
|
|
|
|
public Response<PersonalHomepageVO> getPersonalHomepage(@RequestParam("id") Long id){
|
|
|
|
|
|
return Response.success(accountService.getPersonalHomepage(id));
|
|
|
|
|
|
}
|
2024-09-25 16:15:18 +08:00
|
|
|
|
|
2024-09-27 15:40:30 +08:00
|
|
|
|
@ApiOperation(value = "getUsernameModifyTimes")
|
2024-09-25 16:15:18 +08:00
|
|
|
|
@GetMapping("/getNicknameModifyTimes")
|
2025-01-08 14:20:12 +08:00
|
|
|
|
public Response<Long> getNicknameModifyTimes(){
|
2024-09-25 16:15:18 +08:00
|
|
|
|
return Response.success(accountService.getNicknameModifyTimes());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "editUserName")
|
|
|
|
|
|
@GetMapping("/editUserName")
|
|
|
|
|
|
public Response<String> editUserName(@RequestParam("newUserName") String newUserName){
|
|
|
|
|
|
accountService.editUserName(newUserName);
|
|
|
|
|
|
return Response.success("success");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-01-02 17:32:49 +08:00
|
|
|
|
/*@ApiOperation(value = "verifyUserEmail")
|
2024-09-25 16:15:18 +08:00
|
|
|
|
@GetMapping("/verifyUserEmail")
|
|
|
|
|
|
public Response<String> verifyUserEmail(@RequestParam("verifyCode") String verifyCode){
|
|
|
|
|
|
accountService.verifyUserEmail(verifyCode);
|
|
|
|
|
|
return Response.success("success");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "changeUserEmail")
|
|
|
|
|
|
@GetMapping("/changeUserEmail")
|
|
|
|
|
|
public Response<String> changeUserEmail(@RequestParam("newMailbox") String newMailbox){
|
|
|
|
|
|
accountService.changeUserEmail(newMailbox);
|
|
|
|
|
|
return Response.success("success");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "activateNewEmail")
|
|
|
|
|
|
@GetMapping("/activateNewEmail")
|
|
|
|
|
|
public Response<String> activateNewEmail(@RequestParam("token") String token){
|
|
|
|
|
|
accountService.activateNewEmail(token);
|
|
|
|
|
|
return Response.success("success");
|
2025-01-02 17:32:49 +08:00
|
|
|
|
}*/
|
2024-09-25 16:15:18 +08:00
|
|
|
|
|
2024-10-03 12:14:30 +08:00
|
|
|
|
@PostMapping("halfPricePromotion")
|
|
|
|
|
|
@ApiOperation(value = "十月半价活动")
|
|
|
|
|
|
public Response<Boolean> halfPricePromotion() {
|
|
|
|
|
|
accountService.halfPricePromotion();
|
|
|
|
|
|
return Response.success(true);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-12-02 12:02:19 +08:00
|
|
|
|
@PostMapping("temporaryUpgrade")
|
|
|
|
|
|
@ApiOperation(value = "临时升级")
|
|
|
|
|
|
public Response<Boolean> temporaryUpgrade() {
|
|
|
|
|
|
accountService.temporaryUpgrade();
|
|
|
|
|
|
return Response.success(true);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-11-13 15:44:48 +08:00
|
|
|
|
@PostMapping("enterpriseLogin")
|
|
|
|
|
|
@ApiOperation(value = "企业登录")
|
2025-04-11 10:10:38 +08:00
|
|
|
|
public Response<AccountPreLoginVO> enterpriseLogin(@Valid @RequestBody AccountLoginDTO accountDTO) {
|
2024-11-13 15:44:48 +08:00
|
|
|
|
return Response.success(accountService.enterpriseLogin(accountDTO));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("schoolLogin")
|
|
|
|
|
|
@ApiOperation(value = "学校登录")
|
2025-04-11 10:10:38 +08:00
|
|
|
|
public Response<AccountPreLoginVO> schoolLogin(@Valid @RequestBody AccountLoginDTO accountDTO) {
|
2024-11-13 15:44:48 +08:00
|
|
|
|
return Response.success(accountService.schoolLogin(accountDTO));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-11 10:10:38 +08:00
|
|
|
|
@PostMapping("organizationNameSearch")
|
|
|
|
|
|
@ApiOperation(value = "组织名模糊查询")
|
|
|
|
|
|
public Response<Set<String>> organizationNameSearch(@RequestParam("type") String type, @RequestParam("name") String name) {
|
|
|
|
|
|
return Response.success(accountService.organizationNameSearch(type, name));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-11-13 15:44:48 +08:00
|
|
|
|
@PostMapping("addOrUpdateSubAccount")
|
|
|
|
|
|
@ApiOperation(value = "子账号新增")
|
|
|
|
|
|
public Response<Boolean> addSubAccount(@Valid @RequestBody AddSubAccountDTO addSubAccountDTO) {
|
|
|
|
|
|
return Response.success(accountService.addSubAccount(addSubAccountDTO));
|
|
|
|
|
|
}
|
2024-09-25 16:15:18 +08:00
|
|
|
|
|
2024-11-13 15:44:48 +08:00
|
|
|
|
@PostMapping("deleteSubAccount")
|
|
|
|
|
|
@ApiOperation(value = "子账号删除")
|
|
|
|
|
|
public Response<Boolean> deleteSubAccount(@Valid @RequestBody AddSubAccountDTO addSubAccountDTO) {
|
2025-08-13 16:45:30 +08:00
|
|
|
|
// return Response.success(accountService.deleteSubAccount(addSubAccountDTO));
|
|
|
|
|
|
accountService.removeSubAccount(addSubAccountDTO, true);
|
|
|
|
|
|
return Response.success();
|
2024-11-13 15:44:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("subAccountList")
|
|
|
|
|
|
@ApiOperation(value = "子账号查询")
|
|
|
|
|
|
public Response<PageBaseResponse<Account>> subAccountList(@Valid @RequestBody SubAccountPageDTO subAccountPageDTO) {
|
|
|
|
|
|
return Response.success(accountService.subAccountList(subAccountPageDTO));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("accountDetail")
|
|
|
|
|
|
@ApiOperation(value = "账号详情")
|
|
|
|
|
|
public Response<Account> accountDetail(@RequestParam("id") Long id) {
|
|
|
|
|
|
return Response.success(accountService.accountDetail(id));
|
|
|
|
|
|
}
|
2024-12-09 13:31:30 +08:00
|
|
|
|
|
|
|
|
|
|
@PostMapping("getAccountDetail")
|
|
|
|
|
|
@ApiOperation(value = "获取账户信息")
|
|
|
|
|
|
public Response<AccountLoginVO> getAccountDetail() {
|
|
|
|
|
|
return Response.success(accountService.getAccountDetail());
|
|
|
|
|
|
}
|
2024-12-11 14:21:29 +08:00
|
|
|
|
|
|
|
|
|
|
@GetMapping("/bindGoogle")
|
|
|
|
|
|
@ApiOperation(value = "绑定谷歌")
|
2024-12-19 13:31:01 +08:00
|
|
|
|
public Response<AccountExtend> bindGoogle(@RequestParam("credential") String credential) {
|
2024-12-11 14:21:29 +08:00
|
|
|
|
return Response.success(accountService.bindGoogle(credential));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/bindWeChat")
|
|
|
|
|
|
@ApiOperation(value = "绑定微信")
|
2024-12-19 13:31:01 +08:00
|
|
|
|
public Response<AccountExtend> bindWeChat(@RequestParam("code") String code) {
|
2024-12-11 14:21:29 +08:00
|
|
|
|
return Response.success(accountService.bindWeChat(code));
|
|
|
|
|
|
}
|
2024-12-13 16:07:21 +08:00
|
|
|
|
|
2024-12-19 10:51:38 +08:00
|
|
|
|
@GetMapping("/bindEmail")
|
|
|
|
|
|
@ApiOperation(value = "绑定邮箱")
|
2025-02-04 11:39:42 +08:00
|
|
|
|
public Response<BindEmailVO> bindEmail(@RequestParam("email") String email) {
|
2025-01-10 17:16:08 +08:00
|
|
|
|
return Response.success(accountService.bindEmail(email));
|
2024-12-19 10:51:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-12-13 16:07:21 +08:00
|
|
|
|
@GetMapping("/unbindWeChat")
|
|
|
|
|
|
@ApiOperation(value = "解除绑定微信")
|
|
|
|
|
|
public Response<Boolean> unbindWeChat() {
|
|
|
|
|
|
return Response.success(accountService.unbindWeChat());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/unbindGoogle")
|
|
|
|
|
|
@ApiOperation(value = "解除绑定谷歌")
|
|
|
|
|
|
public Response<Boolean> unbindGoogle() {
|
|
|
|
|
|
return Response.success(accountService.unbindGoogle());
|
|
|
|
|
|
}
|
2025-01-10 16:13:45 +08:00
|
|
|
|
|
2025-02-11 11:27:08 +08:00
|
|
|
|
@PostMapping("/updateUserInfo")
|
2025-01-10 16:13:45 +08:00
|
|
|
|
@ApiOperation(value = "更新用户国家、职业信息")
|
2025-02-11 13:08:00 +08:00
|
|
|
|
public Response<Boolean> updateUserInfo(@Valid @RequestBody UpdateUserInfoDTO updateUserInfoDTO) {
|
2025-02-11 11:27:08 +08:00
|
|
|
|
return Response.success(accountService.updateUserInfo(updateUserInfoDTO));
|
2025-01-10 16:13:45 +08:00
|
|
|
|
}
|
2025-04-11 10:10:38 +08:00
|
|
|
|
|
|
|
|
|
|
@GetMapping("/subAccountImportExcelDownload")
|
|
|
|
|
|
@ApiOperation(value = "模板下载")
|
|
|
|
|
|
public void subAccountImportExcelDownload(HttpServletResponse response) {
|
|
|
|
|
|
accountService.subAccountImportExcelDownload(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-15 17:44:45 +08:00
|
|
|
|
@GetMapping("/exportAccountsToExcel")
|
|
|
|
|
|
@ApiOperation(value = "下载子账号信息")
|
|
|
|
|
|
public void exportAccountsToExcel(HttpServletResponse response) {
|
|
|
|
|
|
accountService.exportAccountsToExcel(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-11 10:10:38 +08:00
|
|
|
|
@PostMapping("/subAccountImport")
|
|
|
|
|
|
@ApiOperation(value = "模板导入")
|
|
|
|
|
|
public Response<Boolean> subAccountImport(@RequestParam("file") MultipartFile file) {
|
|
|
|
|
|
return Response.success(accountService.subAccountImport(file));
|
|
|
|
|
|
}
|
2025-06-19 17:16:48 +08:00
|
|
|
|
|
2025-06-19 17:22:43 +08:00
|
|
|
|
/*@GetMapping("/send618Email")
|
2025-06-19 17:16:48 +08:00
|
|
|
|
@ApiOperation(value = "618邮件发送")
|
|
|
|
|
|
public Response<String> send618PromotionEmailTemp() {
|
|
|
|
|
|
accountService.send618PromotionEmailTemp();
|
|
|
|
|
|
return Response.success("success");
|
2025-06-19 17:22:43 +08:00
|
|
|
|
}*/
|
2025-06-19 17:16:48 +08:00
|
|
|
|
|
2025-08-25 18:07:37 +08:00
|
|
|
|
@GetMapping("/refreshCreditsMonthly")
|
|
|
|
|
|
@ApiOperation(value = "刷新子账号积分")
|
|
|
|
|
|
public void refreshCreditsMonthly() {
|
|
|
|
|
|
accountService.refreshCreditsMonthly();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-06-19 17:16:48 +08:00
|
|
|
|
|
2023-01-06 15:17:37 +08:00
|
|
|
|
}
|