263 Commits

Author SHA1 Message Date
3273a61066 BUGFIX:印花优先级不从1开始传导致数组越界 2026-05-13 23:57:07 +08:00
ltx
d055331690 豆包模型更新 2026-05-13 20:56:22 +08:00
ltx
0073f910a7 豆包模型更新 2026-05-13 20:55:24 +08:00
6dcbfa025a TASK:Global Award记录访客量 2026-05-13 17:29:16 +08:00
65cde0b8f5 TASK:admin-organization plan优化 2026-04-28 13:11:57 +08:00
b66877425e BUGFIX:为下载flux图片添加重试机制 2026-04-21 17:33:39 +08:00
litianxiang
f53fca9a09 Merge remote-tracking branch 'origin/dev/3.1_release_merge' into release/3.1 2026-04-15 15:07:04 +08:00
litianxiang
c8dc38575a Merge remote-tracking branch 'origin/dev/3.1_release_merge' into dev/3.1_release_merge 2026-04-15 14:52:35 +08:00
litianxiang
c00d906083 portfolioUrl 漏加fix 2026-04-15 14:52:18 +08:00
4df3f9cc53 BUGFIX:design印花scale与getDetail获取到的印花scale不一致 2026-04-15 14:43:59 +08:00
litianxiang
b0343be544 配置过滤器 2026-04-15 14:05:57 +08:00
litianxiang
d33cb9f0bf 配置过滤器 2026-04-15 13:47:28 +08:00
litianxiang
40f2735831 配置过滤器 2026-04-15 13:26:15 +08:00
litianxiang
d73442d1dd Merge remote-tracking branch 'origin/release/3.1' into release/3.1 2026-04-13 22:05:59 +08:00
litianxiang
c8164cb997 TO PROD 2026-04-13 22:05:31 +08:00
981fc35be4 BUGFIX:design 没有使用printboard中的元素 2026-04-13 18:04:30 +08:00
01d3806d5f Merge remote-tracking branch 'origin/dev/3.1_release_merge' into dev/3.1_release_merge 2026-04-13 17:52:35 +08:00
107e4e9771 BUGFIX:design 没有使用printboard中的元素 2026-04-13 17:51:15 +08:00
litianxiang
716d720782 GlobalAward返回最大的参赛者编号 2026-04-13 14:38:02 +08:00
litianxiang
6b5bacc49b GlobalAward返回最大的参赛者编号 2026-04-13 14:34:05 +08:00
litianxiang
409bc7b1fd 过滤器配置 2026-04-13 13:09:12 +08:00
litianxiang
ec6a5df8af TO DEV 2026-04-13 11:55:17 +08:00
litianxiang
029b96ae99 GlobalAward下载到浏览器 2026-04-13 11:47:20 +08:00
litianxiang
14002e7331 GlobalAward下载补充和数量接口 2026-04-13 10:22:43 +08:00
14dfe2806c merge dev 2026-04-10 23:27:37 +08:00
798c7b0592 Merge branch 'release/3.1' into dev/3.1_release_merge 2026-04-10 23:09:33 +08:00
9bd10581f4 BUGFIX:获取relight结果时删除了排序记录 2026-04-10 23:03:15 +08:00
1f288fe5e3 BUGFIX 2026-04-10 22:55:44 +08:00
72602eb245 BUGFIX 2026-04-10 22:51:00 +08:00
983d53268d DEBUG 2026-04-10 22:32:55 +08:00
f3aeeb3584 DEBUG 2026-04-10 22:21:56 +08:00
5d3692a204 BUGFIX:支付失败后的邮件通知类型错误(临时处理) 2026-04-08 13:52:38 +08:00
f2a074b2f6 Merge branch 'dev/dev_xp' into dev/3.1_release_merge 2026-03-31 15:19:56 +08:00
6a7a37dcec BUGFIX:只有Printboard时,首次design没有使用元素 2026-03-31 14:12:43 +08:00
litianxiang
c4d2780f0e TO DEV 2026-03-31 13:55:32 +08:00
litianxiang
1da6b7728c Merge remote-tracking branch 'origin/dev/3.1_release_merge' into release/3.1 2026-03-30 17:05:43 +08:00
litianxiang
0faf77899b fix:PRINTBOARD_HIGH_I2I与PRINTBOARD_ADVANCED_I2I使用模型一致导致积分扣除错误 2026-03-27 16:49:10 +08:00
litianxiang
e4940019bf 框选适配py 2026-03-27 15:19:38 +08:00
litianxiang
0da66ff210 print t2i模型替换 2026-03-27 15:16:33 +08:00
litianxiang
5dd862ff79 MOOD_BOARD high 去掉翻译 2026-03-26 16:13:43 +08:00
litianxiang
edaec9884d TO PROD 2026-03-25 22:28:44 +08:00
litianxiang
76eeb2be53 moodboard基础模型修改 2026-03-25 10:39:22 +08:00
litianxiang
cb6f94d2d4 py api fix 2026-03-25 10:19:06 +08:00
litianxiang
28656c44c8 FIX FLUX2 2026-03-24 16:24:43 +08:00
litianxiang
6757a89d04 Pattern模式参数fix 2026-03-24 15:54:53 +08:00
litianxiang
9be1a1e307 加锁解决不同线程读取前还未保存的问题 2026-03-24 15:49:16 +08:00
litianxiang
2168978f61 print pattern也改为flux2 2026-03-24 15:32:06 +08:00
litianxiang
54466b935d debug 2026-03-24 15:23:33 +08:00
litianxiang
c970ebe691 debug 2026-03-24 15:15:59 +08:00
litianxiang
1c5a3a12b9 debug 2026-03-24 15:04:40 +08:00
litianxiang
6e06000083 debug 2026-03-24 14:46:01 +08:00
litianxiang
dea2b3be42 debug 2026-03-24 14:29:08 +08:00
litianxiang
bcf51aea23 debug 2026-03-24 14:20:39 +08:00
litianxiang
0c9d5404c6 flux2失败状态判断 2026-03-24 14:05:27 +08:00
litianxiang
93429839c0 本地flux改为flux2 2026-03-24 13:39:38 +08:00
litianxiang
27859c3e28 Merge remote-tracking branch 'origin/release/3.1' into dev/3.1_release_merge 2026-03-23 14:11:33 +08:00
litianxiang
f02c0930a6 日志切面(controller层报错打印) 2026-03-23 13:56:47 +08:00
litianxiang
d57bb83b25 Merge remote-tracking branch 'origin/release/3.1' into release/3.1 2026-03-23 13:50:44 +08:00
731e34f133 TO DEV 2026-03-23 13:38:10 +08:00
75eca8d6ba Merge branch 'release/3.1' into dev/3.1_release_merge
# Conflicts:
#	src/main/java/com/ai/da/python/PythonService.java
2026-03-23 13:22:18 +08:00
3e53401f76 TASK:返回符合查询条件的金额总计 2026-03-23 11:55:07 +08:00
litianxiang
b6a068ebcd SKETCHBOARD传入的text改为获取第一个,为分割获取style的方式 2026-03-23 11:50:24 +08:00
litianxiang
dc291ea086 加入非空校验 2026-03-14 01:50:39 +08:00
litianxiang
2e846e671a romantic风格缺少下装fix 2026-03-13 10:06:26 +08:00
litianxiang
a5093311f9 当style为洛丽塔时无sketch和谷歌风控问题FIX 2026-03-12 19:06:54 +08:00
litianxiang
aed338a6d7 当style为洛丽塔时无sketch和谷歌风控问题FIX 2026-03-12 18:59:17 +08:00
litianxiang
8bdb49d25c 当style为洛丽塔时无sketch和谷歌风控问题FIX 2026-03-12 18:49:57 +08:00
litianxiang
5d53a8cd42 当style为洛丽塔时无sketch和谷歌风控问题FIX 2026-03-12 18:49:28 +08:00
litianxiang
61b7f3072f 当style为洛丽塔时无sketch和谷歌风控问题FIX 2026-03-12 18:36:21 +08:00
litianxiang
a1f489f3a1 比赛url修改 2026-03-12 17:39:05 +08:00
litianxiang
fc3fd877a8 transpose和rotate获取位置修改 2026-03-05 16:58:17 +08:00
litianxiang
fc72d2c430 transpose和rotate获取位置修改 2026-03-05 13:29:14 +08:00
litianxiang
1ac01dd090 测试token恢复 2026-02-25 16:36:06 +08:00
litianxiang
3bbdf7c672 fix:按编号导出参赛选手文件 2026-02-09 10:33:25 +08:00
litianxiang
0646484fba 按编号导出参赛选手文件 2026-02-09 10:21:40 +08:00
litianxiang
96b8613741 映射temp到服务器 2026-02-06 17:29:42 +08:00
litianxiang
cf30226a51 映射temp到服务器 2026-02-06 17:24:43 +08:00
litianxiang
3c15a3ff68 映射temp到服务器 2026-02-06 17:21:07 +08:00
litianxiang
0c904be227 测试临时token 2026-02-06 11:42:34 +08:00
litianxiang
7759b56123 Merge remote-tracking branch 'origin/dev/3.1_release_merge' into dev/3.1_release_merge 2026-02-05 17:39:15 +08:00
litianxiang
d5bfaa8822 fix:允许图生图不带提示词 2026-02-05 17:38:38 +08:00
967c0cbc01 Merge branch 'dev/dev_xp' into dev/3.1_release_merge 2026-02-05 16:55:24 +08:00
417e34b41a BUGFIX:1.首次design没有使用library和生成的印花2.design overall印花太小 2026-02-05 16:54:45 +08:00
litianxiang
d51aa84647 fix:参赛者根据链接返回文件参数 2026-02-05 09:41:10 +08:00
litianxiang
5895bc6ab6 Revert "fix:参赛者根据链接返回文件参数"
This reverts commit 3301869f20.
2026-02-05 09:40:35 +08:00
litianxiang
3301869f20 fix:参赛者根据链接返回文件参数 2026-02-05 09:40:15 +08:00
litianxiang
1ec42f4ad5 fix:参赛者id逻辑更改 2026-02-04 17:20:22 +08:00
cc506ff7e9 Merge branch 'dev/3.1_release_merge' into release/3.1 2026-02-04 17:05:59 +08:00
litianxiang
f2d43f06f4 Merge remote-tracking branch 'origin/dev/3.1_release_merge' into dev/3.1_release_merge 2026-02-04 15:28:08 +08:00
litianxiang
9251df49f8 比赛新增文件大小和视频时长 2026-02-04 15:27:51 +08:00
430156f4e8 Merge branch 'dev/dev_xp' into dev/3.1_release_merge 2026-02-04 14:48:38 +08:00
litianxiang
d1123aedcc fix:导出为页面下载 2026-02-04 14:45:11 +08:00
8c007077a3 BUGFIX: detail中的merge模式下没有存储partialDesign的图片 2026-02-04 14:43:29 +08:00
litianxiang
d63b4b4e63 fix:参赛选手加入编号 2026-02-04 14:03:30 +08:00
litianxiang
b826f0bf39 参赛选手加入编号,增加导出功能 2026-02-04 13:41:16 +08:00
litianxiang
1decd8e258 参赛选手加入编号,增加导出功能 2026-02-04 13:41:09 +08:00
litianxiang
1286e84488 Merge remote-tracking branch 'origin/dev/3.1_release_merge' into dev-ltx 2026-02-04 13:21:19 +08:00
a252fdf7f9 BUGFIX: detail中的default模式报错 2026-02-03 16:56:15 +08:00
807d802178 TASK:motion 参数数据类型变更 2026-02-02 15:30:04 +08:00
53f1b548be CONFIG 2026-02-02 15:28:54 +08:00
45dd78032a BUGFIX: 1.token过期,重新登录无法解决 2.motion生成参数数据类型变更 2026-02-02 15:04:27 +08:00
c160da5132 BUGFIX: token过期,重新登录无法解决 2026-02-02 14:57:32 +08:00
b23faeeee2 Merge branch 'dev/dev_xp' into dev/3.1_release_merge 2026-02-02 13:32:55 +08:00
67789abca4 TASK:getAllPose id的数据类型改为整型 2026-02-02 13:32:27 +08:00
1c78d66aab Merge branch 'dev/dev_xp' into dev/3.1_release_merge 2026-01-30 17:14:50 +08:00
528bc69923 BUGFIX: design single merge模式下取消传递print及elements等元素 2026-01-30 17:10:37 +08:00
litianxiang
22880d128d Merge remote-tracking branch 'origin/dev/3.1_release_merge' into dev-ltx 2026-01-30 15:40:25 +08:00
9c56a102cc Merge branch 'dev/dev_xp' into dev/3.1_release_merge 2026-01-29 14:38:20 +08:00
2f59fe074f BUGFIX: 管理员修改用户身份为游客 2026-01-29 14:37:54 +08:00
9c61b1c8fe Merge branch 'dev/dev_xp' into dev/3.1_release_merge 2026-01-29 10:12:47 +08:00
e30fdf7401 BUGFIX:模特上传,事务管理不统一导致library出现孤儿数据 2026-01-29 10:10:21 +08:00
ba2d10afbc paymentMethodConfiguration切换 2026-01-28 15:41:52 +08:00
6146112d04 TO PROD 2026-01-27 16:39:39 +08:00
412550df27 BUGFIX:管理员查design频次与chart中获取到的数量有区别 2026-01-27 14:59:39 +08:00
497421e7fe TO DEV 2026-01-27 10:15:36 +08:00
891527426c Merge remote-tracking branch 'origin/dev/3.1_release_merge' into dev/3.1_release_merge
# Conflicts:
#	src/main/java/com/ai/da/service/impl/DesignServiceImpl.java
2026-01-26 14:49:38 +08:00
litianxiang
3e334d7956 Merge remote-tracking branch 'origin/dev/3.1_release_merge' into dev-ltx 2026-01-26 11:16:46 +08:00
litianxiang
8f0d0953b2 Merge remote-tracking branch 'origin/dev/3.1_release_merge' into dev/3.1_release_merge 2026-01-26 11:15:38 +08:00
f5c3621a5d bugfix: design like 2026-01-23 22:45:40 +08:00
litianxiang
9a1a0045e0 fix:like报错 2026-01-23 22:40:30 +08:00
6223c8e994 brandDNA 2026-01-23 22:25:01 +08:00
67bbee49fd Merge branch 'dev/3.1_release_merge' into release/3.1 2026-01-23 21:20:26 +08:00
ad62ceb32a Merge branch 'dev/dev_xp' into dev/3.1_release_merge 2026-01-23 21:02:04 +08:00
082afe9e94 gradiant 置空 2026-01-23 20:57:48 +08:00
49288c3a31 TO Prod 2026-01-23 16:10:55 +08:00
81624e36db Merge remote-tracking branch 'origin/dev/3.1_release_merge' into dev/3.1_release_merge 2026-01-23 15:12:15 +08:00
a526b122d1 Merge branch 'release/3.1' into dev/3.1_release_merge 2026-01-23 15:11:45 +08:00
litianxiang
d882b2e817 Merge remote-tracking branch 'origin/dev-ltx' into dev/3.1_release_merge 2026-01-23 15:05:22 +08:00
litianxiang
ebf6427d42 fix:用户特征存入逻辑错误 2026-01-23 15:04:59 +08:00
77fe03d361 Merge branch 'dev/dev_xp' into dev/3.1_release_merge 2026-01-23 11:46:31 +08:00
7a44d67dbf BUGFIX: 系统消息发布 广播时消息数量错误 2026-01-23 11:46:08 +08:00
55ce2c6c7e Merge branch 'dev/dev_xp' into dev/3.1_release_merge 2026-01-23 10:54:35 +08:00
a426caaca3 BUGFIX: 系统消息发布 2026-01-23 10:54:03 +08:00
7cb7ce2836 Merge branch 'dev/dev_xp' into dev/3.1_release_merge 2026-01-22 16:56:11 +08:00
8e075f1da4 BUGFIX: 通过hsv批量获取潘通信息,替换rgb 2026-01-22 16:55:00 +08:00
litianxiang
0f0fde2a3e Merge remote-tracking branch 'origin/dev-ltx' into dev/3.1_release_merge 2026-01-22 14:28:37 +08:00
litianxiang
8c6389a1f6 删除不用的字段 2026-01-22 14:28:10 +08:00
652f82b6a4 Merge branch 'dev/dev_xp' into dev/3.1_release_merge 2026-01-22 13:56:44 +08:00
7ca2528dcf BUGFIX: design后未存储undivided layers 2026-01-22 13:56:07 +08:00
litianxiang
a7800913d2 Merge remote-tracking branch 'origin/dev-ltx' into dev/3.1_release_merge 2026-01-22 13:51:42 +08:00
litianxiang
1eaec64ff4 fix:GlobalAward读取配置错误 2026-01-22 13:51:13 +08:00
e603952332 Merge branch 'dev/dev_xp' into dev/3.1_release_merge 2026-01-22 11:37:25 +08:00
2bc8b8ef96 BUGFIX: single design的渐变色未存储 2026-01-22 11:36:43 +08:00
0ce968b919 BUGFIX: 用户登录时的有效期验证异常抛出导致事务回滚,用户信息修改失败 2026-01-22 10:37:23 +08:00
litianxiang
dfc9ae4db2 GlobalAward站内信url修改 2026-01-21 16:50:01 +08:00
litianxiang
a3505c6d95 GlobalAward站内信url修改 2026-01-21 15:09:45 +08:00
litianxiang
6db0afd515 GlobalAward保存成功发送站内信,根据url可跳转且召回已填写资料 2026-01-21 14:59:41 +08:00
litianxiang
b1e6183dd1 GlobalAward接口token验证,id更换为uuid 2026-01-21 14:34:43 +08:00
30d08356c0 Merge branch 'dev/dev_xp' into dev/3.1_release_merge 2026-01-21 14:14:17 +08:00
64cc29f456 TASK:Global Award邮箱验证 2026-01-21 14:13:33 +08:00
litianxiang
2b3e12a11c GlobalAward MINIO配置 2026-01-21 11:38:38 +08:00
litianxiang
d4a4724f61 GlobalAward拦截器配置 2026-01-21 10:35:22 +08:00
litianxiang
ba6e2bd24c GlobalAward拦截器配置 2026-01-21 10:21:17 +08:00
litianxiang
a38895b028 GlobalAward拦截器配置 2026-01-21 10:13:11 +08:00
litianxiang
69a95e66ca GlobalAward上传文件 2026-01-20 16:37:46 +08:00
litianxiang
40518cab37 Merge remote-tracking branch 'origin/dev/3.1_release_merge' into dev-ltx
# Conflicts:
#	src/main/java/com/ai/da/controller/GlobalAwardController.java
#	src/main/java/com/ai/da/model/dto/ContestantDTO.java
#	src/main/resources/application-dev.properties
#	src/main/resources/application-prod.properties
2026-01-20 16:20:41 +08:00
litianxiang
46d61cb73f GlobalAward上传文件 2026-01-20 15:58:27 +08:00
08f20fd1fe Merge branch 'dev/dev_xp' into dev/3.1_release_merge 2026-01-20 13:24:49 +08:00
d7edc166b3 TASK:Global Award邮箱验证 2026-01-20 13:14:50 +08:00
litianxiang
79ad02f66b fix:style为all时,like报错 2026-01-19 16:50:14 +08:00
litianxiang
5e261b55c7 Merge remote-tracking branch 'origin/dev/3.1_release_merge' into dev/3.1_release_merge 2026-01-19 16:41:02 +08:00
litianxiang
bc92fcbaf4 Merge remote-tracking branch 'origin/dev-ltx' into dev/3.1_release_merge 2026-01-19 16:40:58 +08:00
litianxiang
c6aec917c2 fix:style为all时,like报错 2026-01-19 16:40:28 +08:00
6bc500e78f Merge branch 'dev/dev_xp' into dev/3.1_release_merge 2026-01-16 17:17:25 +08:00
4c43b98c02 TASK:DB中PartialDesign为空时,取undivided_layer作为merge_image_path 2026-01-16 17:17:04 +08:00
litianxiang
5bae785a9f Merge remote-tracking branch 'origin/dev-ltx' into dev/3.1_release_merge 2026-01-16 16:37:49 +08:00
litianxiang
7b619aa4cb GlobalAward首次提交 2026-01-16 16:37:03 +08:00
c93ad6daa9 Merge branch 'dev/dev_xp' into dev/3.1_release_merge 2026-01-16 16:24:38 +08:00
0047be7a03 BUGFIX:PartialDesign传空时,先从数据库获取原数据 2026-01-16 16:23:56 +08:00
4ef209cfd4 Merge branch 'dev/dev_xp' into dev/3.1_release_merge 2026-01-16 14:28:27 +08:00
a19751b4b7 BUGFIX:designType参数校验;print数据验空 2026-01-16 14:28:04 +08:00
litianxiang
bb0e5a4263 Merge remote-tracking branch 'origin/dev-ltx' into dev/3.1_release_merge 2026-01-16 11:04:52 +08:00
litianxiang
9e9df5367d fix:接口SegAnything返回值处理 2026-01-16 11:04:18 +08:00
ba8a2c52de Merge remote-tracking branch 'origin/dev/3.1_release_merge' into dev/3.1_release_merge 2026-01-15 17:36:37 +08:00
39d8c7efcf TASK:取消存储/返回UndividedLayer和UndividedLayerWithSinglePrint字段 2026-01-15 17:35:55 +08:00
litianxiang
401910901a Merge remote-tracking branch 'origin/dev-ltx' into dev/3.1_release_merge
# Conflicts:
#	src/main/java/com/ai/da/python/PythonService.java
2026-01-15 17:21:30 +08:00
litianxiang
3f5ce6e0e7 接口SegAnything返回值处理 2026-01-15 17:17:08 +08:00
0787025151 TASK:merge 模式返回mask 2026-01-15 14:07:18 +08:00
08b26872ff Merge branch 'dev/dev_xp' into dev/3.1_release_merge 2026-01-14 14:28:05 +08:00
5bbf1326bb TASK:design single部分cv操作前置,新增merge | default两种designType 2026-01-14 14:26:47 +08:00
litianxiang
c5e27cd220 Merge remote-tracking branch 'origin/dev-ltx' into dev/3.1_release_merge 2026-01-14 13:55:01 +08:00
litianxiang
112e9c3bc9 对接前端和py接口SegAnything 2026-01-14 13:31:33 +08:00
litianxiang
ce95cb5080 Merge remote-tracking branch 'origin/dev-ltx' into dev/3.1_release_merge 2026-01-12 14:42:02 +08:00
litianxiang
71211bfbc3 修改存入userPreference表的时间方式 2026-01-12 14:41:24 +08:00
72ad977dcb BUGFIX: 获取近期新用户图表数据允许userType为null 2026-01-12 11:55:43 +08:00
litianxiang
6400e79929 Merge remote-tracking branch 'origin/dev-ltx' into dev/3.1_release_merge 2026-01-09 14:49:25 +08:00
litianxiang
dd8c72f7d7 切换用户sketch点赞记录存储方式;新增镜像和角度字段,存储前端需要的object 2026-01-09 10:14:46 +08:00
13151b65f5 TASK:限制同一个管理员不允许绑定不同组织的订阅计划 2026-01-07 15:24:38 +08:00
9f523d5953 TASK:分页获取所有用户id,添加按邮箱模糊查询 2026-01-07 11:26:39 +08:00
4879cfeb60 BUGFIX: 2026-01-07 09:53:58 +08:00
9e252b16ef BUGFIX: 2026-01-06 17:36:12 +08:00
e64add14af BUGFIX:更新订阅计划时根据业务需要对参数进行判断并在需要时更新管理员信息 2026-01-06 17:29:33 +08:00
3beb27e491 TASK:获取用户id信息做分页;订阅计划添加国家或地区字段 2026-01-06 09:56:21 +08:00
501032ef17 TASK:试用用户试用期延长至7天 2025-12-31 13:15:13 +08:00
litianxiang
cb25bdd2e0 Merge remote-tracking branch 'origin/dev-ltx' into dev/3.1_release_merge 2025-12-29 14:57:41 +08:00
litianxiang
7a9fb0213b 适配新推荐接口 2025-12-29 13:49:31 +08:00
cd767dce6f BUGFIX:新用户不能获取历史系统通知 2025-12-24 11:47:11 +08:00
bf95b85841 to dev 2025-12-23 16:28:07 +08:00
9e58bd9e7d Merge branch 'release/3.1' into dev/3.1_release_merge
# Conflicts:
#	src/main/java/com/ai/da/common/utils/SendRequestUtil.java
2025-12-23 16:16:30 +08:00
d0ec5c5c26 BUGFIX:邮件发送失败 2025-12-23 16:03:48 +08:00
ab8aa5ea5c Merge branch 'dev/dev_xp' into dev/3.1_release_merge 2025-12-23 14:07:53 +08:00
aefcd2fdb0 BUGFIX:邮件发送失败 2025-12-23 14:07:26 +08:00
e74eab1070 BUGFIX:邮件发送失败 2025-12-23 14:05:20 +08:00
litianxiang
34da437a26 Merge remote-tracking branch 'origin/dev-ltx' into dev/3.1_release_merge 2025-12-22 11:36:23 +08:00
litianxiang
f84935d0bd 登录token存入redis 2025-12-22 11:35:38 +08:00
35edaa0f27 CONFIG: 拦截器配置 2025-12-19 21:43:02 +08:00
f43099e19e CONFIG: redis 配置修改 2025-12-19 21:21:21 +08:00
8079877734 CONFIG: TO DEV 2025-12-19 17:40:37 +08:00
ef686e38ac CONFIG: TO PROD 2025-12-19 17:33:51 +08:00
100019d2a4 Merge remote-tracking branch 'origin/dev/3.1_release_merge' into dev/3.1_release_merge 2025-12-19 16:00:55 +08:00
litianxiang
12af237d76 Merge remote-tracking branch 'origin/dev/3.1_release_merge' into dev/3.1_release_merge 2025-12-19 15:47:36 +08:00
litianxiang
44dbbb2a4b 更换Moodboard和Printboard提示词 2025-12-19 15:47:07 +08:00
9f42e153a4 Merge branch 'release/3.1' into dev/3.1_release_merge
# Conflicts:
#	.gitea/workflows/develop_build_manual.yaml
2025-12-19 15:01:32 +08:00
4fa70a1c90 BUGFIX:订阅计划创建不允许指定子账号为管理员 2025-12-18 18:03:03 +08:00
dfb34916e7 BUGFIX:订阅计划与子账号新增 2025-12-18 14:52:12 +08:00
9f7987306c BUGFIX:订阅计划 2025-12-18 13:38:38 +08:00
litianxiang
d3fc70fbf2 fix:edit产品图照成排序问题,恢复原逻辑 2025-12-17 16:08:49 +08:00
litianxiang
17645d17e5 关闭batch MQ监听 2025-12-17 16:02:49 +08:00
litianxiang
258eea5277 edit 产品图失败会导致sort不对试验5 2025-12-17 15:43:26 +08:00
litianxiang
bb1d3bd359 Revert "edit 产品图失败会导致sort不对试验5"
This reverts commit 6a8c87ed95.
2025-12-17 15:41:02 +08:00
litianxiang
6a8c87ed95 edit 产品图失败会导致sort不对试验5 2025-12-17 15:40:47 +08:00
litianxiang
eb3826927d edit 产品图失败会导致sort不对试验4 2025-12-17 15:33:14 +08:00
litianxiang
7720c8c771 edit 产品图失败会导致sort不对试验3 2025-12-17 14:12:20 +08:00
litianxiang
b459148d58 edit 产品图失败会导致sort不对试验2 2025-12-17 13:49:07 +08:00
litianxiang
eadda18d1e Merge remote-tracking branch 'origin/dev/3.1_release_merge' into dev/3.1_release_merge 2025-12-17 13:28:12 +08:00
litianxiang
d403df51ec edit 产品图失败会导致sort不对试验 2025-12-17 13:28:04 +08:00
6903b98b60 Merge remote-tracking branch 'origin/dev/3.1_release_merge' into dev/3.1_release_merge 2025-12-17 13:20:34 +08:00
81bf65515c Merge branch 'dev/dev_xp' into dev/3.1_release_merge 2025-12-17 13:19:54 +08:00
8e984eb283 BUGFIX:订阅计划 2025-12-17 13:18:24 +08:00
litianxiang
afc6041570 临时测试修改 2025-12-17 13:10:09 +08:00
bce368248c Merge branch 'dev/dev_xp' into dev/3.1_release_merge 2025-12-16 16:26:27 +08:00
ca7121dcda BUGFIX:订阅计划 2025-12-16 16:24:52 +08:00
litianxiang
9a206f9979 生产环境配置callbackUrl 2025-12-16 14:10:22 +08:00
litianxiang
eb7a46c7e8 fix:callbackUrl 2025-12-16 13:45:21 +08:00
litianxiang
95ef68a784 Merge remote-tracking branch 'origin/dev-ltx' into dev/3.1_release_merge 2025-12-16 13:20:31 +08:00
litianxiang
6429288fd9 dev环境加入design回调配置 2025-12-16 13:16:36 +08:00
c5af194876 BUGFIX 2025-12-16 10:42:31 +08:00
da84e1e4b4 注解修改 2025-12-15 18:39:16 +08:00
95a9c81a1b Merge branch 'dev/dev_xp' into dev/3.1_release_merge
# Conflicts:
#	src/main/java/com/ai/da/model/dto/SubscriptionPlanDTO.java
#	src/main/java/com/ai/da/model/vo/SubscriptionPlanVO.java
2025-12-15 18:34:30 +08:00
81c0d7eeac TASK:订阅计划相关 2025-12-15 18:30:28 +08:00
litianxiang
fbc473735c fix:对没有like的已发布作品进行二创,会不显示原作者名字 2025-12-15 15:41:58 +08:00
litianxiang
9f48a2ce09 fix:升级swagger注解 2025-12-15 13:38:44 +08:00
459c743ce4 CONFIG: 2025-12-11 16:58:24 +08:00
ce3516916d CONFIG: 2025-12-11 16:18:37 +08:00
0692b29065 Merge branch 'dev/dev_xp' into dev/3.1_release_merge
# Conflicts:
#	src/main/java/com/ai/da/controller/AccountController.java
2025-12-11 16:12:41 +08:00
94cafbd10c TASK:flux积分不足,邮件通知 2025-12-11 16:07:14 +08:00
5c2008ec4a TASK:订阅计划,测试修改 2025-12-11 15:26:20 +08:00
litianxiang
4e4b8bd4d2 Merge remote-tracking branch 'origin/dev/3.1_release_merge' into dev-ltx 2025-12-11 15:12:22 +08:00
litianxiang
9c19d061be fix:升级swagger注解 2025-12-11 10:35:08 +08:00
7f094265da TASK:新增订阅计划概念 2025-12-11 09:44:25 +08:00
a940105fa4 DEV 数据库切换 2025-12-03 14:18:58 +08:00
4c0edf09bd Merge branch 'dev/dev_xp' into dev/3.1_release_merge 2025-12-03 14:14:11 +08:00
fab0c7b372 更新 .gitea/workflows/develop_build_manual.yaml 2025-12-02 14:48:23 +08:00
6cd42b799a 删除 .gitea/workflows/prod_build_schedule.yaml 2025-12-01 10:22:29 +08:00
6e1ed7f9b8 删除 .gitea/workflows/prod_build_manual.yaml 2025-12-01 10:22:25 +08:00
b7be16738b 删除 .gitea/workflows/develop_build_manual.yaml 2025-12-01 10:22:21 +08:00
6da5e91ec1 删除 .gitea/workflows/develop_build_commit.yaml 2025-12-01 10:22:17 +08:00
a710fdd432 删除 docker-compose.yml 2025-11-30 11:01:12 +08:00
d598f53d3c Merge branch 'dev/3.1_release_merge' into release/3.1
# Conflicts:
#	.gitea/workflows/prod_build_schedule.yaml
2025-11-28 17:16:55 +08:00
96170a9956 更新 .gitea/workflows/prod_build_manual.yaml 2025-11-28 15:25:50 +08:00
8205fb5290 上传文件至「.gitea/workflows」 2025-11-28 15:25:41 +08:00
fcbe4762b3 TO prod 2025-11-27 17:38:24 +08:00
e750adcc94 TO prod 2025-11-27 17:35:47 +08:00
272 changed files with 13091 additions and 7760 deletions

