fix:升级swagger注解
This commit is contained in:
@@ -13,8 +13,8 @@ import com.ai.da.model.vo.AccountPreLoginVO;
|
||||
import com.ai.da.model.vo.BindEmailVO;
|
||||
import com.ai.da.model.vo.PersonalHomepageVO;
|
||||
import com.ai.da.service.AccountService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.util.StringUtils;
|
||||
@@ -31,7 +31,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
@Api(tags = "Account模块")
|
||||
@Tag(name = "Account模块")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/account")
|
||||
@@ -40,103 +40,103 @@ public class AccountController {
|
||||
@Resource
|
||||
private AccountService accountService;
|
||||
|
||||
@ApiOperation(value = "预先登入")
|
||||
@Operation(summary = "预先登入")
|
||||
@PostMapping("/preLogin")
|
||||
public Response<AccountPreLoginVO> preLogin(@Valid @RequestBody AccountPreLoginDTO accountDTO) {
|
||||
return Response.success(accountService.preLogin(accountDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "登入")
|
||||
@Operation(summary = "登入")
|
||||
@PostMapping("/login")
|
||||
public Response<AccountLoginVO> login(@Valid @RequestBody AccountLoginDTO accountDTO, HttpServletRequest request) {
|
||||
return Response.success(accountService.login(accountDTO, request));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "绑定邮箱")
|
||||
@Operation(summary = "绑定邮箱")
|
||||
@PostMapping("/bindEmail")
|
||||
public Response<BindEmailVO> bindEmail(@Valid @RequestBody AccountBindEmailDTO accountBindEmailDTO, HttpServletRequest request) {
|
||||
return Response.success(accountService.bindEmail(accountBindEmailDTO, request));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "忘记密码")
|
||||
@Operation(summary = "忘记密码")
|
||||
@PostMapping("/resetPwd")
|
||||
public Response<Boolean> resetPwd(@Valid @RequestBody AccountRegisterDTO accountRegisterDTO) {
|
||||
return Response.success(accountService.forgetPwd(accountRegisterDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "发送邮件")
|
||||
@Operation(summary = "发送邮件")
|
||||
@PostMapping("/sendEmail")
|
||||
public Response<Boolean> sendEmail(@Valid @RequestBody EmailSendDTO emailSendDTO) {
|
||||
return Response.success(accountService.sendEmail(emailSendDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "登出")
|
||||
@Operation(summary = "登出")
|
||||
@PostMapping("/logout")
|
||||
public Response<Boolean> logout(@Valid @RequestBody AccountLogoutDTO accountLogoutDTO) {
|
||||
return Response.success(accountService.logout(accountLogoutDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "是否登入")
|
||||
@Operation(summary = "是否登入")
|
||||
@PostMapping("/isLogin")
|
||||
public Response<Boolean> isLogin(@Valid @RequestBody AccountLogoutDTO accountLogoutDTO) {
|
||||
return Response.success(accountService.isLogin(accountLogoutDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取当前用户语言")
|
||||
@Operation(summary = "获取当前用户语言")
|
||||
@PostMapping("/getUserLanguage")
|
||||
public Response<String> getUserLanguage() {
|
||||
return Response.success(accountService.getUserLanguage());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "切换当前用户语言")
|
||||
@Operation(summary = "切换当前用户语言")
|
||||
@GetMapping("/changeUserLanguage")
|
||||
public Response<String> changeUserLanguage(String language) {
|
||||
return Response.success(accountService.changeUserLanguage(language));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "试用用户退出登录")
|
||||
@Operation(summary = "试用用户退出登录")
|
||||
@GetMapping("/trialUserLogout")
|
||||
public Response<Boolean> trialUserLogout() {
|
||||
return Response.success(accountService.trialUserLogout());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "完成新手教程")
|
||||
@Operation(summary = "完成新手教程")
|
||||
@PostMapping("/completeGuidance")
|
||||
public Response<Boolean> completeGuidance() {
|
||||
return Response.success(accountService.completeGuidance());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "试用订单列表")
|
||||
@Operation(summary = "试用订单列表")
|
||||
@PostMapping("/trialOrderList")
|
||||
public Response<PageBaseResponse<TrialOrder>> trialOrderList(@Valid @RequestBody TrialOrderDTO trialOrderDTO) {
|
||||
return Response.success(PageBaseResponse.success(accountService.trialOrderList(trialOrderDTO)));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "通过试用订单审批")
|
||||
@Operation(summary = "通过试用订单审批")
|
||||
@PostMapping("/trialOrderApproval")
|
||||
public Response<Boolean> trialOrderApproval(@RequestParam("ids") List<Long> ids) {
|
||||
return Response.success(accountService.trialOrderApproval(ids));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "拒绝试用订单审批")
|
||||
@Operation(summary = "拒绝试用订单审批")
|
||||
@PostMapping("/trialOrderRefuse")
|
||||
public Response<Boolean> trialOrderRefuse(@RequestParam("ids") List<Long> ids) {
|
||||
return Response.success(accountService.trialOrderRefuse(ids));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取是否自动审评")
|
||||
@Operation(summary = "获取是否自动审评")
|
||||
@PostMapping("/getIsAutoApproval")
|
||||
public Response<Boolean> getIsAutoApproval() {
|
||||
return Response.success(accountService.getIsAutoApproval());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "切换是否自动审评")
|
||||
@Operation(summary = "切换是否自动审评")
|
||||
@PostMapping("/switchIsAutoApproval")
|
||||
public Response<Boolean> switchIsAutoApproval() {
|
||||
return Response.success(accountService.switchIsAutoApproval());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "aws状态检测")
|
||||
@Operation(summary = "aws状态检测")
|
||||
@GetMapping("/healthy")
|
||||
@ResponseStatus(HttpStatus.OK)
|
||||
public Response<Map<String,Integer>> checkStatus(){
|
||||
@@ -145,34 +145,34 @@ public class AccountController {
|
||||
return Response.success(returnMap);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询账号到期时间")
|
||||
@Operation(summary = "查询账号到期时间")
|
||||
@PostMapping("/getExpiredTime")
|
||||
public Response<Long> getExpiredTime(){
|
||||
return Response.success(accountService.getExpiredTime());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "免密登录")
|
||||
@Operation(summary = "免密登录")
|
||||
@PostMapping("/noLoginRequired")
|
||||
public Response<AccountLoginVO> noLoginRequired(@RequestBody NoLoginRequiredDTO noLoginRequiredDTO, HttpServletRequest request){
|
||||
return Response.success(accountService.noLoginRequired(noLoginRequiredDTO, request));
|
||||
}
|
||||
|
||||
@PostMapping("upgradeNotification")
|
||||
@ApiOperation(value = "升级邮件通知")
|
||||
@Operation(summary = "升级邮件通知")
|
||||
public Response<Boolean> upgradeNotification() {
|
||||
accountService.upgradeNotification();
|
||||
return Response.success(true);
|
||||
}
|
||||
|
||||
@CrossOrigin
|
||||
@ApiOperation(value = "广场用户注册")
|
||||
@Operation(summary = "广场用户注册")
|
||||
@PostMapping("/designWorksRegister")
|
||||
public Response<Boolean> designWorksRegister(@Valid @RequestBody AccountDesignWorksRegisterDTO accountDesignWorksRegisterDTO) {
|
||||
return Response.success(accountService.designWorksRegister(accountDesignWorksRegisterDTO));
|
||||
}
|
||||
|
||||
@CrossOrigin
|
||||
@ApiOperation(value = "广场用户注册")
|
||||
@Operation(summary = "广场用户注册")
|
||||
@PostMapping("/designWorksRegisterCode")
|
||||
public Response<AccountLoginVO> designWorksRegisterCode(@Valid @RequestBody AccountDesignWorksRegisterDTO accountDesignWorksRegisterDTO,
|
||||
HttpServletRequest request) {
|
||||
@@ -183,7 +183,7 @@ public class AccountController {
|
||||
* 填写调查问卷
|
||||
* @return
|
||||
*/
|
||||
/* @ApiOperation(value = "填写调查问卷")
|
||||
/* @Operation(summary = "填写调查问卷")
|
||||
@PostMapping("/questionnaire")
|
||||
public Response<Boolean> questionnaire(@Valid @RequestBody String questionnaireInfo){
|
||||
return Response.success(accountService.collectQuestionnaires(questionnaireInfo));
|
||||
@@ -193,20 +193,20 @@ public class AccountController {
|
||||
* 参与活动 获取福利
|
||||
* @return
|
||||
*/
|
||||
/* @ApiOperation(value = "参与活动 获取福利")
|
||||
/* @Operation(summary = "参与活动 获取福利")
|
||||
@GetMapping("/activity")
|
||||
public Response<String> getActivityBenefits(){
|
||||
return Response.success(accountService.getActivityBenefits());
|
||||
}*/
|
||||
|
||||
@ApiOperation(value = "将用户账号过期时间设置为过期当天的23:59:59")
|
||||
@Operation(summary = "将用户账号过期时间设置为过期当天的23:59:59")
|
||||
@GetMapping("/setUserValidToDayEnd")
|
||||
public Response<List<Long>> setUserValidToDayEnd(){
|
||||
return Response.success(accountService.setUserValidToDayEnd());
|
||||
}
|
||||
|
||||
// 用户上传头像
|
||||
@ApiOperation(value = "上传头像")
|
||||
@Operation(summary = "上传头像")
|
||||
@PostMapping(path = "/uploadAvatar")
|
||||
public Response<String> uploadAvatar(@RequestParam("file") MultipartFile file) {
|
||||
if (null == file || StringUtils.isEmpty(file.getOriginalFilename())) {
|
||||
@@ -215,25 +215,25 @@ public class AccountController {
|
||||
return Response.success(accountService.uploadAvatar(file));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "个人主页浏览量增加")
|
||||
@Operation(summary = "个人主页浏览量增加")
|
||||
@GetMapping("/viewsIncrease")
|
||||
public Response<Boolean> viewsGet(@RequestParam("id") Long id) {
|
||||
return Response.success(accountService.viewsIncrease(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取个人主页信息")
|
||||
@Operation(summary = "获取个人主页信息")
|
||||
@GetMapping("/personalHomepage")
|
||||
public Response<PersonalHomepageVO> getPersonalHomepage(@RequestParam("id") Long id){
|
||||
return Response.success(accountService.getPersonalHomepage(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "getUsernameModifyTimes")
|
||||
@Operation(summary = "getUsernameModifyTimes")
|
||||
@GetMapping("/getNicknameModifyTimes")
|
||||
public Response<Long> getNicknameModifyTimes(){
|
||||
return Response.success(accountService.getNicknameModifyTimes());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "editUserName")
|
||||
@Operation(summary = "editUserName")
|
||||
@GetMapping("/editUserName")
|
||||
public Response<String> editUserName(@RequestParam("newUserName") String newUserName){
|
||||
accountService.editUserName(newUserName);
|
||||
@@ -247,14 +247,14 @@ public class AccountController {
|
||||
return Response.success("success");
|
||||
}
|
||||
|
||||
@ApiOperation(value = "changeUserEmail")
|
||||
@Operation(summary = "changeUserEmail")
|
||||
@GetMapping("/changeUserEmail")
|
||||
public Response<String> changeUserEmail(@RequestParam("newMailbox") String newMailbox){
|
||||
accountService.changeUserEmail(newMailbox);
|
||||
return Response.success("success");
|
||||
}
|
||||
|
||||
@ApiOperation(value = "activateNewEmail")
|
||||
@Operation(summary = "activateNewEmail")
|
||||
@GetMapping("/activateNewEmail")
|
||||
public Response<String> activateNewEmail(@RequestParam("token") String token){
|
||||
accountService.activateNewEmail(token);
|
||||
@@ -262,45 +262,45 @@ public class AccountController {
|
||||
}*/
|
||||
|
||||
@PostMapping("halfPricePromotion")
|
||||
@ApiOperation(value = "十月半价活动")
|
||||
@Operation(summary = "十月半价活动")
|
||||
public Response<Boolean> halfPricePromotion() {
|
||||
accountService.halfPricePromotion();
|
||||
return Response.success(true);
|
||||
}
|
||||
|
||||
@PostMapping("temporaryUpgrade")
|
||||
@ApiOperation(value = "临时升级")
|
||||
@Operation(summary = "临时升级")
|
||||
public Response<Boolean> temporaryUpgrade() {
|
||||
accountService.temporaryUpgrade();
|
||||
return Response.success(true);
|
||||
}
|
||||
|
||||
@PostMapping("enterpriseLogin")
|
||||
@ApiOperation(value = "企业登录")
|
||||
@Operation(summary = "企业登录")
|
||||
public Response<AccountPreLoginVO> enterpriseLogin(@Valid @RequestBody AccountLoginDTO accountDTO) {
|
||||
return Response.success(accountService.enterpriseLogin(accountDTO));
|
||||
}
|
||||
|
||||
@PostMapping("schoolLogin")
|
||||
@ApiOperation(value = "学校登录")
|
||||
@Operation(summary = "学校登录")
|
||||
public Response<AccountPreLoginVO> schoolLogin(@Valid @RequestBody AccountLoginDTO accountDTO) {
|
||||
return Response.success(accountService.schoolLogin(accountDTO));
|
||||
}
|
||||
|
||||
@PostMapping("organizationNameSearch")
|
||||
@ApiOperation(value = "组织名模糊查询")
|
||||
@Operation(summary = "组织名模糊查询")
|
||||
public Response<Set<String>> organizationNameSearch(@RequestParam("type") String type, @RequestParam("name") String name) {
|
||||
return Response.success(accountService.organizationNameSearch(type, name));
|
||||
}
|
||||
|
||||
@PostMapping("addOrUpdateSubAccount")
|
||||
@ApiOperation(value = "子账号新增")
|
||||
@Operation(summary = "子账号新增")
|
||||
public Response<Boolean> addSubAccount(@Valid @RequestBody AddSubAccountDTO addSubAccountDTO) {
|
||||
return Response.success(accountService.addSubAccount(addSubAccountDTO));
|
||||
}
|
||||
|
||||
@PostMapping("deleteSubAccount")
|
||||
@ApiOperation(value = "子账号删除")
|
||||
@Operation(summary = "子账号删除")
|
||||
public Response<Boolean> deleteSubAccount(@Valid @RequestBody AddSubAccountDTO addSubAccountDTO) {
|
||||
// return Response.success(accountService.deleteSubAccount(addSubAccountDTO));
|
||||
accountService.removeSubAccount(addSubAccountDTO, UserContext.getUserHolder().getId());
|
||||
@@ -308,91 +308,91 @@ public class AccountController {
|
||||
}
|
||||
|
||||
@PostMapping("subAccountList")
|
||||
@ApiOperation(value = "子账号查询")
|
||||
@Operation(summary = "子账号查询")
|
||||
public Response<PageBaseResponse<Account>> subAccountList(@Valid @RequestBody SubAccountPageDTO subAccountPageDTO) {
|
||||
return Response.success(accountService.subAccountList(subAccountPageDTO));
|
||||
}
|
||||
|
||||
@GetMapping("accountDetail")
|
||||
@ApiOperation(value = "账号详情")
|
||||
@Operation(summary = "账号详情")
|
||||
public Response<Account> accountDetail(@RequestParam("id") Long id) {
|
||||
return Response.success(accountService.accountDetail(id));
|
||||
}
|
||||
|
||||
@PostMapping("getAccountDetail")
|
||||
@ApiOperation(value = "获取账户信息")
|
||||
@Operation(summary = "获取账户信息")
|
||||
public Response<AccountLoginVO> getAccountDetail() {
|
||||
return Response.success(accountService.getAccountDetail());
|
||||
}
|
||||
|
||||
@GetMapping("/bindGoogle")
|
||||
@ApiOperation(value = "绑定谷歌")
|
||||
@Operation(summary = "绑定谷歌")
|
||||
public Response<AccountExtend> bindGoogle(@RequestParam("credential") String credential) {
|
||||
return Response.success(accountService.bindGoogle(credential));
|
||||
}
|
||||
|
||||
@GetMapping("/bindWeChat")
|
||||
@ApiOperation(value = "绑定微信")
|
||||
@Operation(summary = "绑定微信")
|
||||
public Response<AccountExtend> bindWeChat(@RequestParam("code") String code) {
|
||||
return Response.success(accountService.bindWeChat(code));
|
||||
}
|
||||
|
||||
@GetMapping("/bindEmail")
|
||||
@ApiOperation(value = "绑定邮箱")
|
||||
@Operation(summary = "绑定邮箱")
|
||||
public Response<BindEmailVO> bindEmail(@RequestParam("email") String email) {
|
||||
return Response.success(accountService.bindEmail(email));
|
||||
}
|
||||
|
||||
@GetMapping("/unbindWeChat")
|
||||
@ApiOperation(value = "解除绑定微信")
|
||||
@Operation(summary = "解除绑定微信")
|
||||
public Response<Boolean> unbindWeChat() {
|
||||
return Response.success(accountService.unbindWeChat());
|
||||
}
|
||||
|
||||
@GetMapping("/unbindGoogle")
|
||||
@ApiOperation(value = "解除绑定谷歌")
|
||||
@Operation(summary = "解除绑定谷歌")
|
||||
public Response<Boolean> unbindGoogle() {
|
||||
return Response.success(accountService.unbindGoogle());
|
||||
}
|
||||
|
||||
@PostMapping("/updateUserInfo")
|
||||
@ApiOperation(value = "更新用户国家、职业信息")
|
||||
@Operation(summary = "更新用户国家、职业信息")
|
||||
public Response<Boolean> updateUserInfo(@Valid @RequestBody UpdateUserInfoDTO updateUserInfoDTO) {
|
||||
return Response.success(accountService.updateUserInfo(updateUserInfoDTO));
|
||||
}
|
||||
|
||||
@GetMapping("/subAccountImportExcelDownload")
|
||||
@ApiOperation(value = "模板下载")
|
||||
@Operation(summary = "模板下载")
|
||||
public void subAccountImportExcelDownload(HttpServletResponse response) {
|
||||
accountService.subAccountImportExcelDownload(response);
|
||||
}
|
||||
|
||||
@GetMapping("/exportAccountsToExcel")
|
||||
@ApiOperation(value = "下载子账号信息")
|
||||
@Operation(summary = "下载子账号信息")
|
||||
public void exportAccountsToExcel(HttpServletResponse response) {
|
||||
accountService.exportAccountsToExcel(response);
|
||||
}
|
||||
|
||||
@PostMapping("/subAccountImport")
|
||||
@ApiOperation(value = "模板导入")
|
||||
@Operation(summary = "模板导入")
|
||||
public Response<Boolean> subAccountImport(@RequestParam("file") MultipartFile file) {
|
||||
return Response.success(accountService.subAccountImport(file));
|
||||
}
|
||||
|
||||
/*@GetMapping("/send618Email")
|
||||
@ApiOperation(value = "618邮件发送")
|
||||
@Operation(summary = "618邮件发送")
|
||||
public Response<String> send618PromotionEmailTemp() {
|
||||
accountService.send618PromotionEmailTemp();
|
||||
return Response.success("success");
|
||||
}*/
|
||||
|
||||
/*@GetMapping("/refreshCreditsMonthly")
|
||||
@ApiOperation(value = "刷新子账号积分")
|
||||
@Operation(summary = "刷新子账号积分")
|
||||
public void refreshCreditsMonthly() {
|
||||
accountService.refreshCreditsMonthly();
|
||||
}*/
|
||||
/*@GetMapping("/checkEduAdminExpireStatus")
|
||||
@ApiOperation(value = "检查教育管理员账号到期情况")
|
||||
@Operation(summary = "检查教育管理员账号到期情况")
|
||||
public void checkEduAdminExpireStatus() {
|
||||
accountService.checkEduAdminExpireStatus();
|
||||
}*/
|
||||
|
||||
@@ -12,9 +12,10 @@ import com.ai.da.model.vo.ReferralPageQueryVO;
|
||||
import com.ai.da.service.AffiliateService;
|
||||
import com.ai.da.service.ReferralService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -27,7 +28,7 @@ import java.util.Map;
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/affiliate")
|
||||
@Api(tags = "Affiliate模块")
|
||||
@Tag(name = "Affiliate模块")
|
||||
public class AffiliateController {
|
||||
|
||||
@Resource
|
||||
@@ -36,31 +37,31 @@ public class AffiliateController {
|
||||
@Resource
|
||||
private ReferralService referralService;
|
||||
|
||||
@ApiOperation(value = "注册成为affiliate")
|
||||
@Operation(summary = "注册成为affiliate")
|
||||
@GetMapping("/registration")
|
||||
public Response<Boolean> completeGuidance(@RequestParam(value = "promotionMethod", required = false) String promotionMethod) {
|
||||
return Response.success(affiliateService.registerAsAnAffiliate(promotionMethod));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取affiliate列表")
|
||||
@Operation(summary = "获取affiliate列表")
|
||||
@PostMapping("/list")
|
||||
public Response<PageBaseResponse<AffiliateVO>> getAffiliateList(@Validated @RequestBody AffiliateQueryDTO affiliateQueryDTO) {
|
||||
return Response.success(affiliateService.getAffiliateList(affiliateQueryDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取affiliate个人中心")
|
||||
@Operation(summary = "获取affiliate个人中心")
|
||||
@GetMapping("/personalCenter")
|
||||
public Response<AffiliateVO> personalAffiliateCenter() {
|
||||
return Response.success(affiliateService.personalAffiliateCenter());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取个人佣金图表数据")
|
||||
@Operation(summary = "获取个人佣金图表数据")
|
||||
@GetMapping("/getPersonalMonthlyIncome")
|
||||
public Response<BigDecimal[]> getPersonalMonthlyIncome(@RequestParam("year") int year) {
|
||||
return Response.success(affiliateService.getPersonalMonthlyIncome(year));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "审批affiliate申请")
|
||||
@Operation(summary = "审批affiliate申请")
|
||||
@GetMapping("/approval")
|
||||
public Response<Boolean> applicationApproval(@RequestParam("id") Long id,
|
||||
@RequestParam("isApproved") Boolean isApproved,
|
||||
@@ -68,13 +69,13 @@ public class AffiliateController {
|
||||
return Response.success(affiliateService.applicationApproval(id, isApproved, commission));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "编辑affiliate")
|
||||
@Operation(summary = "编辑affiliate")
|
||||
@GetMapping("/editAffiliate")
|
||||
public Response<String> editAffiliate(@RequestParam("id") Long id,
|
||||
@ApiParam(value = "佣金比例", example = "25")
|
||||
@Parameter(description = "佣金比例", example = "25")
|
||||
@RequestParam(value = "commission", required = false) Float commission,
|
||||
@ApiParam(value = "操作类型", example = "Active",
|
||||
allowableValues = "Active,Inactive,Delete")
|
||||
@Parameter(description = "操作类型", example = "Active",
|
||||
schema = @Schema(allowableValues = {"Active", "Inactive", "Delete"}))
|
||||
@RequestParam(value = "operationType", required = false) String operationType) {
|
||||
affiliateService.editAffiliate(id, commission, operationType);
|
||||
return Response.success("success");
|
||||
@@ -94,39 +95,39 @@ public class AffiliateController {
|
||||
return Response.success("success ");
|
||||
}*/
|
||||
|
||||
@ApiOperation(value = "affiliate链接浏览量增加")
|
||||
@Operation(summary = "affiliate链接浏览量增加")
|
||||
@GetMapping("/viewsIncrease")
|
||||
public Response<Boolean> viewsGet(@RequestParam("id") Long id) {
|
||||
return Response.success(affiliateService.affiliateLinkViewsIncrease(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取每个affiliate产生的收入")
|
||||
@Operation(summary = "获取每个affiliate产生的收入")
|
||||
@PostMapping("/getEachAffiliateGeneratedRevenue")
|
||||
public Response<IPage<AffiliateInvitationDetailsVO>> getEachAffiliateGeneratedRevenue(@Validated @RequestBody AffiliateQueryDTO affiliateQueryDTO) {
|
||||
return Response.success(affiliateService.getEachAffiliateGeneratedRevenue(affiliateQueryDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "分页获取所有的referral")
|
||||
@Operation(summary = "分页获取所有的referral")
|
||||
@PostMapping("/getReferrals")
|
||||
public Response<IPage<ReferralPageQueryVO>> getReferrals(@RequestBody ReferralPageQueryDTO referralPageQueryDTO) {
|
||||
return Response.success(referralService.queryByPage(referralPageQueryDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "编辑单个referral")
|
||||
@Operation(summary = "编辑单个referral")
|
||||
@PostMapping("/editReferral")
|
||||
public Response<String> editReferral(@Validated @RequestBody EditReferralDTO editReferralDTO) {
|
||||
referralService.editReferral(editReferralDTO);
|
||||
return Response.success();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "(批量)删除referral")
|
||||
@Operation(summary = "(批量)删除referral")
|
||||
@PostMapping("/batchDeleteReferral")
|
||||
public Response<String> batchDeleteReferral(@RequestBody List<Long> idList) {
|
||||
referralService.deleteReferral(idList);
|
||||
return Response.success();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取所有affiliate用户名")
|
||||
@Operation(summary = "获取所有affiliate用户名")
|
||||
@GetMapping("/getAllAffiliateUsername")
|
||||
public Response<List<Map<String, Object>>> getAllAffiliateUsername() {
|
||||
return Response.success(affiliateService.getAllAffiliateUsername());
|
||||
|
||||
@@ -3,8 +3,8 @@ package com.ai.da.controller;
|
||||
import com.ai.da.common.response.Response;
|
||||
import com.ai.da.model.dto.ProductPurchaseDTO;
|
||||
import com.ai.da.service.AliPayService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -16,14 +16,14 @@ import java.util.Map;
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/ali-pay")
|
||||
@Api(tags = "网站支付宝支付")
|
||||
@Tag(name = "网站支付宝支付")
|
||||
@Slf4j
|
||||
public class AliPayController {
|
||||
|
||||
@Resource
|
||||
private AliPayService aliPayService;
|
||||
|
||||
@ApiOperation("统一收单下单并支付页面接口的调用")
|
||||
@Operation(summary = "统一收单下单并支付页面接口的调用")
|
||||
@PostMapping("/trade/page/pay")
|
||||
public Response<String> tradePagePay(@Valid @RequestBody ProductPurchaseDTO productPurchaseDTO, HttpServletRequest request){
|
||||
log.info("统一收单下单并支付页面接口的调用");
|
||||
@@ -35,7 +35,7 @@ public class AliPayController {
|
||||
return Response.success(formStr);
|
||||
}
|
||||
|
||||
@ApiOperation("支付通知")
|
||||
@Operation(summary = "支付通知")
|
||||
@PostMapping("/trade/notify")
|
||||
public String tradeNotify(@RequestParam Map<String, String> params){
|
||||
return aliPayService.tradeNotify(params);
|
||||
@@ -46,7 +46,7 @@ public class AliPayController {
|
||||
* @param orderNo
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("用户取消订单")
|
||||
@Operation(summary = "用户取消订单")
|
||||
@PostMapping("/trade/close/{orderNo}")
|
||||
public Response<String> cancel(@PathVariable String orderNo){
|
||||
log.info("取消订单");
|
||||
@@ -59,7 +59,7 @@ public class AliPayController {
|
||||
* @param orderNo
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("查询订单:测试订单状态用")
|
||||
@Operation(summary = "查询订单:测试订单状态用")
|
||||
@GetMapping("/trade/query/{orderNo}")
|
||||
public Response<String> queryOrder(@PathVariable String orderNo) {
|
||||
log.info("查询订单");
|
||||
@@ -74,7 +74,7 @@ public class AliPayController {
|
||||
* @param reason
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("申请退款")
|
||||
@Operation(summary = "申请退款")
|
||||
@PostMapping("/trade/refund/{orderNo}/{reason}")
|
||||
public Response<String> refunds(@PathVariable String orderNo, @PathVariable String reason){
|
||||
log.info("申请退款");
|
||||
@@ -88,7 +88,7 @@ public class AliPayController {
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation("查询退款:测试用")
|
||||
@Operation(summary = "查询退款:测试用")
|
||||
@GetMapping("/trade/fastpay/refund/{orderNo}")
|
||||
public Response<String> queryRefund(@PathVariable String orderNo) {
|
||||
log.info("查询退款");
|
||||
@@ -103,7 +103,7 @@ public class AliPayController {
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("获取账单url")
|
||||
@Operation(summary = "获取账单url")
|
||||
@GetMapping("/bill/downloadurl/query/{billDate}/{type}")
|
||||
public Response<String> queryTradeBill(
|
||||
@PathVariable String billDate,
|
||||
|
||||
@@ -3,8 +3,8 @@ package com.ai.da.controller;
|
||||
import com.ai.da.common.response.Response;
|
||||
import com.ai.da.model.dto.ProductPurchaseDTO;
|
||||
import com.ai.da.service.AlipayHKService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -15,28 +15,28 @@ import jakarta.validation.Valid;
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/alipay-hk")
|
||||
@Api(tags = "网站支付 香港支付宝")
|
||||
@Tag(name = "网站支付 香港支付宝")
|
||||
@Slf4j
|
||||
public class AlipayHKController {
|
||||
|
||||
@Resource
|
||||
private AlipayHKService alipayHKService;
|
||||
|
||||
@ApiOperation(value = "创建订单")
|
||||
@Operation(summary = "创建订单")
|
||||
@PostMapping(value = "/createOrder")
|
||||
public Response<String> createOrder(@Valid @RequestBody ProductPurchaseDTO productPurchaseDTO, HttpServletRequest request) {
|
||||
String order = alipayHKService.createOrder(productPurchaseDTO, request);
|
||||
return Response.success(order);
|
||||
}
|
||||
|
||||
@ApiOperation("支付通知")
|
||||
@Operation(summary = "支付通知")
|
||||
@PostMapping("/trade/notify")
|
||||
public String callback(@RequestBody String paramString){
|
||||
log.info("alipay-hk callback parameter : {}", paramString);
|
||||
return alipayHKService.callback(paramString);
|
||||
}
|
||||
|
||||
@ApiOperation("订单查询")
|
||||
@Operation(summary = "订单查询")
|
||||
@PostMapping("/trade/query/{orderRef}")
|
||||
public Response<String> queryOrder(@PathVariable String orderRef){
|
||||
String s = alipayHKService.queryDetail(orderRef);
|
||||
|
||||
@@ -5,9 +5,8 @@ import com.ai.da.model.dto.ClassificationDTO;
|
||||
import com.ai.da.model.vo.ClassificationVO;
|
||||
import com.ai.da.service.ClassificationService;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -26,7 +25,7 @@ import java.util.List;
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@RequestMapping("/api/classification")
|
||||
@Api(value = "", tags = "分类")
|
||||
@Tag(name = "分类")
|
||||
public class ClassificationController {
|
||||
|
||||
@Resource
|
||||
@@ -37,7 +36,7 @@ public class ClassificationController {
|
||||
*/
|
||||
@PostMapping("/saveOrUpdate")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@ApiOperation(value = "新增修改", notes = "传入ClassificationDTO")
|
||||
@Operation(summary = "新增修改", description = "传入ClassificationDTO")
|
||||
public Response<Boolean> saveOrUpdate(@Valid @RequestBody ClassificationDTO classificationDTO) {
|
||||
return Response.success(classificationService.saveOrUpdate(classificationDTO));
|
||||
}
|
||||
@@ -47,28 +46,28 @@ public class ClassificationController {
|
||||
*/
|
||||
@PostMapping("/delete")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@ApiOperation(value = "删除", notes = "传入ClassificationDTO")
|
||||
@Operation(summary = "删除", description = "传入ClassificationDTO")
|
||||
public Response<Boolean> delete(@Valid @RequestBody ClassificationDTO classificationDTO) {
|
||||
return Response.success(classificationService.delete(classificationDTO));
|
||||
}
|
||||
|
||||
@PostMapping("/queryClassification")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@ApiModelProperty(value = "查询", notes = "传入ClassificationDTO")
|
||||
@Operation(summary = "查询", description = "传入ClassificationDTO")
|
||||
public Response<List<ClassificationVO>> queryClassification(@Valid @RequestBody ClassificationDTO classificationDTO) {
|
||||
return Response.success(classificationService.queryClassification(classificationDTO));
|
||||
}
|
||||
|
||||
@PostMapping("/relationLibrary")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@ApiModelProperty(value = "关联", notes = "传入ClassificationDTO")
|
||||
@Operation(summary = "关联", description = "传入ClassificationDTO")
|
||||
public Response<Boolean> relationLibrary(@Valid @RequestBody ClassificationDTO classificationDTO) {
|
||||
return Response.success(classificationService.relationLibrary(classificationDTO));
|
||||
}
|
||||
|
||||
@PostMapping("/getRelClassificationIdList")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@ApiModelProperty(value = "获取关联分类IDList", notes = "传入ClassificationDTO")
|
||||
@Operation(summary = "获取关联分类IDList", description = "传入ClassificationDTO")
|
||||
public Response<List<Long>> getRelClassificationIdList(@Valid @RequestBody ClassificationDTO classificationDTO) {
|
||||
return Response.success(classificationService.getRelClassificationIdList(classificationDTO));
|
||||
}
|
||||
@@ -80,7 +79,7 @@ public class ClassificationController {
|
||||
*/
|
||||
@PostMapping("/getRelPublicClassificationIdList")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@ApiModelProperty(value = "获取关联公共分类IDList", notes = "传入ClassificationDTO")
|
||||
@Operation(summary = "获取关联公共分类IDList", description = "传入ClassificationDTO")
|
||||
public Response<List<Long>> getRelPublicClassificationIdList(@Valid @RequestBody ClassificationDTO classificationDTO) {
|
||||
return Response.success(classificationService.getRelPublicClassificationIdList(classificationDTO));
|
||||
}
|
||||
@@ -92,7 +91,7 @@ public class ClassificationController {
|
||||
*/
|
||||
@PostMapping("/editRelPublicClassificationIdList")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@ApiModelProperty(value = "编辑关联公共分类IDList", notes = "传入ClassificationDTO")
|
||||
@Operation(summary = "编辑关联公共分类IDList", description = "传入ClassificationDTO")
|
||||
public Response<Boolean> editRelPublicClassificationIdList(@Valid @RequestBody ClassificationDTO classificationDTO) {
|
||||
return Response.success(classificationService.editRelPublicClassificationIdList(classificationDTO));
|
||||
}
|
||||
|
||||
@@ -17,9 +17,9 @@ import com.ai.da.service.AccountService;
|
||||
import com.ai.da.service.ConvenientInquiryService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.netty.util.internal.StringUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -30,7 +30,7 @@ import jakarta.validation.Valid;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
@Api(tags = "便利查询")
|
||||
@Tag(name = "便利查询")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/inquiry")
|
||||
@@ -43,13 +43,13 @@ public class ConvenientInquiryController {
|
||||
private AccountService accountService;
|
||||
|
||||
|
||||
@ApiOperation("获取当前所有试用用户")
|
||||
@Operation(summary = "获取当前所有试用用户")
|
||||
@PostMapping("/getTrial")
|
||||
public Response<IPage<TrialOrder>> getTrial(@Valid @RequestBody QueryUserConditionsVO queryUserConditionsVO) {
|
||||
return Response.success(convenientInquiryService.getTrial(queryUserConditionsVO));
|
||||
}
|
||||
|
||||
@ApiOperation("获取指定时间区间内所有用户design的使用情况")
|
||||
@Operation(summary = "获取指定时间区间内所有用户design的使用情况")
|
||||
@GetMapping("/getDesignStatistic")
|
||||
public Response<List<UserDesignStatisticDTO>> getDesignStatistic(@RequestParam(required = false) String startTime, @RequestParam(required = false) String endTime,
|
||||
@RequestParam(required = false) List<Long> ids, @RequestParam(required = false) String email,
|
||||
@@ -81,68 +81,68 @@ public class ConvenientInquiryController {
|
||||
|
||||
|
||||
//调查问卷
|
||||
@ApiOperation("获取调查问卷统计详情")
|
||||
@Operation(summary = "获取调查问卷统计详情")
|
||||
@GetMapping("/getQuestionnaireStatistic")
|
||||
public Response<QuestionnaireFeedbackVO> getQuestionnaire() {
|
||||
return Response.success(convenientInquiryService.getQuestionnaireInfo());
|
||||
}
|
||||
|
||||
@ApiOperation("获取所有调查问卷")
|
||||
@Operation(summary = "获取所有调查问卷")
|
||||
@GetMapping("/getAllQuestionnaire")
|
||||
public Response<List<QuestionnaireVO>> getAllQuestionnaire() {
|
||||
return Response.success(convenientInquiryService.getAllQuestionnaire());
|
||||
}
|
||||
|
||||
@ApiOperation("获取近期新用户")
|
||||
@Operation(summary = "获取近期新用户")
|
||||
@PostMapping("/recentNewUser")
|
||||
public Response<IPage<Account>> recentNewUser(@Valid @RequestBody QueryUserConditionsVO queryUserConditionsVO) {
|
||||
return Response.success(convenientInquiryService.recentNewUser(queryUserConditionsVO));
|
||||
}
|
||||
|
||||
@ApiOperation("获取近期新用户图表数据")
|
||||
@Operation(summary = "获取近期新用户图表数据")
|
||||
@GetMapping("/recentNewUserChart")
|
||||
public Response<Map<String, Object>> recentNewUserChart(@ApiParam(value = "startTime") @RequestParam @Nullable String startTime,
|
||||
@ApiParam(value = "endTime") @RequestParam @Nullable String endTime,
|
||||
@ApiParam("userType") @RequestParam Integer userType) {
|
||||
public Response<Map<String, Object>> recentNewUserChart(@Parameter(description = "startTime") @RequestParam @Nullable String startTime,
|
||||
@Parameter(description = "endTime") @RequestParam @Nullable String endTime,
|
||||
@Parameter(description = "userType") @RequestParam Integer userType) {
|
||||
return Response.success(convenientInquiryService.recentNewUserChart(startTime, endTime, userType));
|
||||
}
|
||||
|
||||
@ApiOperation("获取近期活跃用户")
|
||||
@Operation(summary = "获取近期活跃用户")
|
||||
@PostMapping("/recentActiveUser")
|
||||
public Response<IPage<Account>> recentActiveUser(@Valid @RequestBody QueryUserConditionsVO queryUserConditionsVO) {
|
||||
return Response.success(convenientInquiryService.recentActiveUser(queryUserConditionsVO));
|
||||
}
|
||||
|
||||
@ApiOperation("获取近期活跃用户图表数据")
|
||||
@Operation(summary = "获取近期活跃用户图表数据")
|
||||
@GetMapping("/recentActiveUserChart")
|
||||
public Response<Integer> recentActiveUserChart(@ApiParam(value = "startTime") @RequestParam @Nullable String startTime,
|
||||
@ApiParam(value = "endTime") @RequestParam @Nullable String endTime) {
|
||||
public Response<Integer> recentActiveUserChart(@Parameter(description = "startTime") @RequestParam @Nullable String startTime,
|
||||
@Parameter(description = "endTime") @RequestParam @Nullable String endTime) {
|
||||
return Response.success(convenientInquiryService.recentActiveUserChart(startTime, endTime));
|
||||
}
|
||||
|
||||
@ApiOperation("获取用户的各模块功能使用详情")
|
||||
@Operation(summary = "获取用户的各模块功能使用详情")
|
||||
@GetMapping("/getActiveUserFunc")
|
||||
public Response<Map<String, List<Object>>> getActiveUserFunc(@ApiParam(value = "startTime") @RequestParam @Nullable String startTime,
|
||||
@ApiParam(value = "endTime") @RequestParam @Nullable String endTime,
|
||||
@ApiParam("userIdList") @RequestParam(required = false) @Nullable List<Long> userIdList) {
|
||||
public Response<Map<String, List<Object>>> getActiveUserFunc(@Parameter(description = "startTime") @RequestParam @Nullable String startTime,
|
||||
@Parameter(description = "endTime") @RequestParam @Nullable String endTime,
|
||||
@Parameter(description = "userIdList") @RequestParam(required = false) @Nullable List<Long> userIdList) {
|
||||
return Response.success(convenientInquiryService.getActiveUserFunc(startTime, endTime, userIdList));
|
||||
}
|
||||
|
||||
@ApiOperation("试用用户到正式用户的转化率")
|
||||
@Operation(summary = "试用用户到正式用户的转化率")
|
||||
@GetMapping("/conversionRate")
|
||||
public Response<Map<String, Object>> conversionRate(@ApiParam(value = "startTime") @RequestParam(required = false) @Nullable String startTime,
|
||||
@ApiParam(value = "endTime") @RequestParam(required = false) @Nullable String endTime) {
|
||||
public Response<Map<String, Object>> conversionRate(@Parameter(description = "startTime") @RequestParam(required = false) @Nullable String startTime,
|
||||
@Parameter(description = "endTime") @RequestParam(required = false) @Nullable String endTime) {
|
||||
return Response.success(convenientInquiryService.conversionRate(startTime, endTime));
|
||||
}
|
||||
|
||||
@ApiOperation("试用用户国家/城市分布")
|
||||
@Operation(summary = "试用用户国家/城市分布")
|
||||
@GetMapping("/trialUserCountry")
|
||||
public Response<Map<String, List<Object>>> trialUserCountry(@ApiParam(value = "startTime") @RequestParam(required = false) @Nullable String startTime,
|
||||
@ApiParam(value = "endTime") @RequestParam(required = false) @Nullable String endTime) {
|
||||
public Response<Map<String, List<Object>>> trialUserCountry(@Parameter(description = "startTime") @RequestParam(required = false) @Nullable String startTime,
|
||||
@Parameter(description = "endTime") @RequestParam(required = false) @Nullable String endTime) {
|
||||
return Response.success(convenientInquiryService.trialUserCountry(startTime, endTime));
|
||||
}
|
||||
|
||||
@ApiOperation("添加用户")
|
||||
@Operation(summary = "添加用户")
|
||||
@PostMapping("/addUser")
|
||||
public Response<Boolean> addUser(@Valid @RequestBody AccountAddDTO accountAddDTO) {
|
||||
Long userAccountId = UserContext.getUserHolder().getId();
|
||||
@@ -155,12 +155,12 @@ public class ConvenientInquiryController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("修改用户信息")
|
||||
@Operation(summary = "修改用户信息")
|
||||
@PostMapping("/modifyUser")
|
||||
public Response<Boolean> modifyUser(@ApiParam(value = "用户id") @RequestParam @Nullable Long accountId,
|
||||
@ApiParam(value = "有效期截止时间的毫秒级unix格式") @RequestParam @Nullable Long validEndTime,
|
||||
@ApiParam(value = "用户类型 1/2/3/0 -> yearly/monthly/trial/visitor") @RequestParam @Nullable Integer systemUser,
|
||||
@ApiParam("积分") @RequestParam @Nullable Long credits) {
|
||||
public Response<Boolean> modifyUser(@Parameter(description = "用户id") @RequestParam @Nullable Long accountId,
|
||||
@Parameter(description = "有效期截止时间的毫秒级unix格式") @RequestParam @Nullable Long validEndTime,
|
||||
@Parameter(description = "用户类型 1/2/3/0 -> yearly/monthly/trial/visitor") @RequestParam @Nullable Integer systemUser,
|
||||
@Parameter(description = "积分") @RequestParam @Nullable Long credits) {
|
||||
Long userAccountId = UserContext.getUserHolder().getId();
|
||||
if (userAccountId.equals(31L) || userAccountId.equals(87L) || userAccountId.equals(83L)
|
||||
|| userAccountId.equals(6L) || userAccountId.equals(4L) || userAccountId.equals(73L)
|
||||
@@ -171,56 +171,56 @@ public class ConvenientInquiryController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("获取用户信息")
|
||||
@Operation(summary = "获取用户信息")
|
||||
@PostMapping("/getUserInfo")
|
||||
public Response<IPage<Account>> getUserInfo(@Valid @RequestBody QueryUserConditionsVO queryUserConditionsVO) {
|
||||
return Response.success(convenientInquiryService.getUserInfo(queryUserConditionsVO));
|
||||
}
|
||||
|
||||
@ApiOperation("获取所有用户id")
|
||||
@Operation(summary = "获取所有用户id")
|
||||
@GetMapping("/getAllUserId")
|
||||
public Response<List<Map<String, Object>>> getAllUsrIdList() {
|
||||
return Response.success(convenientInquiryService.getAllUserIdList());
|
||||
}
|
||||
|
||||
@ApiOperation("获取所有交易信息")
|
||||
@Operation(summary = "获取所有交易信息")
|
||||
@PostMapping("/queryTransaction")
|
||||
public Response<PageBaseResponse<PaymentInfoVO>> queryTransactionRecords(@Valid @RequestBody QueryPaymentInfoDTO queryPaymentInfoDTO){
|
||||
return Response.success(convenientInquiryService.queryTransactionRecords(queryPaymentInfoDTO));
|
||||
}
|
||||
|
||||
@ApiOperation("获取所有国家、城市")
|
||||
@Operation(summary = "获取所有国家、城市")
|
||||
@GetMapping("/getCities")
|
||||
public Response<Map<String, List<String>>> getCities(){
|
||||
return Response.success(convenientInquiryService.getCities());
|
||||
}
|
||||
|
||||
@ApiOperation("下载交易记录")
|
||||
@Operation(summary = "下载交易记录")
|
||||
@PostMapping("/queryTransaction/download")
|
||||
public Response<String> exportTransactionRecords(@Valid @RequestBody QueryPaymentInfoDTO queryPaymentInfoDTO, HttpServletResponse response){
|
||||
return Response.success(convenientInquiryService.exportTransactionRecords(queryPaymentInfoDTO, response));
|
||||
}
|
||||
|
||||
@ApiOperation("获取生成功能使用频次")
|
||||
@Operation(summary = "获取生成功能使用频次")
|
||||
@PostMapping("/getGenerateFrequency")
|
||||
public Response<PageBaseResponse<AccountCreditsUsageDTO>> getGenerateFrequency(@Valid @RequestBody AccountCreditsUsageQueryDTO queryDTO){
|
||||
return Response.success(convenientInquiryService.getGenerateFrequency(queryDTO));
|
||||
}
|
||||
|
||||
@ApiOperation("获取所有生成功能的名字")
|
||||
@Operation(summary = "获取所有生成功能的名字")
|
||||
@GetMapping("/getAllGenerateFuncName")
|
||||
public Response<List<String>> getAllGenerateFuncName(){
|
||||
return Response.success(convenientInquiryService.getAllGenerateFuncName());
|
||||
}
|
||||
|
||||
@ApiOperation("添加组织机构")
|
||||
@Operation(summary = "添加组织机构")
|
||||
@GetMapping("/addOrganization")
|
||||
public Response<String> addOrganization(@ApiParam(value = "机构名") @RequestParam String name, @ApiParam(value = "Enterprise || Education") @RequestParam String type){
|
||||
public Response<String> addOrganization(@Parameter(description = "机构名") @RequestParam String name, @Parameter(description = "Enterprise || Education") @RequestParam String type){
|
||||
convenientInquiryService.addOrganization(name, type);
|
||||
return Response.success();
|
||||
}
|
||||
|
||||
@ApiOperation("查询所有企业或教育机构")
|
||||
@Operation(summary = "查询所有企业或教育机构")
|
||||
@PostMapping("/queryOrganization")
|
||||
public Response<IPage<Organization>> queryOrganization(@RequestBody QueryOrganizationPageDTO queryOrganizationPageDTO){
|
||||
return Response.success(convenientInquiryService.queryOrganization(queryOrganizationPageDTO));
|
||||
|
||||
@@ -6,8 +6,8 @@ import com.ai.da.common.response.Response;
|
||||
import com.ai.da.mapper.primary.entity.CreditsDetail;
|
||||
import com.ai.da.model.dto.QueryIncomeOrExpenditureDTO;
|
||||
import com.ai.da.service.CreditsService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -17,21 +17,21 @@ import jakarta.validation.Valid;
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/api/credits")
|
||||
@Api(tags = "积分")
|
||||
@Tag(name = "积分")
|
||||
@Slf4j
|
||||
public class CreditsController {
|
||||
|
||||
@Resource
|
||||
private CreditsService creditsService;
|
||||
|
||||
@ApiOperation("获取当前积分")
|
||||
@Operation(summary = "获取当前积分")
|
||||
@GetMapping("/getCredits")
|
||||
public Response<String> getCredits() {
|
||||
String credits = creditsService.getCredits(UserContext.getUserHolder().getId());
|
||||
return Response.success(credits);
|
||||
}
|
||||
|
||||
@ApiOperation("获取积分详细")
|
||||
@Operation(summary = "获取积分详细")
|
||||
@PostMapping("/getCreditsDetail")
|
||||
public Response<PageBaseResponse<CreditsDetail>> getCreditsDetail(@Valid @RequestBody QueryIncomeOrExpenditureDTO queryPageByTimeDTO) {
|
||||
PageBaseResponse<CreditsDetail> credits = creditsService.queryCreditsDetailsPage(queryPageByTimeDTO);
|
||||
|
||||
@@ -9,9 +9,9 @@ import com.ai.da.model.dto.*;
|
||||
import com.ai.da.model.vo.*;
|
||||
import com.ai.da.service.DesignService;
|
||||
import com.ai.da.service.UserLikeGroupService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Api(tags = "design模块")
|
||||
@Tag(name = "design模块")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/design")
|
||||
@@ -31,98 +31,98 @@ public class DesignController {
|
||||
@Resource
|
||||
private UserLikeGroupService userLikeGroupService;
|
||||
|
||||
@ApiOperation(value = "设计 Conllection")
|
||||
@Operation(summary = "设计 Conllection")
|
||||
@PostMapping("/designCollection")
|
||||
@CrossOrigin
|
||||
public Response<String> designCollection(@Valid @RequestBody DesignCollectionDTO designDTO) {
|
||||
return Response.success(designService.designCollection(designDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "design进度条")
|
||||
@Operation(summary = "design进度条")
|
||||
@GetMapping("/designProcess")
|
||||
public Response<Integer> designProcess(@RequestParam("processId") String processId) {
|
||||
return Response.success(designService.designProcess(processId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "重新设计 Collection")
|
||||
@Operation(summary = "重新设计 Collection")
|
||||
@PostMapping("/reDesignCollection")
|
||||
public Response<String> reDesignCollection(@Valid @RequestBody ReDesignCollectionDTO reDesignDTO) {
|
||||
return Response.success(designService.reDesignCollection(reDesignDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "designItem list,刷新用")
|
||||
@Operation(summary = "designItem list,刷新用")
|
||||
@GetMapping("/designItemList")
|
||||
public Response<DesignCollectionVO> designItemList(@ApiParam("designId") @RequestParam("designId") Long designId) {
|
||||
public Response<DesignCollectionVO> designItemList(@Parameter(description = "designId") @RequestParam("designId") Long designId) {
|
||||
return Response.success(designService.designItemList(designId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "统计design进度")
|
||||
@Operation(summary = "统计design进度")
|
||||
@PostMapping("/countDesignProcess")
|
||||
public Response<BigDecimal> countDesignProcess() {
|
||||
return Response.success(designService.countDesignProcess());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Design Like")
|
||||
@Operation(summary = "Design Like")
|
||||
@PostMapping("/like")
|
||||
public Response<DesignLikeVO> like(@Valid @RequestBody DesignLikeDTO designLikeDTO) {
|
||||
return Response.success(designService.like(designLikeDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Design Dislike")
|
||||
@Operation(summary = "Design Dislike")
|
||||
@PostMapping("/dislike")
|
||||
public Response<Boolean> dislike(@Valid @RequestBody DisDesignLikeDTO disDesignLikeDTO) {
|
||||
return Response.success(designService.dislike(disDesignLikeDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Design sort")
|
||||
@Operation(summary = "Design sort")
|
||||
@PostMapping("/sort")
|
||||
public Response<Boolean> sort(@Valid @RequestBody CollectionSortDTO userLikeSortDTO) {
|
||||
return Response.success(designService.sort(userLikeSortDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "sketchBoard upload generate design前裁剪")
|
||||
@Operation(summary = "sketchBoard upload generate design前裁剪")
|
||||
@PostMapping("/sketchBoardsBoundingBox")
|
||||
public Response<List<CollectionSketchVO>> sketchesBoundingBox(@Valid @RequestBody ReDesignCollectionDTO reDesignCollectionDTO) {
|
||||
return Response.success(designService.sketchesBoundingBox(reDesignCollectionDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "通过designItemId获取模特图")
|
||||
@Operation(summary = "通过designItemId获取模特图")
|
||||
@PostMapping("/getModel")
|
||||
public Response<List<String>> getModel(@RequestBody List<Long> designItemIdList){
|
||||
return Response.success(designService.getModel(designItemIdList));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取design结果")
|
||||
@Operation(summary = "获取design结果")
|
||||
@GetMapping("/getDesignResult")
|
||||
public Response<DesignCollectionVO> getDesignResult(@RequestParam("requestId") String requestId, @RequestParam("objectSignList") List<String> objectSignList){
|
||||
return Response.success(designService.getDesignResult(requestId, objectSignList));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "云生成")
|
||||
@Operation(summary = "云生成")
|
||||
@PostMapping("/designCloud")
|
||||
public Response<String> designCloud(@Valid @RequestBody CloudTaskDTO cloudTaskDTO) {
|
||||
return Response.success(designService.designCloud(cloudTaskDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "云生成修改任务名")
|
||||
@Operation(summary = "云生成修改任务名")
|
||||
@PostMapping("/cloudTaskNameUpdate")
|
||||
public Response<Boolean> cloudTaskNameUpdate(@Valid @RequestBody CloudTaskDTO cloudTaskDTO) {
|
||||
return Response.success(designService.cloudTaskNameUpdate(cloudTaskDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "云生成删除任务")
|
||||
@Operation(summary = "云生成删除任务")
|
||||
@PostMapping("/cloudTaskDelete")
|
||||
public Response<Boolean> cloudTaskDelete(@Valid @RequestBody CloudTaskDTO cloudTaskDTO) {
|
||||
return Response.success(designService.cloudTaskDelete(cloudTaskDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "云生成page")
|
||||
@Operation(summary = "云生成page")
|
||||
@PostMapping("/cloudPage")
|
||||
public Response<PageBaseResponse<CloudTaskVO>> cloudPage(@Valid @RequestBody CloudPageDTO cloudPageDTO) {
|
||||
return Response.success(PageBaseResponse.success(designService.cloudPage(cloudPageDTO)));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取design云生成结果")
|
||||
@Operation(summary = "获取design云生成结果")
|
||||
@PostMapping("/getDesignCloudResult")
|
||||
public Response<CloudTaskResultVO> getDesignCloudResult(@Valid @RequestBody DesignCloudResultQuery designCloudResultQuery) {
|
||||
return Response.success(designService.getDesignCloudResult(designCloudResultQuery));
|
||||
|
||||
@@ -5,9 +5,9 @@ import com.ai.da.model.dto.*;
|
||||
import com.ai.da.model.vo.*;
|
||||
import com.ai.da.service.DesignItemService;
|
||||
import com.ai.da.service.DesignService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -16,7 +16,7 @@ import jakarta.validation.Valid;
|
||||
import java.io.IOException;
|
||||
|
||||
|
||||
@Api(tags = "design Detail模块")
|
||||
@Tag(name = "design Detail模块")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/design/detail")
|
||||
@@ -26,7 +26,7 @@ public class DesignDetailController {
|
||||
@Resource
|
||||
private DesignItemService designItemService;
|
||||
|
||||
@ApiOperation(value = "生成高级design图片")
|
||||
@Operation(summary = "生成高级design图片")
|
||||
@PostMapping("/generateHighDesign")
|
||||
public Response<String> generateHighDesign(@Valid @RequestBody GenerateHighDesignDTO generateHighDesignDTO) {
|
||||
Response response = new Response();
|
||||
@@ -34,7 +34,7 @@ public class DesignDetailController {
|
||||
return response;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除高级design图片")
|
||||
@Operation(summary = "删除高级design图片")
|
||||
@PostMapping("/deleteHighDesign")
|
||||
public Response<Boolean> deleteHighDesign(@Valid @RequestBody GenerateHighDesignDTO generateHighDesignDTO) {
|
||||
Response response = new Response();
|
||||
@@ -42,28 +42,28 @@ public class DesignDetailController {
|
||||
return response;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询design详情")
|
||||
@Operation(summary = "查询design详情")
|
||||
@GetMapping("/getDetail")
|
||||
public Response<DesignItemDetailVO> getDetail(@ApiParam("designItemId") @RequestParam("designItemId") Long designItemId,
|
||||
@ApiParam("designPythonOutfitId") @RequestParam(value = "designPythonOutfitId", required = false) Long designPythonOutfitId) {
|
||||
public Response<DesignItemDetailVO> getDetail(@Parameter(description = "designItemId") @RequestParam("designItemId") Long designItemId,
|
||||
@Parameter(description = "designPythonOutfitId") @RequestParam(value = "designPythonOutfitId", required = false) Long designPythonOutfitId) {
|
||||
return Response.success(designService.detail(designPythonOutfitId, designItemId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "切换系统的element")
|
||||
@Operation(summary = "切换系统的element")
|
||||
@GetMapping("/getNextSysElement")
|
||||
public Response<GetNextSysElementVO> getNextSysElement(@ApiParam("要切换的系统element 类型") @RequestParam("type") String type,
|
||||
@ApiParam("要切换的系统element id") @RequestParam("id") Long id,
|
||||
@ApiParam("操作类型 PREV 上一步 NEXT 下一步") @RequestParam("operateType") String operateType) {
|
||||
public Response<GetNextSysElementVO> getNextSysElement(@Parameter(description = "要切换的系统element 类型") @RequestParam("type") String type,
|
||||
@Parameter(description = "要切换的系统element id") @RequestParam("id") Long id,
|
||||
@Parameter(description = "操作类型 PREV 上一步 NEXT 下一步") @RequestParam("operateType") String operateType) {
|
||||
return Response.success(designItemService.getNextSysElement(id, type, operateType));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "单个design")
|
||||
@Operation(summary = "单个design")
|
||||
@PostMapping("/designSingle")
|
||||
public Response<DesignSingleVO> designSingle(@Valid @RequestBody DesignSingleIncludeLayersDTO designSingleIncludeLayersDTO) {
|
||||
return Response.success(designItemService.designSingleIncludeLayers(designSingleIncludeLayersDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "print打点")
|
||||
@Operation(summary = "print打点")
|
||||
@PostMapping("/printDot")
|
||||
public Response<String> printDot(@Valid @RequestBody DesignSingleDTO designSingleDTO) {
|
||||
Response<String> response = new Response();
|
||||
@@ -72,20 +72,20 @@ public class DesignDetailController {
|
||||
return response;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "编辑图层大小和位置 废弃")
|
||||
@Operation(summary = "编辑图层大小和位置 废弃")
|
||||
@PostMapping("/editLayers")
|
||||
public Response<ComposeLayersVO> editPositionAndScale(@Valid @RequestBody EditLayersPositionAndScaleVO positionAndScaleVO) throws IOException {
|
||||
return Response.success(designItemService.editLayersPositionAndScale(positionAndScaleVO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "mask数据兼容")
|
||||
@Operation(summary = "mask数据兼容")
|
||||
@GetMapping("/convertWithoutGradient")
|
||||
public Response<String> convertHistoryMaskWithoutGradient(){
|
||||
designItemService.convertHistoryMaskWithoutGradient();
|
||||
return Response.success("success");
|
||||
}
|
||||
|
||||
@ApiOperation(value = "mask数据库路径更新")
|
||||
@Operation(summary = "mask数据库路径更新")
|
||||
@GetMapping("/updateMaskUrl")
|
||||
public Response<String> updateMaskUrl(){
|
||||
designItemService.updateMaskUrl();
|
||||
|
||||
@@ -8,9 +8,9 @@ import com.ai.da.model.vo.*;
|
||||
import com.ai.da.service.CollectionElementService;
|
||||
import com.ai.da.service.PanToneService;
|
||||
import com.ai.da.service.SysFileService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -24,7 +24,7 @@ import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@Api(tags = "collection模块")
|
||||
@Tag(name = "collection模块")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/element")
|
||||
@@ -37,7 +37,7 @@ public class ElementController {
|
||||
@Resource
|
||||
private SysFileService sysFileService;
|
||||
|
||||
@ApiOperation(value = "初始化系统文件")
|
||||
@Operation(summary = "初始化系统文件")
|
||||
@PostMapping("/initDefaultSysFile")
|
||||
public Response<Boolean> initDefaultSysFile(@RequestParam("validate") String validateUse) {
|
||||
if (validateUse.equals("da_fl_mm_dad88888")) {
|
||||
@@ -47,15 +47,15 @@ public class ElementController {
|
||||
return Response.success();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "element文件上传")
|
||||
@Operation(summary = "element文件上传")
|
||||
@PostMapping("/upload")
|
||||
public Response<CollectionElementVO> upload(@RequestParam("file") MultipartFile file,
|
||||
@ApiParam("一级类型 Moodboard Printboard Sketchboard MarketingSketch Colorboard")
|
||||
@Parameter(description = "一级类型 Moodboard Printboard Sketchboard MarketingSketch Colorboard")
|
||||
@RequestParam(value = "level1Type") String level1Type,
|
||||
@RequestParam(name = "gender", required = false) String gender,
|
||||
@RequestParam(name = "level2Type", required = false) String level2Type,
|
||||
@RequestParam(name = "projectId", required = false) Long projectId,
|
||||
@ApiParam("本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取")
|
||||
@Parameter(description = "本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取")
|
||||
@RequestParam(value = "timeZone") String timeZone) {
|
||||
if (null == file || StringUtils.isEmpty(file.getOriginalFilename())) {
|
||||
throw new BusinessException("file.cannot.be.empty");
|
||||
@@ -64,7 +64,7 @@ public class ElementController {
|
||||
new CollectionElementUploadDTO(file, projectId, level1Type, level2Type, gender, timeZone, MD5Utils.encryptFile(file))));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "element文件删除")
|
||||
@Operation(summary = "element文件删除")
|
||||
@PostMapping("/delete")
|
||||
public Response<Boolean> delete(@Valid @RequestBody CollectionDeleteFileDTO deleteFileDTO) {
|
||||
collectionElementService.delete(deleteFileDTO.getId());
|
||||
@@ -73,45 +73,45 @@ public class ElementController {
|
||||
|
||||
/** 该功能已删除 */
|
||||
@Deprecated
|
||||
@ApiOperation(value = "生成印花")
|
||||
@Operation(summary = "生成印花")
|
||||
@PostMapping("/generatePrint")
|
||||
public Response<GenerateCollectionItemVO> generatePrint(@Valid @RequestBody CollectionGeneratePrintDTO generatePrintDTO) {
|
||||
return Response.success(collectionElementService.generatePrint(generatePrintDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "保存印花")
|
||||
@Operation(summary = "保存印花")
|
||||
@PostMapping("/savePrint")
|
||||
public Response<Boolean> savePrint(@Valid @RequestBody CollectionSavePrintDTO savePrintDTO) {
|
||||
return Response.success(collectionElementService.savePrint(savePrintDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "通过tcx值获取潘通信息")
|
||||
@Operation(summary = "通过tcx值获取潘通信息")
|
||||
@GetMapping("/getRgbByTcx")
|
||||
public Response<PantoneVO> getRgbByHsv(@ApiParam("tcx") @RequestParam("tcx") String tcx) {
|
||||
public Response<PantoneVO> getRgbByHsv(@Parameter(description = "tcx") @RequestParam("tcx") String tcx) {
|
||||
return Response.success(panToneService.getByTCX(tcx));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "通过hsv值获取潘通信息")
|
||||
@Operation(summary = "通过hsv值获取潘通信息")
|
||||
@GetMapping("/getRgbByHsv")
|
||||
public Response<PantoneVO> getRgbByHsv(@RequestParam("h") Integer h,
|
||||
@RequestParam("s") Integer s, @RequestParam("v") Integer v) {
|
||||
return Response.success(panToneService.getByHSV(h, s, v));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "通过hsv值数组批量获取潘通信息")
|
||||
@Operation(summary = "通过hsv值数组批量获取潘通信息")
|
||||
@PostMapping("/getRgbByHsvBatch")
|
||||
public Response<List<PantoneVO>> getRgbByHsvBatch(@RequestBody @Valid List<GetRgbByHsvBatchDTO> rgbByHsvBatch) {
|
||||
return Response.success(panToneService.getRgbByHsvBatch(rgbByHsvBatch));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "刷新历史数据")
|
||||
@Operation(summary = "刷新历史数据")
|
||||
@PostMapping("/refreshHistoryData")
|
||||
public Response<Boolean> refreshHistoryData() {
|
||||
collectionElementService.refreshHistoryData();
|
||||
return Response.success();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "图片分割")
|
||||
@Operation(summary = "图片分割")
|
||||
@PostMapping("/imageSegmentation")
|
||||
public Response<List<CollectionElementVO>> selectedImageSeg(
|
||||
@RequestPart(value = "file", required = false) MultipartFile[] file,
|
||||
@@ -133,7 +133,7 @@ public class ElementController {
|
||||
return Response.success(collectionElementService.selectedImageSeg(nonEmptyFiles, id, type, sourceType));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "更新element level2type")
|
||||
@Operation(summary = "更新element level2type")
|
||||
@GetMapping("/updateElementLevel2Type")
|
||||
public Response<String> updateLibraryLevel2Type(@RequestParam(value = "elementId") Long elementId, @RequestParam(value = "level2Type") String level2Type) {
|
||||
collectionElementService.updateElementLevel2Type(elementId, level2Type);
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.ai.da.controller;
|
||||
|
||||
import com.ai.da.service.EmailService;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -12,7 +12,7 @@ import org.thymeleaf.context.Context;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
|
||||
@Api(tags = "邮件模块")
|
||||
@Tag(name = "邮件模块")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/email")
|
||||
|
||||
@@ -6,9 +6,9 @@ import com.ai.da.mapper.primary.entity.CollectionSort;
|
||||
import com.ai.da.model.dto.*;
|
||||
import com.ai.da.model.vo.*;
|
||||
import com.ai.da.service.GenerateService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -22,7 +22,7 @@ import java.util.Map;
|
||||
/**
|
||||
* @author XP
|
||||
*/
|
||||
@Api(tags = "Generate模块")
|
||||
@Tag(name = "Generate模块")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/generate")
|
||||
@@ -44,20 +44,20 @@ public class GenerateController {
|
||||
generateService.generateThroughImageText(generateThroughImageTextDTO);
|
||||
}*/
|
||||
|
||||
@ApiOperation("喜欢生成的图片")
|
||||
@Operation(summary = "喜欢生成的图片")
|
||||
@PostMapping("/like")
|
||||
public Response<GenerateLikeVO> like(@Valid @RequestBody GenerateLikeDTO generateLikeDTO) {
|
||||
return Response.success(generateService.generateLike(generateLikeDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "取消喜欢")
|
||||
@Operation(summary = "取消喜欢")
|
||||
@GetMapping("/dislike")
|
||||
public Response<Boolean> dislike(@ApiParam("generateDetailId") @RequestParam Long generateDetailId,
|
||||
@ApiParam("timeZone") @RequestParam String timeZone) {
|
||||
public Response<Boolean> dislike(@Parameter(description = "generateDetailId") @RequestParam Long generateDetailId,
|
||||
@Parameter(description = "timeZone") @RequestParam String timeZone) {
|
||||
return Response.success(generateService.generateDislike(generateDetailId, timeZone));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "发起生成请求,异步获取结果")
|
||||
@Operation(summary = "发起生成请求,异步获取结果")
|
||||
@PostMapping("/prepare")
|
||||
public ResponseEntity<Response<PrepareForGenerateVO>> prepareForGenerate(@Valid @RequestBody GenerateThroughImageTextDTO generateThroughImageTextDTO) {
|
||||
PrepareForGenerateVO prepareForGenerateVO = generateService.prepareForGenerate(generateThroughImageTextDTO);
|
||||
@@ -69,7 +69,7 @@ public class GenerateController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "取消继续生成")
|
||||
@Operation(summary = "取消继续生成")
|
||||
@GetMapping("/stopWaiting")
|
||||
public Response<String> stopWaiting(@RequestParam("userId") Long userId,
|
||||
@RequestParam("uniqueId") List<String> uniqueId,
|
||||
@@ -86,14 +86,14 @@ public class GenerateController {
|
||||
return Response.success(generateResult);
|
||||
}*/
|
||||
|
||||
@ApiOperation(value = "获取生成结果")
|
||||
@Operation(summary = "获取生成结果")
|
||||
@PostMapping("/result")
|
||||
public Response<List<GenerateResultVO>> getGenerateResults(@Valid @RequestBody List<String> taskIdList) {
|
||||
List<GenerateResultVO> generateResult = generateService.getGenerateResultList(taskIdList);
|
||||
return Response.success(generateResult);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "imageToSketch")
|
||||
@Operation(summary = "imageToSketch")
|
||||
@PostMapping("/imageToSketch")
|
||||
public Response<String> imageToSketch(@Valid @RequestBody ImageToSketchDTO imageToSketchDTO) {
|
||||
return Response.success(generateService.imageToSketchAsync(imageToSketchDTO, null, null));
|
||||
@@ -101,59 +101,59 @@ public class GenerateController {
|
||||
}
|
||||
|
||||
// modifySketch
|
||||
@ApiOperation(value = "modifySketch")
|
||||
@Operation(summary = "modifySketch")
|
||||
@PostMapping("/modifySketch")
|
||||
public Response<GenerateResultVO> modifySketch(@Valid @RequestBody GenerateModifyDTO generateModifyDTO) {
|
||||
return Response.success(generateService.modifySketch(generateModifyDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "请求进行姿势变换")
|
||||
@Operation(summary = "请求进行姿势变换")
|
||||
@PostMapping("/poseTransform")
|
||||
public Response<ToProductImageResultVO> poseTransform(@Valid @RequestBody PoseTransformDTO poseTransformDTO) {
|
||||
return Response.success(generateService.poseTransform(poseTransformDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取姿势变换生成结果")
|
||||
@Operation(summary = "获取姿势变换生成结果")
|
||||
@PostMapping("/poseTransformResult")
|
||||
public Response<List<PoseTransformationVO>> getPoseTransformationResults(@Valid @RequestBody List<String> taskIdList) {
|
||||
List<PoseTransformationVO> generateResult = generateService.getPoseTransformationResult(taskIdList, null, null);
|
||||
return Response.success(generateResult);
|
||||
}
|
||||
|
||||
@ApiOperation("喜欢或取消喜欢姿势变换生成的图片")
|
||||
@Operation(summary = "喜欢或取消喜欢姿势变换生成的图片")
|
||||
@PostMapping("/likeOrDislike")
|
||||
public Response<CollectionSort> likeOrDislike(@ApiParam("id") @RequestParam Long transformedId, @ApiParam("like || dislike") @RequestParam String likeOrDislike, @RequestParam("projectId") Long projectId, @RequestParam(value = "collectionSortParentId", required = false) Long collectionSortParentId) {
|
||||
public Response<CollectionSort> likeOrDislike(@Parameter(description = "id") @RequestParam Long transformedId, @Parameter(description = "like || dislike") @RequestParam String likeOrDislike, @RequestParam("projectId") Long projectId, @RequestParam(value = "collectionSortParentId", required = false) Long collectionSortParentId) {
|
||||
return Response.success(generateService.disOrLikePose(transformedId, likeOrDislike, projectId, collectionSortParentId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改模特比例")
|
||||
@Operation(summary = "修改模特比例")
|
||||
@PostMapping("/modifyProportion")
|
||||
public Response<String> modifyModelProportion(@Valid @RequestBody ModifyModelProportionDTO proportionDTO){
|
||||
String path = generateService.modifyModelProportion(proportionDTO);
|
||||
return Response.success(path);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "拼贴图生成线稿")
|
||||
@Operation(summary = "拼贴图生成线稿")
|
||||
@PostMapping("/genSketchRecon")
|
||||
public Response<GenerateResultVO> sketchReconstructionGenerate(@Valid @RequestBody SketchReconstructionDTO sketchReconstructionDTO){
|
||||
GenerateResultVO generateResultVO = generateService.sketchReconstructionGenerate(sketchReconstructionDTO);
|
||||
return Response.success(generateResultVO);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取拼贴图最后一次生成结果")
|
||||
@Operation(summary = "获取拼贴图最后一次生成结果")
|
||||
@GetMapping("/getReconLastResult")
|
||||
public Response<SketchReconstructionVO> getSketchReconstruction(@RequestParam("projectId") Long projectId){
|
||||
SketchReconstructionVO sketchReconstruction = generateService.getSketchReconstruction(projectId);
|
||||
return Response.success(sketchReconstruction);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取pose transfer的所有pose")
|
||||
@Operation(summary = "获取pose transfer的所有pose")
|
||||
@GetMapping("/getAllPose")
|
||||
public Response<List<Map<String, String>>> getAllPose(){
|
||||
return Response.success(generateService.getAllPose());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除pose transfer的结果")
|
||||
@Operation(summary = "删除pose transfer的结果")
|
||||
@GetMapping("/deleteResult")
|
||||
public Response<String> deleteToProductRelightResult(@RequestParam("projectId") @NotNull Long projectId,
|
||||
@RequestParam("id") @NotNull Long id){
|
||||
@@ -171,31 +171,31 @@ public class GenerateController {
|
||||
return Response.success(generateService.createAsyncTask(87L, prompt, ""));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "万象 t2i 获取异步任务结果")
|
||||
@Operation(summary = "万象 t2i 获取异步任务结果")
|
||||
@GetMapping("/waitAsyncTask")
|
||||
public Response<GenerateResultVO> waitAsyncTask(@RequestParam("taskId") String taskId){
|
||||
return Response.success(generateService.getAsyncTaskResult(taskId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "万象 图生动图")
|
||||
@Operation(summary = "万象 图生动图")
|
||||
@GetMapping("/animateAnyone")
|
||||
public Response<String> animateAnyone(@Valid @RequestBody PoseTransformDTO poseTransformDTO){
|
||||
return Response.success(generateService.animateAnyone(poseTransformDTO, null));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "万象 获取动图模板id")
|
||||
@Operation(summary = "万象 获取动图模板id")
|
||||
@GetMapping("/getVideoTemplateId")
|
||||
public Response<String> getVideoTemplateId(@RequestParam("videoPath") String videoPath){
|
||||
return Response.success(generateService.getVideoTemplateId(videoPath));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "万象 获取动图结果")
|
||||
@Operation(summary = "万象 获取动图结果")
|
||||
@GetMapping("/getAnimateResult")
|
||||
public Response<PoseTransformationVO> getAnimateResult(@RequestParam("taskId") String taskId){
|
||||
return Response.success(generateService.getAnimateResult(taskId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "freepik toProductImage")
|
||||
@Operation(summary = "freepik toProductImage")
|
||||
@GetMapping("/reimagineFreePik")
|
||||
public Response<String> reimagineFreePik(@RequestParam("path") String path,
|
||||
@RequestParam("prompt") String prompt,
|
||||
@@ -203,13 +203,13 @@ public class GenerateController {
|
||||
return Response.success(generateService.reimagineFreePik(path, prompt, style));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取图片描述")
|
||||
@Operation(summary = "获取图片描述")
|
||||
@GetMapping("/getImageDescription")
|
||||
public Response<String> getImageDescription(@RequestParam("path") String path) {
|
||||
return Response.success(generateService.getImageDescription(path));
|
||||
}*/
|
||||
|
||||
// @ApiOperation(value = "试用flux")
|
||||
// @Operation(summary = "试用flux")
|
||||
// @GetMapping("/flux")
|
||||
public Response<String> flux(@RequestParam(value = "path", required = false) String path,
|
||||
@RequestParam("type") int type,
|
||||
@@ -229,7 +229,7 @@ public class GenerateController {
|
||||
return Response.success(generateService.flux(typeEnum, prompt, path, false));
|
||||
}
|
||||
|
||||
// @ApiOperation(value = "获取flux结果")
|
||||
// @Operation(summary = "获取flux结果")
|
||||
// @GetMapping("/fluxResult")
|
||||
public Response<String> fluxResult(@RequestParam("taskId") String taskId){
|
||||
return Response.success(generateService.getFluxResult(taskId, "87/" + taskId + ".png"));
|
||||
|
||||
@@ -5,8 +5,8 @@ import com.ai.da.common.response.Response;
|
||||
import com.ai.da.mapper.primary.entity.ChatMessage;
|
||||
import com.ai.da.model.dto.*;
|
||||
import com.ai.da.service.LLMService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -17,7 +17,7 @@ import jakarta.annotation.Resource;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@Api(tags = "llm模块")
|
||||
@Tag(name = "llm模块")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/llm")
|
||||
@@ -26,7 +26,7 @@ public class LLMController {
|
||||
@Resource
|
||||
private LLMService llmService;
|
||||
|
||||
@ApiOperation(value = "对话")
|
||||
@Operation(summary = "对话")
|
||||
@CrossOrigin
|
||||
@GetMapping(value = "/stream", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
|
||||
public SseEmitter streamPrompt(@RequestParam String prompt,
|
||||
@@ -39,7 +39,7 @@ public class LLMController {
|
||||
return llmService.stream(prompt, projectId, fileUrl, imageUrlList, token, enableThinking, process);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "对话")
|
||||
@Operation(summary = "对话")
|
||||
@CrossOrigin
|
||||
@GetMapping(value = "/streamNew", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
|
||||
public SseEmitter streamNew(@RequestParam String prompt,
|
||||
@@ -52,7 +52,7 @@ public class LLMController {
|
||||
return llmService.streamNew(prompt, projectId, fileUrl, imageUrlList, token, enableThinking, process);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "对话创建项目")
|
||||
@Operation(summary = "对话创建项目")
|
||||
@GetMapping(value = "/chatCreateProject")
|
||||
public Response<Long> chatCreateProject(@RequestParam String prompt, @RequestParam String process,
|
||||
@RequestParam(required = false) String fileUrl,
|
||||
@@ -60,13 +60,13 @@ public class LLMController {
|
||||
return Response.success(llmService.chatCreateProject(prompt, process, fileUrl, imageUrlList));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "上传文件")
|
||||
@Operation(summary = "上传文件")
|
||||
@PostMapping(value = "/uploadFile")
|
||||
public Response<List<String>> uploadFile(@RequestParam("file") MultipartFile file) {
|
||||
return Response.success(llmService.uploadFile(file));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取历史聊天记录")
|
||||
@Operation(summary = "获取历史聊天记录")
|
||||
@PostMapping(value = "/getChatHistory")
|
||||
public Response<PageBaseResponse<ChatMessage>> getChatHistory(@RequestBody ChatHistoryDTO chatHistoryDTO) {
|
||||
return Response.success(llmService.getChatHistory(chatHistoryDTO));
|
||||
|
||||
@@ -14,9 +14,9 @@ import com.ai.da.model.vo.*;
|
||||
import com.ai.da.service.LibraryModelPointService;
|
||||
import com.ai.da.service.LibraryService;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.util.StringUtils;
|
||||
@@ -31,7 +31,7 @@ import java.text.ParseException;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@Api(tags = "library模块")
|
||||
@Tag(name = "library模块")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/library")
|
||||
@@ -49,26 +49,26 @@ public class LibraryController {
|
||||
@Value("${minio.bucketName.sysImage}")
|
||||
private String sysImage;
|
||||
|
||||
@ApiOperation(value = "Library分页列表")
|
||||
@Operation(summary = "Library分页列表")
|
||||
@PostMapping("/queryLibraryPage")
|
||||
public Response<PageBaseResponse<QueryLibraryPageVO>> queryLibraryPage(@Valid @RequestBody QueryLibraryPageDTO query) {
|
||||
return Response.success(libraryService.queryLibraryPage(CopyUtil.copyObject(query, QueryLibraryPageServiceDTO.class)));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Library分页列表(查询top和bottom)")
|
||||
@Operation(summary = "Library分页列表(查询top和bottom)")
|
||||
@PostMapping("/queryLibraryTopAndBottomPage")
|
||||
public Response<PageBaseResponse<QueryLibraryPageVO>> queryLibraryTopAndBottomPage(@Valid @RequestBody QueryLibraryTopPageDTO query) {
|
||||
return Response.success(libraryService.queryLibraryPage(CopyUtil.copyObject(query, QueryLibraryPageServiceDTO.class)));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Library文件上传")
|
||||
@Operation(summary = "Library文件上传")
|
||||
@PostMapping("/upload")
|
||||
public Response<LibraryUpdateVo> upload(@RequestParam("file") MultipartFile file,
|
||||
@ApiParam("一级类型 Moodboard Printboard Sketchboard MarketingSketch Models")
|
||||
@Parameter(description = "一级类型 Moodboard Printboard Sketchboard MarketingSketch Models")
|
||||
@RequestParam(value = "level1Type") String level1Type,
|
||||
@ApiParam("二级类型 争对 Sketchboard; 有 Outwear Dress Blouse Skirt Trousers")
|
||||
@Parameter(description = "二级类型 争对 Sketchboard; 有 Outwear Dress Blouse Skirt Trousers")
|
||||
@RequestParam(value = "level2Type", required = false) String level2Type,
|
||||
@ApiParam("本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取")
|
||||
@Parameter(description = "本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取")
|
||||
@RequestParam(value = "timeZone") String timeZone,
|
||||
@RequestParam(value = "modelType") String modelType,
|
||||
@RequestParam(value = "sex") String sex,
|
||||
@@ -102,20 +102,20 @@ public class LibraryController {
|
||||
timeZone, md5, high, width, modelType, sex, ageGroup)));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "保存或者编辑template打点")
|
||||
@Operation(summary = "保存或者编辑template打点")
|
||||
@PostMapping("/saveOrEditTemplatePoint")
|
||||
public Response<LibraryModelPointVO> saveOrEditTemplatePoint(@Valid @RequestBody LibraryModelPointDTO libraryModelPoint) {
|
||||
return Response.success(libraryModelPointService.saveOrEditTemplatePoint(libraryModelPoint));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "批量Library修改用户文件名")
|
||||
@Operation(summary = "批量Library修改用户文件名")
|
||||
@PostMapping("/batchUpdateLibraryName")
|
||||
public Response<Boolean> batchUpdateLibraryName(@Valid @RequestBody LibraryUpdateDTO libraryUpdateDTO) {
|
||||
libraryService.updateLibraryName(libraryUpdateDTO);
|
||||
return Response.success(Boolean.TRUE);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "批量删除library")
|
||||
@Operation(summary = "批量删除library")
|
||||
@PostMapping("/batchDeleteLibrary")
|
||||
public Response<Boolean> batchDeleteLibrary(@Valid @RequestBody LibraryDeleteDTO deleteDTO) {
|
||||
libraryService.batchDeleteLibrary(deleteDTO);
|
||||
@@ -123,10 +123,10 @@ public class LibraryController {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "Models打点预览")
|
||||
@Operation(summary = "Models打点预览")
|
||||
@PostMapping("/modelsDot")
|
||||
public Response<String> modelsDot(@ApiParam("file") @RequestPart(value = "file", required = false) MultipartFile file,
|
||||
@ApiParam("models对象") @RequestPart("models") ModelsDotDTO modelsDotDTO) {
|
||||
public Response<String> modelsDot(@Parameter(description = "file") @RequestPart(value = "file", required = false) MultipartFile file,
|
||||
@Parameter(description = "models对象") @RequestPart("models") ModelsDotDTO modelsDotDTO) {
|
||||
if (Objects.nonNull(file)) {
|
||||
if (StringUtils.isEmpty(file.getOriginalFilename())) {
|
||||
throw new BusinessException("file.cannot.be.empty");
|
||||
@@ -167,7 +167,7 @@ public class LibraryController {
|
||||
return response;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "更新sketchboard level2type")
|
||||
@Operation(summary = "更新sketchboard level2type")
|
||||
@PostMapping("/updateLibraryLevel2Type")
|
||||
public Response<Boolean> updateLibraryLevel2Type(@Validated @RequestBody LibraryLevel2TypeUpdateDTO libraryLevel2TypeUpdateDTO) {
|
||||
return Response.success(libraryService.updateLibraryLevel2Type(libraryLevel2TypeUpdateDTO));
|
||||
@@ -196,21 +196,21 @@ public class LibraryController {
|
||||
}
|
||||
|
||||
@PostMapping("moveLibraryData")
|
||||
@ApiOperation(value = "用户library数据迁移")
|
||||
@Operation(summary = "用户library数据迁移")
|
||||
public Response<Boolean> moveLibraryDate() throws ParseException {
|
||||
libraryService.moveLibraryDate();
|
||||
return Response.success(true);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "将系统模特添加到个人library")
|
||||
@Operation(summary = "将系统模特添加到个人library")
|
||||
@GetMapping("addSysModelToLib")
|
||||
public Response<Map<String, String>> addSysModelToLib(@ApiParam("系统模特id") @RequestParam("sysModelId")long sysModelId){
|
||||
public Response<Map<String, String>> addSysModelToLib(@Parameter(description = "系统模特id") @RequestParam("sysModelId")long sysModelId){
|
||||
return Response.success(libraryService.addSysModelToLib(sysModelId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "将个人library元素添加到公共库")
|
||||
@Operation(summary = "将个人library元素添加到公共库")
|
||||
@GetMapping("addToPublicLibrary")
|
||||
public Response<String> addToPublicLibrary(@ApiParam("元素的libraryId") @RequestParam("libraryId") Long libraryId){
|
||||
public Response<String> addToPublicLibrary(@Parameter(description = "元素的libraryId") @RequestParam("libraryId") Long libraryId){
|
||||
boolean b = libraryService.saveToOrganizationLibrary(libraryId);
|
||||
if (b){
|
||||
return Response.success("success");
|
||||
@@ -219,31 +219,31 @@ public class LibraryController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "将个人library元素从公共库中删除")
|
||||
@Operation(summary = "将个人library元素从公共库中删除")
|
||||
@GetMapping("deleteFromPublicLib")
|
||||
public Response<String> deleteFromPublicLib(@ApiParam("元素的libraryId") @RequestParam("libraryId") Long libraryId){
|
||||
public Response<String> deleteFromPublicLib(@Parameter(description = "元素的libraryId") @RequestParam("libraryId") Long libraryId){
|
||||
libraryService.deleteFromPublicLib(libraryId);
|
||||
return Response.success("success");
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取公共库")
|
||||
@Operation(summary = "获取公共库")
|
||||
@GetMapping("getPublicLib")
|
||||
public Response<PageBaseResponse<Library>> getPublicLib(@ApiParam("排序" ) @RequestParam(value = "order", defaultValue = "DESC", required = false) String order,
|
||||
@ApiParam("page") @RequestParam(value = "page", defaultValue = "1", required = false) Long page,
|
||||
@ApiParam("size") @RequestParam(value = "size", defaultValue = "20", required = false) Long size){
|
||||
public Response<PageBaseResponse<Library>> getPublicLib(@Parameter(description = "排序" ) @RequestParam(value = "order", defaultValue = "DESC", required = false) String order,
|
||||
@Parameter(description = "page") @RequestParam(value = "page", defaultValue = "1", required = false) Long page,
|
||||
@Parameter(description = "size") @RequestParam(value = "size", defaultValue = "20", required = false) Long size){
|
||||
|
||||
return Response.success(libraryService.getPublicLib(order, page, size));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "管理员获取所有子账号lib元素")
|
||||
@Operation(summary = "管理员获取所有子账号lib元素")
|
||||
@GetMapping("getAllSubAccLib")
|
||||
public Response<PageBaseResponse<Library>> getAllSubAccLib(@ApiParam("排序") @RequestParam(value = "order", defaultValue = "DESC", required = false) String order,
|
||||
@ApiParam("page") @RequestParam(value = "page", defaultValue = "1", required = false) Long page,
|
||||
@ApiParam("size") @RequestParam(value = "size", defaultValue = "20", required = false) Long size){
|
||||
public Response<PageBaseResponse<Library>> getAllSubAccLib(@Parameter(description = "排序") @RequestParam(value = "order", defaultValue = "DESC", required = false) String order,
|
||||
@Parameter(description = "page") @RequestParam(value = "page", defaultValue = "1", required = false) Long page,
|
||||
@Parameter(description = "size") @RequestParam(value = "size", defaultValue = "20", required = false) Long size){
|
||||
return Response.success(libraryService.getAllSubAccLib(order, page, size));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "将系统sketch添加到library")
|
||||
@Operation(summary = "将系统sketch添加到library")
|
||||
@GetMapping("addSysSketchToLibrary")
|
||||
public Response<String> addSysSketchToLibrary(Long clothId, String path) {
|
||||
return Response.success(libraryService.addSysSketchToLibrary(clothId, path));
|
||||
|
||||
@@ -6,8 +6,8 @@ import com.ai.da.model.dto.GetNotificationDTO;
|
||||
import com.ai.da.model.vo.NotificationVO;
|
||||
import com.ai.da.model.dto.PublishSysNotificationDTO;
|
||||
import com.ai.da.service.MessageCenterService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -16,7 +16,7 @@ import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Api(tags = "消息中心模块")
|
||||
@Tag(name = "消息中心模块")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/message")
|
||||
@@ -26,35 +26,35 @@ public class MessageCenterController {
|
||||
private MessageCenterService messageCenterService;
|
||||
|
||||
// 获取未读消息总数
|
||||
@ApiOperation(value = "获取未读消息数")
|
||||
@Operation(summary = "获取未读消息数")
|
||||
@GetMapping("/getUnreadCount")
|
||||
public Response<Map<String, Long>> getUnreadMessage(){
|
||||
return Response.success(messageCenterService.getAllTypeMessageUnreadCount());
|
||||
}
|
||||
|
||||
// 获取历史消息
|
||||
@ApiOperation(value = "获取历史消息")
|
||||
@Operation(summary = "获取历史消息")
|
||||
@PostMapping("/getHistoryNotification")
|
||||
public Response<PageBaseResponse<NotificationVO>> getHistoryNotification(@Valid @RequestBody GetNotificationDTO getNotificationDTO) {
|
||||
return Response.success(messageCenterService.getHistoryNotification(getNotificationDTO));
|
||||
}
|
||||
|
||||
// 已读消息
|
||||
@ApiOperation(value = "设置消息状态为已读")
|
||||
@Operation(summary = "设置消息状态为已读")
|
||||
@PostMapping("/setReadStatus")
|
||||
public Response<Boolean> setReadStatus(@RequestParam("notificationIdList") List<Long> notificationIdList, @RequestParam("type") String type) {
|
||||
return Response.success(messageCenterService.setReadStatus(notificationIdList, type));
|
||||
}
|
||||
|
||||
// 发布系统消息
|
||||
@ApiOperation(value = "发布系统消息")
|
||||
@Operation(summary = "发布系统消息")
|
||||
@PostMapping("/publishSysMessage")
|
||||
public Response<String> publishSysMessage(@Valid @RequestBody PublishSysNotificationDTO message) {
|
||||
messageCenterService.publishSystemNotification(message);
|
||||
return Response.success("success");
|
||||
}
|
||||
|
||||
@ApiOperation(value = "一键已读")
|
||||
@Operation(summary = "一键已读")
|
||||
@PostMapping("/oneClickRead")
|
||||
public Response<String> setReadAll(@RequestParam("type") String type) {
|
||||
messageCenterService.setReadAll(type);
|
||||
|
||||
@@ -7,15 +7,15 @@ import com.ai.da.model.dto.QueryPageByTimeDTO;
|
||||
import com.ai.da.model.vo.OrderListVO;
|
||||
import com.ai.da.service.OrderInfoService;
|
||||
import com.ai.da.service.PaymentInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
@CrossOrigin //开放前端的跨域访问
|
||||
@Api(tags = "商品订单管理")
|
||||
@Tag(name = "商品订单管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/order-info")
|
||||
public class OrderInfoController {
|
||||
@@ -26,7 +26,7 @@ public class OrderInfoController {
|
||||
@Resource
|
||||
private PaymentInfoService paymentInfoService;
|
||||
|
||||
@ApiOperation("订单列表")
|
||||
@Operation(summary = "订单列表")
|
||||
@PostMapping("/list")
|
||||
public Response<PageBaseResponse<OrderListVO>> list(@Valid @RequestBody QueryPageByTimeDTO queryPageByTimeDTO){
|
||||
PageBaseResponse<OrderListVO> orderByAccountId = paymentInfoService.getPaymentInfo(queryPageByTimeDTO);
|
||||
@@ -39,7 +39,7 @@ public class OrderInfoController {
|
||||
* @param orderNo
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("查询本地订单状态")
|
||||
@Operation(summary = "查询本地订单状态")
|
||||
@GetMapping("/query-order-status/{orderNo}")
|
||||
public Response<String> queryOrderStatus(@PathVariable String orderNo){
|
||||
String orderStatus = orderInfoService.getOrderStatus(orderNo);
|
||||
|
||||
@@ -7,8 +7,8 @@ import com.paypal.http.HttpResponse;
|
||||
import com.paypal.http.exceptions.SerializeException;
|
||||
import com.paypal.orders.Order;
|
||||
import com.paypal.payments.Refund;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
@@ -20,21 +20,21 @@ import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
|
||||
@RestController
|
||||
@Api(tags = "PayPalCheckout接口")
|
||||
@Tag(name = "PayPalCheckout接口")
|
||||
@RequestMapping("/api/paypal")
|
||||
public class PayPalCheckoutController {
|
||||
|
||||
@Resource
|
||||
private PayPalCheckoutService payPalCheckoutService;
|
||||
|
||||
@ApiOperation(value = "创建订单")
|
||||
@Operation(summary = "创建订单")
|
||||
@PostMapping(value = "/trade")
|
||||
public Response<HashMap<String, String>> createOrder(@Valid @RequestBody ProductPurchaseDTO productPurchaseDTO, HttpServletRequest request) throws SerializeException {
|
||||
HashMap<String, String> approvalUrl = payPalCheckoutService.createOrder(productPurchaseDTO, request);
|
||||
return Response.success(approvalUrl);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "ipn异步回调")
|
||||
@Operation(summary = "ipn异步回调")
|
||||
@PostMapping(value = "/ipn/back")
|
||||
public Response<String> callback(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
Boolean result = payPalCheckoutService.doPost(request, response);
|
||||
@@ -45,7 +45,7 @@ public class PayPalCheckoutController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询指定订单")
|
||||
@Operation(summary = "查询指定订单")
|
||||
@PostMapping(value = "/trade/query/{orderNo}")
|
||||
public Response<Order> queryOrder(@PathVariable String orderNo) throws SerializeException {
|
||||
Order s = payPalCheckoutService.queryOrder(orderNo);
|
||||
@@ -53,7 +53,7 @@ public class PayPalCheckoutController {
|
||||
}
|
||||
|
||||
/** 不提供退款接口 */
|
||||
@ApiOperation("申请退款")
|
||||
@Operation(summary = "申请退款")
|
||||
@PostMapping("/trade/refund/{orderNo}/{reason}")
|
||||
public Response<HttpResponse<Refund>> refund(@PathVariable String orderNo, @PathVariable String reason) throws IOException {
|
||||
Boolean response = payPalCheckoutService.refundOrder(orderNo,reason);
|
||||
@@ -64,7 +64,7 @@ public class PayPalCheckoutController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("执行扣款")
|
||||
@Operation(summary = "执行扣款")
|
||||
@PostMapping("/trade/capture/{orderNo}")
|
||||
public Response<com.paypal.orders.Order> captureOrder(@PathVariable String orderNo) throws IOException {
|
||||
Order response = payPalCheckoutService.captureOrder(orderNo);
|
||||
|
||||
@@ -9,8 +9,8 @@ import com.ai.da.model.vo.CommentVO;
|
||||
import com.ai.da.model.vo.PortfolioVO;
|
||||
import com.ai.da.service.PortfolioService;
|
||||
import com.ai.da.service.UserFollowService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@@ -19,7 +19,7 @@ import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@Api(tags = "Portfolio模块")
|
||||
@Tag(name = "Portfolio模块")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/portfolio")
|
||||
@@ -31,133 +31,133 @@ public class PortfolioController {
|
||||
@Resource
|
||||
private UserFollowService userFollowService;
|
||||
|
||||
@ApiOperation(value = "发布作品集")
|
||||
@Operation(summary = "发布作品集")
|
||||
@PostMapping("/publish")
|
||||
public Response<Long> publish(@RequestParam("file") MultipartFile canvas, @RequestParam("data") String data) {
|
||||
return Response.success(portfolioService.publish(canvas, data));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除作品集")
|
||||
@Operation(summary = "删除作品集")
|
||||
@GetMapping("/delete")
|
||||
public Response<Boolean> delete(@RequestParam("id") Long id) {
|
||||
return Response.success(portfolioService.delete(id));
|
||||
}
|
||||
|
||||
@CrossOrigin
|
||||
@ApiOperation(value = "作品集page")
|
||||
@Operation(summary = "作品集page")
|
||||
@PostMapping("/page")
|
||||
public Response<PageBaseResponse<PortfolioVO>> page(@Valid @RequestBody QueryPortfolioPageDTO query) {
|
||||
return Response.success(portfolioService.page(query));
|
||||
}
|
||||
|
||||
@CrossOrigin
|
||||
@ApiOperation(value = "作品详情")
|
||||
@Operation(summary = "作品详情")
|
||||
@PostMapping("/detail")
|
||||
public Response<PortfolioVO> detail(@Valid @RequestBody PortfolioDTO portfolioDTO) {
|
||||
return Response.success(portfolioService.detail(portfolioDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "选择作品")
|
||||
@Operation(summary = "选择作品")
|
||||
@PostMapping("/choose")
|
||||
public Response<ProjectChooseVO> choose(@Valid @RequestBody PortfolioDTO portfolioDTO) {
|
||||
return Response.success(portfolioService.choose(portfolioDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "更新作品")
|
||||
@Operation(summary = "更新作品")
|
||||
@PostMapping("/update")
|
||||
public Response<PortfolioVO> update(@Valid @RequestBody PortfolioDTO portfolioDTO) {
|
||||
return Response.success(portfolioService.update(portfolioDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "广场用户注册")
|
||||
@Operation(summary = "广场用户注册")
|
||||
@PostMapping("/designWorksRegister")
|
||||
public Response<Boolean> designWorksRegister(@Valid @RequestBody DesignWorksRegisterDTO designWorksRegisterDTO) {
|
||||
return Response.success(portfolioService.designWorksRegister(designWorksRegisterDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "喜欢")
|
||||
@Operation(summary = "喜欢")
|
||||
@GetMapping("/like")
|
||||
public Response<Boolean> like(@RequestParam("id") Long id) {
|
||||
return Response.success(portfolioService.like(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "不喜欢")
|
||||
@Operation(summary = "不喜欢")
|
||||
@GetMapping("/unlike")
|
||||
public Response<Boolean> unlike(@RequestParam("id") Long id) {
|
||||
return Response.success(portfolioService.unlike(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取点赞数")
|
||||
@Operation(summary = "获取点赞数")
|
||||
@GetMapping("/getLikeCount")
|
||||
public Response<Long> getLikeCount(@RequestParam("id") Long id) {
|
||||
return Response.success(portfolioService.getLikeCount(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "评论")
|
||||
@Operation(summary = "评论")
|
||||
@PostMapping("/comment")
|
||||
public Response<Boolean> comment(@Valid @RequestBody CommentDTO commentDTO) {
|
||||
return Response.success(portfolioService.comment(commentDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "评论列表")
|
||||
@Operation(summary = "评论列表")
|
||||
@PostMapping("/commentPage")
|
||||
public Response<PageBaseResponse<CommentVO>> commentPage(@Valid @RequestBody CommentPageDTO commentPageDTO) {
|
||||
return Response.success(portfolioService.commentPage(commentPageDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "增加浏览量")
|
||||
@Operation(summary = "增加浏览量")
|
||||
@GetMapping("/viewsIncrease")
|
||||
public Response<Boolean> viewsIncrease(@RequestParam("id") Long id) {
|
||||
return Response.success(portfolioService.viewsIncrease(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "浏览量获取")
|
||||
@Operation(summary = "浏览量获取")
|
||||
@GetMapping("/viewsGet")
|
||||
public Response<Long> viewsGet(@RequestParam("id") Long id) {
|
||||
return Response.success(portfolioService.viewsGet(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除评论")
|
||||
@Operation(summary = "删除评论")
|
||||
@PostMapping("/commentDelete")
|
||||
public Response<Boolean> commentDelete(@Valid @RequestBody CommentDTO commentDTO) {
|
||||
return Response.success(portfolioService.commentDelete(commentDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "关注")
|
||||
@Operation(summary = "关注")
|
||||
@GetMapping("/follow")
|
||||
public Response<String> follow(@RequestParam("followeeId") Long followeeId) {
|
||||
portfolioService.follow(followeeId);
|
||||
return Response.success(BusinessException.getMessageFromResource("subscription.success"));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "取消关注")
|
||||
@Operation(summary = "取消关注")
|
||||
@GetMapping("/cancelFollow")
|
||||
public Response<String> cancelFollow(@RequestParam("followeeId") Long followeeId) {
|
||||
portfolioService.cancelFollow(followeeId);
|
||||
return Response.success(BusinessException.getMessageFromResource("unsubscribe.success"));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取关注列表")
|
||||
@Operation(summary = "获取关注列表")
|
||||
@PostMapping("/getFolloweeList")
|
||||
public Response<List<AccountFollowVO>> getFolloweeList(@Valid @RequestBody GetFollowListDTO getFollowListDTO) {
|
||||
return Response.success(userFollowService.getFolloweeList(getFollowListDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取粉丝列表")
|
||||
@Operation(summary = "获取粉丝列表")
|
||||
@PostMapping("/getFollowerList")
|
||||
public Response<List<AccountFollowVO>> getFollowerList(@Valid @RequestBody GetFollowListDTO getFollowListDTO) {
|
||||
return Response.success(userFollowService.getFollowerList(getFollowListDTO));
|
||||
}
|
||||
|
||||
|
||||
/* @ApiOperation(value = "按标签名查询作品")
|
||||
/* @Operation(summary = "按标签名查询作品")
|
||||
@GetMapping("/queryPortfolioByTag")
|
||||
public Response<List<PortfolioVO>> queryPortfolioByTag(@RequestParam(value = "tagName", required = false) String tagName,
|
||||
@RequestParam(value = "tagId", required = false) Long tagId) {
|
||||
return Response.success(portfolioService.queryPortfolioByTag(tagName, tagId));
|
||||
}*/
|
||||
|
||||
@ApiOperation(value = "将企业或教育版中的作品发布到公共gallery")
|
||||
@Operation(summary = "将企业或教育版中的作品发布到公共gallery")
|
||||
@GetMapping("/toPublic")
|
||||
public Response<String> setPortfolioToPublic(@RequestParam("portfolioId") Long portfolioId) {
|
||||
portfolioService.setPortfolioToPublic(portfolioId);
|
||||
|
||||
@@ -4,8 +4,8 @@ package com.ai.da.controller;
|
||||
import com.ai.da.common.response.Response;
|
||||
import com.ai.da.mapper.primary.entity.Product;
|
||||
import com.ai.da.service.ProductService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -16,7 +16,7 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@CrossOrigin //开放前端的跨域访问
|
||||
@Api(tags = "商品管理")
|
||||
@Tag(name = "商品管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/product")
|
||||
public class ProductController {
|
||||
@@ -24,14 +24,14 @@ public class ProductController {
|
||||
@Resource
|
||||
private ProductService productService;
|
||||
|
||||
@ApiOperation("测试接口")
|
||||
@Operation(summary = "测试接口")
|
||||
@GetMapping("/test")
|
||||
public Response<String> test(){
|
||||
|
||||
return Response.success("now" + new Date());
|
||||
}
|
||||
|
||||
@ApiOperation("商品列表")
|
||||
@Operation(summary = "商品列表")
|
||||
@GetMapping("/list")
|
||||
public Response<List<Product>> list(){
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ import com.ai.da.service.UserLikeGroupService;
|
||||
import com.ai.da.service.WorkspaceService;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.minio.errors.MinioException;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -20,7 +20,7 @@ import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import java.io.IOException;
|
||||
|
||||
@Api(tags = "Project模块")
|
||||
@Tag(name = "Project模块")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/project")
|
||||
@@ -37,14 +37,14 @@ public class ProjectController {
|
||||
|
||||
@PostMapping("/saveOrUpdate")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@ApiOperation(value = "新增或编辑", notes = "传入project")
|
||||
@Operation(summary = "新增或编辑", description = "传入project")
|
||||
public Response<SaveOrUpdateProjectVO> saveOrUpdateProject(@Valid @RequestBody ProjectDTO projectDTO) {
|
||||
return Response.success(workspaceService.saveOrUpdateProject(projectDTO));
|
||||
}
|
||||
|
||||
@PostMapping("/page")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@ApiOperation(value = "分页查询", notes = "传入project")
|
||||
@Operation(summary = "分页查询", description = "传入project")
|
||||
public Response<PageBaseResponse<ProjectVO>> page(@Valid @RequestBody ProjectQueryDTO projectQueryDTO) {
|
||||
return Response.success(PageBaseResponse.success(userLikeGroupService.getPage(projectQueryDTO)));
|
||||
}
|
||||
@@ -58,21 +58,21 @@ public class ProjectController {
|
||||
//
|
||||
@PostMapping("/choose")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@ApiOperation(value = "选择", notes = "传入project")
|
||||
@Operation(summary = "选择", description = "传入project")
|
||||
public Response<ProjectChooseVO> choose(@Valid @RequestBody ProjectDTO projectDTO) {
|
||||
return Response.success(userLikeGroupService.choose(projectDTO));
|
||||
}
|
||||
|
||||
@PostMapping("/getModuleContent")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@ApiOperation(value = "获取模块内容", notes = "传入project")
|
||||
@Operation(summary = "获取模块内容", description = "传入project")
|
||||
public Response<ModuleChooseVO> getModuleContent(@Valid @RequestBody ProjectDTO projectDTO) {
|
||||
return Response.success(userLikeGroupService.getModuleContent(projectDTO));
|
||||
}
|
||||
|
||||
@PostMapping("/saveModuleContent")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@ApiOperation(value = "存储模块内容", notes = "传入project")
|
||||
@Operation(summary = "存储模块内容", description = "传入project")
|
||||
public Response<ModuleChooseVO> saveModuleContent(@Valid @RequestBody ModuleSaveDTO moduleSaveDTO) {
|
||||
return Response.success(userLikeGroupService.saveModuleContent(moduleSaveDTO));
|
||||
}
|
||||
@@ -86,50 +86,49 @@ public class ProjectController {
|
||||
|
||||
@PostMapping("/getMannequinDetail")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@ApiOperation(value = "获取模特详情", notes = "传入mannequinId")
|
||||
@Operation(summary = "获取模特详情", description = "传入mannequinId")
|
||||
public Response<QueryLibraryPageVO> getMannequinDetail(@Valid @RequestBody MannequinDTO mannequinDTO) {
|
||||
return Response.success(userLikeGroupService.getMannequinDetail(mannequinDTO));
|
||||
}
|
||||
|
||||
@PostMapping("/threeDPage")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@ApiOperation(value = "获取3Dpage", notes = "传入ThreeDLayoutQueryDTO")
|
||||
@Operation(summary = "获取3Dpage", description = "传入ThreeDLayoutQueryDTO")
|
||||
public Response<PageBaseResponse<ThreeDLayoutVO>> threeDPage(@Valid @RequestBody ThreeDLayoutQueryDTO threeDLayoutQueryDTO) {
|
||||
return Response.success(PageBaseResponse.success(userLikeGroupService.getThreeDLayoutPage(threeDLayoutQueryDTO)));
|
||||
}
|
||||
|
||||
@PostMapping("/getLayoutDetail")
|
||||
@ApiOperationSupport(order = 9)
|
||||
@ApiOperation(value = "获取3D详情", notes = "传入project")
|
||||
@Operation(summary = "获取3D详情", description = "传入project")
|
||||
public Response<ThreeDVO> getLayoutDetail(@RequestParam(value = "threeDSimpleId") Long threeDSimpleId) {
|
||||
return Response.success(userLikeGroupService.getLayoutDetail(threeDSimpleId));
|
||||
}
|
||||
|
||||
@PostMapping("/getThreeDSize")
|
||||
|
||||
@ApiOperationSupport(order = 10)
|
||||
@ApiOperation(value = "获取尺码", notes = "传入project")
|
||||
@Operation(summary = "获取尺码", description = "传入project")
|
||||
public Response<ThreeDSizeVO> getThreeDSize(@RequestParam(value = "threeDSimpleId") Long threeDSimpleId) {
|
||||
return Response.success(userLikeGroupService.getThreeDSize(threeDSimpleId));
|
||||
}
|
||||
|
||||
@GetMapping("/getThreeDGlb")
|
||||
@ApiOperationSupport(order = 11)
|
||||
@ApiOperation(value = "获取GLB", notes = "传入project")
|
||||
@Operation(summary = "获取GLB", description = "传入project")
|
||||
public void getThreeDGlb(@RequestParam(value = "threeDSimpleId") Long threeDSimpleId, HttpServletResponse response) throws MinioException, IOException {
|
||||
userLikeGroupService.getThreeDGlb(threeDSimpleId, response);
|
||||
}
|
||||
|
||||
@GetMapping("/downloadZip")
|
||||
@ApiOperationSupport(order = 11)
|
||||
@ApiOperation(value = "下载", notes = "传入project")
|
||||
@Operation(summary = "下载", description = "传入project")
|
||||
public Response<String> downloadZip(@RequestParam(value = "threeDSimpleId") Long threeDSimpleId, @RequestParam(value = "sizeType") String sizeType, @RequestParam(value = "size") String size, HttpServletResponse response) throws MinioException, IOException {
|
||||
return Response.success(userLikeGroupService.downloadZip(threeDSimpleId, sizeType, size, response));
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@ApiOperationSupport(order = 12)
|
||||
@ApiOperation(value = "删除", notes = "传入project")
|
||||
@Operation(summary = "删除", description = "传入project")
|
||||
public Response<Boolean> delete(@RequestParam("projectId") Long projectId) {
|
||||
return Response.success(userLikeGroupService.delete(projectId));
|
||||
}
|
||||
|
||||
@@ -16,9 +16,9 @@ import com.ai.da.service.ChatRobotService;
|
||||
import com.ai.da.service.LibraryService;
|
||||
import com.ai.da.service.SuperResolutionService;
|
||||
import com.ai.da.service.SysFileService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@@ -31,7 +31,7 @@ import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@Api(tags = "python对接模块")
|
||||
@Tag(name = "python对接模块")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/python")
|
||||
@@ -49,17 +49,17 @@ public class PythonController {
|
||||
@Resource
|
||||
private SuperResolutionService superResolutionService;
|
||||
|
||||
@ApiOperation(value = "python服务保存图片到java服务")
|
||||
@Operation(summary = "python服务保存图片到java服务")
|
||||
@PostMapping("/saveGeneratePicture")
|
||||
public Response<String> upload(@RequestParam("file") MultipartFile file,
|
||||
@ApiParam("操作类型 generatePrint ->生成印花 " +
|
||||
@Parameter(description = "操作类型 generatePrint ->生成印花 " +
|
||||
"designCollection ->设计collection generateAdvancedDesign ->生成高级design" +
|
||||
"generateSketch -> 生成草图")
|
||||
@RequestParam(value = "operateType") String operateType) {
|
||||
return Response.success(pythonService.upload(file, operateType));
|
||||
}
|
||||
|
||||
// @ApiOperation(value = "python服务保存多张图片到java服务")
|
||||
// @Operation(summary = "python服务保存多张图片到java服务")
|
||||
// @PostMapping("/saveMultiGeneratePicture")
|
||||
// public Response<List<String>> uploadMultiple(@RequestParam("files") MultipartFile[] files,
|
||||
// @ApiParam("操作类型 generatePrint ->生成印花 " +
|
||||
@@ -69,13 +69,13 @@ public class PythonController {
|
||||
// return Response.success(pythonService.upload(files, operateType));
|
||||
// }
|
||||
|
||||
@ApiOperation(value = "通过文件类型获取系统文件")
|
||||
@Operation(summary = "通过文件类型获取系统文件")
|
||||
@GetMapping("/getSysFileByLevel2Type")
|
||||
public Response<List<SysFileVO>> getSysFileByLevel2Type(/*@RequestParam(value = "level2Type",required = false) String level2Type*/) {
|
||||
return Response.success(sysFileService.getByLevel2Type("All"));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "通过用户id获取library")
|
||||
@Operation(summary = "通过用户id获取library")
|
||||
@GetMapping("/getLibraryByUserId")
|
||||
public Response<Map<String, List<String>>> getLibraryByUserId(@RequestParam(value = "userId") Long userId) {
|
||||
List<PythonLibraryVo> response = CopyUtil.copyList(libraryService.selectByAccountIdAnd1TypeList(userId,
|
||||
@@ -86,34 +86,34 @@ public class PythonController {
|
||||
}
|
||||
|
||||
@CrossOrigin
|
||||
@ApiOperation(value = "发送用户输入消息")
|
||||
@Operation(summary = "发送用户输入消息")
|
||||
@PostMapping("/chatStream")
|
||||
public Response<ChatRobotVO> MessageToPythonChatStream(@RequestBody ChatSendDTO chatSendDTO) {
|
||||
log.info(chatSendDTO.toString());
|
||||
return Response.success(chatRobotService.sendMessageToChatRobot(chatSendDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "血条")
|
||||
@Operation(summary = "血条")
|
||||
@GetMapping("/getBloodBars")
|
||||
public Response<BigDecimal> getBloodBars(@RequestParam(value = "userId") Long userId) {
|
||||
return Response.success(chatRobotService.getBloodBars(userId));
|
||||
}
|
||||
|
||||
@CrossOrigin
|
||||
@ApiOperation(value = "likeOrUnlike")
|
||||
@Operation(summary = "likeOrUnlike")
|
||||
@PostMapping("/pictureLikeOrUnLike")
|
||||
public Response<Library> pictureLikeOrUnLike(@RequestBody ChatRobotLibraryDTO chatRobotLibraryDTO) {
|
||||
return Response.success(chatRobotService.pictureLikeOrUnLike(chatRobotLibraryDTO));
|
||||
}
|
||||
|
||||
@CrossOrigin
|
||||
@ApiOperation(value = "刷新会话缓存")
|
||||
@Operation(summary = "刷新会话缓存")
|
||||
@PostMapping("/flush")
|
||||
public Response<String> ChatBufferFlush(@RequestBody ChatFlushDTO chatFlushDTO) {
|
||||
return Response.success(chatRobotService.chatBufferFlush(chatFlushDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "超分辨率")
|
||||
@Operation(summary = "超分辨率")
|
||||
@PostMapping("/prepareForSR")
|
||||
public Response<List<String>> superResolution(@RequestBody List<SuperResolutionDTO> superResolutionDTO) {
|
||||
return Response.success(superResolutionService.prepareForSR(superResolutionDTO));
|
||||
|
||||
@@ -17,9 +17,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.google.common.base.Function;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
@@ -35,7 +36,7 @@ import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@Api(tags = "History模块(saved Collection)")
|
||||
@Tag(name = "History模块(saved Collection)")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@Validated
|
||||
@@ -56,7 +57,7 @@ public class SavedCollectionController {
|
||||
@Resource
|
||||
private PortfolioService portfolioService;
|
||||
|
||||
@ApiOperation(value = "History用户分页分组列表")
|
||||
@Operation(summary = "History用户分页分组列表")
|
||||
@PostMapping("/queryUserGroup")
|
||||
public Response<PageBaseResponse<UserLikeGroupVO>> queryUserGroup(@Valid @RequestBody QueryHistoryPageDTO query) {
|
||||
AuthPrincipalVo authPrincipalVo = UserContext.getUserHolder();
|
||||
@@ -147,21 +148,21 @@ public class SavedCollectionController {
|
||||
return Response.success(PageBaseResponse.success(convert));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "History用户分组详情,目前弃用 ")
|
||||
@Operation(summary = "History用户分组详情,目前弃用 ")
|
||||
@GetMapping("/getUserGroupDetail")
|
||||
public Response<List<UserLikeVO>> getUserGroupDetail(
|
||||
@ApiParam("用户分组id") @RequestParam("userGroupId") Long userGroupId) {
|
||||
@Parameter(description = "用户分组id") @RequestParam("userGroupId") Long userGroupId) {
|
||||
return Response.success(userLikeService.getGroupDetail(userGroupId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "History修改用户分组名")
|
||||
@Operation(summary = "History修改用户分组名")
|
||||
@PostMapping("/updateUserGroupName")
|
||||
public Response<HistoryUpdateVO> updateUserGroupName(@Valid @RequestBody HistoryUpdateDTO historyUpdateDTO) {
|
||||
return Response.success(userLikeGroupService.updateUserGroupName(historyUpdateDTO.getUserGroupId()
|
||||
, historyUpdateDTO.getUserGroupName(), historyUpdateDTO.getTimeZone()));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "History删除用户分组")
|
||||
@Operation(summary = "History删除用户分组")
|
||||
@PostMapping("/deleteUserGroup")
|
||||
public Response<Boolean> deleteUserGroup(@Valid @RequestBody HistoryDeleteDTO deleteDTO) {
|
||||
userLikeGroupService.deleteUserGroup(deleteDTO.getUserGroupId());
|
||||
@@ -169,106 +170,106 @@ public class SavedCollectionController {
|
||||
return Response.success(Boolean.TRUE);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "History choose")
|
||||
@Operation(summary = "History choose")
|
||||
@GetMapping("/choose")
|
||||
public Response<UserLikeChooseVO> choose(
|
||||
@ApiParam("用户分组id") @RequestParam("userGroupId") Long userGroupId) {
|
||||
@Parameter(description = "用户分组id") @RequestParam("userGroupId") Long userGroupId) {
|
||||
return Response.success(userLikeGroupService.choose(userGroupId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "exportSave")
|
||||
@Operation(summary = "exportSave")
|
||||
@PostMapping("/exportSave")
|
||||
public Response<Long> exportSave(@RequestParam("file") MultipartFile file, @RequestParam(value = "projectId", required = false) Long projectId,
|
||||
@RequestParam("module") String module, @RequestParam(value = "designItemDetailId", required = false) Long designItemDetailId) {
|
||||
return Response.success(userLikeGroupService.exportSave(file, projectId, module, designItemDetailId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "exportSearch")
|
||||
@Operation(summary = "exportSearch")
|
||||
@PostMapping("/exportSearch")
|
||||
public Response<JSONObject> exportSearch(@Valid @RequestBody ExportSearchDTO exportSearchDTO) {
|
||||
return Response.success(userLikeGroupService.exportSearch(exportSearchDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "toProduct")
|
||||
@Operation(summary = "toProduct")
|
||||
@PostMapping("/toProduct")
|
||||
public Response<List<ToProductImageResultVO>> toProduct(@Valid @RequestBody ToProductImageDTO toProductImageDTO) {
|
||||
return Response.success(userLikeGroupService.toProduct(toProductImageDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "toProductImageElementUpload")
|
||||
@Operation(summary = "toProductImageElementUpload")
|
||||
@PostMapping("/toProductImageElementUpload")
|
||||
public Response<ToProductElementVO> toProductImageElementUpload(@RequestParam("file") MultipartFile file,
|
||||
@RequestParam(value = "projectId", required = false) Long projectId,
|
||||
@ApiParam(value = "首尾帧", example = "first",
|
||||
allowableValues = "first,last")
|
||||
@Parameter(description = "首尾帧", example = "first",
|
||||
schema = @Schema(allowableValues = {"first", "last"}))
|
||||
@RequestParam(value = "type", required = false) String type) {
|
||||
return Response.success(userLikeGroupService.toProductImageElementUpload(file, projectId, type));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "toProductImageElementDelete")
|
||||
@Operation(summary = "toProductImageElementDelete")
|
||||
@PostMapping("/toProductImageElementDelete")
|
||||
public Response<Boolean> toProductImageElementDelete(@RequestParam(value = "id") Long id) {
|
||||
return Response.success(userLikeGroupService.toProductImageElementDelete(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "productImageLike")
|
||||
@Operation(summary = "productImageLike")
|
||||
@PostMapping("/productImageLike")
|
||||
public Response<CollectionSort> productImageLike(@Valid @RequestBody ProductImageLikeDTO productImageLikeDTO) {
|
||||
CollectionSort collectionSort = userLikeGroupService.productImageLike(productImageLikeDTO);
|
||||
return Response.success(collectionSort);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "collectionLikeUpdate")
|
||||
@Operation(summary = "collectionLikeUpdate")
|
||||
@PostMapping("/collectionLikeUpdate")
|
||||
public Response<Boolean> collectionLikeUpdate(@Valid @RequestBody CollectionLikeUpdateDTO collectionLikeUpdateDTO) {
|
||||
return Response.success(userLikeGroupService.collectionLikeUpdate(collectionLikeUpdateDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "productImageUnLike")
|
||||
@Operation(summary = "productImageUnLike")
|
||||
@PostMapping("/productImageUnLike")
|
||||
public Response<Boolean> productImageUnLike(@Valid @RequestBody ProductImageLikeDTO productImageLikeDTO) {
|
||||
return Response.success(userLikeGroupService.productImageUnLike(productImageLikeDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取生成结果")
|
||||
@Operation(summary = "获取生成结果")
|
||||
@PostMapping("/toProductImageResult")
|
||||
public Response<List<MagicToolResultVO>> getToProductImageResult(@Valid @RequestBody List<String> taskIdList) {
|
||||
List<MagicToolResultVO> magicToolResultVOList = userLikeGroupService.getToProductImageResultList(taskIdList);
|
||||
return Response.success(magicToolResultVOList);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "画布用户上传元素")
|
||||
@Operation(summary = "画布用户上传元素")
|
||||
@PostMapping("/canvasElementUpload")
|
||||
public Response<CanvasElementUpload> canvasElementUpload(@RequestParam("file") MultipartFile file) {
|
||||
return Response.success(userLikeGroupService.canvasElementUpload(file));
|
||||
}
|
||||
|
||||
@ApiOperation("productImageLikeList")
|
||||
@Operation(summary = "productImageLikeList")
|
||||
@PostMapping("/productImageLikeList")
|
||||
public Response<List<ToProductImageResultVO>> productImageLikeList(@Valid @RequestBody ToProductImageDTO toProductImageDTO) {
|
||||
return Response.success(userLikeGroupService.productImageLikeList(toProductImageDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "relight")
|
||||
@Operation(summary = "relight")
|
||||
@PostMapping("/relight")
|
||||
public Response<List<ToProductImageResultVO>> relight(@Valid @RequestBody ToProductImageDTO toProductImageDTO) {
|
||||
return Response.success(userLikeGroupService.relight(toProductImageDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "转relight元素")
|
||||
@Operation(summary = "转relight元素")
|
||||
@PostMapping("/convertRelightElement")
|
||||
public Response<ToProductElementVO> convertRelightElement(@RequestParam("id") Long id) {
|
||||
return Response.success(userLikeGroupService.convertRelightElement(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取relight结果")
|
||||
@Operation(summary = "获取relight结果")
|
||||
@PostMapping("/relightResult")
|
||||
public Response<List<MagicToolResultVO>> getRelightResult(@Valid @RequestBody List<String> taskIdList) {
|
||||
List<MagicToolResultVO> magicToolResultVOList = userLikeGroupService.getRelightResult(taskIdList);
|
||||
return Response.success(magicToolResultVOList);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除toProduct Relight的结果")
|
||||
@Operation(summary = "删除toProduct Relight的结果")
|
||||
@GetMapping("/deleteResult")
|
||||
public Response<String> deleteResult(@RequestParam("id") Long id,
|
||||
@RequestParam("projectId") Long projectId,
|
||||
@@ -281,61 +282,61 @@ public class SavedCollectionController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "likeHistoryRelSketch")
|
||||
@Operation(summary = "likeHistoryRelSketch")
|
||||
@PostMapping("/likeHistoryRelSketch")
|
||||
public Response<String> likeHistoryRelSketch() {
|
||||
return Response.success(userLikeGroupService.likeHistoryRelSketch());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "download")
|
||||
@Operation(summary = "download")
|
||||
@PostMapping("/download")
|
||||
public Response<String> download() {
|
||||
return Response.success(userLikeGroupService.download());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "productImageInitialize")
|
||||
@Operation(summary = "productImageInitialize")
|
||||
@PostMapping("/productImageInitialize")
|
||||
public Response<Boolean> productImageUpload(@Valid @RequestBody ProductImageInitializeDTO productImageInitializeDTO) {
|
||||
return Response.success(userLikeGroupService.productImageInitialize(productImageInitializeDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "getInitializeProgress")
|
||||
@Operation(summary = "getInitializeProgress")
|
||||
@PostMapping("/getInitializeProgress")
|
||||
public Response<InitializeProgressVO> getInitializeProgress(@Valid @RequestBody ProductImageInitializeDTO productImageInitializeDTO) {
|
||||
return Response.success(userLikeGroupService.getInitializeProgress(productImageInitializeDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "brandDNASaveOrUpdate")
|
||||
@Operation(summary = "brandDNASaveOrUpdate")
|
||||
@PostMapping("/brandDNASaveOrUpdate")
|
||||
public Response<Boolean> brandDNASaveOrUpdate(@Valid @RequestBody BrandDNADTO brandDNADTO) {
|
||||
return Response.success(userLikeGroupService.brandDNASaveOrUpdate(brandDNADTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "brandDNADelete")
|
||||
@Operation(summary = "brandDNADelete")
|
||||
@PostMapping("/brandDNADelete")
|
||||
public Response<Boolean> brandDNADelete(@Valid @RequestBody BrandDNADTO brandDNADTO) {
|
||||
return Response.success(userLikeGroupService.brandDNADelete(brandDNADTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "brandDNAPage")
|
||||
@Operation(summary = "brandDNAPage")
|
||||
@PostMapping("/brandDNAPage")
|
||||
public Response<PageBaseResponse<BrandDNAVO>> brandDNAPage(@Valid @RequestBody BrandDNAQueryDTO brandDNAQueryDTO) {
|
||||
return Response.success(userLikeGroupService.brandDNAPage(brandDNAQueryDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "brandLogoUpload")
|
||||
@Operation(summary = "brandLogoUpload")
|
||||
@PostMapping("/brandLogoUpload")
|
||||
public Response<BrandLogoUploadVO> brandDNASaveOrUpdate(@RequestParam("file") MultipartFile file) {
|
||||
return Response.success(userLikeGroupService.brandLogoUpload(file));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "brandDNAUpload")
|
||||
@Operation(summary = "brandDNAUpload")
|
||||
@PostMapping("/brandDNAUpload")
|
||||
public Response<LibraryUpdateVo> brandDNAUpload(@RequestParam("file") MultipartFile file, @RequestParam("brandId") Long brandId) throws IOException {
|
||||
return Response.success(userLikeGroupService.brandDNAUpload(file, brandId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "brandDNAGenerate")
|
||||
@Operation(summary = "brandDNAGenerate")
|
||||
@PostMapping("/brandDNAGenerate")
|
||||
public Response<BrandDNAGenerateVO> brandDNAGenerate(@RequestParam("prompt") String prompt) {
|
||||
return Response.success(userLikeGroupService.brandDNAGenerate(prompt));
|
||||
|
||||
@@ -14,8 +14,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.paypal.http.HttpResponse;
|
||||
import com.paypal.payments.Refund;
|
||||
import com.stripe.exception.StripeException;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -29,7 +29,7 @@ import java.io.IOException;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Api(tags = "Stripe模块")
|
||||
@Tag(name = "Stripe模块")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/stripe")
|
||||
@@ -41,7 +41,7 @@ public class StripeController {
|
||||
@Resource
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
@ApiOperation("创建支付链接")
|
||||
@Operation(summary = "创建支付链接")
|
||||
@PostMapping("/createOrder")
|
||||
public Response<String> pay(@Valid @RequestBody ProductPurchaseDTO productPurchaseDTO, HttpServletRequest request) {
|
||||
return Response.success(stripeService.pay(productPurchaseDTO, request));
|
||||
@@ -50,7 +50,7 @@ public class StripeController {
|
||||
@Value("${stripe.webhook.fail.reminder}")
|
||||
private String webhookReminderFlag;
|
||||
|
||||
@ApiOperation("支付通知")
|
||||
@Operation(summary = "支付通知")
|
||||
@PostMapping("/trade/notify")
|
||||
public void callback(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
try{
|
||||
@@ -76,7 +76,7 @@ public class StripeController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("申请退款")
|
||||
@Operation(summary = "申请退款")
|
||||
@GetMapping("/trade/refund/{orderNo}/{reason}")
|
||||
public Response<HttpResponse<Refund>> refund(@PathVariable String orderNo, @PathVariable String reason) throws IOException {
|
||||
String response = stripeService.refund(null,orderNo,reason);
|
||||
@@ -87,7 +87,7 @@ public class StripeController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("获取订阅")
|
||||
@Operation(summary = "获取订阅")
|
||||
@GetMapping("/getSubscription")
|
||||
public Response<List<String>> getSubscription(@RequestParam String name, @RequestParam String email) {
|
||||
try {
|
||||
@@ -97,44 +97,44 @@ public class StripeController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("取消订阅")
|
||||
@Operation(summary = "取消订阅")
|
||||
@GetMapping("/cancelSubscription")
|
||||
public Response<String> cancelSubscription(@RequestParam String subscriptionId, @RequestParam(required = false) String reason) {
|
||||
stripeService.cancelSubscription(subscriptionId, reason);
|
||||
return Response.success("success");
|
||||
}
|
||||
|
||||
@ApiOperation("创建推广码")
|
||||
@Operation(summary = "创建推广码")
|
||||
@PostMapping("/createCoupon")
|
||||
public Response<String> createCoupon(@Valid @RequestBody CreateCouponDTO createCouponDTO){
|
||||
return Response.success(stripeService.createCoupon(createCouponDTO));
|
||||
}
|
||||
|
||||
@ApiOperation("检查推广码")
|
||||
@Operation(summary = "检查推广码")
|
||||
@GetMapping("/checkCoupon")
|
||||
public Response<CheckCouponsVO> checkCoupon(@RequestParam String promotionCode, @RequestParam Long price){
|
||||
return Response.success(stripeService.checkProductCoupon(promotionCode, price));
|
||||
}
|
||||
|
||||
@ApiOperation("获取所有推广码")
|
||||
@Operation(summary = "获取所有推广码")
|
||||
@PostMapping("/getAllCoupons")
|
||||
public Response<IPage<ProductCoupons>> getAllCoupons(@RequestBody QueryCouponsPageDTO queryCouponsPageDTO){
|
||||
return Response.success(stripeService.getAllCoupons(queryCouponsPageDTO));
|
||||
}
|
||||
|
||||
@ApiOperation("检索优惠券")
|
||||
@Operation(summary = "检索优惠券")
|
||||
@GetMapping("/retrieveCoupon")
|
||||
public Response<String> retrieveCoupon(@RequestParam String couponId){
|
||||
return Response.success(stripeService.retrieveCoupon(couponId));
|
||||
}
|
||||
|
||||
@ApiOperation("检索推广码")
|
||||
@Operation(summary = "检索推广码")
|
||||
@GetMapping("/retrievePromotionCode")
|
||||
public Response<String> retrievePromotionCode(@RequestParam String retrievePromotionCode){
|
||||
return Response.success(stripeService.retrievePromotionCode(retrievePromotionCode));
|
||||
}
|
||||
|
||||
@ApiOperation("更新推广码信息")
|
||||
@Operation(summary = "更新推广码信息")
|
||||
@GetMapping("/updatePromCodeInfo")
|
||||
public Response<ProductCoupons> updateCouponsInfo(@RequestParam Long id, @RequestParam(required = false) String paidCommission,
|
||||
@RequestParam(required = false) String cooperator,
|
||||
@@ -143,7 +143,7 @@ public class StripeController {
|
||||
return Response.success(stripeService.updateCouponsInfo(id, paidCommission, cooperator, remark, startTime));
|
||||
}
|
||||
|
||||
@ApiOperation("删除推广码")
|
||||
@Operation(summary = "删除推广码")
|
||||
@GetMapping("/deletePromCode")
|
||||
public Response<String> deleteCoupon(@RequestParam Long id){
|
||||
stripeService.deleteCoupon(id);
|
||||
@@ -157,31 +157,31 @@ public class StripeController {
|
||||
return Response.success("success");
|
||||
}
|
||||
|
||||
@ApiOperation("创建订阅 临时")
|
||||
@Operation(summary = "创建订阅 临时")
|
||||
@GetMapping("/createSubscriptionTemp")
|
||||
public Response<String> createSubscriptionTemp(@RequestParam String name, @RequestParam String email) {
|
||||
return Response.success(stripeService.createSubscriptionTemp(name, email));
|
||||
}
|
||||
|
||||
@ApiOperation("修改用户默认支付方式 临时")
|
||||
@Operation(summary = "修改用户默认支付方式 临时")
|
||||
@GetMapping("/changeCustomerPayment")
|
||||
public Response<String> changeCustomerPayment(@RequestParam String name, @RequestParam String email) {
|
||||
return Response.success(stripeService.changeCustomerPayment(name, email));
|
||||
}
|
||||
|
||||
@ApiOperation("临时 发送续订失败邮件")
|
||||
@Operation(summary = "临时 发送续订失败邮件")
|
||||
@GetMapping("/sendRenewalFailEmail")
|
||||
public Response<Boolean> sendRenewalFailEmail(@RequestParam String invoiceId, @RequestParam String subscriptionId, @RequestParam String orderNo) {
|
||||
return Response.success(stripeService.sendRenewalFailEmail(invoiceId, subscriptionId,orderNo));
|
||||
}
|
||||
|
||||
@ApiOperation("临时 查询指定用户绑定的付款方式")
|
||||
@Operation(summary = "临时 查询指定用户绑定的付款方式")
|
||||
@GetMapping("/getCustomerPaymentMethod")
|
||||
public Response<List<Map<String,String>>> getCustomerPaymentMethod(@RequestParam String name, @RequestParam String email) {
|
||||
return Response.success(stripeService.getCustomerPaymentMethod(name, email));
|
||||
}
|
||||
|
||||
@ApiOperation("临时 解绑指定用户绑定的所有付款方式")
|
||||
@Operation(summary = "临时 解绑指定用户绑定的所有付款方式")
|
||||
@GetMapping("/detachCustomerAllPaymentMethod")
|
||||
public Response<String> detachCustomerAllPaymentMethod(@RequestParam String name, @RequestParam String email) {
|
||||
return Response.success(stripeService.detachCustomerAllPaymentMethod(name, email));
|
||||
|
||||
@@ -6,8 +6,8 @@ import com.ai.da.mapper.primary.entity.Product;
|
||||
import com.ai.da.mapper.primary.entity.Tags;
|
||||
import com.ai.da.service.ProductService;
|
||||
import com.ai.da.service.TagsService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
@@ -15,7 +15,7 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@CrossOrigin //开放前端的跨域访问
|
||||
@Api(tags = "标签管理")
|
||||
@Tag(name = "标签管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/tags")
|
||||
public class TagsController {
|
||||
@@ -23,7 +23,7 @@ public class TagsController {
|
||||
@Resource
|
||||
private TagsService tagsService;
|
||||
|
||||
@ApiOperation("获取标签")
|
||||
@Operation(summary = "获取标签")
|
||||
@GetMapping("/getTags")
|
||||
public Response<List<Tags>> getTags(@RequestParam(value = "userInput", required = false) String userInput) {
|
||||
return Response.success(tagsService.getTags(userInput));
|
||||
|
||||
@@ -7,8 +7,8 @@ import com.ai.da.model.dto.SuperResolutionDTO;
|
||||
import com.ai.da.model.dto.TaskDTO;
|
||||
import com.ai.da.model.vo.TaskVO;
|
||||
import com.ai.da.service.TaskListService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -16,7 +16,7 @@ import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@Api(tags = "任务列表模块")
|
||||
@Tag(name = "任务列表模块")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/tasks")
|
||||
@@ -26,13 +26,13 @@ public class TaskListController {
|
||||
private TaskListService taskListService;
|
||||
|
||||
@PostMapping("/getList")
|
||||
@ApiOperation("获取未执行完的任务")
|
||||
@Operation(summary = "获取未执行完的任务")
|
||||
public Response<List<TaskDTO<SuperResolutionDTO>>> getTaskList(@Valid @RequestBody List<String> taskIdList) {
|
||||
return Response.success(taskListService.getExecTask(taskIdList));
|
||||
}
|
||||
|
||||
@PostMapping("/getAllTask")
|
||||
@ApiOperation("获取所有任务")
|
||||
@Operation(summary = "获取所有任务")
|
||||
public Response<PageBaseResponse<TaskVO>> getAllTask(@Valid @RequestBody QueryTaskHistoryDTO queryTaskHistoryDTO) {
|
||||
return Response.success(taskListService.getAllTask(queryTaskHistoryDTO));
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@ import com.ai.da.model.vo.DesignCollectionVO;
|
||||
import com.ai.da.service.AccountService;
|
||||
import com.ai.da.service.DesignService;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
||||
@@ -25,7 +25,7 @@ import jakarta.validation.Valid;
|
||||
import java.security.cert.X509Certificate;
|
||||
|
||||
|
||||
@Api(tags = "Third Party Modules")
|
||||
@Tag(name = "Third Party Modules")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/third/party")
|
||||
@@ -46,35 +46,35 @@ public class ThirdPartyController {
|
||||
return Response.success(accountService.addUser(accountAddDTO));
|
||||
}*/
|
||||
|
||||
@ApiOperation(value = "Edit user information")
|
||||
@Operation(summary = "Edit user information")
|
||||
@PostMapping("/editUser")
|
||||
public Response<Boolean> editUser(@RequestBody AccountEditDTO accountEditDTO) {
|
||||
return Response.success(accountService.editUser(accountEditDTO));
|
||||
}
|
||||
|
||||
@CrossOrigin
|
||||
@ApiOperation(value = "Add user information")
|
||||
@Operation(summary = "Add user information")
|
||||
@PostMapping("/addTrialUser")
|
||||
public Response<Boolean> addTrialUser(@RequestBody AccountTrialDTO accountTrialDTO, HttpServletRequest request) {
|
||||
return Response.success(accountService.addTrialUser(accountTrialDTO, request));
|
||||
}
|
||||
|
||||
@CrossOrigin
|
||||
@ApiOperation(value = "add No Login Required")
|
||||
@Operation(summary = "add No Login Required")
|
||||
@PostMapping("/addNoLoginRequired")
|
||||
public Response<Boolean> addNoLoginRequired(@RequestBody NoLoginRequiredDTO noLoginRequiredDTO) {
|
||||
return Response.success(accountService.addNoLoginRequired(noLoginRequiredDTO));
|
||||
}
|
||||
|
||||
@CrossOrigin
|
||||
@ApiOperation(value = "add No Login Required")
|
||||
@Operation(summary = "add No Login Required")
|
||||
@PostMapping("/deleteNoLoginRequired")
|
||||
public Response<Boolean> deleteNoLoginRequired(@RequestBody NoLoginRequiredDTO noLoginRequiredDTO) {
|
||||
return Response.success(accountService.deleteNoLoginRequired(noLoginRequiredDTO));
|
||||
}
|
||||
|
||||
@CrossOrigin
|
||||
@ApiOperation(value = "add No Login Required")
|
||||
@Operation(summary = "add No Login Required")
|
||||
@PostMapping("/existNoLoginRequired")
|
||||
public Response<Boolean> existNoLoginRequired(@RequestBody NoLoginRequiredDTO noLoginRequiredDTO, HttpServletRequest request) {
|
||||
return Response.success(accountService.existNoLoginRequired(noLoginRequiredDTO, request));
|
||||
@@ -99,14 +99,14 @@ public class ThirdPartyController {
|
||||
}
|
||||
|
||||
@CrossOrigin
|
||||
@ApiOperation(value = "add No Login Required")
|
||||
@Operation(summary = "add No Login Required")
|
||||
@PostMapping("/addNoLoginRequiredNew")
|
||||
public Response<String> addNoLoginRequiredNew(@RequestBody NoLoginRequiredDTO noLoginRequiredDTO, HttpServletRequest request) {
|
||||
return Response.success(accountService.addNoLoginRequiredNew(noLoginRequiredDTO, request));
|
||||
}
|
||||
|
||||
@CrossOrigin
|
||||
@ApiOperation(value = "add No Login Required")
|
||||
@Operation(summary = "add No Login Required")
|
||||
@PostMapping("/deleteNoLoginRequiredNew")
|
||||
public Response<Boolean> deleteNoLoginRequiredNew(@RequestBody NoLoginRequiredDTO noLoginRequiredDTO, HttpServletRequest request) {
|
||||
return Response.success(accountService.deleteNoLoginRequiredNew(noLoginRequiredDTO, request));
|
||||
@@ -115,14 +115,14 @@ public class ThirdPartyController {
|
||||
@Value("${redirect_url}")
|
||||
private String REDIRECT_URL;
|
||||
@CrossOrigin
|
||||
@ApiOperation(value = "add No Login Required")
|
||||
@Operation(summary = "add No Login Required")
|
||||
@PostMapping("/getRedirectUrl")
|
||||
public Response<String> getRedirectUrl() {
|
||||
return Response.success(REDIRECT_URL);
|
||||
}
|
||||
|
||||
@CrossOrigin
|
||||
@ApiOperation(value = "updateNoLoginRequiredNew")
|
||||
@Operation(summary = "updateNoLoginRequiredNew")
|
||||
@PostMapping("/updateNoLoginRequiredNew")
|
||||
public Response<String> updateNoLoginRequiredNew(@RequestBody NoLoginRequiredDTO noLoginRequiredDTO, HttpServletRequest request) {
|
||||
return Response.success(accountService.updateNoLoginRequiredNew(noLoginRequiredDTO, request));
|
||||
@@ -145,21 +145,21 @@ public class ThirdPartyController {
|
||||
return Response.success(accountService.parseWeChatCode(code, type));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "接收Design结果")
|
||||
@Operation(summary = "接收Design结果")
|
||||
@PostMapping("/receiveDesignResults")
|
||||
@CrossOrigin
|
||||
public Response<Boolean> receiveDesignResults(@Valid @RequestBody JSONObject responseObject) {
|
||||
return Response.success(designService.receiveDesignResults(responseObject));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "接收Design入参")
|
||||
@Operation(summary = "接收Design入参")
|
||||
@PostMapping("/receiveDesignParams")
|
||||
@CrossOrigin
|
||||
public Response<Boolean> receiveDesignParams(@Valid @RequestBody ReceiveDesignParam receiveDesignParam) {
|
||||
return Response.success(designService.receiveDesignParams(receiveDesignParam));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "刷新minio预签名地址")
|
||||
@Operation(summary = "刷新minio预签名地址")
|
||||
@GetMapping("/refreshMinioUrl")
|
||||
public Response<String> refreshMinioUrl(@RequestParam("path") String path){
|
||||
return Response.success(minioUtil.getPreSignedUrl(path, CommonConstant.MINIO_IMAGE_EXPIRE_TIME));
|
||||
|
||||
@@ -11,9 +11,9 @@ import com.ai.da.model.vo.ModelsVO;
|
||||
import com.ai.da.model.vo.StyleVO;
|
||||
import com.ai.da.model.vo.WorkspaceVO;
|
||||
import com.ai.da.service.WorkspaceService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
@@ -36,7 +36,7 @@ import java.util.List;
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@RequestMapping("/api/workspace")
|
||||
@Api(value = "", tags = "工作空间")
|
||||
@Tag(name = "工作空间")
|
||||
public class WorkspaceController {
|
||||
|
||||
@Resource
|
||||
@@ -47,8 +47,8 @@ public class WorkspaceController {
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@ApiOperation(value = "详情", notes = "传入workspace")
|
||||
public Response<WorkspaceVO> detail(@ApiParam(value = "主键集合", required = true) @RequestParam Long id) {
|
||||
@Operation(summary = "详情", description = "传入workspace")
|
||||
public Response<WorkspaceVO> detail(@Parameter(description = "主键集合", required = true) @RequestParam Long id) {
|
||||
WorkspaceVO detail = workspaceService.getByIdNew(id);
|
||||
return Response.success(detail);
|
||||
}
|
||||
@@ -58,7 +58,7 @@ public class WorkspaceController {
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@ApiOperation(value = "分页", notes = "传入workspace")
|
||||
@Operation(summary = "分页", description = "传入workspace")
|
||||
public Response<WorkspaceVO> list(@Valid @RequestBody WorkspaceDTO query) {
|
||||
WorkspaceVO response = workspaceService.getPage(query);
|
||||
return Response.success(response);
|
||||
@@ -69,7 +69,7 @@ public class WorkspaceController {
|
||||
*/
|
||||
@PostMapping("/saveOrUpdate")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@ApiOperation(value = "新增或编辑", notes = "传入workspace")
|
||||
@Operation(summary = "新增或编辑", description = "传入workspace")
|
||||
public Response saveOrUpdate(@Valid @RequestBody WorkspaceSaveDTO workspaceDTO) {
|
||||
return Response.success(workspaceService.saveOrUpdate(workspaceDTO));
|
||||
}
|
||||
@@ -80,14 +80,14 @@ public class WorkspaceController {
|
||||
*/
|
||||
@DeleteMapping("/remove")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@ApiOperation(value = "删除", notes = "传入id")
|
||||
@Operation(summary = "删除", description = "传入id")
|
||||
public Response<List<Long>> remove(@Valid @RequestBody List<Workspace> workspaceList) {
|
||||
return Response.success(workspaceService.delete(workspaceList));
|
||||
}
|
||||
|
||||
@GetMapping("/enumValues")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@ApiOperation(value = "获取枚举类值")
|
||||
@Operation(summary = "获取枚举类值")
|
||||
public Response<List<BizJson>> enumValues(@RequestParam("enumName") String enumName) {
|
||||
List<BizJson> bizJsonList = workspaceService.getEnumValues(enumName);
|
||||
return Response.success(bizJsonList);
|
||||
@@ -95,7 +95,7 @@ public class WorkspaceController {
|
||||
|
||||
@GetMapping("/getMannequins")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@ApiOperation(value = "获取模特")
|
||||
@Operation(summary = "获取模特")
|
||||
public Response<List<ModelsVO>> getMannequins(@RequestParam("sex") String sex, @RequestParam("style") String style, @RequestParam("ageGroup") String ageGroup) {
|
||||
List<ModelsVO> modelsVO = workspaceService.getMannequins(sex, style, ageGroup);
|
||||
return Response.success(modelsVO);
|
||||
@@ -104,7 +104,7 @@ public class WorkspaceController {
|
||||
|
||||
@PostMapping("system_file_copy")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@ApiOperation(value = "minio数据迁移")
|
||||
@Operation(summary = "minio数据迁移")
|
||||
public Response<Boolean> systemFileCopy() {
|
||||
workspaceService.systemFileCopy();
|
||||
return Response.success(true);
|
||||
@@ -112,7 +112,7 @@ public class WorkspaceController {
|
||||
|
||||
@PostMapping("moveFile")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@ApiOperation(value = "增加一级性别路径")
|
||||
@Operation(summary = "增加一级性别路径")
|
||||
public Response<Boolean> moveFile() {
|
||||
workspaceService.moveFile();
|
||||
return Response.success(true);
|
||||
@@ -120,7 +120,7 @@ public class WorkspaceController {
|
||||
|
||||
@GetMapping("/maleDataInsert")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@ApiOperation(value = "男装数据入库入minio")
|
||||
@Operation(summary = "男装数据入库入minio")
|
||||
public Response<Boolean> maleDataInsert() throws FileNotFoundException {
|
||||
// workspaceService.maleDataInsert();
|
||||
return Response.success(true);
|
||||
@@ -128,14 +128,14 @@ public class WorkspaceController {
|
||||
|
||||
@PostMapping("styleList")
|
||||
@ApiOperationSupport(order = 9)
|
||||
@ApiOperation(value = "获取style列表")
|
||||
@Operation(summary = "获取style列表")
|
||||
public Response<List<StyleVO>> styleList() {
|
||||
return Response.success(workspaceService.styleList());
|
||||
}
|
||||
|
||||
@PostMapping("/saveOrUpdateProject")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@ApiOperation(value = "新增或编辑", notes = "传入project")
|
||||
@Operation(summary = "新增或编辑", description = "传入project")
|
||||
public Response saveOrUpdateProject(@Valid @RequestBody ProjectDTO projectDTO) {
|
||||
return Response.success(workspaceService.saveOrUpdateProject(projectDTO));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user