View File

@@ -99,6 +99,8 @@ jobs:
volumes:
# 数据挂载
- ./log:/log
- ./temp:/temp
- ./uploads:/temp/uploads
ports:
- '10090:5567'
restart: always
@@ -157,7 +159,7 @@ jobs:
password: ${{ secrets.MAIL_PASSWORD }} # 存储在Secrets中的邮箱密码
subject: 'Gitea Actions 构建通知: ${{ job.status }} - AiDA back-java Develop'
# 收件人列表,可以根据需要更改
to: 'xupei3360@163.com,txli@aidlab.hk,cgzhou@aidlab.hk,zchengrong@yeah.net' # 替换为实际收件人邮箱
to: 'cgzhou@aidlab.hk,zchengrong@yeah.net' # 替换为实际收件人邮箱
# --- 邮件正文内容 ---
body: |

View File

@@ -427,6 +427,11 @@
<artifactId>bcpkix-jdk18on</artifactId>
<version>1.78.1</version>
</dependency>
<!-- AOP -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
</dependencies>
<build>

View File

@@ -636,26 +636,26 @@ public class GenerateConsumer {
public void getPoseTransformationResult(Message msg, Channel channel) {
processPoseTransformResult(msg, channel);
}
@RabbitListener(queues = "#{rabbitMQProperties.queues.designBatch}")
@RabbitHandler
public void getDesignBatchResult(Message msg, Channel channel) {
processDesignBatchResult(msg, channel);
}
@RabbitListener(queues = "#{rabbitMQProperties.queues.toProductImageBatch}")
@RabbitHandler
public void getToProductImageBatchResult(Message msg, Channel channel) {
processToProductImageBatchResult(msg, channel);
}
@RabbitListener(queues = "#{rabbitMQProperties.queues.relightBatch}")
@RabbitHandler
public void getRelightBatchResult(Message msg, Channel channel) {
processRelightBatchResult(msg, channel);
}
@RabbitListener(queues = "#{rabbitMQProperties.queues.poseTransformBatch}")
@RabbitHandler
public void getPoseTransformBatchResult(Message msg, Channel channel) {
processPoseTransformBatchResult(msg, channel);
}
// @RabbitListener(queues = "#{rabbitMQProperties.queues.designBatch}")
// @RabbitHandler
// public void getDesignBatchResult(Message msg, Channel channel) {
// processDesignBatchResult(msg, channel);
// }
// @RabbitListener(queues = "#{rabbitMQProperties.queues.toProductImageBatch}")
// @RabbitHandler
// public void getToProductImageBatchResult(Message msg, Channel channel) {
// processToProductImageBatchResult(msg, channel);
// }
//
// @RabbitListener(queues = "#{rabbitMQProperties.queues.relightBatch}")
// @RabbitHandler
// public void getRelightBatchResult(Message msg, Channel channel) {
// processRelightBatchResult(msg, channel);
// }
//
// @RabbitListener(queues = "#{rabbitMQProperties.queues.poseTransformBatch}")
// @RabbitHandler
// public void getPoseTransformBatchResult(Message msg, Channel channel) {
// processPoseTransformBatchResult(msg, channel);
// }
}

View File

@@ -28,6 +28,11 @@ public class MQPublisher {
amqpTemplate.convertAndSend(rabbitMQProperties.getQueues().getSr(), mm);
}
public void sendGenerateResultMessage(String mm) {
log.info("send generate result message: {}", mm);
amqpTemplate.convertAndSend(rabbitMQProperties.getQueues().getGenerateResult(), mm);
}
/**
*
* @param mailParams 含有的字段

View File

@@ -0,0 +1,170 @@
package com.ai.da.common.aspect;
import com.ai.da.common.context.UserContext;
import com.ai.da.model.vo.AuthPrincipalVo;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.multipart.MultipartFile;
import java.util.HashMap;
import java.util.Map;
/**
* Controller日志切面
* 记录所有Controller接口的请求参数和用户信息
*/
@Aspect
@Component
public class ControllerLoggingAspect {
private static final Logger logger = LoggerFactory.getLogger(ControllerLoggingAspect.class);
/**
* 定义切点所有Controller方法
*/
@Pointcut("execution(* com.ai.da.controller..*(..))")
public void controllerMethods() {
}
/**
* Controller方法执行前记录日志
*/
// @Before("controllerMethods()")
public void logControllerBefore(JoinPoint joinPoint) {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
if (attributes != null) {
HttpServletRequest request = attributes.getRequest();
// 获取当前用户ID
Long userId = null;
AuthPrincipalVo authPrincipalVo = UserContext.getUserHolder();
if (authPrincipalVo != null) {
userId = authPrincipalVo.getId();
}
// 获取请求参数
Map<String, Object> params = getRequestParams(joinPoint, request);
logger.info("=== 请求开始 ===");
logger.info("用户ID: {}", userId);
logger.info("请求URL: {}", request.getRequestURL().toString());
logger.info("请求方法: {}", request.getMethod());
logger.info("请求IP: {}", getClientIpAddress(request));
logger.info("调用方法: {}.{}", joinPoint.getSignature().getDeclaringType().getSimpleName(), joinPoint.getSignature().getName());
logger.info("请求参数: {}", params);
}
}
/**
* 获取请求参数
*/
private Map<String, Object> getRequestParams(JoinPoint joinPoint, HttpServletRequest request) {
Map<String, Object> params = new HashMap<>();
// 1. 获取Query String参数
String queryString = request.getQueryString();
if (queryString != null && !queryString.isEmpty()) {
params.put("queryString", queryString);
}
// 2. 获取方法参数(包含 @PathVariable, @RequestParam, @RequestBody 等)
Object[] args = joinPoint.getArgs();
if (args != null && args.length > 0) {
Map<String, Object> methodParams = new HashMap<>();
for (int i = 0; i < args.length; i++) {
Object arg = args[i];
// 过滤掉不可序列化的参数
if (arg != null) {
if (isIgnorable(arg)) {
// 对于可忽略的类型,记录类型名
methodParams.put("arg" + i, "[" + arg.getClass().getSimpleName() + "]");
} else {
try {
methodParams.put("arg" + i, arg);
} catch (Exception e) {
methodParams.put("arg" + i, arg.toString());
}
}
}
}
if (!methodParams.isEmpty()) {
params.put("methodParams", methodParams);
}
}
return params;
}
/**
* 判断是否需要过滤的参数类型
*/
private boolean isIgnorable(Object obj) {
return obj instanceof HttpServletRequest
|| obj instanceof HttpServletResponse
|| obj instanceof MultipartFile
|| obj instanceof MultipartFile[];
}
/**
* Controller方法抛出异常时记录日志
*/
@AfterThrowing(pointcut = "controllerMethods()", throwing = "exception")
public void logControllerAfterThrowing(JoinPoint joinPoint, Throwable exception) {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
Long userId = null;
AuthPrincipalVo authPrincipalVo = UserContext.getUserHolder();
if (authPrincipalVo != null) {
userId = authPrincipalVo.getId();
}
// 获取请求参数
Map<String, Object> params = new HashMap<>();
if (attributes != null) {
HttpServletRequest request = attributes.getRequest();
params = getRequestParams(joinPoint, request);
}
logger.error("=== 请求异常 ===");
logger.error("用户ID: {}", userId);
logger.error("调用方法: {}.{}", joinPoint.getSignature().getDeclaringType().getSimpleName(), joinPoint.getSignature().getName());
logger.error("请求参数: {}", params);
logger.error("异常信息: ", exception);
logger.error("=== 异常结束 ===");
}
/**
* 获取客户端真实IP地址
*/
private String getClientIpAddress(HttpServletRequest request) {
String xForwardedFor = request.getHeader("X-Forwarded-For");
if (xForwardedFor != null && !xForwardedFor.isEmpty() && !"unknown".equalsIgnoreCase(xForwardedFor)) {
return xForwardedFor.split(",")[0];
}
String xRealIp = request.getHeader("X-Real-IP");
if (xRealIp != null && !xRealIp.isEmpty() && !"unknown".equalsIgnoreCase(xRealIp)) {
return xRealIp;
}
String proxyClientIp = request.getHeader("Proxy-Client-IP");
if (proxyClientIp != null && !proxyClientIp.isEmpty() && !"unknown".equalsIgnoreCase(proxyClientIp)) {
return proxyClientIp;
}
String wlProxyClientIp = request.getHeader("WL-Proxy-Client-IP");
if (wlProxyClientIp != null && !wlProxyClientIp.isEmpty() && !"unknown".equalsIgnoreCase(wlProxyClientIp)) {
return wlProxyClientIp;
}
return request.getRemoteAddr();
}
}

View File

@@ -202,7 +202,7 @@ public class MyTaskScheduler {
}
}
// @Scheduled(cron = "0 0 9 * * ?")
@Scheduled(cron = "0 0 9 * * ?")
public void sendTrialOrderExcelToManagements() {
// 获取前一天日期
LocalDate yesterday = LocalDate.now().minusDays(1);
@@ -308,7 +308,7 @@ public class MyTaskScheduler {
private MinioUtil minioUtil;
@Resource
private UserLikeService userLikeService;
public void clearMinio() {
/* public void clearMinio() {
List<CollectionElement> collectionElements = collectionElementMapper.selectDeleteList();
for (CollectionElement collectionElement : collectionElements) {
String url = collectionElement.getUrl();
@@ -472,7 +472,7 @@ public class MyTaskScheduler {
// }
// String preSignedUrl = minioUtil.getPreSignedUrl("aida-clothing/image/image_1698374859.3031476.png", 10000);
// System.out.println(preSignedUrl);
}
}*/
@Resource
private AttributeRetrievalMapper attributeRetrievalMapper;

View File

@@ -23,6 +23,7 @@ public class CommonConstant {
}
public static final String GENERATE_PATH = "/api/generate_image";
public static final String GENERATE_PATH_FLUX2_KLEIN = "/api/generate_image_flux2_klein";
public static final String GENERATE_SINGLE_LOGO = "/api/generate_single_logo";

View File

@@ -18,9 +18,9 @@ public class ModelConstants {
// 模型名称常量
public static final String PRINTBOARD_ADVANCED_T2I = "qwen-image";
public static final String MOODBOARD_ADVANCED = "doubao-seedream-3-0-t2i-250415";
public static final String PRINTBOARD_HIGH_T2I = "doubao-seedream-3-0-t2i-250415";
public static final String PRINTBOARD_HIGH_I2I = "doubao-seededit-3-0-i2i-250628";
public static final String MOODBOARD_ADVANCED = "doubao-seedream-4-5-251128";
public static final String PRINTBOARD_HIGH_T2I = "doubao-seedream-4-0-250828-high";
public static final String PRINTBOARD_HIGH_I2I = "doubao-seedream-4-0-250828-fast";
public static final String PRINTBOARD_ADVANCED_I2I = "doubao-seedream-4-0-250828";
public static final String IMAGEN_MODEL = "imagen-4.0-generate-001";
public static final String NANO_BANANA = "gemini-2.5-flash-image";

View File

@@ -33,7 +33,11 @@ public enum AuthenticationOperationTypeEnum {
*/
UPDATE_USERINFO,
REGISTER;
REGISTER,
/**
* Global_Award 活动验证
*/
GLOBAL_AWARD;
public static AuthenticationOperationTypeEnum of(String name) {
return Stream.of(AuthenticationOperationTypeEnum.values()).filter(v -> v.name().equals(name)).findFirst().orElse(null);

View File

@@ -1,8 +1,7 @@
package com.ai.da.common.response;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.NoArgsConstructor;
@@ -16,17 +15,17 @@ import java.util.List;
*/
@Data
@NoArgsConstructor
@ApiModel("分页响应结果")
@Schema(description = "分页响应结果")
public class PageBaseResponse<T> {
@ApiModelProperty("页码")
@Schema(description = "页码")
private long page;
@ApiModelProperty("每页数量")
@Schema(description = "每页数量")
private long size;
@ApiModelProperty("总页数")
@Schema(description = "总页数")
private long pages;
@ApiModelProperty("总条数")
@Schema(description = "总条数")
private long total;
@ApiModelProperty("结果集")
@Schema(description = "结果集")
private List<T> content;

View File

@@ -1,8 +1,7 @@
package com.ai.da.common.response;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.NoArgsConstructor;
@@ -16,18 +15,18 @@ import java.util.List;
*/
@Data
@NoArgsConstructor
@ApiModel("分页响应结果")
@Schema(description = "分页响应结果")
public class PageResponse<T> extends Response<List<T>> {
@ApiModelProperty("页码")
@Schema(description = "页码")
private long page;
@ApiModelProperty("每页数量")
@Schema(description = "每页数量")
private long size;
@ApiModelProperty("总页数")
@Schema(description = "总页数")
private long pages;
@ApiModelProperty("总条数")
@Schema(description = "总条数")
private long total;
@ApiModelProperty("结果集")
@Schema(description = "结果集")
private List<T> content;

View File

@@ -1,7 +1,6 @@
package com.ai.da.common.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@@ -17,14 +16,14 @@ import java.io.Serializable;
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("响应结果")
@Schema(description = "响应结果")
public class Response<T> implements Serializable {
@ApiModelProperty("响应状态码 0成功 -1失败")
@Schema(description = "响应状态码 0成功 -1失败")
private int errCode;
@ApiModelProperty("提示消息")
@Schema(description = "提示消息")
private String errMsg;
@ApiModelProperty("数据结果")
@Schema(description = "数据结果")
private T data;
public static <T> Response<T> success() {

View File

@@ -1,6 +1,6 @@
package com.ai.da.common.response;
import io.swagger.annotations.ApiModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.NoArgsConstructor;
@@ -8,7 +8,7 @@ import java.math.BigDecimal;
@Data
@NoArgsConstructor
@ApiModel("交易记录分页响应结果")
@Schema(description = "交易记录分页响应结果")
public class TransactionPageResponse<T> extends PageBaseResponse<T> {
private BigDecimal totalAmount;

View File

@@ -6,6 +6,7 @@ import com.ai.da.common.context.UserContext;
import com.ai.da.common.security.config.SecurityProperties;
import com.ai.da.common.security.jwt.JWTTokenHelper;
import com.ai.da.common.utils.LocalCacheUtils;
import com.ai.da.common.utils.RedisUtil;
import com.ai.da.common.utils.MultiReadHttpServletRequest;
import com.ai.da.common.utils.MultiReadHttpServletResponse;
import com.ai.da.common.utils.RequestInfoUtil;
@@ -40,6 +41,8 @@ public class AuthenticationFilter extends OncePerRequestFilter {
private JWTTokenHelper jwtTokenHelper;
@Resource
private SecurityProperties properties;
@Resource
private RedisUtil redisUtil;
private static final List<String> FILTER_URL =
Arrays.asList("/favicon.ico", "/doc.html", "/swagger-ui.html",
@@ -56,7 +59,9 @@ public class AuthenticationFilter extends OncePerRequestFilter {
"/api/account/designWorksRegister","/api/account/questionnaire","/api/stripe/trade/notify",
"/notification","/api/account/activateNewEmail","/api/third/party/auth/google_callback","/api/third/party/parseGoogleCredential","/api/third/party/receiveDesignResults","/api/third/party/parseWeChatCode","/api/third/party/receiveDesignParams"
, "/api/account/schoolLogin", "/api/account/enterpriseLogin", "/api/account/organizationNameSearch",
"/api/llm/stream"
"/api/llm/stream",
//GlobalAwardController
"/api/global-award"
);
@Override
@@ -132,12 +137,19 @@ public class AuthenticationFilter extends OncePerRequestFilter {
UserContext.delete();
//存取用户信息到缓存
UserContext.setUserHolder(principal);
//校验token
String cacheToken = LocalCacheUtils.getTokenCache(String.valueOf(principal.getId()));
// 校验 token:先查本地缓存,再查 Redis保证服务重启后仍然有效
String userIdStr = String.valueOf(principal.getId());
String cacheToken = LocalCacheUtils.getTokenCache(userIdStr);
if(StringUtils.isEmpty(cacheToken)){
// throw new RuntimeException("TOKEN已过期请重新登录");
throw new TokenMissingOrExpiredException("TOKEN已过期请重新登录(local cache empty)");
if (StringUtils.isEmpty(cacheToken)) {
// 本地缓存为空时,尝试从 Redis 读取
cacheToken = redisUtil.getLoginToken(principal.getId());
if (StringUtils.isEmpty(cacheToken)) {
// throw new RuntimeException("TOKEN已过期请重新登录");
throw new TokenMissingOrExpiredException("TOKEN已过期请重新登录(cache & redis empty)");
}
// 将 Redis 中的 token 回填到本地缓存,减少后续 Redis 访问
LocalCacheUtils.setTokenCache(userIdStr, cacheToken);
}
if(!cacheToken.equals(jwtToken) ){
// throw new RuntimeException("TOKEN已过期请重新登录");

View File

@@ -3,6 +3,7 @@ package com.ai.da.common.task;
import com.ai.da.common.utils.RedisUtil;
import com.ai.da.mapper.primary.entity.Account;
import com.ai.da.service.AccountService;
import com.ai.da.service.SubscriptionPlanService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@@ -18,6 +19,8 @@ public class AccountTask {
private AccountService accountService;
@Resource
private RedisUtil redisUtil;
@Resource
private SubscriptionPlanService subscriptionPlanService;
/**
* 每周日晚上刷新 年付用户、月付用户的积分
@@ -31,14 +34,14 @@ public class AccountTask {
accountService.refreshCreditsMonthly();
}
// @Scheduled(cron = "0 */5 * * * *") // Run every 5 minutes
@Scheduled(cron = "0 */5 * * * *") // Run every 5 minutes
public void getPaidUser() {
// 获取code-create 表中 指定日期之后 订单状态为wc-processing的订单
accountService.extendValidityForCC();
}
// 每天凌晨0点执行一次
@Scheduled(cron = "0 0 0 * * ?")
// 每天凌晨0点执行一次 目前已没有角色类型为4的用户
/*@Scheduled(cron = "0 0 0 * * ?")
public void cancelActivityBenefits() {
// 1、查询当前所有参与了活动且过期的用户
List<Account> accountList = accountService.getExpiredUserBySystemUser(4);
@@ -48,7 +51,7 @@ public class AccountTask {
log.info("参与活动的用户{} : {} 于 {} 账号有效期到期,置为游客", account.getId(), account.getUserEmail(), account.getValidEndTime());
accountService.toVisitor(account);
}
}
}*/
// 每天检测正式用户到期情况每天凌晨0点执行
@Scheduled(cron = "0 0 0 * * ?")
@@ -86,4 +89,14 @@ public class AccountTask {
public void checkEduAdminExpireStatus() {
accountService.checkEduAdminExpireStatus();
}
@Scheduled(cron = "0 5 0 * * ?")
public void activeSubscriptionPlan() {
subscriptionPlanService.activeSubscriptionPlan(null);
}
@Scheduled(cron = "0 */5 * * * *") // Run every 5 minutes
public void expireSubscription() {
subscriptionPlanService.expireSubscription();
}
}

View File

@@ -45,7 +45,7 @@ public class PaymentTask {
@Resource
private PayPalCheckoutService payPalCheckoutService;
// @Scheduled(cron = "0/30 * * * * ?")
@Scheduled(cron = "0/30 * * * * ?")
public void orderConfirmForPaypal() throws SerializeException {
// log.info("PayPal orderConfirm 被执行......");
@@ -97,7 +97,7 @@ public class PaymentTask {
//
}
@Scheduled(cron = "0 */5 * * * *") // Run every 5 minutes
@Scheduled(cron = "0 */5 * * * *") // Run every 5 minutes
public void updateAffiliateInfoWithPayment(){
// log.info("佣金计算定时器");
affiliateService.updateAffiliateInfoWithPayment();
@@ -109,7 +109,7 @@ public class PaymentTask {
affiliateService.syncLinkViewCountToDB();
}
// @Scheduled(cron = "0 0 8 28-31 * ?")
@Scheduled(cron = "0 0 8 28-31 * ?")
public void commissionSummaryReminder(){
// 每个月末的最后一天的早上八点执行
LocalDate today = LocalDate.now();

View File

@@ -40,7 +40,7 @@ public class SubscriptionReminderTask {
REMINDER_DAYS_CONFIG.put("year", 14);
}
@Scheduled(cron = "0 0 9 * * ?")
@Scheduled(cron = "0 0 9 * * ?")
public void subscriptionReminder() {
// 获取所有需要通知的订阅
List<SubscriptionInfo> subscriptionInfos = getDueSubscriptions();
@@ -97,7 +97,7 @@ public class SubscriptionReminderTask {
return subscriptionInfoMapper.selectList(qw);
}
@Scheduled(cron = "0 0 9 * * ?")
@Scheduled(cron = "0 0 9 * * ?")
public void trialReminder() {
// 今天的 00:00:00 和 23:59:59
LocalDateTime startOfDay = LocalDateTime.now().toLocalDate().atStartOfDay();

View File

@@ -41,6 +41,13 @@ public class MinioUtil {
@Autowired
private MinioClient minioClient;
/**
* 获取MinIO客户端实例
*/
public MinioClient getMinioClient() {
return minioClient;
}
/**
* description: 判断bucket是否存在不存在则创建
*

File diff suppressed because it is too large Load Diff

View File

@@ -767,7 +767,7 @@ public class SendEmailUtil {
try {
String merchantEmail = "kimwong@code-create.com.hk";
String developer = "xupei3360@163.com";
String[] receiverEmail = {/*merchantEmail,*/ developer};
String[] receiverEmail = {merchantEmail, developer};
Credential cred = new Credential(SECRET_ID, SECRET_KEy);
// 实例化一个http选项可选的没有特殊需求可以跳过
HttpProfile httpProfile = new HttpProfile();
@@ -883,8 +883,8 @@ public class SendEmailUtil {
if (!type.equals("cancel") && !type.equals("fail_new")) {
// 返回的resp是一个SendEmailResponse的实例与请求对象对应
// SendEmailResponse respUser = client.SendEmail(user);
log.info("邮件主题:{}发送结果toUser###{}, email:{}", user.getSubject(), /*SendEmailResponse.toJsonString(respUser)*/null, receiverAddress);
SendEmailResponse respUser = client.SendEmail(user);
log.info("邮件主题:{}发送结果toUser###{}, email:{}", user.getSubject(), SendEmailResponse.toJsonString(respUser), receiverAddress);
}
if (!type.startsWith("reminder")) {
SendEmailResponse respMerchant = client.SendEmail(merchant);
@@ -968,7 +968,7 @@ public class SendEmailUtil {
req.setFromEmailAddress(SEND_ADDRESS);
String merchantEmail = "kimwong@code-create.com.hk";
String developerEmail = "xupei@code-create.com.hk";
req.setDestination(new String[]{/*merchantEmail,*/ developerEmail});
req.setDestination(new String[]{merchantEmail, developerEmail});
Template template = new Template();
req.setSubject("New Credit Purchase Order");
template.setTemplateID(CREDITS_PURCHASE_MERCHANT);
@@ -1024,7 +1024,7 @@ public class SendEmailUtil {
log.info("邮件发送结果res###{}", SendEmailResponse.toJsonString(resp));
} catch (TencentCloudSDKException e) {
log.info("邮件发送失败###{}", e.toString());
throw new BusinessException("failed.to.send.mail");
// throw new BusinessException("failed.to.send.mail");
}
}

View File

@@ -88,7 +88,7 @@ public class SendRequestUtil {
}
}
public String sendFluxPost(String url, String requestBodyStr){
/*public String sendFluxPost(String url, String requestBodyStr){
int status;
String body;
try (HttpResponse execute = HttpRequest.post(url)
@@ -103,9 +103,63 @@ public class SendRequestUtil {
if (status == 200) {
return body;
}
if (status == 402 || status == 403) {
SendEmailUtil.commonExceptionReminder("Flux账户积分不足flux生成任务",
new String[]{"xupei3360@163.com, fangjianliao@aidlab.hk, investigation@aidlab.hk"});
}
}
log.warn("请求失败,状态码为 {}", status);
return null;
}*/
public String sendFluxPost(String url, String requestBodyStr) {
// 尝试两个API key
String[] apiKeys = {"84e8f5d5-b0b3-49aa-b244-ab7ba27e7ae7",
"d447a0ac-2291-4f1c-9a36-f7614c385989"};
boolean[] notified = {false, false}; // 记录是否已发送过不足提醒
for (int i = 0; i < apiKeys.length; i++) {
int status;
String body;
try (HttpResponse execute = HttpRequest.post(url)
.header(Header.CONTENT_TYPE, "application/json")
.header("x-key", apiKeys[i])
.body(requestBodyStr)
.timeout(180000)
.execute()) {
status = execute.getStatus();
body = execute.body();
if (status == 200) {
return body;
}
// 余额不足处理
if (status == 402 || status == 403) {
if (!notified[i]) {
SendEmailUtil.commonExceptionReminder(
"Flux账户积分不足flux生成任务失败。key:" + apiKeys[i],
new String[]{"xupei3360@163.com", "fangjianliao@aidlab.hk", "investigation@aidlab.hk"}
);
notified[i] = true;
}
continue; // 尝试下一个key
}
// 其他错误直接返回null
log.warn("请求失败,状态码为:{}使用key{}", status, apiKeys[i]);
return null;
} catch (Exception e) {
log.error("请求异常使用key{}", apiKeys[i], e);
if (i == apiKeys.length - 1) return null; // 最后一个key也失败则返回null
}
}
log.warn("所有API key均余额不足");
return null;
}
public String sendPost(String url, String requestBodyStr){

View File

@@ -13,25 +13,25 @@ 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 jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.Valid;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
@Api(tags = "Account模块")
@Tag(name = "Account模块")
@Slf4j
@RestController
@RequestMapping("/api/account")
@@ -40,139 +40,139 @@ 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(){
Map<String,Integer> returnMap = new HashMap<>();
returnMap.put("code",200);
public Response<Map<String, Integer>> checkStatus() {
Map<String, Integer> returnMap = new HashMap<>();
returnMap.put("code", 200);
return Response.success(returnMap);
}
@ApiOperation(value = "查询账号到期时间")
@Operation(summary = "查询账号到期时间")
@PostMapping("/getExpiredTime")
public Response<Long> 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){
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));
@@ -191,22 +191,23 @@ public class AccountController {
/**
* 参与活动 获取福利
*
* @return
*/
/* @ApiOperation(value = "参与活动 获取福利")
/* @Operation(summary = "参与活动 获取福利")
@GetMapping("/activity")
public Response<String> getActivityBenefits(){
return Response.success(accountService.getActivityBenefits());
}*/
@ApiOperation(value = "将用户账号过期时间设置为过期当天的235959")
@Operation(summary = "将用户账号过期时间设置为过期当天的235959")
@GetMapping("/setUserValidToDayEnd")
public Response<List<Long>> 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,27 +216,27 @@ 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){
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(){
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){
public Response<String> editUserName(@RequestParam("newUserName") String newUserName) {
accountService.editUserName(newUserName);
return Response.success("success");
}
@@ -247,14 +248,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 +263,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 = "组织名模糊查询")
public Response<Set<String>> organizationNameSearch(@RequestParam("type") String type, @RequestParam("name") String name) {
@Operation(summary = "组织名模糊查询")
public Response<Set<String>> organizationNameSearch(@RequestParam("type") String type, @RequestParam(value = "name", required = false) 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 +309,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();
}*/

View File

@@ -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());

View File

@@ -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,

View File

@@ -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);

View File

@@ -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));
}

View File

@@ -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 @Nullable 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,58 @@ 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());
public Response<IPage<Map<String, Object>>> getAllUserIdList(@Parameter(description = "page") @RequestParam Integer page,
@Parameter(description = "size") @RequestParam Integer size,
@Parameter(description = "email 模糊查询") @RequestParam(required = false) String email) {
return Response.success(convenientInquiryService.getAllUserIdList(page, size, email));
}
@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));

View File

@@ -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);

View File

@@ -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));

View File

@@ -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();

View File

@@ -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);

View File

@@ -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")

View File

@@ -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"));

View File

@@ -0,0 +1,217 @@
package com.ai.da.controller;
import com.ai.da.common.response.Response;
import com.ai.da.model.dto.*;
import com.ai.da.model.dto.ContestantDTO;
import com.ai.da.model.vo.CheckOTPVO;
import com.ai.da.model.vo.ContestantCountVO;
import com.ai.da.model.vo.PageVisitCountVO;
import com.ai.da.service.GlobalAwardService;
import com.ai.da.service.upload.UploadService;
import com.ai.da.service.upload.UploadTask;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.Map;
@RestController
@RequestMapping("/api/global-award")
@Api(tags = "全球奖项API", description = "全球奖项大赛管理和文件上传")
public class GlobalAwardController {
@Resource
private GlobalAwardService globalAwardService;
@Resource
private UploadService uploadService;
// @PostMapping("/uploads/pdf")
// public Response<String> uploadPdf(@RequestParam("file") MultipartFile file,
// @RequestParam(value = "email", required = false) String email) throws Exception {
// return Response.success(globalAwardService.uploadPdf(file, email));
// }
//
// @PostMapping("/uploads/video")
// public Response<String> uploadVideo(@RequestParam("file") MultipartFile file,
// @RequestParam(value = "email", required = false) String email) throws Exception {
// return Response.success(globalAwardService.uploadVideo(file, email));
// }
// ===== 新增分片上传接口 =====
// ===== PDF分片上传接口 =====
/** 初始化PDF上传任务 */
@PostMapping("/uploads/pdf/init")
@ApiOperation(value = "初始化PDF上传", notes = "创建新的PDF上传任务并返回上传参数")
public Response<UploadInitResponse> initPdfUpload(@ApiParam(value = "PDF上传初始化请求", required = true) @RequestBody UploadInitRequest request) {
UploadTask uploadTask = uploadService.initPdfUpload(request);
return Response.success(UploadInitResponse.builder()
.uploadId(uploadTask.getUploadId())
.chunkSize(uploadTask.getChunkSize())
.totalChunks(uploadTask.getTotalChunks())
.expiresAt(uploadTask.getExpiresAt())
.build());
}
/** 上传PDF分片 */
@PostMapping("/uploads/pdf/chunk")
@ApiOperation(value = "上传PDF分片", notes = "上传PDF文件的单个分片")
public Response<UploadChunkResponse> uploadPdfChunk(
@ApiParam(value = "PDF文件分片", required = true) @RequestParam("chunk") MultipartFile chunk,
@ApiParam(value = "上传任务ID", required = true) @RequestParam("uploadId") String uploadId,
@ApiParam(value = "分片索引(从0开始)", required = true) @RequestParam("chunkIndex") int chunkIndex,
@ApiParam(value = "分片总数", required = true) @RequestParam("totalChunks") int totalChunks) {
UploadChunkResponse uploadChunkResponse = uploadService.uploadPdfChunk(uploadId, chunk, chunkIndex, totalChunks);
return Response.success(uploadChunkResponse);
}
/** 完成PDF上传 */
@PostMapping("/uploads/pdf/complete")
@ApiOperation(value = "完成PDF上传", notes = "完成PDF上传并合并所有分片")
public Response<UploadCompleteResponse> completePdfUpload(@ApiParam(value = "PDF上传完成请求", required = true) @RequestBody UploadCompleteRequest request) {
UploadCompleteResponse uploadCompleteResponse = uploadService.completePdfUpload(
request.getUploadId(),
request.getFileName(),
request.getTotalSize(),
request.getEmail(),
request.getSecureToken());
return Response.success(uploadCompleteResponse);
}
/** 查询PDF上传状态 */
@GetMapping("/uploads/pdf/status/{uploadId}")
@ApiOperation(value = "查询PDF上传状态", notes = "获取PDF上传任务的当前状态")
public Response<UploadStatusResponse> getPdfUploadStatus(@ApiParam(value = "上传任务ID", required = true) @PathVariable String uploadId) {
UploadStatusResponse pdfUploadStatus = uploadService.getPdfUploadStatus(uploadId);
return Response.success(pdfUploadStatus);
}
// ===== 视频分片上传接口 =====
/** 初始化视频上传任务 */
@PostMapping("/uploads/video/init")
@ApiOperation(value = "初始化视频上传", notes = "创建新的视频上传任务并返回上传参数")
public Response<UploadInitResponse> initVideoUpload(@ApiParam(value = "视频上传初始化请求", required = true) @RequestBody UploadInitRequest request) {
UploadTask uploadTask = uploadService.initVideoUpload(request);
return Response.success(UploadInitResponse.builder()
.uploadId(uploadTask.getUploadId())
.chunkSize(uploadTask.getChunkSize())
.totalChunks(uploadTask.getTotalChunks())
.expiresAt(uploadTask.getExpiresAt())
.build());
}
/** 上传视频分片 */
@PostMapping("/uploads/video/chunk")
@ApiOperation(value = "上传视频分片", notes = "上传视频文件的单个分片")
public Response<UploadChunkResponse> uploadVideoChunk(
@ApiParam(value = "视频文件分片", required = true) @RequestParam("chunk") MultipartFile chunk,
@ApiParam(value = "上传任务ID", required = true) @RequestParam("uploadId") String uploadId,
@ApiParam(value = "分片索引(从0开始)", required = true) @RequestParam("chunkIndex") int chunkIndex,
@ApiParam(value = "分片总数", required = true) @RequestParam("totalChunks") int totalChunks) {
UploadChunkResponse uploadChunkResponse = uploadService.uploadVideoChunk(uploadId, chunk, chunkIndex, totalChunks);
return Response.success(uploadChunkResponse);
}
/** 完成视频上传 */
@PostMapping("/uploads/video/complete")
@ApiOperation(value = "完成视频上传", notes = "完成视频上传并合并所有分片")
public Response<UploadCompleteResponse> completeVideoUpload(@ApiParam(value = "视频上传完成请求", required = true) @RequestBody UploadCompleteRequest request) {
UploadCompleteResponse uploadCompleteResponse = uploadService.completeVideoUpload(
request.getUploadId(),
request.getFileName(),
request.getTotalSize(),
request.getEmail(),
request.getSecureToken());
return Response.success(uploadCompleteResponse);
}
/** 查询视频上传状态 */
@GetMapping("/uploads/video/status/{uploadId}")
@ApiOperation(value = "查询视频上传状态", notes = "获取视频上传任务的当前状态")
public Response<UploadStatusResponse> getVideoUploadStatus(@ApiParam(value = "上传任务ID", required = true) @PathVariable String uploadId) {
UploadStatusResponse videoUploadStatus = uploadService.getVideoUploadStatus(uploadId);
return Response.success(videoUploadStatus);
}
@PostMapping("/contestants/save")
@ApiOperation(value = "保存参赛者信息", notes = "保存或更新参赛者信息及已上传的文件")
public Response<Map<String,Object>> submit(@ApiParam(value = "参赛者信息", required = true) @RequestBody ContestantDTO request) {
return Response.success(globalAwardService.saveContestant(request));
}
@GetMapping("/contestants/{id}")
@ApiOperation(value = "根据id查询参赛者", notes = "根据id获取参赛者信息")
public Response<ContestantDTO> getContestantByID(@ApiParam(value = "参赛者id", required = true) @PathVariable("id") String id) {
ContestantDTO dto = globalAwardService.getContestantByID(id);
return Response.success(dto);
}
@GetMapping("/checkEmail")
public Response<String> checkEmail(@RequestParam("email") String email) {
globalAwardService.checkEmail(email);
return Response.success();
}
@GetMapping("/checkCode")
public Response<CheckOTPVO> checkCode(@RequestParam("email") String email, @RequestParam("code") String code) {
return Response.success(globalAwardService.checkCode(email, code));
}
@GetMapping("/contestants/export")
@ApiOperation(value = "导出参赛者列表为Excel", notes = "导出所有参赛者信息为xlsx并触发下载")
public void exportContestants(HttpServletResponse response) throws Exception {
byte[] data = globalAwardService.exportContestants();
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setHeader("Content-Disposition", "attachment; filename=\"contestants.xlsx\"");
response.setContentLength(data.length);
response.getOutputStream().write(data);
response.getOutputStream().flush();
}
@PostMapping("/contestants/export/files")
@ApiOperation(value = "导出参赛者文件为ZIP", notes = "根据参赛者编号范围导出PDF、视频和信息文件为ZIP直接响应给浏览器")
public void exportContestantFiles(@ApiParam(value = "参赛者文件导出请求", required = true) @RequestBody ContestantExportRequest request, HttpServletResponse response) throws Exception {
byte[] zipData = globalAwardService.exportContestantFilesAsZip(request.getMinContestantNumber(), request.getMaxContestantNumber());
if (zipData.length == 0) {
response.setStatus(HttpServletResponse.SC_NOT_FOUND);
response.getWriter().write("No contestants found in the specified range.");
return;
}
response.setContentType("application/zip");
response.setHeader("Content-Disposition", "attachment; filename=\"contestants.zip\"");
response.setContentLength(zipData.length);
response.getOutputStream().write(zipData);
response.getOutputStream().flush();
}
@GetMapping("/contestants/count")
@ApiOperation(value = "查询参赛者总数", notes = "查询数据库中参赛者的总数量和最大参赛者编号")
public Response<ContestantCountVO> getContestantCount() {
return Response.success(globalAwardService.getContestantCount());
}
@PostMapping("/page/visit")
@ApiOperation(value = "记录比赛页面访问量", notes = "记录比赛页面的访问量,包含两种统计方式:每次访问/刷新计一次以及5秒内刷新只计一次")
public Response<Void> recordPageVisit(@ApiParam(value = "会话ID用于5秒内去重判断", required = false) @RequestParam(value = "sessionId", required = false) String sessionId) {
globalAwardService.recordPageVisit(sessionId);
return Response.success();
}
@GetMapping("/page/visit/count")
@ApiOperation(value = "获取比赛页面访问量", notes = "获取比赛页面的两种访问量rawVisitCount每次访问/刷新计一次)和 uniqueVisitCount5秒内刷新只计一次")
public Response<PageVisitCountVO> getPageVisitCount() {
return Response.success(globalAwardService.getPageVisitCount());
}
}

View File

@@ -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));

View File

@@ -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));

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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(){

View File

@@ -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));
}

View File

@@ -16,13 +16,16 @@ 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;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import jakarta.annotation.Resource;
import java.math.BigDecimal;
import java.util.Collections;
@@ -31,7 +34,7 @@ import java.util.Map;
import java.util.stream.Collectors;
@Api(tags = "python对接模块")
@Tag(name = "python对接模块")
@Slf4j
@RestController
@RequestMapping("/api/python")
@@ -49,17 +52,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 +72,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,37 +89,47 @@ 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));
}
@CrossOrigin
@Operation(summary = "Seg Anything 转发接口")
@PostMapping("/segAnything")
public Response<String> segAnything(@RequestBody Map<String, Object> payload) {
// 将前端传来的 Map 转为 fastjson JSONObject 并转发给 python 服务
JSONObject requestJson = (JSONObject) JSON.toJSON(payload);
String url = pythonService.segAnything(requestJson);
return Response.success(url);
}
}

View File

@@ -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));

View File

@@ -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{
@@ -70,13 +70,13 @@ public class StripeController {
Long size = redisUtil.getSize(key_1);
// 给我发送邮件
if (webhookReminderFlag.equals("1") && size == 3){
SendEmailUtil.commonExceptionReminder("Stripe Webhook 回调", new String[]{"xupei3360@163.com"});
SendEmailUtil.commonExceptionReminder("Stripe Webhook 回调处理出现异常", new String[]{"xupei3360@163.com"});
}
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
}
@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));

View File

@@ -0,0 +1,112 @@
package com.ai.da.controller;
import com.ai.da.common.response.Response;
import com.ai.da.common.task.SubscriptionReminderTask;
import com.ai.da.mapper.primary.entity.SubscriptionPlan;
import com.ai.da.model.dto.SubscriptionPlanDTO;
import com.ai.da.model.dto.SubscriptionPlanPageQuery;
import com.ai.da.model.dto.UpdateSubscriptionPlanDTO;
import com.ai.da.model.vo.SubscriptionPlanVO;
import com.ai.da.service.SubscriptionPlanService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@Tag(name = "订阅计划模块")
@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping("/api/subscription_plan")
public class SubscriptionPlanController {
private final SubscriptionPlanService subscriptionPlanService;
private final SubscriptionReminderTask subscriptionReminderTask;
@Operation(summary = "创建订阅计划")
@PostMapping("/createPlan")
public Response<String> createPlan(@Valid @RequestBody SubscriptionPlanDTO subscriptionPlanDTO) {
subscriptionPlanService.createPlan(subscriptionPlanDTO);
return Response.success();
}
@Operation(summary = "更新订阅计划")
@PostMapping("/updatePlan")
public Response<String> updatePlan(@Valid @RequestBody UpdateSubscriptionPlanDTO updateDTO) {
subscriptionPlanService.updatePlan(updateDTO);
return Response.success();
}
@Operation(summary = "搜索订阅计划")
@PostMapping("/searchByOrganizationIdAndStatus")
public Response<List<SubscriptionPlan>> searchByOrganizationIdAndStatus(@Valid @RequestBody SubscriptionPlanPageQuery subscriptionPlanPageQuery) {
return Response.success(subscriptionPlanService.searchByOrganizationIdAndStatus(subscriptionPlanPageQuery));
}
@Operation(summary = "分页搜索订阅计划")
@PostMapping("/searchByPage")
public Response<IPage<SubscriptionPlanVO>> searchByPage(@Valid @RequestBody SubscriptionPlanPageQuery subscriptionPlanPageQuery) {
IPage<SubscriptionPlanVO> subscriptionPlanVOIPage = subscriptionPlanService.searchByPage(subscriptionPlanPageQuery);
return Response.success(subscriptionPlanVOIPage);
}
@Operation(summary = "删除订阅计划")
@GetMapping("/deletePlan")
public Response<String> deletePlan(@RequestParam Long id) {
subscriptionPlanService.deletePlan(id);
return Response.success();
}
@Operation(summary = "管理员切换订阅计划")
@GetMapping("/switchSubscriptionPlan")
public Response<String> switchSubscriptionPlan(@RequestParam Long targetSubscriptionPlanId, @RequestParam(required = false) Long adminAccId) {
subscriptionPlanService.switchSubscriptionPlan(targetSubscriptionPlanId, adminAccId);
return Response.success();
}
@Operation(summary = "子账号切换订阅计划")
@GetMapping("/switchSubAccSubscriptionPlan")
public Response<String> switchSubAccSubscriptionPlan(@RequestParam Long targetSubscriptionPlanId, @RequestParam Long subAccId) {
subscriptionPlanService.switchSubAccSubscriptionPlan(targetSubscriptionPlanId, subAccId);
return Response.success();
}
// @Hidden
@Operation(summary = "activeSubscriptionPlan")
@GetMapping("/activeSubscriptionPlan")
public Response<String> activeSubscriptionPlan() {
subscriptionPlanService.activeSubscriptionPlan(null);
return Response.success();
}
// @Hidden
@Operation(summary = "expireSubscription")
@GetMapping("/expireSubscription")
public Response<String> expireSubscription() {
subscriptionPlanService.expireSubscription();
return Response.success();
}
@Operation(summary = "subscriptionReminder")
@GetMapping("/subscriptionReminder")
public Response<String> subscriptionReminder() {
subscriptionReminderTask.subscriptionReminder();
return Response.success();
}
@Operation(summary = "trialReminder")
@GetMapping("/trialReminder")
public Response<String> trialReminder() {
subscriptionReminderTask.trialReminder();
return Response.success();
}
}

View File

@@ -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));

View File

@@ -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));
}

View File

@@ -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));

View File

@@ -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));
}

View File

@@ -0,0 +1,12 @@
package com.ai.da.mapper.primary;
import com.ai.da.mapper.primary.entity.Contestant;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface ContestantMapper extends BaseMapper<Contestant> {
}

View File

@@ -19,7 +19,7 @@ public interface DesignMapper extends CommonMapper<Design> {
Long insertDesign(Design design);
List<UserDesignStatisticDTO> getDesignStatistic(String startTime, String endTime, List<Long> ids, String email,
String role, String organizationName);
String role, String organizationName, boolean filterBySecond);
List<Design> selectDeleteList();
}

View File

@@ -4,6 +4,7 @@ import com.ai.da.common.config.mybatis.plus.CommonMapper;
import com.ai.da.mapper.primary.entity.Notification;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.util.Map;
@@ -20,5 +21,5 @@ public interface NotificationMapper extends CommonMapper<Notification> {
void setPersonalNotificationAllRead(String type, Long receiverId, LocalDateTime time);
List<Long> getUnreadSysNotification(Long accountId);
List<Long> getUnreadSysNotification(Long accountId, Date createTime);
}

View File

@@ -0,0 +1,29 @@
package com.ai.da.mapper.primary;
import com.ai.da.mapper.primary.entity.SubscriptionPlan;
import com.ai.da.model.vo.SubscriptionPlanVO;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
public interface SubscriptionPlanMapper extends BaseMapper<SubscriptionPlan> {
/**
* 关联查询订阅计划信息(包含管理员邮箱)- 分页
*/
@Select("""
SELECT sp.*,
a.user_email AS adminAccEmail,
a.user_name AS adminAccName,
o.name AS organizationName
FROM t_subscription_plan sp
LEFT JOIN t_account a ON sp.admin_acc_id = a.id
LEFT JOIN t_organization o on sp.organization_id = o.id
${ew.customSqlSegment}
""")
Page<SubscriptionPlanVO> selectWithEmailPage(Page<SubscriptionPlanVO> page,
@Param(Constants.WRAPPER) Wrapper<?> wrapper);
}

View File

@@ -0,0 +1,7 @@
package com.ai.da.mapper.primary;
import com.ai.da.common.config.mybatis.plus.CommonMapper;
import com.ai.da.mapper.primary.entity.UserPreference;
public interface UserPreferenceMapper extends CommonMapper<UserPreference> {
}

View File

@@ -3,6 +3,8 @@ package com.ai.da.mapper.primary;
import com.ai.da.common.config.mybatis.plus.CommonMapper;
import com.ai.da.mapper.primary.entity.WorkspaceRelStyle;
import java.util.List;
/**
* Mapper 接口
*
@@ -11,5 +13,11 @@ import com.ai.da.mapper.primary.entity.WorkspaceRelStyle;
*/
public interface WorkspaceRelStyleMapper extends CommonMapper<WorkspaceRelStyle> {
/**
* 根据projectId查询workspaceRelStyles
* @param projectId 项目ID
* @return workspaceRelStyles列表
*/
List<WorkspaceRelStyle> selectByProjectId(Long projectId);
}

View File

@@ -1,14 +1,14 @@
package com.ai.da.mapper.primary.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("t_api_generate")
@ApiModel("调用第三方api的所有记录")
@Schema(description = "调用第三方api的所有记录")
public class APIGenerate extends BaseEntity{
// 用户id
private Long accountId;

View File

@@ -1,12 +1,13 @@
package com.ai.da.mapper.primary.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import io.swagger.v3.oas.annotations.media.Schema;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.experimental.Accessors;
import java.io.Serializable;
@@ -76,13 +77,13 @@ public class Account implements Serializable {
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createDate;
/**
* 更新时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updateDate;
private Integer isTrial;
@@ -132,12 +133,36 @@ public class Account implements Serializable {
private String invitationCode;
@ApiModelProperty("title")
@Schema(description = "title")
private String title;
@ApiModelProperty("surname")
@Schema(description = "surname")
private String surname;
@ApiModelProperty("givenName")
@Schema(description = "givenName")
private String givenName;
private Long subscriptionPlanId;
// 在类内部定义的枚举
@Getter
public enum SystemRole {
VISITOR("游客", 0),
YEARLY("年付用户", 1),
MONTHLY("月付用户", 2),
TRIAL("试用用户", 3),
EVENT_USER("参加活动获取30天有效期和6000个积分的用户", 4),
ENTERPRISE_ADMIN("企业管理员账号", 5),
ENTERPRISE_SUB("企业子账号", 6),
EDUCATION_ADMIN("学校管理员", 7),
EDUCATION_SUB("学校子账号", 8);
private final String desc;
private final int code;
SystemRole(String desc, int code) {
this.desc = desc;
this.code = code;
}
}
}

View File

@@ -1,9 +1,9 @@
package com.ai.da.mapper.primary.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import io.swagger.v3.oas.annotations.media.Schema;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
@@ -27,16 +27,16 @@ public class Canvas implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("ID")
@Schema(description = "ID")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
@ApiModelProperty("url")
@Schema(description = "url")
private String url;
@ApiModelProperty("accountId")
@Schema(description = "accountId")
private Long accountId;
@ApiModelProperty("createTime")
@Schema(description = "createTime")
private LocalDateTime createTime;
}

View File

@@ -1,9 +1,9 @@
package com.ai.da.mapper.primary.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import io.swagger.v3.oas.annotations.media.Schema;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
@@ -22,22 +22,22 @@ public class ChatMessage implements Serializable {
@TableId(value = "id", type = IdType.AUTO)
private Long id;
@ApiModelProperty("项目ID")
@Schema(description = "项目ID")
private Long projectId;
@ApiModelProperty("角色system/user")
@Schema(description = "角色system/user")
private String role;
@ApiModelProperty("排序")
@Schema(description = "排序")
private Integer seq;
@ApiModelProperty("内容")
@Schema(description = "内容")
private String content;
@ApiModelProperty("用户ID")
@Schema(description = "用户ID")
private Long accountId;
@ApiModelProperty("0对话内容1颜色2图片")
@Schema(description = "0对话内容1颜色2图片")
private Integer isImage;
/**
* 输入
@@ -56,6 +56,6 @@ public class ChatMessage implements Serializable {
*/
private String totalCost;
@ApiModelProperty("创建时间")
@Schema(description = "创建时间")
private LocalDateTime createTime;
}

View File

@@ -1,9 +1,9 @@
package com.ai.da.mapper.primary.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import io.swagger.v3.oas.annotations.media.Schema;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
@@ -20,7 +20,7 @@ public class ChatRobot implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("ID")
@Schema(description = "ID")
@TableId(value = "id", type = IdType.AUTO)
private Long id;

View File

@@ -1,9 +1,9 @@
package com.ai.da.mapper.primary.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import io.swagger.v3.oas.annotations.media.Schema;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
@@ -18,22 +18,22 @@ import java.time.LocalDateTime;
public class Classification implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "ID")
@Schema(description = "ID")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
@ApiModelProperty(value = "分类名称")
@Schema(description = "分类名称")
private String classificationName;
@ApiModelProperty(value = "分类类型")
@Schema(description = "分类类型")
private String type;
@ApiModelProperty(value = "父菜单ID")
@Schema(description = "父菜单ID")
private Long parentId;
@ApiModelProperty(value = "用户ID")
@Schema(description = "用户ID")
private Long userId;
@ApiModelProperty(value = "创建时间")
@Schema(description = "创建时间")
private LocalDateTime createTime;
@ApiModelProperty(value = "更新时间")
@Schema(description = "更新时间")
private LocalDateTime updateTime;
@ApiModelProperty(value = "是否删除1:是0:否")
@Schema(description = "是否删除1:是0:否")
private Integer isDeleted = 0;
}

View File

@@ -1,9 +1,9 @@
package com.ai.da.mapper.primary.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import io.swagger.v3.oas.annotations.media.Schema;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
@@ -18,20 +18,20 @@ import java.time.LocalDateTime;
public class ClassificationRelLibrary implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "ID")
@Schema(description = "ID")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
@ApiModelProperty(value = "分类名称")
@Schema(description = "分类名称")
private Long classificationId;
@ApiModelProperty(value = "分类名称")
@Schema(description = "分类名称")
private Long libraryId;
@ApiModelProperty(value = "用户ID")
@Schema(description = "用户ID")
private Long userId;
@ApiModelProperty(value = "创建时间")
@Schema(description = "创建时间")
private LocalDateTime createTime;
@ApiModelProperty(value = "更新时间")
@Schema(description = "更新时间")
private LocalDateTime updateTime;
@ApiModelProperty(value = "是否删除1:是0:否")
@Schema(description = "是否删除1:是0:否")
private Integer isDeleted;
}

View File

@@ -1,9 +1,9 @@
package com.ai.da.mapper.primary.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import io.swagger.v3.oas.annotations.media.Schema;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
@@ -19,52 +19,52 @@ import java.time.LocalDateTime;
public class CloudTask implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "ID")
@Schema(description = "ID")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
@ApiModelProperty("任务名")
@Schema(description = "任务名")
private String name;
@ApiModelProperty("项目ID")
@Schema(description = "项目ID")
private Long projectId;
@ApiModelProperty("collectionId")
@Schema(description = "collectionId")
private Long collectionId;
@ApiModelProperty("designId")
@Schema(description = "designId")
private Long designId;
@ApiModelProperty("任务类型")
@Schema(description = "任务类型")
private String buildType;
@ApiModelProperty("生成数量")
@Schema(description = "生成数量")
private Integer nums;
@ApiModelProperty("完成数量")
@Schema(description = "完成数量")
private Integer completedNum;
@ApiModelProperty("消耗积分")
@Schema(description = "消耗积分")
private Integer costCredits;
@ApiModelProperty("状态1完成0未完成")
@Schema(description = "状态1完成0未完成")
private Integer status;
@ApiModelProperty("批处理ID")
@Schema(description = "批处理ID")
private String taskId;
@ApiModelProperty("创建时间")
@Schema(description = "创建时间")
private LocalDateTime createTime;
@ApiModelProperty("任务开始时间")
@Schema(description = "任务开始时间")
private LocalDateTime startTime;
@ApiModelProperty("任务更新时间")
@Schema(description = "任务更新时间")
private LocalDateTime updateTime;
@ApiModelProperty("用户ID")
@Schema(description = "用户ID")
private Long accountId;
@ApiModelProperty("任务序号")
@Schema(description = "任务序号")
private Long sequence;
}

View File

@@ -0,0 +1,82 @@
package com.ai.da.mapper.primary.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDateTime;
/**
* submissions 表对应实体 — 参赛选手信息 (Contestant)
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@TableName("contestants")
public class Contestant {
@TableId(value = "id", type = IdType.ASSIGN_UUID)
private String id;
private String email;
@TableField("contestant_number")
private Integer contestantNumber;
@TableField("first_name")
private String firstName;
@TableField("last_name")
private String lastName;
private String gender;
private String occupation;
private Integer age;
@TableField("country_region_city")
private String countryRegionCity;
@TableField("phone_number")
private String phoneNumber;
@TableField("design_title")
private String designTitle;
@TableField("design_description")
private String designDescription;
@TableField("pdf_path")
private String pdfPath;
@TableField("video_path")
private String videoPath;
@TableField("video_duration")
private Integer videoDuration;
@TableField("video_size")
private Long videoSize;
@TableField("pdf_size")
private Long pdfSize;
@TableField("portfolio_url")
private String portfolioUrl;
@TableField("created_at")
private LocalDateTime createdAt;
@TableField("updated_at")
private LocalDateTime updatedAt;
}

View File

@@ -62,4 +62,9 @@ public class DesignItemDetailPrint {
* 更新时间
*/
private LocalDateTime updateDate;
/**
* 对象信息JSON格式
*/
private String object;
}

View File

@@ -3,50 +3,49 @@ package com.ai.da.mapper.primary.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
@Data
@ApiModel(value = "Portfolio对象", description = "作品集")
@Schema(description = "作品集")
@TableName("portfolio")
public class Portfolio implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "ID")
@Schema(description = "ID")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
@ApiModelProperty(value = "collection ID")
@Schema(description = "collection ID")
private Long collectionId;
private Long projectId;
@ApiModelProperty(value = "userLikeGroup源")
@Schema(description = "userLikeGroup源")
private Long userLikeGroupSourceId;
@ApiModelProperty(value = "作品名称")
@Schema(description = "作品名称")
private String portfolioName;
@ApiModelProperty(value = "作品描述")
@Schema(description = "作品描述")
private String portfolioDes;
@ApiModelProperty(value = "作品类型")
@Schema(description = "作品类型")
private String portfolioType;
@ApiModelProperty(value = "画布ID")
@Schema(description = "画布ID")
private Long canvasId;
@ApiModelProperty(value = "封面ID")
@Schema(description = "封面ID")
private Long coverId;
@ApiModelProperty(value = "作品状态1公开0隐藏")
@Schema(description = "作品状态1公开0隐藏")
private Integer status;
@ApiModelProperty(value = "是否允许二次创作1允许0不允许")
@Schema(description = "是否允许二次创作1允许0不允许")
private Integer openSource;
private Integer original;
@@ -57,7 +56,7 @@ public class Portfolio implements Serializable {
private String snapshot;
@ApiModelProperty(value = "作品集作者ID")
@Schema(description = "作品集作者ID")
private Long accountId;
// 学校/企业id
@@ -66,12 +65,12 @@ public class Portfolio implements Serializable {
// 该条作品是否在该组织公开 默认公开 10为不公开
private Integer isPublic;
@ApiModelProperty(value = "创建时间")
@Schema(description = "创建时间")
private LocalDateTime createDate;
@ApiModelProperty(value = "更新时间")
@Schema(description = "更新时间")
private LocalDateTime updateDate;
@ApiModelProperty(value = "是否删除")
@Schema(description = "是否删除")
private Integer isDeleted;
}

View File

@@ -0,0 +1,92 @@
package com.ai.da.mapper.primary.entity;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@TableName("t_subscription_plan")
public class SubscriptionPlan extends BaseEntity{
/**
* 组织id
*/
private Long organizationId;
/**
* 订阅命名
*/
private String name;
/**
* 当前订阅开始时间
*/
private Long currentPeriodStart;
/**
* 当前订阅结束时间
*/
private Long currentPeriodEnd;
/**
* 当前订阅总的子账号数量
*/
private Integer accountNum;
/**
* 当前订阅可用积分上限
*/
private BigDecimal creditLimit;
/**
* 当前订阅已使用积分
*/
private BigDecimal creditUsage;
/**
* 管理员账户id
*/
private Long adminAccId;
@TableLogic(value = "0", delval = "1")
private Integer isDeleted;
/**
* 删除人的用户id
*/
private Long deleteBy;
/**
* 状态
*/
private String status;
/**
* 国家或地区
*/
private String countryOrRegion;
// 在类内部定义的枚举
@Getter
public enum SubscriptionStatus {
PENDING("待激活", 0),
ACTIVE("已激活", 1),
EXPIRED("已过期", 2),
CANCELLED("已取消", 3);
private final String desc;
private final int code;
SubscriptionStatus(String desc, int code) {
this.desc = desc;
this.code = code;
}
}
}

View File

@@ -1,10 +1,9 @@
package com.ai.da.mapper.primary.entity;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
@@ -25,22 +24,22 @@ import java.util.Date;
@Setter
@Accessors(chain = true)
@TableName("t_collection_element_relation")
@ApiModel(value = "TCollectionElementRelation对象", description = "collection和element的关联表")
@Schema(description = "collection和element的关联表")
public class TCollectionElementRelation implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("ID")
@Schema(description = "ID")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
@ApiModelProperty("element ID")
@Schema(description = "element ID")
private Long elementId;
@ApiModelProperty("colletion ID class类型为COLLECTION 存 其他默认是0")
@Schema(description = "colletion ID class类型为COLLECTION 存 其他默认是0")
private Long collectionId;
@ApiModelProperty("创建时间")
@Schema(description = "创建时间")
private Date createDate;

View File

@@ -2,6 +2,7 @@
package com.ai.da.mapper.primary.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import io.swagger.v3.oas.annotations.media.Schema;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
@@ -9,9 +10,6 @@ import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* design item表 存对应design的8张图片实体类
*
@@ -20,7 +18,7 @@ import io.swagger.annotations.ApiModelProperty;
*/
@Data
@TableName("t_design_python_outfit")
@ApiModel(value = "TDesignPythonOutfit对象", description = "design item表 存对应design的8张图片")
@Schema(description = "design item表 存对应design的8张图片")
public class TDesignPythonOutfit implements Serializable {
private static final long serialVersionUID = 1L;
@@ -28,48 +26,48 @@ public class TDesignPythonOutfit implements Serializable {
/**
* ID
*/
@ApiModelProperty(value = "ID")
@Schema(description = "ID")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* designItemId
*/
@ApiModelProperty(value = "designItemId")
@Schema(description = "designItemId")
private Long designItemId;
/**
* 关联的design ID
*/
@ApiModelProperty(value = "关联的design ID")
@Schema(description = "关联的design ID")
private Long designId;
/**
* 关联的collection ID
*/
@ApiModelProperty(value = "关联的collection ID")
@Schema(description = "关联的collection ID")
private Long collectionId;
/**
* design后的用户文件地址(python 返回)
*/
@ApiModelProperty(value = "design后的用户文件地址(python 返回)")
@Schema(description = "design后的用户文件地址(python 返回)")
private String designUrl;
/**
* 保存用户ID
*/
@ApiModelProperty(value = "保存用户ID")
@Schema(description = "保存用户ID")
private Long userId;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
@Schema(description = "创建时间")
private LocalDateTime createDate;
/**
* 更新时间
*/
@ApiModelProperty(value = "更新时间")
@Schema(description = "更新时间")
private LocalDateTime updateDate;
/**
* 是否删除
*/
@ApiModelProperty(value = "是否删除")
@Schema(description = "是否删除")
private String isDeleted;

View File

@@ -2,6 +2,7 @@
package com.ai.da.mapper.primary.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import io.swagger.v3.oas.annotations.media.Schema;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
@@ -9,9 +10,6 @@ import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* design item详情表实体类
*
@@ -20,7 +18,7 @@ import io.swagger.annotations.ApiModelProperty;
*/
@Data
@TableName("t_design_python_outfit_detail")
@ApiModel(value = "TDesignPythonOutfitDetail对象", description = "design item详情表")
@Schema(description = "design item详情表")
public class TDesignPythonOutfitDetail implements Serializable {
private static final long serialVersionUID = 1L;
@@ -28,84 +26,97 @@ public class TDesignPythonOutfitDetail implements Serializable {
/**
* ID
*/
@ApiModelProperty(value = "ID")
@Schema(description = "ID")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 关联的design ID
*/
@ApiModelProperty(value = "关联的design ID")
@Schema(description = "关联的design ID")
private Long designId;
/**
* 关联的design_item ID
*/
@ApiModelProperty(value = "关联的design_item ID")
@Schema(description = "关联的design_item ID")
private Long designPythonOutfitId;
/**
* 关联的elementId 没有为null
*/
@ApiModelProperty(value = "关联的elementId 没有为null")
@Schema(description = "关联的elementId 没有为null")
private Long collectionElementId;
/**
* 图层
*/
@ApiModelProperty(value = "图层")
@Schema(description = "图层")
private String imageCategory;
/**
* imageSize
*/
@ApiModelProperty(value = "imageSize")
@Schema(description = "imageSize")
private String imageSize;
/**
* 对应的图片的绝对路径
*/
@ApiModelProperty(value = "对应的图片的绝对路径")
@Schema(description = "对应的图片的绝对路径")
private String imageUrl;
/**
* mask_url
*/
@ApiModelProperty(value = "mask_url")
@Schema(description = "mask_url")
private String maskUrl;
/**
* 位置
*/
@ApiModelProperty(value = "位置")
@Schema(description = "位置")
private String position;
/**
* 偏移量
*/
@ApiModelProperty(value = "偏移量")
@Schema(description = "偏移量")
private String offset;
/**
* 图层缩放大小
*/
@ApiModelProperty(value = "图层缩放大小")
@Schema(description = "图层缩放大小")
private String scale;
/**
* 用户ID
*/
@ApiModelProperty(value = "用户ID")
@Schema(description = "用户ID")
private Long userId;
/**
* 图层优先级
*/
@ApiModelProperty(value = "图层优先级")
@Schema(description = "图层优先级")
private Integer priority;
/**
* 镜像模式
*/
@Schema(description = "镜像模式")
private String transpose;
/**
* 旋转角度
*/
@Schema(description = "旋转角度")
private Double rotate;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
@Schema(description = "创建时间")
private LocalDateTime createDate;
/**
* 更新时间
*/
@ApiModelProperty(value = "更新时间")
@Schema(description = "更新时间")
private LocalDateTime updateDate;
/**
* 是否删除
*/
@ApiModelProperty(value = "是否删除")
@Schema(description = "是否删除")
private Integer isDeleted;

View File

@@ -1,8 +1,8 @@
package com.ai.da.mapper.primary.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import io.swagger.v3.oas.annotations.media.Schema;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@@ -12,22 +12,22 @@ import java.time.LocalDateTime;
public class ToProductElement implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "ID")
@Schema(description = "ID")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
@ApiModelProperty(value = "userLikeGroupId")
@Schema(description = "userLikeGroupId")
private Long userLikeGroupId;
@ApiModelProperty(value = "项目id")
@Schema(description = "项目id")
private Long projectId;
@ApiModelProperty(value = "url")
@Schema(description = "url")
private String url;
@ApiModelProperty(value = "首尾帧 first | last")
@Schema(description = "首尾帧 first | last")
private String frameType;
@ApiModelProperty(value = "createTime")
@Schema(description = "createTime")
private LocalDateTime createTime;
}

View File

@@ -1,8 +1,8 @@
package com.ai.da.mapper.primary.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import io.swagger.v3.oas.annotations.media.Schema;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@@ -12,18 +12,18 @@ import java.time.LocalDateTime;
public class ToProductImageRecord implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "ID")
@Schema(description = "ID")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
@ApiModelProperty(value = "userLikeGroupId")
@Schema(description = "userLikeGroupId")
private Long userLikeGroupId;
private Long projectId;
@ApiModelProperty(value = "prompt")
@Schema(description = "prompt")
private String prompt;
@ApiModelProperty(value = "createTime")
@Schema(description = "createTime")
private LocalDateTime createTime;
}

View File

@@ -1,9 +1,9 @@
package com.ai.da.mapper.primary.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import io.swagger.v3.oas.annotations.media.Schema;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@@ -14,11 +14,11 @@ import java.time.LocalDateTime;
public class ToProductImageResult implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "ID")
@Schema(description = "ID")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
@ApiModelProperty(value = "elementId")
@Schema(description = "elementId")
private Long elementId;
/**
@@ -26,28 +26,28 @@ public class ToProductImageResult implements Serializable {
* ProductElement 上传的图片
* ToProductImage 以to product image的结果作为图片来源(relight)
*/
@ApiModelProperty(value = "elementType 图片来源DesignOutfit(design的结果) | ProductElement(上传的图片) | ToProductImage(生成的结果)")
@Schema(description = "elementType 图片来源DesignOutfit(design的结果) | ProductElement(上传的图片) | ToProductImage(生成的结果)")
private String elementType;
@ApiModelProperty(value = "url")
@Schema(description = "url")
private String url;
@ApiModelProperty(value = "isLike 1是0否")
@Schema(description = "isLike 1是0否")
private Integer isLike;
@ApiModelProperty(value = "createTime")
@Schema(description = "createTime")
private LocalDateTime createTime;
@ApiModelProperty(value = "toProductImageRecordId")
@Schema(description = "toProductImageRecordId")
private Long toProductImageRecordId;
@ApiModelProperty(value = "taskId")
@Schema(description = "taskId")
private String taskId;
@ApiModelProperty(value = "userLikeGroupId")
@Schema(description = "userLikeGroupId")
private Long userLikeGroupId;
@ApiModelProperty(value = "generate 结果类型")
@Schema(description = "generate 结果类型")
private String resultType;
private Double brightenValue;
@@ -64,7 +64,7 @@ public class ToProductImageResult implements Serializable {
private String status;
@ApiModelProperty(value = "是否删除1:是 0:否")
@Schema(description = "是否删除1:是 0:否")
@TableField
private byte isDeleted = 0;
}

View File

@@ -1,10 +1,10 @@
package com.ai.da.mapper.primary.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import io.swagger.v3.oas.annotations.media.Schema;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
@@ -26,25 +26,25 @@ public class TrialOrder implements Serializable {
@TableId(value = "id", type = IdType.AUTO)
private Long id;
@ApiModelProperty("title")
@Schema(description = "title")
private String title;
@ApiModelProperty("surname")
@Schema(description = "surname")
private String surname;
@ApiModelProperty("givenName")
@Schema(description = "givenName")
private String givenName;
@ApiModelProperty("userName")
@Schema(description = "userName")
private String userName;
@ApiModelProperty("email")
@Schema(description = "email")
private String email;
@ApiModelProperty("country")
@Schema(description = "country")
private String country;
@ApiModelProperty("occupation")
@Schema(description = "occupation")
private String occupation;
/**

View File

@@ -0,0 +1,31 @@
package com.ai.da.mapper.primary.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user_preference")
public class UserPreference implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
private Long accountId;
private String path;
private LocalDateTime dataTime;
private String category;
private String style;
private Long workspaceRelStyleId;
private Long projectId;
private Long designItemId;
}

View File

@@ -23,5 +23,8 @@ public class UserPreferenceLogTest implements Serializable {
private Long accountId;
private String path;
private LocalDateTime dataTime;
private String category;
private String style;
private Long sysFileId;
}

View File

@@ -7,8 +7,7 @@ import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* 实体类
@@ -17,7 +16,7 @@ import io.swagger.annotations.ApiModelProperty;
* @since 2023-08-01
*/
@Data
@ApiModel(value = "Workspace对象", description = "Workspace对象")
@Schema(description = "Workspace对象")
@TableName("workspace")
public class Workspace implements Serializable {
@@ -26,23 +25,23 @@ public class Workspace implements Serializable {
/**
* ID
*/
@ApiModelProperty(value = "ID")
@Schema(description = "ID")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 工作空间名称
*/
@ApiModelProperty(value = "工作空间名称")
@Schema(description = "工作空间名称")
private String workSpaceName;
/**
* 用户名
*/
@ApiModelProperty(value = "用户名")
@Schema(description = "用户名")
private String userName;
/**
* 用户ID
*/
@ApiModelProperty(value = "用户ID")
@Schema(description = "用户ID")
private Long accountId;
/**
* 年龄段 Adult || Child
@@ -51,54 +50,54 @@ public class Workspace implements Serializable {
/**
* 性别
*/
@ApiModelProperty(value = "性别")
@Schema(description = "性别")
private String sex;
/**
* 服装部位
*/
@ApiModelProperty(value = "服装部位")
@Schema(description = "服装部位")
private String position;
/**
* SYSTEM_DESIGNER占比
*/
@ApiModelProperty(value = "SYSTEM_DESIGNER占比")
@Schema(description = "SYSTEM_DESIGNER占比")
private Integer systemDesignerPercentage;
/**
* 人体模型
*/
@ApiModelProperty(value = "人体模型ID")
@Schema(description = "人体模型ID")
private Long mannequinFemaleId;
private Long mannequinMaleId;
private Long mannequinChildId;
/**
* 人体模型
*/
@ApiModelProperty(value = "人体模型类型")
@Schema(description = "人体模型类型")
private String mannequinFemaleType;
private String mannequinMaleType;
private String mannequinChildType;
/**
* 最后使用的工作空间标识
*/
@ApiModelProperty(value = "最后使用的工作空间标识")
@Schema(description = "最后使用的工作空间标识")
private Integer isLastIndex;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
@ApiModelProperty(value = "创建时间")
@Schema(description = "创建时间")
private LocalDateTime createTime;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@ApiModelProperty(value = "更新时间")
@Schema(description = "更新时间")
private LocalDateTime updateTime;
/**
* 是否删除
*/
@TableLogic
@ApiModelProperty(value = "是否删除")
@Schema(description = "是否删除")
private Integer isDeleted;
private Long projectId;

View File

@@ -1,7 +1,7 @@
package com.ai.da.model.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@@ -10,42 +10,42 @@ import jakarta.validation.constraints.NotBlank;
import java.math.BigDecimal;
@Data
@ApiModel("AccountAddDTO")
@Schema(description = "AccountAddDTO")
@NoArgsConstructor
@AllArgsConstructor
public class AccountAddDTO {
@NotBlank(message = "email.cannot.be.empty")
@ApiModelProperty("userEmail")
@Schema(description = "userEmail")
private String userEmail;
@NotBlank(message = "userName.cannot.be.empty")
@ApiModelProperty("userName")
@Schema(description = "userName")
private String userName;
private String country;
@NotBlank(message = "validStartTime.cannot.be.empty")
@ApiModelProperty("Start time of account validity ")
@Schema(description = "Start time of account validity ")
private String validStartTime;
@NotBlank(message = "validEndTime.cannot.be.empty")
@ApiModelProperty("End time of account validity ")
@Schema(description = "End time of account validity ")
private String validEndTime;
@ApiModelProperty("是否是试用用户 0 否 | 1 是")
@Schema(description = "是否是试用用户 0 否 | 1 是")
private Integer isTrial;
@ApiModelProperty("分配积分")
@Schema(description = "分配积分")
private BigDecimal credits;
@ApiModelProperty("用户角色")
@Schema(description = "用户角色")
private Integer systemUser;
@ApiModelProperty("学校名称 | 企业名称")
@Schema(description = "学校名称 | 企业名称")
private String organizationName;
@ApiModelProperty("可分配子账号总数(仅适用于学校或教育管理员)")
@Schema(description = "可分配子账号总数(仅适用于学校或教育管理员)")
private Integer subAccountNum;
public AccountAddDTO(String userEmail, String userName, String country, String validStartTime, String validEndTime, Integer isTrial, BigDecimal credits, Integer systemUser) {

View File

@@ -1,39 +1,39 @@
package com.ai.da.model.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import jakarta.validation.constraints.NotBlank;
@Data
@ApiModel("绑定邮箱")
@Schema(description = "绑定邮箱")
public class AccountBindEmailDTO {
// @NotNull(message = "userId.cannot.be.empty")
// @ApiModelProperty("用户id")
// @Schema(description = "用户id")
// private Long userId;
@NotBlank(message = "email.cannot.be.empty")
@ApiModelProperty("邮箱")
@Schema(description = "邮箱")
private String userEmail;
@NotBlank(message = "emailVerifyCode.cannot.be.empty")
@ApiModelProperty("邮箱验证码")
@Schema(description = "邮箱验证码")
private String emailVerifyCode;
// @ApiModelProperty("国家")
// @Schema(description = "国家")
// private String country;
//
// @ApiModelProperty("职业")
// @Schema(description = "职业")
// private String occupation;
//
// @ApiModelProperty("title")
// @Schema(description = "title")
// private String title;
//
// @ApiModelProperty("surname")
// @Schema(description = "surname")
// private String surname;
//
// @ApiModelProperty("givenName")
// @Schema(description = "givenName")
// private String givenName;
}

View File

@@ -1,35 +1,35 @@
package com.ai.da.model.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
@ApiModel("AccountEdit")
@Schema(description = "AccountEdit")
public class AccountEditDTO {
@ApiModelProperty("Old user email")
@Schema(description = "Old user email")
private String oldEmail;
@ApiModelProperty("New user email")
@Schema(description = "New user email")
private String newEmail;
@ApiModelProperty("Old user name")
@Schema(description = "Old user name")
private String oldUserName;
@ApiModelProperty("New user name")
@Schema(description = "New user name")
private String newUserName;
@ApiModelProperty("Start time of the new account validity period")
@Schema(description = "Start time of the new account validity period")
private String newValidStartTime;
@ApiModelProperty("Start time of the old account validity period")
@Schema(description = "Start time of the old account validity period")
private String oldValidStartTime;
@ApiModelProperty("End time of the new account validity period")
@Schema(description = "End time of the new account validity period")
private String newValidEndTime;
@ApiModelProperty("End time of the old account validity period")
@Schema(description = "End time of the old account validity period")
private String oldValidEndTime;
}

View File

@@ -1,32 +1,32 @@
package com.ai.da.model.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
@ApiModel("登入")
@Schema(description = "登入")
public class AccountLoginDTO {
@ApiModelProperty("userId")
@Schema(description = "userId")
private Long userId;
@ApiModelProperty("邮箱")
@Schema(description = "邮箱")
private String email;
@ApiModelProperty("用户名")
@Schema(description = "用户名")
private String userName;
@ApiModelProperty("密码")
@Schema(description = "密码")
private String password;
@ApiModelProperty("登入类型 EMAIL - >邮箱 , PASSWORD ->密码")
@Schema(description = "登入类型 EMAIL - >邮箱 , PASSWORD ->密码")
private String loginType;
@ApiModelProperty("邮箱验证码")
@Schema(description = "邮箱验证码")
private String emailVerifyCode;
@ApiModelProperty("组织名")
@Schema(description = "组织名")
private String organizationName;
}

View File

@@ -1,17 +1,17 @@
package com.ai.da.model.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import jakarta.validation.constraints.NotNull;
@Data
@ApiModel("登出")
@Schema(description = "登出")
public class AccountLogoutDTO {
@NotNull(message = "userId.cannot.be.empty")
@ApiModelProperty("userId")
@Schema(description = "userId")
private Long userId;
}

View File

@@ -1,32 +1,31 @@
package com.ai.da.model.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
package com.ai.da.model.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import jakarta.validation.constraints.NotBlank;
@Data
@ApiModel("预先登入")
@Schema(description = "预先登入")
public class AccountPreLoginDTO {
@NotBlank(message = "userName.cannot.be.empty")
@ApiModelProperty("用户名")
@Schema(description = "用户名")
private String userName;
/*新增字段*/
@NotBlank(message = "email.cannot.be.empty")
@ApiModelProperty("邮箱")
@Schema(description = "邮箱")
private String email;
@NotBlank(message = "password.cannot.be.empty")
@ApiModelProperty("密码")
@Schema(description = "密码")
private String password;
@NotBlank(message = "operationType.cannot.be.empty")
@ApiModelProperty("操作类型 LOGIN 注册 FORGET_PWD 忘记密码 BIND_MAILBOX 绑定邮箱")
@Schema(description = "操作类型 LOGIN 注册 FORGET_PWD 忘记密码 BIND_MAILBOX 绑定邮箱")
private String operationType;
@ApiModelProperty("异常ip")
@Schema(description = "异常ip")
private String ip;
}

View File

@@ -1,26 +1,25 @@
package com.ai.da.model.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
package com.ai.da.model.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import jakarta.validation.constraints.NotBlank;
@Data
@ApiModel("账户")
@Schema(description = "账户")
public class AccountRegisterDTO {
@NotBlank(message = "email.cannot.be.empty")
@ApiModelProperty("邮箱")
@Schema(description = "邮箱")
private String email;
private Boolean verifyEmail;
// @NotBlank(message = "password.cannot.be.empty")
@ApiModelProperty("密码")
@Schema(description = "密码")
private String password;
@NotBlank(message = "emailVerifyCode.cannot.be.empty")
@ApiModelProperty("邮箱验证码")
@Schema(description = "邮箱验证码")
private String emailVerifyCode;
}

View File

@@ -1,13 +1,14 @@
package com.ai.da.model.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import com.ai.da.mapper.primary.entity.TrialOrder;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel("AccountTrial")
@Schema(description = "AccountTrial")
public class AccountTrialDTO extends TrialOrder {
private String ref;
}

View File

@@ -1,7 +1,6 @@
package com.ai.da.model.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -9,19 +8,19 @@ import jakarta.validation.constraints.Pattern;
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel("查询affiliate列表")
@Schema(description = "查询affiliate列表")
public class AffiliateQueryDTO extends TimeQueryBaseDTO{
@ApiModelProperty("Active活跃 || Inactive过期 || Pending待审批 || Refused(拒绝)")
@Schema(description = "Active活跃 || Inactive过期 || Pending待审批 || Refused(拒绝)")
private String status;
@ApiModelProperty("推广者id")
@Schema(description = "推广者id")
private Long affiliateId;
@Pattern(regexp = "id|createTime|totalIncome|", message = "允许排序字段只有id|createTime|totalIncome")
@ApiModelProperty("目前允许按id, createTime, totalIncome进行排序")
@Schema(description = "目前允许按id, createTime, totalIncome进行排序")
private String orderBy = "id";
@ApiModelProperty("按时间 DESC 降序 || ASC 升序")
@Schema(description = "按时间 DESC 降序 || ASC 升序")
private String order = "ASC";
@Override

View File

@@ -1,6 +1,6 @@
package com.ai.da.model.dto;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import jakarta.validation.constraints.NotBlank;
@@ -17,11 +17,11 @@ import jakarta.validation.constraints.NotNull;
@Data
public class ChatFlushDTO {
@NotNull(message = "user_id.cannot.be.empty")
@ApiModelProperty("用户id")
@Schema(description = "用户id")
private String user_id;
@NotBlank(message = "session_id.cannot.be.empty")
@ApiModelProperty("会话ID")
@Schema(description = "会话ID")
private String session_id;
}

View File

@@ -1,7 +1,6 @@
package com.ai.da.model.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import jakarta.validation.constraints.NotBlank;
@@ -16,23 +15,23 @@ import jakarta.validation.constraints.NotNull;
*/
@Data
@ApiModel("chatRobot 对话")
@Schema(description = "chatRobot 对话")
public class ChatSendDTO {
@NotNull(message = "userId.cannot.be.empty")
@ApiModelProperty("用户id")
@Schema(description = "用户id")
private Long user_id;
@NotBlank(message = "sessionId.cannot.be.empty")
@ApiModelProperty("会话ID")
@Schema(description = "会话ID")
private String session_id;
@NotBlank(message = "message.cannot.be.empty")
@ApiModelProperty("消息")
@Schema(description = "消息")
private String message;
@NotBlank(message = "gender.cannot.be.empty")
@ApiModelProperty("性别")
@Schema(description = "性别")
private String gender;
}

View File

@@ -1,7 +1,8 @@
package com.ai.da.model.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import com.ai.da.mapper.primary.entity.Classification;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -12,10 +13,10 @@ import java.util.List;
public class ClassificationDTO extends Classification {
private static final long serialVersionUID = 1L;
@ApiModelProperty("分类ID列表")
@Schema(description = "分类ID列表")
private List<Long> classificationIdList;
@ApiModelProperty("LibraryID")
@Schema(description = "LibraryID")
private List<Long> libraryIdList;
@ApiModelProperty("分类删除校验1校验0不校验")
@Schema(description = "分类删除校验1校验0不校验")
private Integer deleteConfirm;
}

View File

@@ -1,16 +1,17 @@
package com.ai.da.model.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import com.ai.da.mapper.primary.entity.CloudTask;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class CloudTaskDTO extends CloudTask {
@ApiModelProperty("toProduct/relight入参")
@Schema(description = "toProduct/relight入参")
private ToProductImageDTO toProductImage;
@ApiModelProperty("posetransfer入参")
@Schema(description = "posetransfer入参")
private List<PoseTransformBatchDTO> poseTransform;

View File

@@ -1,27 +1,27 @@
package com.ai.da.model.dto;
package com.ai.da.model.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import com.ai.da.mapper.primary.entity.Gradient;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import jakarta.validation.constraints.NotBlank;
@Data
@ApiModel("设计Collection颜色板 入参")
@Schema(description = "设计Collection颜色板 入参")
public class CollectionColorDTO {
@ApiModelProperty("潘通id")
@Schema(description = "潘通id")
private Integer id;
@ApiModelProperty("潘通名字")
@Schema(description = "潘通名字")
private String name;
@ApiModelProperty("tcx值")
@Schema(description = "tcx值")
private String tcx;
@NotBlank(message = "rgbValue.cannot.be.empty")
@ApiModelProperty("潘通RGB值")
@Schema(description = "潘通RGB值")
private String rgbValue;
private Gradient gradient;

View File

@@ -1,16 +1,15 @@
package com.ai.da.model.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
package com.ai.da.model.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import jakarta.validation.constraints.NotNull;
@Data
@ApiModel("删除文件")
@Schema(description = "删除文件")
public class CollectionDeleteFileDTO {
@NotNull(message = "file id cannot be empty!")
@ApiModelProperty("文件id")
@Schema(description = "文件id")
private Long id;
}

View File

@@ -1,7 +1,6 @@
package com.ai.da.model.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
package com.ai.da.model.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;
@@ -11,28 +10,28 @@ import jakarta.validation.constraints.NotNull;
import java.util.Date;
@Data
@ApiModel("文件上传")
@Schema(description = "文件上传")
@AllArgsConstructor
public class CollectionElementUploadDTO {
@NotNull(message = "file.cannot.be.empty")
private MultipartFile file;
@ApiModelProperty("项目id")
@Schema(description = "项目id")
private Long projectId;
@ApiModelProperty("一级类型")
@Schema(description = "一级类型")
private String level1Type;
@ApiModelProperty("二级类型")
@Schema(description = "二级类型")
private String level2Type;
@ApiModelProperty("性别")
@Schema(description = "性别")
private String gender;
@ApiModelProperty("时区")
@Schema(description = "时区")
private String timeZone;
@ApiModelProperty("md5")
@Schema(description = "md5")
private String md5;
}

View File

@@ -1,25 +1,24 @@
package com.ai.da.model.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
package com.ai.da.model.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
@Data
@ApiModel("生成印花")
@Schema(description = "生成印花")
public class CollectionGeneratePrintDTO {
@NotNull(message = "select1Id.cannot.be.empty")
@ApiModelProperty("选择的第一个print文件id")
@Schema(description = "选择的第一个print文件id")
private Long select1Id;
@NotNull(message = "select2Id.cannot.be.empty")
@ApiModelProperty("选择的第一个print文件id")
@Schema(description = "选择的第一个print文件id")
private Long select2Id;
@NotBlank(message = "timeZone.cannot.be.empty")
@ApiModelProperty("本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取")
@Schema(description = "本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取")
private String timeZone;
}

View File

@@ -1,7 +1,6 @@
package com.ai.da.model.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
package com.ai.da.model.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import jakarta.validation.constraints.NotBlank;
@@ -10,16 +9,16 @@ import jakarta.validation.constraints.Size;
import java.util.List;
@Data
@ApiModel("印花保存")
@Schema(description = "印花保存")
public class CollectionSavePrintDTO {
@ApiModelProperty("生成的印花绝对路径")
@Schema(description = "生成的印花绝对路径")
@Size(max = 15, message = "Save up to 15 prints at a time!")
@NotEmpty(message = "printId.cannot.be.empty")
private List<String> printId;
@NotBlank(message = "timeZone.cannot.be.empty")
@ApiModelProperty("本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取")
@Schema(description = "本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取")
private String timeZone;
}

View File

@@ -1,29 +1,28 @@
package com.ai.da.model.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
package com.ai.da.model.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
@Data
@ApiModel("设计Collection Sketch 入参")
@Schema(description = "设计Collection Sketch 入参")
public class CollectionSketchDTO {
@ApiModelProperty("sketchBoardId 元素id")
@Schema(description = "sketchBoardId 元素id")
private Long sketchBoardId;
@NotNull(message = "isPin.cannot.be.empty")
@ApiModelProperty("是否pin 1 pin 0 不pin")
@Schema(description = "是否pin 1 pin 0 不pin")
private Byte isPin;
@NotBlank(message = "level2Type.cannot.be.empty")
@ApiModelProperty("二级类型 Outwear Dress Blouse Skirt Trousers")
@Schema(description = "二级类型 Outwear Dress Blouse Skirt Trousers")
private String level2Type;
@NotBlank(message = "designType.cannot.be.empty")
@ApiModelProperty("design类型 用户design生成时候区别library和collection")
@Schema(description = "design类型 用户design生成时候区别library和collection")
private String designType;
}

View File

@@ -1,7 +1,8 @@
package com.ai.da.model.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import com.ai.da.mapper.primary.entity.CollectionSort;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@@ -9,9 +10,9 @@ import java.util.List;
@Data
public class CollectionSortDTO{
@ApiModelProperty("userLikeGroupId")
@Schema(description = "userLikeGroupId")
private Long userLikeGroupId;
@ApiModelProperty("排序数组")
@Schema(description = "排序数组")
List<CollectionSort> userLikeSortList;
}

View File

@@ -0,0 +1,74 @@
package com.ai.da.model.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
/**
* Contestant request DTO for Global Award
*/
@Data
@ApiModel(value = "参赛者信息", description = "全球奖项大赛参赛者信息数据传输对象")
public class ContestantDTO {
@ApiModelProperty(value = "邮箱地址", required = true, example = "user@example.com")
private String email;
@ApiModelProperty(value = "名字", required = true, example = "John")
private String firstName;
@ApiModelProperty(value = "姓氏", required = true, example = "Doe")
private String lastName;
@ApiModelProperty(value = "性别", required = true, example = "Male", allowableValues = "Male,Female,Other")
private String gender;
@ApiModelProperty(value = "职业", required = true, example = "Designer")
private String occupation;
@ApiModelProperty(value = "年龄", required = true, example = "25")
private Integer age;
@ApiModelProperty(value = "国家/地区/城市", required = true, example = "China/Shanghai/Shanghai")
private String countryRegionCity;
@ApiModelProperty(value = "电话号码", required = true, example = "+86 138 0000 0000")
private String phoneNumber;
@ApiModelProperty(value = "作品集链接", required = false, example = "https://portfolio.example.com")
private String portfolioUrl;
@ApiModelProperty(value = "设计作品标题", required = true, example = "Modern Office Building Design")
private String designTitle;
@ApiModelProperty(value = "设计作品描述", required = true, example = "A modern office building design featuring sustainable materials...")
private String designDescription;
@ApiModelProperty(value = "PDF文件路径", required = false, example = "contestants/user@example.com/2024/01/design_1234567890.pdf")
private String pdfPath;
@ApiModelProperty(value = "视频文件路径", required = false, example = "contestants/user@example.com/2024/01/video_1234567890.mp4")
private String videoPath;
@ApiModelProperty(value = "视频时长(秒)", required = false, example = "120")
private Integer videoDuration;
@ApiModelProperty(value = "视频大小(字节)", required = false, example = "10485760")
private Long videoSize;
@ApiModelProperty(value = "PDF 文件大小(字节)", required = false, example = "524288")
private Long pdfSize;
// /**
// * 是否确认覆盖已存在记录false 表示发现已有记录时仅返回 existingRecord不覆盖
// */
// @ApiModelProperty(value = "是否确认覆盖已存在记录", required = false, example = "false")
// private Boolean confirm = false;
@NotBlank
private String secureToken;
}

View File

@@ -0,0 +1,19 @@
package com.ai.da.model.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 参赛者文件导出请求DTO
*/
@Data
@ApiModel(value = "参赛者文件导出请求", description = "用于导出指定范围的参赛者文件")
public class ContestantExportRequest {
@ApiModelProperty(value = "最小参赛者编号", required = true, example = "10000")
private Integer minContestantNumber;
@ApiModelProperty(value = "最大参赛者编号", required = true, example = "10010")
private Integer maxContestantNumber;
}

Some files were not shown because too many files have changed in this diff Show More