237 Commits 91e1c663e6 ... 3b4f109ffb

Author SHA1 Message Date
  ssk 3b4f109ffb Merge branch 'sit' into uat 4 weeks ago
  lyx ac8c857c87 bugfix:用旧密码修改密码失败 4 weeks ago
  ssk e0d436cd15 bugfix: #1105 4 weeks ago
  lyx c5df200e82 bugfix:首页粉丝数量,(去掉店铺关联,查询粉丝数量跟有没有店铺有毛关系啊) 4 weeks ago
  lyx be78491ec1 Merge remote-tracking branch 'origin/sit' into sit 4 weeks ago
  jyc dc738849b6 店铺详情接口距离用sql计算 4 weeks ago
  qxy 6f9c2f8f44 bugfix:1010 修改 4 weeks ago
  zhangchen 1b18d1ae90 bugId:1343 新增返回图片列表 4 weeks ago
  lyx 28c1718d40 bugfix:提现记录查询,提现账户增加 4 weeks ago
  lyx f85d4479de Merge remote-tracking branch 'origin/sit' into sit 4 weeks ago
  ssk 68ddcd238e bugfix: #900 4 weeks ago
  qrs ba8a78948a 交易确认bug修改 4 weeks ago
  ssk 45cd80d5e4 bugfix: #1378 4 weeks ago
  ssk f8e435824a bugfix: #1111, 增加实名注册限制 4 weeks ago
  lyx 7b87830530 Merge remote-tracking branch 'origin/sit' into sit 4 weeks ago
  jyc f34fc25996 店铺详情接口距离用sql计算 4 weeks ago
  lyx 1e8f6a07ff bugfix:订单列表只查待使用,和已完成 4 weeks ago
  lyx 0f7ddd92fd bugfix:storeStatus状态修改 4 weeks ago
  qxy 63c39a92ba bugfix:1010 修改 1 month ago
  zhangchen 00a02117d7 bugid-1334 1 month ago
  zhangchen ee6093f926 bugid-1328 修改 1 month ago
  qxy 1d60e90707 bugfix:1408 重提 1 month ago
  qxy 6f66246e3f bugfix:1408 推荐喜欢套餐 1 month ago
  lyx 71711bdc84 bugfix:时间倒叙 1 month ago
  ssk f8e1d608ab 还原代码 1 month ago
  ssk 16cded7d16 退款bug测试 1 month ago
  ssk 22defb2f25 退款bug测试 1 month ago
  ssk 6bac106000 退款bug测试 1 month ago
  ssk 8cb252bb52 退款bug测试 1 month ago
  ssk cda8fc761a 退款bug测试 1 month ago
  lyx 31c630f7a4 bugfix:创建订单修改 1 month ago
  lyx a50a19142e Merge remote-tracking branch 'origin/sit' into sit 1 month ago
  lyx a3e3442486 bugfix:idCard设置为空 1 month ago
  lyx 44c441d845 bugfix:订单数量问题 1 month ago
  lyx b6e5db9ba0 bugfix:过期自动退款 1 month ago
  ssk 2e286d9c81 bugfix: #1121 #1116 1 month ago
  lyx c98a9d5b3c bugfix:提现金额修改 1 month ago
  lyx 2fa548ff6d bugfix:提现修改 1 month ago
  lyx 8e85eeb4ca bugfix:过期自动退款 1 month ago
  lyx 0f14f9235a bugfix:退款通知增加title 1 month ago
  lyx c81607e61c bugfix:已到账期删除已经提现条件 1 month ago
  lyx 18ab3676c6 bugfix:取消+退款 券状态问题 1 month ago
  lyx e625fc0b7a bugfix:验证码校验 1 month ago
  lyx 1935652797 bugfix:我的钱包数据展示问题,设置字段 1 month ago
  lyx ba63958660 Merge remote-tracking branch 'origin/sit' into sit 1 month ago
  ssk 25363a19f3 bugfix: #1099 #1057 #1048 1 month ago
  lyx faf0c51b96 bugfix:退款dev分支代码错误合并回滚 1 month ago
  qxy f49c7ac438 bugfix:1330 商家列表 商家评分 1 month ago
  lyx 4e9722217f bugfix:退款,代金券/团购状态改变 1 month ago
  qxy 7fb973a33a 获取门店趣味信息 1 month ago
  lyx d93bfb32a7 bugfix:代金券数量为0,状态不改变。 1 month ago
  qxy f9a76aba7d Merge remote-tracking branch 'origin/sit' into sit 1 month ago
  zjy 6254cf9e7e 解决风控管理中因事务问题导致查不到新建的登录log问题 1 month ago
  qxy 79e13a99af 定时拉取AI服务店铺趣味信息数据 1 month ago
  qxy c5cfdd7385 bugfix:422 店铺详情 本店动态三个问题修改 1 month ago
  lyx 03945e0a67 bugfix:重置密码只重置登录密码 1 month ago
  lyx 940acf343b bugfix:赠券增加消息通知 1 month ago
  ssk c50999588f bugfix: 1086 1 month ago
  qxy 902b645775 设置邀请码 1 month ago
  ssk 16208e6ed2 暂时关闭单用户实名认证 1 month ago
  lyx 8372e41129 Merge remote-tracking branch 'origin/sit' into sit 1 month ago
  lyx e1e3526a2d bugfix:通知增加字段 1 month ago
  ssk 6eeef36396 fix: 实名验证业务判断 1 month ago
  jyc bd570530f1 评分保留两位小数 1 month ago
  lyx 0a78e22ec0 bugfix:补充缺少的字段 1 month ago
  qxy 1886052975 bug:1288 邀请码可以输入不正确的邀请码并绑定成功bug修改 1 month ago
  zhangchen 41b1827f4d 邀请代码回退 1 month ago
  zhangchen af41a82281 邀请代码回退 1 month ago
  zhangchen 7abe203d6b 邀请代码回退 1 month ago
  zhangchen 8a2847c7ae 邀请代码优化 1 month ago
  zhangchen a242c0bdbf Merge remote-tracking branch 'origin/sit' into sit 1 month ago
  zhangchen 99dc87ab2d 邀请代码优化 1 month ago
  lyx d22a00cfa0 bugfix:查询字段修改 1 month ago
  zhangchen ab7f95f193 代码优化 1 month ago
  zhangchen 18af81bde5 未合并分支代码合并到sit分支 1 month ago
  qxy 0cf297a6af bug:1337 选择已售罄团购 修改库存数为1 变更状态 1 month ago
  qxy baea163c0b 高德工具类获取附近商家、建筑等信息 修改 1 month ago
  zhangchen 3b2a7f5ba8 数据中台订单管理,只查询待支付,待使用,已取消,已完成,已退款的数据 1 month ago
  zhangchen 4c97faab67 bugid-1333修复,【20251105】导出文件,店铺合同照片不显示 1 month ago
  zhangchen d5b3ac8733 数据大屏折现图修改 1 month ago
  zhangchen ca00e0ed99 平台净利润折现图修改 1 month ago
  zhangchen a815f05df3 平台净利润修改 1 month ago
  wxd 6f9603afa1 feat(second): 添加举报处理状态字段- 在 SecondReportingVo 中新增 processingStatus 字段- 完善举报信息展示,包含处理状态- 补充处理状态的注释说明 1 month ago
  zjy d5f931e717 二手评论报错bug 1 month ago
  zhangchen b742a6c86f 签到活动配置 1 month ago
  zhangchen 8205ec4c7c 订单状态查询bug 1 month ago
  wxd 52117b0997 风控提交 1 month ago
  zhangchen 9291b49b11 bugid-1332 【20251105】导出文件,门店状态显示不正确 1 month ago
  zjy f81dc500b0 风控体系代码提交 1 month ago
  zhangchen 7b85429986 字段回滚 1 month ago
  ldz af4d02936d 中台部分,产品需求变更,原bug1059 1 month ago
  qrs b11786f8ea 二手风控 1 month ago
  ssk 96254bf14e add:动态配置测试手机号 1 month ago
  zjy 651cd88a55 风控体系代码提交 1 month ago
  zjy a6f1c3e725 风控体系代码提交 1 month ago
  zhangchen a4d33e7021 数据大屏详情 1 month ago
  zhangchen 790a87cf11 数据大屏详情 1 month ago
  ssk e5ed0f81e8 修改前后端登录未同步问题 1 month ago
  zjy d1f154081a 风控体系代码提交 1 month ago
  qrs 47665daab9 修改调用异常问题 1 month ago
  zjy c9883c12f1 风控体系代码提交 1 month ago
  zjy 3879eaf42e 风控体系代码提交 1 month ago
  ssk 3a73aa7a6f Merge remote-tracking branch 'origin/sit' into sit 1 month ago
  ssk 71634bcc02 fixbug: #1227 1 month ago
  zjy 837c24a43c 风控体系代码提交 1 month ago
  ssk 896dcaaa25 fixbug: #1227 1 month ago
  wxd 8567c7d239 refactor(second-goods): 调整商品发布限制检查时机 1 month ago
  qrs e92f3494b9 风控管理 1 month ago
  zjy 10ee043649 风控体系代码提交 1 month ago
  wxd b223581745 refactor(second-goods): 调整商品发布限制检查时机 1 month ago
  ssk 0b9d522d8c fixbug: #1057 #1062 #1107 #1088 #1096 #1093 #1065 1 month ago
  zhangchen 728e20478a bugid-1201 按照已完成订单查询无数据,但是用户端已完成显示相应数据 1 month ago
  qrs e0f00366f3 Merge branch 'sit' of http://8.152.195.41:3000/alien/alien_cloud into secondReport 1 month ago
  ldz 422f5fc25d 修改代金券部分的状态问题 1 month ago
  ldz 3584dca680 bug1147,982修改 1 month ago
  qrs c1614e9c1a Merge branch 'sit' of http://8.152.195.41:3000/alien/alien_cloud into secondReport 1 month ago
  ssk 29012d7f35 测试发版记录 1 month ago
  ssk 7bb49a0e2f fix:bug#1055 增加抽成比例字段 1 month ago
  zhangchen 05094153c2 bugid1085 【活动】邀请活动添加设置每天最多1人,但是APP端可以绑定多人 邀请多人 1 month ago
  ldz b0c47edbf8 bug 1071,1050,1076 1 month ago
  zhangchen 4e75e8e301 bugid- 1040 【服务中台】列表页面导出异常 1 month ago
  lyx 541a34f260 Merge remote-tracking branch 'origin/sit' into sit 1 month ago
  lyx 51f39c3643 bugfix:购买时返回信息增加;支付宝接口失败返回信息。 1 month ago
  qxy 1668eca80a bug 团购库存数为0 增加库存数变更状态为进行中 1 month ago
  qxy 0c8e3ec7e0 bugfix:1197 扫码核销 增加单日次数判断 1 month ago
  zhangchen 2434516ee7 bugid-1283 删除评价后,则订单为已评价 1 month ago
  jyc f4447422ca 1098bug 1 month ago
  zhangchen dcd0340955 bugfix:评价删除后,则订单为已评价 1 month ago
  zhangchen 6f12a03c5e bugid-1177 【数据大屏】明细页面,查看订单详情,订单状态显示code,应该显示value信息 1 month ago
  zhangchen 738ca40f1e Merge branch 'sit' of http://8.152.195.41:3000/alien/alien_cloud into sit 1 month ago
  zhangchen c620d5997e bugid-1039 【服务中台】列表页面按照举报人联系电话查询条件查询结果不正确 1 month ago
  ssk 7a54cccfea 更改短信验证码校验 增加图片验证码 1 month ago
  jyc 78ef57e261 1087bug 1 month ago
  ldz 658485825e 修改代金券部分的状态问题 1 month ago
  lyx bead270707 bugfix:避免超卖 1 month ago
  qrs 20fb1b9f36 PC举报修改 1 month ago
  zjy ec7190d095 PC举报修改 2 months ago
  zjy 3a8891318f PC举报修改 3 months ago
  zjy f2071d54e9 PC举报修改 3 months ago
  zjy dabc2182da PC举报修改 3 months ago
  zjy 515c8f9bdc PC举报修改 3 months ago
  zjy aa522019fa PC举报修改 3 months ago
  zjy 44a4650f27 PC举报修改 3 months ago
  zjy b26bfaa6eb PC端商品分类修改 3 months ago
  qrs 9986580157 Merge branch 'sit' of http://8.152.195.41:3000/alien/alien_cloud into second 1 month ago
  zjy 4a6651f561 风控体系代码提交 1 month ago
  zjy 5154d02609 风控体系代码提交 1 month ago
  zjy fcce607dc2 风控体系代码提交 1 month ago
  zjy b5a7a798e2 风控体系代码提交 1 month ago
  qrs 14e986e625 二手风控 1 month ago
  qrs e665c43483 二手风控 1 month ago
  qrs 72f52a7845 二手风控 1 month ago
  qrs a261397f4b 二手风控 1 month ago
  wxd d1d62bb33c feat(second): 新增风控商品管理功能- 新增风控商品信息查询接口,支持通过记录ID和商品ID批量查询 1 month ago
  qrs 1b1979c5eb 二手风控 1 month ago
  qrs bbfc215569 二手风控 1 month ago
  qrs f014b6ce6a 二手风控 1 month ago
  zjy 0b928ae06b 风控体系代码提交 1 month ago
  wxd 063653dca3 feat(second): 添加风控记录查询与商品批量下架功能 1 month ago
  qrs 8f7fa6713e 添加 fill = FieldFill.INSERT 1 month ago
  qrs bc23d7f1d3 nacos添加二手风控类型和检测指标 1 month ago
  wxd e36e06e3df feat(store): 集成OpenFeign并新增风控和积分服务调用接口- 添加 spring-cloud-starter-openfeign 依赖以支持 Feign 客户端功能 1 month ago
  zjy c460fb116b 风控体系代码提交 1 month ago
  wxd af5833db6b feat(risk): 调整风控业务ID为字符串类型 1 month ago
  wxd 7feeaa56da feat(gateway): 风控添加 1 month ago
  wxd 9301386239 feat(second): 添加风控规则类型枚举- 新增洗钱嫌疑规则类型- 新增账号异常规则类型- 新增交易欺诈规则类型 1 month ago
  wxd 2ba8574d79 feat(second): 新增风控数据记录功能- 在 alien-gateway 模块中启用 Feign 客户端支持 1 month ago
  wxd 4e2691b465 feat(config): 添加风控配置时间窗口字段 1 month ago
  wxd 6f556c48aa feat(second): 新增二手商品风控记录实体和映射器 1 month ago
  wxd 4559eaf7d0 feat(second-goods): 添加用户发布商品风控检查 1 month ago
  wxd 0a8a3dedef feat(config): 添加风险控制配置属性并支持动态刷新- 在 AlienSecondApplication 中启用 properties 配置扫描 1 month ago
  qrs 14cdba00aa 二手交易排行榜添加交易时间排序 1 month ago
  lyx 8b96b495c1 bugfix:添加增加转发数量接口 1 month ago
  zhangchen ed21de6df4 bugid-422 bug修改 1 month ago
  zhangchen 6a956791a9 bugId-1141 【服务中台】详情页面已驳回处理结果显示不正确 1 month ago
  zhangchen a24941ae23 bugId-1141 【服务中台】详情页面已驳回处理结果显示不正确 1 month ago
  zhangchen 4e847e360e bugId-1038 【服务中台】列表页面昵称未展示 1 month ago
  zhangchen 25d15ab202 bugId-1038 【服务中台】列表页面昵称未展示 1 month ago
  zhangchen aab93378df bugId-1037 【服务中台】详情页面昵称未展示 1 month ago
  zhangchen 0c62482d29 bugId-1202 数据逻辑修改 1 month ago
  zhangchen f5078adb82 bugId-1193 中台的订单管理,即使优惠券被删掉,也应该查询出订单。 1 month ago
  zhangchen 96085abc08 bugId-1185 bug修改 1 month ago
  zhangchen 3d973cbe39 bugId-1185 bug修改 1 month ago
  zhangchen 1e75f083d6 bugId-1141 邀请码区分大小写 1 month ago
  lyx d6e0e468e2 bugfix:查询方法修改 1 month ago
  lyx 32ce40fb1e bugfix:身份验证返回修改,评价增加查询字段 1 month ago
  ssk c7157dc7fb 修改bug: U店在这#723 1 month ago
  qxy f6d8830d18 LifeUserOrderVo 去掉orderGmv字段 1 month ago
  qxy 679f0a7b9d bugfix:1186 团购详情 修改团购提前上架售卖时间时间 1 month ago
  qxy b0aa327cc1 bugfix:1010 商户A(入驻店铺提交后等待审核)关注商户B,商户B的好友/关注/粉丝列表中字段值显示不正确 1 month ago
  qxy 0d5c0951ec bugfix:391 已完成的订单,评价店铺能评价两次 修改 1 month ago
  lyx 477b9be541 字段注释修改 1 month ago
  lyx 6ee51c72ea bugfix:收入详情时间显示 1 month ago
  ssk 8aff009dd6 Merge remote-tracking branch 'origin/sit' into sit 1 month ago
  ssk d3013cb9c4 修改bug: U店在这#981 1 month ago
  lyx 165ad424fc bugfix:1063收益显示错误 1 month ago
  lyx b1b96fa022 bugfix:使用时间验证先回滚 1 month ago
  jyc b27bf7bafd 1115bug 1 month ago
  jyc 59042df36d 1115bug 1 month ago
  jyc 67c13d2ac1 1137,1148bug 1 month ago
  ssk 3cd742f790 修改订单文案 1 month ago
  lyx dbb3971519 调用退款失败返回信息先不提交 1 month ago
  lyx b81854784e Merge remote-tracking branch 'origin/sit' into sit 1 month ago
  lyx bc574bc70f bugfix:功能缺失,转发数量 1 month ago
  ssk 7d13ea114a 修改退款返回类型 1 month ago
  ssk 7e0db31145 修改bug#1195, 优惠券时间检验 1 month ago
  lyx e5a6ef6e90 bugfix:功能缺失,评论详情显示商铺名称 1 month ago
  lyx eba8efec2b 代码优化 1 month ago
  lyx 31b4cd9e51 bugfix:1105删除菜品加使用校验 1 month ago
  qxy 5533bf2b24 提现 退款支付宝单笔转账接口记录错误信息 1 month ago
  qxy 7a05cbbf04 提现 退款支付宝单笔转账接口记录错误信息 1 month ago
  jyc 922372c9d2 团购增加已售数量返回 1 month ago
  lyx a422b6a4e6 bugfix:图片连接 1 month ago
  lyx fc783c77ee bugfix:1165 修复之前bug操作 1 month ago
  jyc eb6fc5f3c6 460bug,商户达人 1 month ago
  lyx 743961a04d Merge remote-tracking branch 'origin/sit' into sit 1 month ago
  lyx be9163cd38 bugfix:695喜欢的动态里不展示拉黑用户的数据 1 month ago
  zhangchen dfbb8091b1 bugId-973 订单搜索相关的bug修改 1 month ago
  zc 3e66f2c6bf BugId-974:新增订单类型字段 1 month ago
  zc a2d1d9035a BugId-971:中台商户金额信息修改 1 month ago
  zc d6c3589353 BugId-970:中台冻结金额修改 1 month ago
  qxy f7ee0376c6 bugfix:805 团购管理库存为0状态修改为售罄 1 month ago
  lyx ff515bed07 bugfix:今日订单数量 1 month ago
  lyx 2afdbec1b5 bugfix:举报项目排序 1 month ago
  jyc e7afacbfdc 1004,474bug 1 month ago
  qxy 156a930bcf bugfix:917 门店注销 1 month ago
  jyc 798614ee4e 474,772,502bug 1 month ago
  jyc 6c474b3e05 474,772,502bug 1 month ago
  jyc 656fea9acb 474,772bug 1 month ago
  jyc 6a5ad9569e 474bug 1 month ago
  lyx c193ba3bd3 Merge remote-tracking branch 'origin/sit' into sit 1 month ago
  lyx c0a758d799 bugfix:327缺少使用时间。 1 month ago
  jyc 281f457d81 928bug 1 month ago
  lyx 24cd27a329 bugfix:对方是否关注我 1 month ago
  lyx bd18844266 bugfix:点赞列表添加是否关注对方,对是否关注我字段 1 month ago
  jyc 1a8580439d 928bug 1 month ago
  ldz d86a542492 修改代金券部分退款之后同步代金券状态 1 month ago
100 changed files with 3125 additions and 320 deletions
  1. 2 0
      README.md
  2. 120 0
      alien-config/src/main/java/shop/alien/config/properties/RiskControlProperties.java
  3. 50 0
      alien-entity/src/main/java/shop/alien/entity/second/LifeUserLog.java
  4. 1 1
      alien-entity/src/main/java/shop/alien/entity/second/SecondGoodsCategory.java
  5. 91 0
      alien-entity/src/main/java/shop/alien/entity/second/SecondRiskControlRecord.java
  6. 7 10
      alien-entity/src/main/java/shop/alien/entity/second/SecondTradeOperation.java
  7. 55 0
      alien-entity/src/main/java/shop/alien/entity/second/SecondUserCredit.java
  8. 54 0
      alien-entity/src/main/java/shop/alien/entity/second/SecondUserCreditRecord.java
  9. 56 0
      alien-entity/src/main/java/shop/alien/entity/second/enums/RiskControlRuleTypeEnum.java
  10. 20 0
      alien-entity/src/main/java/shop/alien/entity/second/vo/BatchUnshelveGoodsDTO.java
  11. 18 0
      alien-entity/src/main/java/shop/alien/entity/second/vo/RiskControlGoodsIdsDTO.java
  12. 18 0
      alien-entity/src/main/java/shop/alien/entity/second/vo/RiskControlGoodsQueryDTO.java
  13. 6 0
      alien-entity/src/main/java/shop/alien/entity/second/vo/SecondGoodsVo.java
  14. 4 0
      alien-entity/src/main/java/shop/alien/entity/second/vo/SecondReportingVo.java
  15. 42 0
      alien-entity/src/main/java/shop/alien/entity/second/vo/SecondRiskControlRecordVo.java
  16. 30 0
      alien-entity/src/main/java/shop/alien/entity/second/vo/SecondRiskRecordVo.java
  17. 22 0
      alien-entity/src/main/java/shop/alien/entity/second/vo/SecondUserCreditVo.java
  18. 29 0
      alien-entity/src/main/java/shop/alien/entity/second/vo/SecondUserViolationDetailVo.java
  19. 40 13
      alien-entity/src/main/java/shop/alien/entity/second/vo/SecondUserViolationVo.java
  20. 4 0
      alien-entity/src/main/java/shop/alien/entity/store/ActivityInviteLog.java
  21. 1 1
      alien-entity/src/main/java/shop/alien/entity/store/ActivitySignInConfig.java
  22. 1 1
      alien-entity/src/main/java/shop/alien/entity/store/LifeCoupon.java
  23. 9 0
      alien-entity/src/main/java/shop/alien/entity/store/LifeUserOrder.java
  24. 6 2
      alien-entity/src/main/java/shop/alien/entity/store/LifeUserViolation.java
  25. 76 0
      alien-entity/src/main/java/shop/alien/entity/store/StoreAliPayErrorLog.java
  26. 2 0
      alien-entity/src/main/java/shop/alien/entity/store/StoreAliPayLog.java
  27. 63 0
      alien-entity/src/main/java/shop/alien/entity/store/StoreCommentSummaryInterest.java
  28. 1 1
      alien-entity/src/main/java/shop/alien/entity/store/StoreIncomeDetailsRecord.java
  29. 4 0
      alien-entity/src/main/java/shop/alien/entity/store/excelVo/LifeUserOrderExcelVo.java
  30. 15 0
      alien-entity/src/main/java/shop/alien/entity/store/vo/ActivityInviteLogVo.java
  31. 6 0
      alien-entity/src/main/java/shop/alien/entity/store/vo/LifeAppealManageVo.java
  32. 6 0
      alien-entity/src/main/java/shop/alien/entity/store/vo/LifeFansVo.java
  33. 12 0
      alien-entity/src/main/java/shop/alien/entity/store/vo/LifeGroupBuyMainVo.java
  34. 3 0
      alien-entity/src/main/java/shop/alien/entity/store/vo/LifeGroupBuyThaliVo.java
  35. 4 0
      alien-entity/src/main/java/shop/alien/entity/store/vo/LifeUserOrderCommentVo.java
  36. 17 0
      alien-entity/src/main/java/shop/alien/entity/store/vo/LifeUserOrderVo.java
  37. 7 0
      alien-entity/src/main/java/shop/alien/entity/store/vo/LifeUserViolationVo.java
  38. 3 0
      alien-entity/src/main/java/shop/alien/entity/store/vo/LifeUserVo.java
  39. 1 1
      alien-entity/src/main/java/shop/alien/entity/store/vo/StoreCommentAppealVo.java
  40. 7 0
      alien-entity/src/main/java/shop/alien/entity/store/vo/StoreCommentVo.java
  41. 4 0
      alien-entity/src/main/java/shop/alien/entity/store/vo/StoreIncomeDetailsRecordVo.java
  42. 3 0
      alien-entity/src/main/java/shop/alien/entity/store/vo/StoreInfoVo.java
  43. 3 0
      alien-entity/src/main/java/shop/alien/entity/store/vo/StoreMainInfoVo.java
  44. 3 0
      alien-entity/src/main/java/shop/alien/entity/store/vo/StoreUserVo.java
  45. 33 4
      alien-entity/src/main/java/shop/alien/mapper/ActivityInviteLogMapper.java
  46. 2 2
      alien-entity/src/main/java/shop/alien/mapper/LifeBrowseRecordMapper.java
  47. 16 0
      alien-entity/src/main/java/shop/alien/mapper/LifeCouponMapper.java
  48. 86 24
      alien-entity/src/main/java/shop/alien/mapper/LifeFansMapper.java
  49. 82 0
      alien-entity/src/main/java/shop/alien/mapper/LifeGroupBuyMainMapper.java
  50. 49 10
      alien-entity/src/main/java/shop/alien/mapper/LifeUserDynamicsMapper.java
  51. 17 15
      alien-entity/src/main/java/shop/alien/mapper/LifeUserMapper.java
  52. 45 8
      alien-entity/src/main/java/shop/alien/mapper/LifeUserOrderMapper.java
  53. 100 0
      alien-entity/src/main/java/shop/alien/mapper/LifeUserViolationMapper.java
  54. 15 0
      alien-entity/src/main/java/shop/alien/mapper/StoreAliPayErrorLogMapper.java
  55. 13 0
      alien-entity/src/main/java/shop/alien/mapper/StoreCashOutRecordMapper.java
  56. 1 1
      alien-entity/src/main/java/shop/alien/mapper/StoreCommentAppealMapper.java
  57. 40 4
      alien-entity/src/main/java/shop/alien/mapper/StoreCommentMapper.java
  58. 40 0
      alien-entity/src/main/java/shop/alien/mapper/StoreCommentSummaryInterestMapper.java
  59. 1 1
      alien-entity/src/main/java/shop/alien/mapper/StoreIncomeDetailsRecordMapper.java
  60. 20 0
      alien-entity/src/main/java/shop/alien/mapper/StoreInfoMapper.java
  61. 27 0
      alien-entity/src/main/java/shop/alien/mapper/second/LifeUserLogMapper.java
  62. 17 0
      alien-entity/src/main/java/shop/alien/mapper/second/SecondGoodsMapper.java
  63. 39 0
      alien-entity/src/main/java/shop/alien/mapper/second/SecondRiskControlRecordMapper.java
  64. 4 4
      alien-entity/src/main/java/shop/alien/mapper/second/SecondTradeRecordMapper.java
  65. 20 0
      alien-entity/src/main/java/shop/alien/mapper/second/SecondUserCreditMapper.java
  66. 12 0
      alien-entity/src/main/java/shop/alien/mapper/second/SecondUserCreditRecordMapper.java
  67. 20 0
      alien-entity/src/main/java/shop/alien/mapper/second/SecondUserViolationMapper.java
  68. 5 1
      alien-entity/src/main/resources/mapper/LifeAppealManageMapper.xml
  69. 86 0
      alien-entity/src/main/resources/mapper/LifeUserDynamicsMapper.xml
  70. 35 10
      alien-entity/src/main/resources/mapper/LifeUserOrderMapper.xml
  71. 235 134
      alien-entity/src/main/resources/mapper/ManagementInfoMapper.xml
  72. 5 4
      alien-entity/src/main/resources/mapper/PlatformLifeUserMapper.xml
  73. 3 0
      alien-entity/src/main/resources/mapper/second/SecondGoodsInfoMapper.xml
  74. 95 0
      alien-entity/src/main/resources/mapper/second/SecondUserViolationMapper.xml
  75. 13 0
      alien-gateway/pom.xml
  76. 4 2
      alien-gateway/src/main/java/shop/alien/gateway/AlienGatewayApplication.java
  77. 57 0
      alien-gateway/src/main/java/shop/alien/gateway/config/BeanConfig.java
  78. 4 4
      alien-gateway/src/main/java/shop/alien/gateway/config/JwtTokenFilter.java
  79. 120 0
      alien-gateway/src/main/java/shop/alien/gateway/config/RiskControlProperties.java
  80. 70 0
      alien-gateway/src/main/java/shop/alien/gateway/controller/CaptchaImageController.java
  81. 35 5
      alien-gateway/src/main/java/shop/alien/gateway/controller/LifeUserController.java
  82. 27 7
      alien-gateway/src/main/java/shop/alien/gateway/controller/StoreUserController.java
  83. 36 0
      alien-gateway/src/main/java/shop/alien/gateway/feign/SecondServiceFeign.java
  84. 1 1
      alien-gateway/src/main/java/shop/alien/gateway/mapper/LifeSysGatewayMapper.java
  85. 1 1
      alien-gateway/src/main/java/shop/alien/gateway/mapper/LifeUserGatewayMapper.java
  86. 27 0
      alien-gateway/src/main/java/shop/alien/gateway/mapper/LifeUserLogGatewayMapper.java
  87. 1 1
      alien-gateway/src/main/java/shop/alien/gateway/mapper/StoreInfoGatewayMapper.java
  88. 1 1
      alien-gateway/src/main/java/shop/alien/gateway/mapper/StoreUserGatewayMapper.java
  89. 15 0
      alien-gateway/src/main/java/shop/alien/gateway/service/ActivityInviteConfigService.java
  90. 119 35
      alien-gateway/src/main/java/shop/alien/gateway/service/LifeUserService.java
  91. 15 0
      alien-gateway/src/main/java/shop/alien/gateway/service/UserPointService.java
  92. 120 0
      alien-gateway/src/main/java/shop/alien/gateway/service/impl/ActivityInviteConfigServiceImpl.java
  93. 2 2
      alien-gateway/src/main/java/shop/alien/gateway/service/impl/StoreInfoServiceImpl.java
  94. 4 4
      alien-gateway/src/main/java/shop/alien/gateway/service/impl/StoreUserServiceImpl.java
  95. 2 2
      alien-gateway/src/main/java/shop/alien/gateway/service/impl/SystemServiceImpl.java
  96. 50 0
      alien-gateway/src/main/java/shop/alien/gateway/service/impl/UserPointServiceImpl.java
  97. 253 0
      alien-gateway/src/main/java/shop/alien/gateway/util/Base64.java
  98. 56 0
      alien-gateway/src/main/java/shop/alien/gateway/util/KaptchaTextCreator.java
  99. 2 2
      alien-gateway/src/main/resources/mapper/StoreUserGatewayMapper.xml
  100. 1 1
      alien-job/src/main/java/shop/alien/job/feign/AlienStoreFeign.java

+ 2 - 0
README.md

@@ -0,0 +1,2 @@
+## 测试发版记录
+2025-11-05

+ 120 - 0
alien-config/src/main/java/shop/alien/config/properties/RiskControlProperties.java

@@ -0,0 +1,120 @@
+package shop.alien.config.properties;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.cloud.context.config.annotation.RefreshScope;
+import org.springframework.stereotype.Component;
+
+@Data
+@Component
+@RefreshScope
+@ConfigurationProperties(prefix = "risk-control")
+public class RiskControlProperties {
+
+    /**
+     * 洗钱嫌疑规则配置
+     */
+    private MoneyLaundering moneyLaundering = new MoneyLaundering();
+
+    /**
+     * 账号异常规则配置
+     */
+    private AccountAbnormal accountAbnormal = new AccountAbnormal();
+
+    /**
+     * 交易欺诈规则配置
+     */
+    private TradeFraud tradeFraud = new TradeFraud();
+
+    /**
+     * 异常发布规则配置
+     */
+    private AbnormalPublish abnormalPublish = new AbnormalPublish();
+
+    @Data
+    public static class MoneyLaundering {
+        /**
+         * 每天交易次数阈值
+         */
+        private int dailyCount = 5;
+
+        /**
+         * 每笔交易金额阈值(元)
+         */
+        private double amountThreshold = 200.0;
+
+        /**
+         * 风险类型
+         */
+        private String riskType = "洗钱嫌疑";
+
+        /**
+         * 检测指标
+         */
+        private String detectIndicator = "高频高价交易";
+    }
+
+    @Data
+    public static class AccountAbnormal {
+        /**
+         * 24小时内同一设备/mac注册账号数量阈值
+         */
+        private int regCount24h = 3;
+
+        /**
+         * 风险类型
+         */
+        private String riskType = "账号异常";
+
+        /**
+         * 检测指标
+         */
+        private String detectIndicator = "同一设备24小时内注册超过3个账号";
+    }
+
+    @Data
+    public static class TradeFraud {
+        /**
+         * 24小时内发布成功记录次数阈值
+         */
+        private int publishCount24h = 3;
+
+        /**
+         * 时间窗口(小时)
+         */
+        private int timeWindowHours = 24;
+
+        /**
+         * 风险类型
+         */
+        private String riskType = "交易欺诈";
+
+        /**
+         * 检测指标
+         */
+        private String detectIndicator = "用户频繁修改商品";
+    }
+
+    @Data
+    public static class AbnormalPublish {
+        /**
+         * 24小时内发布同类商品数量阈值
+         */
+        private int sameCategoryCount24h = 10;
+        
+        /**
+         * 时间窗口(小时)
+         */
+        private int timeWindowHours = 24;
+
+        /**
+         * 风险类型
+         */
+        private String riskType = "异常发布";
+
+        /**
+         * 检测指标
+         */
+        private String detectIndicator = "短时间大量发布同类商品";
+    }
+}

+ 50 - 0
alien-entity/src/main/java/shop/alien/entity/second/LifeUserLog.java

@@ -0,0 +1,50 @@
+package shop.alien.entity.second;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 用户
+ */
+@Data
+@JsonInclude
+@TableName("life_user_log")
+public class LifeUserLog implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @TableField("user_id")
+    private Integer userId;
+
+    @TableField("user_name")
+    private String userName;
+
+    @TableField("mac_ip")
+    private String macIp;
+
+    @ApiModelProperty(value = "创建时间")
+    @TableField(value = "created_time", fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createdTime;
+
+    @ApiModelProperty(value = "创建人ID")
+    @TableField("created_user_id")
+    private Integer createdUserId;
+
+    @ApiModelProperty(value = "修改时间")
+    @TableField(value = "updated_time", fill = FieldFill.UPDATE)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updatedTime;
+
+    @ApiModelProperty(value = "修改人ID")
+    @TableField("updated_user_id")
+    private Integer updatedUserId;
+}

+ 1 - 1
alien-entity/src/main/java/shop/alien/entity/second/SecondGoodsCategory.java

@@ -66,5 +66,5 @@ public class SecondGoodsCategory implements Serializable {
     private Integer updatedUserId;
 
     @TableField(exist = false)
-    private List<SecondGoodsCategory> children = new ArrayList<>();
+    private List<SecondGoodsCategory> children = null;
 }

+ 91 - 0
alien-entity/src/main/java/shop/alien/entity/second/SecondRiskControlRecord.java

@@ -0,0 +1,91 @@
+package shop.alien.entity.second;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@JsonInclude
+@TableName("second_risk_control_record")
+public class SecondRiskControlRecord extends Model<SecondRiskControlRecord> {
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    @ApiModelProperty(value = "主键ID")
+    private Integer id;
+
+    @TableField("user_id")
+    @ApiModelProperty(value = "用户ID")
+    private Integer userId;
+
+    @TableField("rule_type")
+    @ApiModelProperty(value = "规则类型 1:洗钱嫌疑 2:账号异常 3:交易欺诈 4:异常发布")
+    private Integer ruleType;
+
+    @TableField("rule_name")
+    @ApiModelProperty(value = "规则名称")
+    private String ruleName;
+
+    @TableField("risk_status")
+    @ApiModelProperty(value = "风控执行状态 0 未执行,1-已执行 2-已忽略")
+    private Integer riskStatus;
+
+//
+//    @TableField("trigger_count")
+//    @ApiModelProperty(value = "触发次数")
+//    private Integer triggerCount;
+//
+//    @TableField("time_window_hours")
+//    @ApiModelProperty(value = "时间窗口(小时)")
+//    private Integer timeWindowHours;
+//
+//    @TableField("threshold_value")
+//    @ApiModelProperty(value = "阈值")
+//    private Integer thresholdValue;
+//
+//    @TableField("actual_value")
+//    @ApiModelProperty(value = "实际值")
+//    private Integer actualValue;
+
+    @TableField("business_id")
+    @ApiModelProperty(value = "业务ID(如商品ID、交易ID等)")
+    private String businessId;
+
+//    @TableField("business_type")
+//    @ApiModelProperty(value = "业务类型 1:二手商品 2:交易记录")
+//    private Integer businessType;
+
+    @TableField("detail_info")
+    @ApiModelProperty(value = "详细信息(JSON格式)")
+    private String detailInfo;
+
+    @TableField("delete_flag")
+    @ApiModelProperty(value = "删除标记 0:未删除 1:已删除")
+    @TableLogic
+    private Integer deleteFlag;
+
+    @TableField(value = "created_time", fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @ApiModelProperty(value = "创建时间")
+    private Date createdTime;
+
+    @TableField(value = "created_user_id", fill = FieldFill.INSERT)
+    @ApiModelProperty(value = "创建人ID")
+    private Integer createdUserId;
+
+    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @ApiModelProperty(value = "修改时间")
+    private Date updatedTime;
+
+    @TableField(value = "updated_user_id", fill = FieldFill.INSERT_UPDATE)
+    @ApiModelProperty(value = "修改人ID")
+    private Integer updatedUserId;
+}

+ 7 - 10
alien-entity/src/main/java/shop/alien/entity/second/SecondTradeOperation.java

@@ -1,9 +1,6 @@
 package shop.alien.entity.second;
 
-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 com.baomidou.mybatisplus.annotation.*;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
@@ -41,21 +38,21 @@ public class SecondTradeOperation extends Model<SecondTradeOperation> {
     @ApiModelProperty(value = "删除标记 0:未删除 1:已删除")
     private Integer deleteFlag;
 
-    @TableField("created_time")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @ApiModelProperty(value = "创建时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(value = "created_time", fill = FieldFill.INSERT)
     private Date createdTime;
 
-    @TableField("created_user_id")
     @ApiModelProperty(value = "创建人ID")
+    @TableField(value = "created_user_id", fill = FieldFill.INSERT)
     private Integer createdUserId;
 
-    @TableField("updated_time")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @ApiModelProperty(value = "修改时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
     private Date updatedTime;
 
-    @TableField("updated_user_id")
     @ApiModelProperty(value = "修改人ID")
+    @TableField(value = "updated_user_id", fill = FieldFill.INSERT_UPDATE)
     private Integer updatedUserId;
 }

+ 55 - 0
alien-entity/src/main/java/shop/alien/entity/second/SecondUserCredit.java

@@ -0,0 +1,55 @@
+package shop.alien.entity.second;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 用户
+ */
+@Data
+@JsonInclude
+@TableName("second_user_credit")
+public class SecondUserCredit implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @TableField("user_id")
+    private Integer userId;
+
+    @TableField("user_points")
+    private Integer userPoints;
+
+    @TableField("delete_flag")
+    @TableLogic
+    private Integer deleteFlag;
+
+    @ApiModelProperty(value = "冻结时间")
+    @TableField("freeze_time")
+    private Date freezeTime;
+
+    @TableField(value = "created_time", fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @ApiModelProperty(value = "创建时间")
+    private Date createdTime;
+
+    @TableField(value = "created_user_id", fill = FieldFill.INSERT)
+    @ApiModelProperty(value = "创建人ID")
+    private Integer createdUserId;
+
+    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @ApiModelProperty(value = "修改时间")
+    private Date updatedTime;
+
+    @TableField(value = "updated_user_id", fill = FieldFill.INSERT_UPDATE)
+    @ApiModelProperty(value = "修改人ID")
+    private Integer updatedUserId;
+}

+ 54 - 0
alien-entity/src/main/java/shop/alien/entity/second/SecondUserCreditRecord.java

@@ -0,0 +1,54 @@
+package shop.alien.entity.second;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 用户
+ */
+@Data
+@JsonInclude
+@TableName("second_user_credit_record")
+public class SecondUserCreditRecord implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @TableField("user_id")
+    private Integer userId;
+
+    @TableField("points")
+    private Integer points;
+
+    @TableField("points_type")
+    private Integer pointsType;
+
+    @TableField("delete_flag")
+    @TableLogic
+    private Integer deleteFlag;
+
+    @TableField(value = "created_time", fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @ApiModelProperty(value = "创建时间")
+    private Date createdTime;
+
+    @TableField(value = "created_user_id", fill = FieldFill.INSERT)
+    @ApiModelProperty(value = "创建人ID")
+    private Integer createdUserId;
+
+    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @ApiModelProperty(value = "修改时间")
+    private Date updatedTime;
+
+    @TableField(value = "updated_user_id", fill = FieldFill.INSERT_UPDATE)
+    @ApiModelProperty(value = "修改人ID")
+    private Integer updatedUserId;
+}

+ 56 - 0
alien-entity/src/main/java/shop/alien/entity/second/enums/RiskControlRuleTypeEnum.java

@@ -0,0 +1,56 @@
+package shop.alien.entity.second.enums;
+
+import lombok.Getter;
+
+/**
+ * 风控规则类型枚举
+ * @see RiskControlRuleTypeEnum 风控规则类型枚举
+ */
+@Getter
+public enum RiskControlRuleTypeEnum {
+    /**
+     * 洗钱嫌疑: 高频高价交易(>5次/天,>200元/笔)
+     */
+    MONEY_LAUNDERING_SUSPICION(1, "洗钱嫌疑", "24h>5次>200元"),
+
+    /**
+     * 账号异常: 同一设备/mac 24小时内注册超过3个账号
+     */
+    ACCOUNT_ABNORMAL(2, "账号异常", "24h同设备>3账号"),
+
+    /**
+     * 交易欺诈: 用户频繁修改商品 发布成功的记录(24小时 3次 - 调取接口发当前时间 倒推24小时)
+     */
+    TRANSACTION_FRAUD(3, "交易欺诈", "24h修改商品>3次"),
+
+    /**
+     * 异常发布: 短时间大量发布同类商品(如24小时发布10个同二级分类触发- 调取接口发当前时间 倒推24小时)
+     */
+    ABNORMAL_PUBLISH(4, "异常发布", "24h同分类>10商品");
+
+
+    private final Integer ruleType;
+    private final String ruleName;
+    private final String description;
+
+    RiskControlRuleTypeEnum(Integer ruleType, String ruleName, String description) {
+        this.ruleType = ruleType;
+        this.ruleName = ruleName;
+        this.description = description;
+    }
+
+    /**
+     * 根据ruleType获取枚举
+     *
+     * @param ruleType 规则类型
+     * @return 对应的枚举值
+     */
+    public static RiskControlRuleTypeEnum fromRuleType(Integer ruleType) {
+        for (RiskControlRuleTypeEnum rule : RiskControlRuleTypeEnum.values()) {
+            if (rule.getRuleType().equals(ruleType)) {
+                return rule;
+            }
+        }
+        return null;
+    }
+}

+ 20 - 0
alien-entity/src/main/java/shop/alien/entity/second/vo/BatchUnshelveGoodsDTO.java

@@ -0,0 +1,20 @@
+package shop.alien.entity.second.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+/**
+ * 批量下架商品DTO
+ */
+@Data
+@ApiModel(value = "BatchUnshelveGoodsDTO", description = "批量下架商品参数")
+public class BatchUnshelveGoodsDTO {
+
+    @ApiModelProperty(value = "风控规则类型")
+    private Integer ruleType;
+
+    @ApiModelProperty(value = "业务ID")
+    private String businessId;
+}

+ 18 - 0
alien-entity/src/main/java/shop/alien/entity/second/vo/RiskControlGoodsIdsDTO.java

@@ -0,0 +1,18 @@
+package shop.alien.entity.second.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 风控商品ID查询DTO
+ */
+@Data
+@ApiModel(value = "RiskControlGoodsIdsDTO", description = "风控商品ID查询参数")
+public class RiskControlGoodsIdsDTO {
+
+    @ApiModelProperty(value = "商品记录表ID列表")
+    private List<Integer> recordIds;
+}

+ 18 - 0
alien-entity/src/main/java/shop/alien/entity/second/vo/RiskControlGoodsQueryDTO.java

@@ -0,0 +1,18 @@
+package shop.alien.entity.second.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 风控商品查询DTO
+ */
+@Data
+@ApiModel(value = "RiskControlGoodsQueryDTO", description = "风控商品查询参数")
+public class RiskControlGoodsQueryDTO {
+
+    @ApiModelProperty(value = "商品表ID列表")
+    private List<Integer> goodsIds;
+}

+ 6 - 0
alien-entity/src/main/java/shop/alien/entity/second/vo/SecondGoodsVo.java

@@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+import io.swagger.models.auth.In;
 import lombok.Data;
 import shop.alien.entity.second.SecondGoods;
 
@@ -68,6 +69,8 @@ public class SecondGoodsVo extends SecondGoods {
     @TableField(exist = false)
     private String categoryTwoName;
 
+    @ApiModelProperty(value = "商品图片列表")
+    private List<String> imageUrls;
     /** -------------------- 搜索入参 -------------------- */
 
     @TableField(exist = false)
@@ -95,6 +98,9 @@ public class SecondGoodsVo extends SecondGoods {
     @ApiModelProperty(value = "屏蔽id")
     private String shieldId;
 
+    @ApiModelProperty(value = "商品id")
+    private Integer goodsId;
+
     @ApiModelProperty(value = "屏蔽商品IDList")
     private List<Integer> shieldedGoodsIds;
 

+ 4 - 0
alien-entity/src/main/java/shop/alien/entity/second/vo/SecondReportingVo.java

@@ -1,5 +1,6 @@
 package shop.alien.entity.second.vo;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.annotation.JsonInclude;
 import io.swagger.annotations.ApiModel;
@@ -21,6 +22,9 @@ public class SecondReportingVo{
     @ApiModelProperty(value = "商品标题")
     private String title;
 
+    @ApiModelProperty(value = "处理状态(0:未处理,1:违规,2:未违规)")
+    private String processingStatus;
+
     @ApiModelProperty(value = "商品封面图片")
     private String homeImage;
 

+ 42 - 0
alien-entity/src/main/java/shop/alien/entity/second/vo/SecondRiskControlRecordVo.java

@@ -0,0 +1,42 @@
+package shop.alien.entity.second.vo;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import shop.alien.entity.second.SecondRiskControlRecord;
+
+import java.util.Date;
+
+@Data
+@JsonInclude
+@TableName("second_risk_control_record")
+public class SecondRiskControlRecordVo extends SecondRiskControlRecord {
+    private static final long serialVersionUID = 1L;
+
+    @TableField("rule_risk")
+    @ApiModelProperty(value = "风险等级")
+    private String ruleRisk;
+
+    @TableField("rule_name")
+    @ApiModelProperty(value = "规则名称")
+    private String ruleName;
+
+    @ApiModelProperty(value = "触发次数")
+    private String UserPhone;
+
+    @ApiModelProperty(value = "规则名称")
+    private String ruleTypeName;
+
+    @ApiModelProperty(value = "规则名称")
+    private String riskStatusName;
+
+    @ApiModelProperty(value = "分页页数")
+    private Integer pageNum;
+
+    @ApiModelProperty(value = "分页条数")
+    private Integer pageSize;
+
+}

+ 30 - 0
alien-entity/src/main/java/shop/alien/entity/second/vo/SecondRiskRecordVo.java

@@ -0,0 +1,30 @@
+package shop.alien.entity.second.vo;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import shop.alien.entity.store.LifeUser;
+
+import java.util.List;
+
+@Data
+@JsonInclude
+public class SecondRiskRecordVo extends SecondRiskControlRecordVo {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "洗钱嫌疑")
+    private List<SecondTradeRecordVo> tradeRecordList;
+
+    @ApiModelProperty(value = "交易欺诈")
+    private List<SecondGoodsRecordDetailVo> goodsRecordList;
+
+    @ApiModelProperty(value = "异常发布")
+    private List<SecondGoodsVo> goodsList;
+
+    @ApiModelProperty(value = "账号异常")
+    private List<LifeUser> userList;
+
+    @ApiModelProperty(value = "1:执行, 2:忽略")
+    private Integer isExecute;
+
+}

+ 22 - 0
alien-entity/src/main/java/shop/alien/entity/second/vo/SecondUserCreditVo.java

@@ -0,0 +1,22 @@
+package shop.alien.entity.second.vo;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import shop.alien.entity.second.SecondUserCredit;
+
+
+/**
+ * 用户
+ */
+@Data
+@JsonInclude
+public class SecondUserCreditVo extends SecondUserCredit {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "规则类型 1:洗钱嫌疑 2:账号异常 3:交易欺诈 4:异常发布")
+    private Integer ruleType;
+
+    @ApiModelProperty(value = "业务ID(如商品ID、交易ID等)")
+    private String businessId;
+}

+ 29 - 0
alien-entity/src/main/java/shop/alien/entity/second/vo/SecondUserViolationDetailVo.java

@@ -0,0 +1,29 @@
+package shop.alien.entity.second.vo;
+
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 二手商品类别表
+ */
+@Data
+@JsonInclude
+@ApiModel(value = "SecondUserViolation对象", description = "二手交易平台管理举报")
+public class SecondUserViolationDetailVo extends SecondUserViolationVo{
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "举报图片集合")
+    private List<Map<String, Object>> imgList;
+
+    // 商品信息
+    private SecondGoodsVo secondGoods;
+
+
+
+}

+ 40 - 13
alien-entity/src/main/java/shop/alien/entity/second/vo/SecondUserViolationVo.java

@@ -1,31 +1,58 @@
 package shop.alien.entity.second.vo;
 
+
+import com.fasterxml.jackson.annotation.JsonInclude;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
+import lombok.NoArgsConstructor;
 import shop.alien.entity.store.LifeUserViolation;
 
+import java.io.Serializable;
+import java.util.Date;
 import java.util.List;
 
 /**
- * <p>
- * 用户举报
- * </p>
- *
- * @author ssk
- * @since 2025-04-29
+ * 二手商品类别表
  */
 @Data
-@EqualsAndHashCode(callSuper = false)
-@Accessors(chain = true)
-@ApiModel(value="LifeUserViolation对象", description="用户举报")
+@JsonInclude
+@NoArgsConstructor
+@ApiModel(value = "SecondUserViolation对象", description = "二手交易平台管理举报")
 public class SecondUserViolationVo extends LifeUserViolation {
-
     private static final long serialVersionUID = 1L;
 
+    @ApiModelProperty(value = "分页页数")
+    private Integer pageNum;
+
+    @ApiModelProperty(value = "分页条数")
+    private Integer pageSize;
+
+    @ApiModelProperty(value = "被举报用户名称")
+    private String reportedUserName;
+
+    @ApiModelProperty(value = "被举报用户电话")
+    private String reportedUserPhone;
+
+    @ApiModelProperty(value = "举报用户名称")
+    private String reportingUserName;
+
+    @ApiModelProperty(value = "举报用户电话")
+    private String reportingUserPhone;
+
+    @ApiModelProperty(value = "举报类型")
+    private String reportContext;
+
+    @ApiModelProperty(value = "举报时间")
+    private String reportingDate;
+
+    @ApiModelProperty(value = "举报枚举")
+    private String dictDetail;
+
+    @ApiModelProperty(value = "举报状态")
+    private String processingContext;
+
     @ApiModelProperty(value = "商品图片")
     private List<String> imgUrl;
 
-}
+}

+ 4 - 0
alien-entity/src/main/java/shop/alien/entity/store/ActivityInviteLog.java

@@ -68,4 +68,8 @@ public class ActivityInviteLog {
     @TableField("delete_flag")
     @TableLogic
     private Integer deleteFlag;
+
+    @ApiModelProperty(value = "发放状态, 0:未发放, 1:已发放")
+    @TableField("distribution_status")
+    private Integer distributionStatus;
 }

+ 1 - 1
alien-entity/src/main/java/shop/alien/entity/store/ActivitySignInConfig.java

@@ -59,10 +59,10 @@ public class ActivitySignInConfig {
     @TableField("delete_flag")
     @TableLogic
     private Integer deleteFlag;
-
     @ApiModelProperty(value = "方案配置类型1,默认方案,2.特殊方案")
     private Integer planConfigType;
 
+
     @ApiModelProperty(value = "返回错误信息")
     @TableField(exist = false)
     private String errorMessage;

+ 1 - 1
alien-entity/src/main/java/shop/alien/entity/store/LifeCoupon.java

@@ -93,7 +93,7 @@ public class LifeCoupon {
     @ApiModelProperty(value = "受用场景")
     private String applicableRule;
 
-    @ApiModelProperty(value = "状态:-1.待审核  -2.已驳回  0.待使用(已通过), 1.进行中, 2.已暂停, 3.已结束")
+    @ApiModelProperty(value = "状态:0草稿/1待审核/2未开始/3审核拒绝/4已售罄/5进行中/6已下架/7已结束/8=2+手动下架")
     private Integer status;
 
     @ApiModelProperty(value = "券图片地址")

+ 9 - 0
alien-entity/src/main/java/shop/alien/entity/store/LifeUserOrder.java

@@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonInclude;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import java.math.BigDecimal;
 import java.util.Date;
 
 /**
@@ -92,4 +93,12 @@ public class LifeUserOrder {
     @ApiModelProperty(value = "核销发送优惠券(0:未发送,1:已发送)")
     @TableField("send_discount_coupon_flag")
     private Integer sendDiscountCouponFlag;
+
+    @ApiModelProperty(value = "达人订单id")
+    @TableField("expert_order_id")
+    private Integer expertOrderId;
+
+    @ApiModelProperty(value = "订单评价 0:未评价 1:已评价")
+    @TableField("order_appraise")
+    private Integer orderAppraise;
 }

+ 6 - 2
alien-entity/src/main/java/shop/alien/entity/store/LifeUserViolation.java

@@ -2,12 +2,16 @@ package shop.alien.entity.store;
 
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
+
 import java.util.Date;
+
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableField;
+
 import java.io.Serializable;
+
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -25,7 +29,7 @@ import lombok.experimental.Accessors;
 @Data
 @EqualsAndHashCode(callSuper = false)
 @Accessors(chain = true)
-@ApiModel(value="LifeUserViolation对象", description="用户举报")
+@ApiModel(value = "LifeUserViolation对象", description = "用户举报")
 public class LifeUserViolation extends Model<LifeUserViolation> {
 
     private static final long serialVersionUID = 1L;
@@ -50,7 +54,7 @@ public class LifeUserViolation extends Model<LifeUserViolation> {
     @TableField("reporting_user_id")
     private String reportingUserId;
 
-    @ApiModelProperty(value = "举报内容分类")
+    @ApiModelProperty(value = "举报内容分类(0:商户, 1:用户,2:动态,3:评论, 4:二手商品, 5:二手用户)")
     @TableField("report_context_type")
     private String reportContextType;
 

+ 76 - 0
alien-entity/src/main/java/shop/alien/entity/store/StoreAliPayErrorLog.java

@@ -0,0 +1,76 @@
+package shop.alien.entity.store;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 支付宝转账记录错误信息表
+ * qxy
+ */
+@Data
+@JsonInclude
+@ApiModel(value = "StoreAliPayErrorLog对象", description = "支付宝转账记录错误信息表")
+public class StoreAliPayErrorLog extends Model<StoreAliPayErrorLog> {
+
+    @ApiModelProperty(value = "主键")
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @ApiModelProperty(value = "商户ID")
+    @TableField("store_user_id")
+    private Integer storeUserId;
+
+    @ApiModelProperty(value = "用户ID")
+    @TableField("life_user_id")
+    private Integer lifeUserId;
+
+    @ApiModelProperty(value = "订单总金额")
+    @TableField("trans_amount")
+    private String transAmount;
+
+    @ApiModelProperty(value = "阿里返回错误信息")
+    @TableField("sub_msg")
+    private String subMsg;
+
+    @ApiModelProperty(value = "阿里返回状态码")
+    @TableField("sub_code")
+    private String subCode;
+
+    @ApiModelProperty(value = "阿里返回参数具体内容")
+    @TableField("biz_content")
+    private String bizContent;
+
+    @ApiModelProperty(value = "错误信息")
+    @TableField("information")
+    private String information;
+
+    @ApiModelProperty(value = "删除标记, 0:未删除, 1:已删除")
+    @TableField("delete_flag")
+    @TableLogic
+    private Integer deleteFlag;
+
+    @ApiModelProperty(value = "创建时间")
+    @TableField(value = "created_time", fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createdTime;
+
+    @ApiModelProperty(value = "创建人ID")
+    @TableField("created_user_id")
+    private Integer createdUserId;
+
+    @ApiModelProperty(value = "修改时间")
+    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updatedTime;
+
+    @ApiModelProperty(value = "修改人ID")
+    @TableField("updated_user_id")
+    private Integer updatedUserId;
+}

+ 2 - 0
alien-entity/src/main/java/shop/alien/entity/store/StoreAliPayLog.java

@@ -74,4 +74,6 @@ public class StoreAliPayLog extends Model<StoreAliPayLog> {
     @TableField("updated_user_id")
     private Integer updatedUserId;
 
+    private StoreAliPayErrorLog storeAliPayErrorLog;
+
 }

+ 63 - 0
alien-entity/src/main/java/shop/alien/entity/store/StoreCommentSummaryInterest.java

@@ -0,0 +1,63 @@
+package shop.alien.entity.store;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * AI服务 店铺推荐趣味信息表
+ */
+@Data
+@JsonInclude
+@TableName("store_comment_summary_interest")
+@ApiModel(value = "store_comment_summary_interest", description = "store_comment_summary_interest")
+public class StoreCommentSummaryInterest {
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @ApiModelProperty(value = "店铺ID(新增字段)")
+    @TableField("store_id")
+    private Integer storeId;
+
+    @ApiModelProperty(value = "店铺名称(对应表格“店铺名称”)")
+    @TableField("store_name")
+    private String storeName;
+
+    @ApiModelProperty(value = "总结内容(对应表格“总结内容”,允许为空)")
+    @TableField("summary")
+    private String summary;
+
+    @ApiModelProperty(value = "任务唯一标识(如 UUID,新增字段)")
+    @TableField("task_id")
+    private String taskId;
+
+    @ApiModelProperty(value = "删除标识")
+    @TableLogic
+    @TableField("delete_flag")
+    private Integer  deleteFlag;
+
+    @ApiModelProperty(value = "创建时间")
+    @TableField(value = "created_time", fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createdTime;
+
+    @ApiModelProperty(value = "创建人ID")
+    @TableField("created_user_id")
+    private Integer createdUserId;
+
+    @ApiModelProperty(value = "修改时间")
+    @TableField(value = "updated_time", fill = FieldFill.UPDATE)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updatedTime;
+
+    @ApiModelProperty(value = "修改人ID")
+    @TableField("updated_user_id")
+    private Integer updatedUserId;
+}

+ 1 - 1
alien-entity/src/main/java/shop/alien/entity/store/StoreIncomeDetailsRecord.java

@@ -34,7 +34,7 @@ public class StoreIncomeDetailsRecord extends Model<StoreIncomeDetailsRecord> {
     @TableField("cash_out_id")
     private Integer cashOutId;
 
-    @ApiModelProperty(value = "收入类型, 0:主页, 1:优惠券, 2:代金券, 3:套餐, 4:联名卡")
+    @ApiModelProperty(value = "收入类型, 0:全部, 1:代金, 2:团购")
     @TableField("income_type")
     private Integer incomeType;
 

+ 4 - 0
alien-entity/src/main/java/shop/alien/entity/store/excelVo/LifeUserOrderExcelVo.java

@@ -58,6 +58,10 @@ public class LifeUserOrderExcelVo {
     @ApiModelProperty(value = "完成时间")
     private String finishTime;
 
+    @ExcelHeader("取消时间")
+    @ApiModelProperty(value = "取消时间")
+    private String cancelTime;
+
     @ExcelHeader("订单状态")
     @ApiModelProperty(value = "订单状态")
     private String orderStatus;

+ 15 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/ActivityInviteLogVo.java

@@ -29,4 +29,19 @@ public class ActivityInviteLogVo extends ActivityInviteLog {
 
     @ApiModelProperty(value = "被邀请人昵称")
     private String invitedNickName;
+
+    @ApiModelProperty(value = "邀请人奖励信息")
+    private String inviteRewardInfo;
+
+    @ApiModelProperty(value = "被邀请人奖励信息")
+    private String invitedRewardInfo;
+
+    @ApiModelProperty(value = "邀请人真实姓名")
+    private String inviteRealName;
+
+    @ApiModelProperty(value = "被邀请人真实姓名")
+    private String invitedRealName;
+
+    @ApiModelProperty(value = "邀请人昵称")
+    private String inviteNickName;
 }

+ 6 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/LifeAppealManageVo.java

@@ -30,4 +30,10 @@ public class LifeAppealManageVo extends LifeAppealManage {
     @ApiModelProperty(value = "业务状态名称")
     private String appealTypeName;
 
+    @ApiModelProperty(value = "用户电话")
+    private String userPhone;
+
+    @ApiModelProperty(value = "评论图片")
+    private String commentImage;
+
 }

+ 6 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/LifeFansVo.java

@@ -50,4 +50,10 @@ public class LifeFansVo {
 
     @ApiModelProperty(value = "拉黑id")
     public String blackListid;
+
+    @ApiModelProperty(value = "用户名")
+    public String username;
+
+    @ApiModelProperty(value = "用户简介")
+    public String accountBlurb;
 }

+ 12 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/LifeGroupBuyMainVo.java

@@ -27,6 +27,18 @@ public class LifeGroupBuyMainVo extends LifeGroupBuyMain {
     @ApiModelProperty(value = "商家名称")
     private String storeName;
 
+    @ApiModelProperty(value = "商家评分")
+    private String scoreAvg;
+
+    @ApiModelProperty(value = "商家经营种类")
+    private String businessName;
+
+    @ApiModelProperty(value = "商家地址")
+    private String address;
+
+    @ApiModelProperty(value = "团购图片url")
+    private String imagePaths;
+
     @ApiModelProperty(value = "商家手机号")
     private String phone;
 

+ 3 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/LifeGroupBuyThaliVo.java

@@ -256,4 +256,7 @@ public class LifeGroupBuyThaliVo {
     @ApiModelProperty(value = "是否收藏")
     private String isCollect;
 
+    @ApiModelProperty(value = "已售数量")
+    private Integer saleNum;
+
 }

+ 4 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/LifeUserOrderCommentVo.java

@@ -17,4 +17,8 @@ public class LifeUserOrderCommentVo extends LifeUserOrder {
     private String groupBuyType;
 
     private String storeType;
+
+    private String businessTypesName;
+
+    private String storeName;
 }

+ 17 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/LifeUserOrderVo.java

@@ -182,4 +182,21 @@ public class LifeUserOrderVo {
     @ApiModelProperty(value = "修改人ID")
     @TableField("updated_user_id")
     private Integer updatedUserId;
+
+    @ApiModelProperty(value = "达人订单id")
+    @TableField("expert_order_id")
+    private Integer expertOrderId;
+
+    @ApiModelProperty(value = "订单评价 0:未评价 1:已评价")
+    @TableField("order_appraise")
+    private Integer orderAppraise;
+    
+    @ApiModelProperty(value = "订单状态值")
+    private String orderStatusValue;
+
+    @ApiModelProperty(value = "图片id")
+    private String imgIds;
+
+    @ApiModelProperty(value = "图片地址列表")
+    private List<String> imgUrls;
 }

+ 7 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/LifeUserViolationVo.java

@@ -22,4 +22,11 @@ public class LifeUserViolationVo extends LifeUserViolation {
 
     //举报结果通知
     private String reportResultNotification;
+
+    
+    private String phone;
+
+    private String nickName;
+
+    private String image;
 }

+ 3 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/LifeUserVo.java

@@ -59,4 +59,7 @@ public class LifeUserVo extends LifeUser {
 
     @ApiModelProperty(value = "简介")
     private String blurb;
+
+    @ApiModelProperty(value = "验证码")
+    private String verificationCode;
 }

+ 1 - 1
alien-entity/src/main/java/shop/alien/entity/store/vo/StoreCommentAppealVo.java

@@ -25,7 +25,7 @@ public class StoreCommentAppealVo extends StoreCommentAppeal {
     @ApiModelProperty(value = "评论图片链接")
     private List<String> commentImgList;
 
-    @ApiModelProperty(value = "商家申诉图片id")
+    @ApiModelProperty(value = "评论图片id")
     private String commentImgId;
 
     @ApiModelProperty(value = "申诉状态字符串")

+ 7 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/StoreCommentVo.java

@@ -57,5 +57,12 @@ public class StoreCommentVo extends StoreComment {
     @ApiModelProperty(value = "标签")
     private List<String> labels;
 
+    @ApiModelProperty(value = "商家or用户(0商家/1用户)")
+    private Integer storeUserFlag;
 
+    private String storeUserName;
+    private String storeUserImg;
+
+    @ApiModelProperty(value = "门店名称")
+    private String  storeName;
 }

+ 4 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/StoreIncomeDetailsRecordVo.java

@@ -1,5 +1,6 @@
 package shop.alien.entity.store.vo;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.annotation.JsonInclude;
 import io.swagger.annotations.ApiModel;
@@ -71,5 +72,8 @@ public class StoreIncomeDetailsRecordVo extends StoreIncomeDetailsRecord {
     @ApiModelProperty(value = "退款金额")
     BigDecimal refundMoney;
 
+    @ApiModelProperty(value = "抽成比例")
+    private String commissionRate;
+
     List<StoreIncomeDetailsRecordVo> incomeDetailsRecordVoList;
 }

+ 3 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/StoreInfoVo.java

@@ -174,6 +174,7 @@ public class StoreInfoVo extends StoreInfo {
     private Integer totalDynamicsNum;
 
     private StoreBusinessInfo storeBusinessInfo;
+    private List<StoreBusinessInfo> storeBusinessInfos;
 
     @ApiModelProperty(value = "是否营业中(0否1是)")
     private Integer yyFlag;
@@ -211,4 +212,6 @@ public class StoreInfoVo extends StoreInfo {
     @ApiModelProperty(value = "食品经营许可")
     private String foodLicenceImageUrl;
 
+    @ApiModelProperty(value = "动态数量")
+    private Integer dynamicsNum;
 }

+ 3 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/StoreMainInfoVo.java

@@ -86,6 +86,9 @@ public class StoreMainInfoVo extends StoreInfo {
     @ApiModelProperty(value = "到期时间")
     private String expirationDate;
 
+    @ApiModelProperty(value = "合同是否到期 0已到期/1没到期")
+    private Integer expirationFlag;
+
     @ApiModelProperty(value = "门店注销中倒计时时间毫秒")
     private long countdown;
 

+ 3 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/StoreUserVo.java

@@ -36,4 +36,7 @@ public class StoreUserVo extends StoreUser {
 
     @ApiModelProperty(value = "倒计时")
     private long countdown;
+
+    @ApiModelProperty(value = "手机号")
+    private String phone;
 }

+ 33 - 4
alien-entity/src/main/java/shop/alien/mapper/ActivityInviteLogMapper.java

@@ -16,9 +16,38 @@ import shop.alien.entity.store.vo.ActivityInviteLogVo;
 @Mapper
 public interface ActivityInviteLogMapper extends BaseMapper<ActivityInviteLog> {
 
-    @Select("select ail.*, lu.user_phone as invitePhone, lu1.user_phone as invitedPhone, lu1.user_image, lu1.user_name as invitedNickName  " +
-            "from activity_invite_log ail " +
-            "left join life_user lu on lu.id = ail.invite_user_id and lu.delete_flag  = 0 " +
-            "left join life_user lu1 on lu1.id = ail.invited_user_id and lu1.delete_flag = 0 ${ew.customSqlSegment}")
+    @Select("SELECT " +
+            "  ail.*," +
+            " lud.real_name as invitedRealName," +
+            " lud.user_name as invitedNickName," +
+            " lu.user_phone AS invitePhone," +
+            " lu.real_name as inviteRealName," +
+            " lu.user_name as inviteNickName," +
+            " lu1.user_phone AS invitedPhone," +
+            " lu1.user_image," +
+            " lu1.user_name AS invitedNickName," +
+            " CASE " +
+            " WHEN ail.invite_reward_type = 1 AND lc_invite.id IS NOT NULL THEN " +
+            " CONCAT('优惠券:', lc_invite.name, '(', IFNULL(lc_invite.offprice, lc_invite.price), '元)') " +
+            " WHEN ail.invite_reward_type = 2 AND ail.invite_reward_point IS NOT NULL THEN " +
+            " CONCAT('积分:', ail.invite_reward_point, '分') " +
+            " ELSE '' " +
+            " END AS inviteRewardInfo, " +
+            " CASE " +
+            " WHEN ail.invited_reward_type = 1 AND lc_invited.id IS NOT NULL THEN " +
+            " CONCAT('优惠券:', lc_invited.name, '(', IFNULL(lc_invited.offprice, lc_invited.price), '元)') " +
+            " WHEN ail.invited_reward_type = 2 AND ail.invited_reward_point IS NOT NULL THEN " +
+            " CONCAT('积分:', ail.invited_reward_point, '分') " +
+            " ELSE '' " +
+            " END AS invitedRewardInfo " +
+            " FROM activity_invite_log ail " +
+            " LEFT JOIN life_user lu ON lu.id = ail.invite_user_id " +
+            " AND lu.delete_flag = 0 " +
+            " LEFT JOIN life_user lud ON lud.id = ail.invited_user_id " +
+            " AND lud.delete_flag = 0 " +
+            " LEFT JOIN life_user lu1 ON lu1.id = ail.invited_user_id AND lu1.delete_flag = 0 " +
+            " LEFT JOIN life_coupon lc_invite ON lc_invite.id = ail.invite_reward_coupon AND lc_invite.delete_flag = 0 " +
+            " LEFT JOIN life_coupon lc_invited ON lc_invited.id = ail.invited_reward_coupon AND lc_invited.delete_flag = 0 " +
+            "${ew.customSqlSegment}")
     IPage<ActivityInviteLogVo> getInviteActivityLogList(IPage<ActivityInviteLogVo> iPage, @Param(Constants.WRAPPER) QueryWrapper<ActivityInviteLogVo> wrapper);
 }

+ 2 - 2
alien-entity/src/main/java/shop/alien/mapper/LifeBrowseRecordMapper.java

@@ -12,7 +12,7 @@ import java.util.Map;
 public interface LifeBrowseRecordMapper extends BaseMapper<LifeBrowseRecord> {
 
     @Select("SELECT a.id,a.liulan_date liulanDate, b.store_type storeType, b.store_position storePosition, a.liulan_time liulanTime, " +
-            "c.img_url image, b.store_name storeName, b.store_address storeDetailAddress, b.id storeId, a.created_time, d.img_url entranceImage, dict.dict_detail storeTypeStr,b.score_avg scoreAvg,b.business_types_name businessTypesName " +
+            "c.img_url image, b.store_name storeName, b.store_address storeDetailAddress, b.id storeId, a.created_time, d.img_url entranceImage, dict.dict_detail storeTypeStr,ROUND(b.score_avg, 2) scoreAvg,b.business_types_name businessTypesName " +
             "FROM life_browse_record a " +
             "LEFT JOIN store_info b ON a.store_id = b.id " +
             "LEFT JOIN store_img c on b.id = c.store_id and c.img_type = 11 and c.delete_flag = 0 " +
@@ -20,7 +20,7 @@ public interface LifeBrowseRecordMapper extends BaseMapper<LifeBrowseRecord> {
             "left join store_dictionary dict on dict.type_name = 'storeType' and dict.dict_id = b.store_type and dict.delete_flag = 0 " +
             "WHERE a.user_id = #{userId} AND a.delete_flag = 0 AND b.delete_flag = 0 ORDER BY a.liulan_time desc")
     List<Map<String, Object>> getBrowseRecordByUserId(String userId);
-    @Select("select lbr.id,lgbm.group_name groupName,lgbm.id couponId,si.id storeId,original_price originalPrice,preferential_price preferentialPrice,lbr.liulan_date liulanDate,si.store_name storeName,si2.img_url\n" +
+    @Select("select lbr.id,lgbm.group_name groupName,lgbm.id couponId,si.id storeId,ROUND(b.score_avg, 2) scoreAvg, original_price originalPrice,preferential_price preferentialPrice,lbr.liulan_date liulanDate,si.store_name storeName,si2.img_url\n" +
             "from life_browse_record lbr \n" +
             "inner join life_group_buy_main lgbm on lgbm.id = lbr.coupon_id \n" +
             "and lgbm.delete_flag = 0 and lbr.delete_flag = 0\n" +

+ 16 - 0
alien-entity/src/main/java/shop/alien/mapper/LifeCouponMapper.java

@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.toolkit.Constants;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
 import shop.alien.entity.store.LifeCoupon;
 import shop.alien.entity.store.vo.LifeCouponVo;
 
@@ -64,4 +65,19 @@ public interface LifeCouponMapper extends BaseMapper<LifeCoupon> {
 
     @Select("SELECT * FROM life_coupon ${ew.customSqlSegment}")
     List<LifeCoupon> getList(@Param(Constants.WRAPPER) LambdaQueryWrapper<LifeCoupon> lambdaQueryWrapper);
+
+    @Update(" UPDATE life_coupon\n" +
+            "    SET \n" +
+            "        status = CASE WHEN (single_qty - #{buyCount}) = 0 \n" +
+            "                     THEN #{soldOutStatus} \n" +
+            "                     ELSE status END,\n" +
+            "        single_qty = single_qty - #{buyCount}\n" +
+            "    WHERE \n" +
+            "        id = #{couponId} \n" +
+            "        AND single_qty >= #{buyCount}")
+    int deductInventoryAtomically(
+            @Param("couponId") Integer couponId,
+            @Param("buyCount") int buyCount,
+            @Param("soldOutStatus") int soldOutStatus
+    );
 }

+ 86 - 24
alien-entity/src/main/java/shop/alien/mapper/LifeFansMapper.java

@@ -23,14 +23,15 @@ public interface LifeFansMapper extends BaseMapper<LifeFans> {
             "        from life_fans   " +
             "        where delete_flag = 0 and fans_id = #{fansId} " +
             "    )   " +
-            "    select info.id, info.store_name name, user.head_img image, concat('store_', user.phone) phoneId, info.store_blurb blurb, 1 blockedType,user.id blockedId" +
+            "    select info.id, IF(info.store_application_status = 0, user.nick_name, info.store_name) AS NAME," +
+            "    user.head_img image, concat('store_', user.phone) phoneId, IF(info.store_application_status = 0, user.account_blurb, info.store_blurb) AS blurb, 1 blockedType,user.id blockedId ,IFNULL(user.nick_name, user.name) username, user.account_blurb accountBlurb " +
             "    from follow foll " +
             "    join store_user user on foll.phone = user.phone " +
             "    join store_info info on info.id = user.store_id " +
             "    left join store_img img on img.store_id = user.store_id and img.img_type = '10' and img.delete_flag = 0 " +
             "    where foll.flag = 'store' and user.delete_flag = 0 and info.delete_flag = 0 " +
             "    union " +
-            "    select user.id, user.user_name name, user.user_image image, concat('user_', user.user_phone) phoneId, user.jianjie blurb, 2 blockedType,user.id blockedId" +
+            "    select user.id, user.user_name name, user.user_image image, concat('user_', user.user_phone) phoneId, user.jianjie blurb, 2 blockedType,user.id blockedId,'' username, '' accountBlurb " +
             "    from follow foll " +
             "    join life_user user on foll.phone = user.user_phone   " +
             "    where foll.flag = 'user' and user.delete_flag = 0   " +
@@ -71,12 +72,12 @@ public interface LifeFansMapper extends BaseMapper<LifeFans> {
             "        from life_fans " +
             "        where delete_flag = 0 and followed_id = #{fansId} " +
             "    ) " +
-            "    select info.id, info.store_name name, user.head_img image, concat('store_', user.phone) phoneId, info.store_blurb blurb, 1 blockedType,user.id blockedId" +
+            "    select user.id, user.nick_name name, user.head_img image, concat('store_', user.phone) phoneId, user.account_blurb blurb, 1 blockedType,user.id blockedId" +
             "    from follow foll " +
             "    join store_user user on foll.phone = user.phone " +
-            "    join store_info info on info.id = user.store_id " +
-            "    left join store_img img on img.store_id = user.store_id and img.img_type = '10' and img.delete_flag = 0 " +
-            "    where foll.flag = 'store' and user.delete_flag = 0 and info.delete_flag = 0 " +
+//            "    join store_info info on info.id = user.store_id " +
+//            "    left join store_img img on img.store_id = user.store_id and img.img_type = '10' and img.delete_flag = 0 " +
+            "    where foll.flag = 'store' and user.delete_flag = 0" +
             "    union " +
             "    select user.id, user.user_name name, user.user_image image, concat('user_', user.user_phone) phoneId, user.jianjie blurb, 2 blockedType,user.id blockedId" +
             "    from follow foll " +
@@ -88,23 +89,84 @@ public interface LifeFansMapper extends BaseMapper<LifeFans> {
             "${ew.customSqlSegment} ")
     IPage<LifeFansVo> getMyFans(IPage<LifeFansVo> iPage, @Param("fansId") String fansId, @Param("blockerType") String blockerType, @Param("blockerId") String blockerId, @Param(Constants.WRAPPER) QueryWrapper<LifeFansVo> wrapper);
 
-    @Select("select foll.*, if(isnull(fans.id), 0, 1) isFollowThis, 1 as isFollowMe, count(fans2.id) fansNum, count(fans3.id) followNum from ( " +
-            "    with follow as ( " +
-            "    select substring_index(fans_id, '_', 1) as flag, substring_index(fans_id, '_', -1) as phone " +
-            "    from life_fans " +
-            "    where delete_flag = 0 and followed_id = #{fansId} " +
-            "    ) " +
-            "    select info.id, info.store_name name, user.head_img image, concat('store_', user.phone) phoneId, info.store_blurb blurb " +
-            "    from follow foll " +
-            "    join store_user user on foll.phone = user.phone " +
-            "    join store_info info on info.id = user.store_id " +
-            "    left join store_img img on img.store_id = user.store_id and img.img_type = '10' and img.delete_flag = 0 " +
-            "    where foll.flag = 'store' and user.delete_flag = 0 and info.delete_flag = 0 " +
+//    @Select("select foll.*, if(isnull(fans.id), 0, 1) isFollowThis, 1 as isFollowMe, count(fans2.id) fansNum, count(fans3.id) followNum from ( " +
+//            "    with follow as ( " +
+//            "    select substring_index(fans_id, '_', 1) as flag, substring_index(fans_id, '_', -1) as phone " +
+//            "    from life_fans " +
+//            "    where delete_flag = 0 and followed_id = #{fansId} " +
+//            "    ) " +
+//            "    select info.id," +
+//            "    \"CASE \" +\n" +
+//            "        \"WHEN user.store_id IS NULL OR info.store_application_status = 0 THEN user.nick_name \" +\n" +
+//            "        \"ELSE info.store_name \" +\n" +
+//            "        \"END AS name, \" +\n" +
+//            "        \"CASE \" +\n" +
+//            "        \"WHEN user.store_id IS NULL OR info.store_application_status IN (0, 2) THEN user.account_blurb \" +\n" +
+//            "        \"ELSE info.store_blurb \" +\n" +
+//            "        \"END AS store_blurb, \" + " +
+//            "    user.head_img image, concat('store_', user.phone) phoneId" +
+//            "    from follow foll " +
+//            "    join store_user user on foll.phone = user.phone " +
+//            "    LEFT JOIN store_info info ON user.store_id IS NOT NULL AND info.id = user.store_id " +
+//            "    and info.delete_flag = 0" +
+//            "    left join store_img img on img.store_id = user.store_id and img.img_type = '10' and img.delete_flag = 0 " +
+//            "    where foll.flag = 'store' and user.delete_flag = 0 " +
+//            ") foll " +
+//            "left join life_fans fans on fans.followed_id = foll.phoneId and fans.fans_id = #{fansId} and fans.delete_flag = 0 " +
+//            "left join life_fans fans2 on fans2.followed_id = foll.phoneId and fans2.delete_flag = 0 " +
+//            "left join life_fans fans3 on fans3.fans_id = foll.phoneId and fans3.delete_flag = 0 " +
+//            "${ew.customSqlSegment} ")
+    @Select("SELECT " +
+            "foll.*, " +
+            "IF(isnull(fans.id), 0, 1) isFollowThis, " +
+            "1 AS isFollowMe, " +
+            "count(fans2.id) fansNum, " +
+            "count(fans3.id) followNum " +
+            "FROM " +
+            "( " +
+            "WITH follow AS ( " +
+            "SELECT " +
+            "substring_index(fans_id, '_', 1) AS flag, " +
+            "substring_index(fans_id, '_', -1) AS phone " +
+            "FROM " +
+            "life_fans " +
+            "WHERE " +
+            "delete_flag = 0 " +
+            "AND followed_id = #{fansId} " +
+            ") " +
+            "SELECT " +
+            "info.id, " +
+            "CASE " +
+            "WHEN user.store_id IS NULL OR info.store_application_status = 0 THEN user.nick_name " +
+            "ELSE info.store_name " +
+            "END AS name, " +
+            "CASE " +
+            "WHEN user.store_id IS NULL OR info.store_application_status IN (0, 2) THEN user.account_blurb " +
+            "ELSE info.store_blurb " +
+            "END AS blurb, " +
+            "user.head_img AS image, " +
+            "concat('store_', user.phone) AS phoneId " +
+            "FROM " +
+            "follow foll " +
+            "JOIN store_user user ON foll.phone = user.phone " +
+            "LEFT JOIN store_info info ON user.store_id IS NOT NULL " +
+            "AND info.id = user.store_id " +
+            "AND info.delete_flag = 0 " +
+            "LEFT JOIN store_img img ON img.store_id = user.store_id " +
+            "AND img.img_type = '10' " +
+            "AND img.delete_flag = 0 " +
+            "WHERE " +
+            "foll.flag = 'store' " +
+            "AND user.delete_flag = 0 " +
             ") foll " +
-            "left join life_fans fans on fans.followed_id = foll.phoneId and fans.fans_id = #{fansId} and fans.delete_flag = 0 " +
-            "left join life_fans fans2 on fans2.followed_id = foll.phoneId and fans2.delete_flag = 0 " +
-            "left join life_fans fans3 on fans3.fans_id = foll.phoneId and fans3.delete_flag = 0 " +
-            "${ew.customSqlSegment} ")
+            "LEFT JOIN life_fans fans ON fans.followed_id = foll.phoneId " +
+            "AND fans.fans_id = #{fansId} " +
+            "AND fans.delete_flag = 0 " +
+            "LEFT JOIN life_fans fans2 ON fans2.followed_id = foll.phoneId " +
+            "AND fans2.delete_flag = 0 " +
+            "LEFT JOIN life_fans fans3 ON fans3.fans_id = foll.phoneId " +
+            "AND fans3.delete_flag = 0 " +
+            "${ew.customSqlSegment}")
     IPage<LifeFansVo> getMyStoreFans(IPage<LifeFansVo> iPage, @Param("fansId") String fansId, @Param(Constants.WRAPPER) QueryWrapper<LifeFansVo> wrapper);
 
     @Select("select foll.*, if(isnull(fans.id), 0, 1) isFollowThis, 1 as isFollowMe, " +
@@ -135,14 +197,14 @@ public interface LifeFansMapper extends BaseMapper<LifeFans> {
             "        join life_fans fans2 on fans1.followed_id = fans2.fans_id and fans1.fans_id = fans2.followed_id " +
             "        where fans1.delete_flag = 0 and fans2.delete_flag = 0 and fans1.fans_id = #{fansId} " +
             "    ) " +
-            "    select info.id, info.store_name name, user.head_img image, concat('store_', user.phone) phoneId, info.store_blurb blurb, 1 blockedType,user.id blockedId " +
+            "    select info.id, info.store_name name, user.head_img image, concat('store_', user.phone) phoneId, info.store_blurb blurb, 1 blockedType,user.id blockedId ,IFNULL(user.nick_name, user.name) username, user.account_blurb accountBlurb " +
             "    from follow foll " +
             "    join store_user user on foll.phone = user.phone " +
             "    join store_info info on info.id = user.store_id " +
             "    left join store_img img on img.store_id = user.store_id and img.img_type = '10' and img.delete_flag = 0 " +
             "    where foll.flag = 'store' and user.delete_flag = 0 and info.delete_flag = 0 " +
             "    union " +
-            "    select user.id, user.user_name name, user.user_image image, concat('user_', user.user_phone) phoneId, user.jianjie blurb, 2 blockedType,user.id blockedId " +
+            "    select user.id, user.user_name name, user.user_image image, concat('user_', user.user_phone) phoneId, user.jianjie blurb, 2 blockedType,user.id blockedId,'' username, '' accountBlurb " +
             "    from follow foll " +
             "    join life_user user on foll.phone = user.user_phone " +
             "    where foll.flag = 'user' and user.delete_flag = 0 " +

+ 82 - 0
alien-entity/src/main/java/shop/alien/mapper/LifeGroupBuyMainMapper.java

@@ -1,5 +1,6 @@
 package shop.alien.mapper;
 
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -7,10 +8,15 @@ import com.baomidou.mybatisplus.core.toolkit.Constants;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
+import org.apache.poi.ss.formula.functions.T;
 import shop.alien.entity.store.LifeGroupBuyMain;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import shop.alien.entity.store.vo.LifeGroupBuyMainVo;
 import shop.alien.entity.store.vo.LifeGroupBuyThaliVo;
 
+import java.util.List;
+
 /**
 * @author youch
 * @description 针对表【life_group_buy_main(团购主表)】的数据库操作Mapper
@@ -28,6 +34,82 @@ public interface LifeGroupBuyMainMapper extends BaseMapper<LifeGroupBuyMain> {
             "        coupon_id,delete_flag,created_time,updated_time,created_user_id,\n" +
             "        updated_user_id from life_group_buy_main ${ew.customSqlSegment}")
     IPage<LifeGroupBuyThaliVo> selectPageByThaliVo(IPage<LifeGroupBuyThaliVo> lifeGroupBuyThaliVoIPage,@Param(Constants.WRAPPER) QueryWrapper<LifeGroupBuyThaliVo> queryWrapper);
+
+
+    @Update("UPDATE life_group_buy_main\n" +
+            "SET \n" +
+            "  status = CASE \n" +
+            "    WHEN (inventory_num - #{buyCount}) = 0 THEN #{soldOutStatus}  \n" +
+            "    ELSE status \n" +
+            "  END,\n" +
+            "  inventory_num = inventory_num - #{buyCount}\n" +
+            "WHERE \n" +
+            "   id = #{couponId}\n" +
+            "\t AND inventory_num >= #{buyCount}"
+    )
+    int deductInventoryAtomically(
+            @Param("couponId") Integer couponId,
+            @Param("buyCount") int buyCount,
+            @Param("soldOutStatus") int soldOutStatus
+    );
+
+    @Select("SELECT\n" +
+            "    g.id AS id,\n" +
+            "    g.group_no AS group_no,\n" +
+            "    g.group_type AS group_type,\n" +
+            "    g.status AS status,\n" +
+            "    g.approval_comments AS approval_comments,\n" +
+            "    g.store_id AS store_id,\n" +
+            "    g.image_id AS image_id,\n" +
+            "    g.group_name AS group_name,\n" +
+            "    g.start_time_type AS start_time_type,\n" +
+            "    g.start_time_value AS start_time_value,\n" +
+            "    g.end_time AS end_time,\n" +
+            "    g.inventory_num AS inventory_num,\n" +
+            "    g.quota_type AS quota_type,\n" +
+            "    g.quota_value AS quota_value,\n" +
+            "    g.original_price AS original_price,\n" +
+            "    g.preferential_price AS preferential_price,\n" +
+            "    g.effective_date_type AS effective_date_type,\n" +
+            "    g.effective_date_value AS effective_date_value,\n" +
+            "    g.disable_date_type AS disable_date_type,\n" +
+            "    g.disable_date_value AS disable_date_value,\n" +
+            "    g.write_off AS write_off,\n" +
+            "    g.reservation_rules AS reservation_rules,\n" +
+            "    g.use_rules AS use_rules,\n" +
+            "    g.applicable_num AS applicable_num,\n" +
+            "    g.other_rules AS other_rules,\n" +
+            "    g.invoice_type AS invoice_type,\n" +
+            "    g.invoice_describe AS invoice_describe,\n" +
+            "    g.insured_flag AS insured_flag,\n" +
+            "    g.insured_price AS insured_price,\n" +
+            "    g.coupon_id AS coupon_id,\n" +
+            "    g.delete_flag AS delete_flag,\n" +
+            "    g.created_time AS created_time,\n" +
+            "    g.updated_time AS updated_time,\n" +
+            "    g.created_user_id AS created_user_id,\n" +
+            "    g.updated_user_id AS updated_user_id,\n" +
+            "    s.store_name AS store_name,\n" +
+            "    s.store_address AS store_address,\n" +
+            "    s.store_tel AS store_tel,\n" +
+            "    ROUND(s.score_avg) AS scoreAvg,\n" +
+            "    s.business_types_name AS businessName,\n" +
+            "    s.query_address AS address,\n" +
+            "    IFNULL(GROUP_CONCAT(img.img_url SEPARATOR ','), '') AS imagePaths\n" +
+            "FROM\n" +
+            "    life_group_buy_main g\n" +
+            "LEFT JOIN store_info s \n" +
+            "    ON g.store_id = s.id \n" +
+            "    AND s.delete_flag = 0 \n" +
+            "    AND g.status = 5 \n" +
+            "LEFT JOIN store_img img \n" +
+            "    ON FIND_IN_SET(img.id, g.image_id) > 0 \n" +
+            "    AND img.delete_flag = 0\t\t \n" +
+            "WHERE\n" +
+            "    g.delete_flag = 0\n" +
+            "GROUP BY\n" +
+            "    g.id")
+    List<LifeGroupBuyMainVo> getLifeGroupInfo(@Param(Constants.WRAPPER) LambdaQueryWrapper<LifeGroupBuyMainVo> queryWrapper);
 }
 
 

+ 49 - 10
alien-entity/src/main/java/shop/alien/mapper/LifeUserDynamicsMapper.java

@@ -15,20 +15,28 @@ import java.util.List;
 public interface LifeUserDynamicsMapper extends BaseMapper<LifeUserDynamics> {
 
     @Select("select dyna1.* from (with dynamice as( " +
-            "    select id, top_status, top_time,  title, phone_id phoneId, context, image_path, address,address_name,address_context, liulan_count, dianzan_count, type, created_time, substring_index(phone_id, '_', 1) flag, substring_index(phone_id, '_', -1) phone, draft , address_province" +
-            "    from life_user_dynamics " +
-            "    where delete_flag = 0  and enable_status = 0 and draft = 0 order by created_time desc" +
-            ") " +
+            "select lud.id, lud.top_status, lud.top_time, lud.title, lud.phone_id phoneId, " +
+            "lud.context, lud.image_path, lud.address, lud.address_name, lud.address_context, " +
+            "lud.liulan_count, lud.dianzan_count, lud.type, lud.created_time, substring_index(lud.phone_id, '_', 1) flag, " +
+            "substring_index(lud.phone_id, '_', -1) phone, lud.draft , lud.address_province, lud.transfer_count " +
+            "from life_user_dynamics lud " +
+            "where lud.delete_flag = 0 and lud.enable_status = 0 and lud.draft = 0 and " +
+            "not exists (select 1 from life_user_violation luv where luv.delete_flag = 0 and luv.processing_status = 1 " +
+            "AND luv.dynamics_id = lud.id) order by lud.created_time desc) " +
             "select dynamice.*, info.store_name userName, user.head_img userImage, info.id storeUserId, user.id storeOrUserId, 0 isExpert " +
             "from dynamice " +
             "join store_user user on dynamice.phone = user.phone and user.delete_flag = 0 " +
+            "and user.status = 0 and user.logout_flag = 0 " +
             "join store_info info on info.id = user.store_id and info.delete_flag = 0 " +
+            "and info.store_status = 1 " +
             "left join store_img img on img.store_id = user.store_id and img.img_type = '10' and img.delete_flag = 0  " +
             "where dynamice.flag = 'store' " +
             "union " +
-            "select dynamice.*, user.user_name userName, user.user_image userImage, user.id storeUserId, user.id storeOrUserId, IF(lue.expert_code IS NOT NULL , 1, 0) AS isExpert " +
+            "select dynamice.*, user.user_name userName, user.user_image userImage, user.id storeUserId, user.id storeOrUserId, " +
+            "IF(lue.expert_code IS NOT NULL , 1, 0) AS isExpert " +
             "from dynamice " +
             "join life_user user on dynamice.phone = user.user_phone and user.delete_flag = 0 " +
+            "and user.logout_flag = 0 " +
             "left join life_user_expert  lue on lue.user_id = user.id and lue.delete_flag = 0 " +
             "where dynamice.flag = 'user') dyna1 order by dyna1.top_status desc, dyna1.top_time desc, created_time desc")
     List<LifeUserDynamicsVo> getLifeUserDynamicsList();
@@ -43,15 +51,46 @@ public interface LifeUserDynamicsMapper extends BaseMapper<LifeUserDynamics> {
             "${ew.customSqlSegment}")
     List<LifeUserDynamicsVo> getStoreDynamicslist(@Param("userId") String userId, @Param(Constants.WRAPPER) QueryWrapper<LifeUserDynamics> dynamicsWrapper);
 
-    @Select("select lud.*,'1' isLike\n" +
-            "from life_user_dynamics lud \n" +
-            "where lud.delete_flag = 0 \n" +
-            "and lud.id in (select llr.huifu_id from life_like_record llr where llr.dianzan_id = #{phoneId} and llr.delete_flag = 0) \n"+
-            "and lud.phone_id not in (select lb.blocked_phone_id  from life_blacklist lb where lb.blocker_phone_id = #{phoneId} and lb.delete_flag = 0)")
+    @Select("with middle_lud as (\n" +
+            "  select distinct  \n" +
+            "    lud.*,\n" +
+            "    '1' as isLike  \n" +
+            "  from life_user_dynamics lud\n" +
+            "  inner join (\n" +
+            "    select distinct huifu_id  \n" +
+            "    from life_like_record llr\n" +
+            "    where llr.dianzan_id = #{phoneId}\n" +
+            "      and llr.delete_flag = 0\n" +
+            "  ) llr_sub on lud.id = llr_sub.huifu_id\n" +
+            "  where lud.delete_flag = 0\n" +
+            "    and not exists (  -- 替代NOT IN,避免NULL问题\n" +
+            "      select 1 from life_blacklist lb\n" +
+            "      where lb.blocker_phone_id = #{phoneId}\n" +
+            "        and lb.delete_flag = 0\n" +
+            "        and lb.blocked_phone_id = lud.phone_id\n" +
+            "    )\n" +
+            ")\n" +
+            "select middle_lud.*,\n" +
+            "  CASE \n" +
+            "    WHEN lf.id is not null THEN 1\n" +
+            "    ELSE 0                        \n" +
+            "  END AS isFollowThis,  \n" +
+            "  CASE \n" +
+            "    WHEN lf1.id is not null THEN 1\n" +
+            "    ELSE 0                        \n" +
+            "  END AS isFollowMe  \n" +
+            "from middle_lud\n" +
+            "left join life_fans lf on lf.fans_id = #{phoneId} \n" +
+            "                      and lf.followed_id = middle_lud.phone_id\n" +
+            "                      and lf.delete_flag = '0'" +
+            "left join life_fans lf1 on lf1.fans_id = middle_lud.phone_id \n" +
+            "                      and lf1.followed_id = #{phoneId}\n" +
+            "                      and lf1.delete_flag = '0'")
     List<LifeUserDynamicsVo> selectDianZanList(String phoneId);
 
     List<LifeUserDynamicsVo> getDynamicsList(@Param("nickName") String nickName, @Param("userType") String userType, @Param("dynamicsType") Integer dynamicsType, @Param("releaseStartTime") String releaseStartTime, @Param("releaseEndTime") String releaseEndTime);
 
     List<LifeUserDynamicsVo> getDynamicsDetail(@Param("id") Integer id);
 
+    List<LifeUserDynamicsVo> getStoreDynamicslist(@Param("userId") String userId, @Param("phoneId") String phoneId);
 }

+ 17 - 15
alien-entity/src/main/java/shop/alien/mapper/LifeUserMapper.java

@@ -32,23 +32,15 @@ public interface LifeUserMapper extends BaseMapper<LifeUser> {
             "where delete_flag = 0 and substring_index(#{phoneId}, '_', 1) = 'user' and substring_index(#{phoneId}, '_', -1) = user_phone")
     LifeFansVo getUserInfoByPhoneId(@Param("phoneId") String phoneId);
 
-
     LifeFansVo getUserInfoByPhoneIdList(@Param("phoneId") String phoneId);
 
-
-    @Select("select * from ( " +
-            "    select store.id, concat('store_', user.phone) phoneId, img.img_url imgUrl, store_blurb blurb, store.store_name storeUserName " +
-            "    from store_info store " +
-            "    join store_user user on user.store_id = store.id " +
-            "    left join store_img img on img.store_id = store.id and img.img_type = '10' and img.delete_flag = 0 " +
-            "    where store.delete_flag = 0 " +
-            "    and user.delete_flag = 0 " +
-            "    union all " +
-            "    select id, concat('user_', user_phone) phoneId, user_image imgUrl, jianjie blurb, user_name name " +
-            "    from life_user " +
-            "    where delete_flag = 0 " +
-            ") a " +
-            "${ew.customSqlSegment}")
+    @Select("SELECT * FROM ( " +
+            " SELECT store.id, concat( 'store_', USER.phone ) phoneId, USER.head_img imgUrl, store_blurb blurb, " +
+            " if(store.id is null,USER.name ,store.store_name) storeUserName " +
+            " FROM store_user USER LEFT JOIN store_info store ON USER.store_id = store.id  and USER.delete_flag = 0 and  store.delete_flag = 0  " +
+            " UNION ALL SELECT id, concat( 'user_', user_phone ) phoneId, user_image imgUrl, jianjie blurb, user_name NAME " +
+            " FROM life_user WHERE delete_flag = 0 ) a " +
+            " ${ew.customSqlSegment}")
     IPage<LifeUserVo> getStoreAndUserByName(IPage<LifeUserVo> iPage, @Param(Constants.WRAPPER) QueryWrapper<LifeUserVo> wrapper);
 
     LifeUserVo getRemoveUser(@Param("id") String id);
@@ -62,4 +54,14 @@ public interface LifeUserMapper extends BaseMapper<LifeUser> {
     @Select("SELECT * " +
             "FROM life_user ${ew.customSqlSegment}")
     List<LifeUserVo> getUserByIds(@Param(Constants.WRAPPER) QueryWrapper<LifeUserVo> queryWrapper);
+
+    /**
+     * 根据id集合查询用户信息
+     *
+     * @param queryWrapper 查询条件
+     * @return 用户信息
+     */
+    @Select("SELECT * " +
+            "FROM life_user ${ew.customSqlSegment}")
+    LifeUserVo getUserById(@Param(Constants.WRAPPER) QueryWrapper<LifeUserVo> queryWrapper);
 }

+ 45 - 8
alien-entity/src/main/java/shop/alien/mapper/LifeUserOrderMapper.java

@@ -1,7 +1,6 @@
 package shop.alien.mapper;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Constants;
@@ -36,13 +35,14 @@ public interface LifeUserOrderMapper extends BaseMapper<LifeUserOrder> {
     @Select("with total_coupon as(\n" +
             "-- 团购\n" +
             "\tselect id coupon_id,2 coupon_type,lgbm.group_name coupon_name, SUBSTRING_INDEX(image_id, ',', 1) AS image_id,effective_date_type,effective_date_value \n" +
-            "from life_group_buy_main lgbm where lgbm.delete_flag = 0\n" +
+            "from life_group_buy_main lgbm \n" +
             "\tunion all\n" +
             "-- 代金券\n" +
-            "\tselect id coupon_id,1 coupon_type,lc.name coupon_name, SUBSTRING_INDEX(image_path, ',', 1) AS image_id,0 effective_date_type,expiration_date effective_date_value \n" +
-            "from life_coupon lc where lc.delete_flag = 0\n" +
+            "\tselect id coupon_id,1 coupon_type,lc.name coupon_name, SUBSTRING_INDEX(image_path, ',', 1) AS image_id,\n" +
+            "case when expiration_type = 1 then 0 else 1 end effective_date_type,case when expiration_type = 1 then expiration_date else validity_period end  effective_date_value \n" +
+            "from life_coupon lc \n" +
             ")\n" +
-            "select luo.id,luo.buy_time,luo.status,luo.price,luo.final_price,luo.user_id,luo.store_id,luo.order_no,luo.pay_time,luo.cancel_time,luo.finish_time,luo.order_str,\n" +
+            "select luo.id,luo.buy_time,luo.status,luo.price,luo.final_price,luo.user_id,luo.store_id,luo.order_no,luo.pay_time,luo.cancel_time,luo.finish_time,luo.order_str,luo.expert_order_id,luo.order_appraise,\n" +
             "si.store_name,si.commission_rate,si.business_section store_type,si.store_status,si.business_status,\n" +
             "count(ocm.coupon_code) coupon_count,\n" +
             "simg.img_url,\n" +
@@ -57,8 +57,8 @@ public interface LifeUserOrderMapper extends BaseMapper<LifeUserOrder> {
             "from life_user_order luo\n" +
             "left join store_info si on si.id = luo.store_id  -- 查询店铺相关 \n" +
             "left join life_user lu on lu.id = luo.user_id and lu.delete_flag = 0 -- 查询用户相关 \n" +
-            "left join order_coupon_middle ocm on ocm.order_id = luo.id and ocm.delete_flag = 0\n" +
-            "inner join total_coupon tc on tc.coupon_id = ocm.coupon_id and tc.coupon_type = luo.coupon_type\n" +
+            "left join order_coupon_middle ocm on ocm.order_id = luo.id \n" +
+            "left join total_coupon tc on tc.coupon_id = ocm.coupon_id and tc.coupon_type = luo.coupon_type\n" +
             "left join  store_img simg on simg.id = tc.image_id and simg.delete_flag = 0 \n" +
             "left join  store_comment sc on sc.business_id = luo.id and sc.delete_flag = 0 and sc.business_type = 5\n" +
             "left join life_discount_coupon_user ldcu on ldcu .id = luo.quan_id \n" +
@@ -71,5 +71,42 @@ public interface LifeUserOrderMapper extends BaseMapper<LifeUserOrder> {
      * @param selectWrapper
      * @return
      */
-    List<LifeUserOrderVo> selectRefundList(LambdaUpdateWrapper<LifeUserOrder> selectWrapper);
+    List<LifeUserOrderVo> selectRefundList(@Param(Constants.WRAPPER) QueryWrapper<LifeUserOrder> selectWrapper);
+
+    @Select("SELECT count( luo.id ) FROM life_user_order luo LEFT JOIN order_coupon_middle ocm ON luo.id = ocm.order_id WHERE luo.`status` IN ( 0, 1, 2, 7 ) AND luo.delete_flag = 0 AND luo.coupon_type = 2 AND ocm.coupon_id = #{groupId}")
+    Integer countBuyGroup(@Param("groupId") String groupId);
+
+    @Select("with total_coupon as(\n" +
+            "-- 团购\n" +
+            "\tselect id coupon_id,2 coupon_type,lgbm.group_name coupon_name, SUBSTRING_INDEX(image_id, ',', 1) AS image_id,effective_date_type,effective_date_value \n" +
+            "from life_group_buy_main lgbm \n" +
+            "\tunion all\n" +
+            "-- 代金券\n" +
+            "\tselect id coupon_id,1 coupon_type,lc.name coupon_name, SUBSTRING_INDEX(image_path, ',', 1) AS image_id,\n" +
+            "case when expiration_type = 1 then 0 else 1 end effective_date_type,case when expiration_type = 1 then expiration_date else validity_period end  effective_date_value \n" +
+            "from life_coupon lc \n" +
+            ")\n" +
+            "select luo.id,luo.buy_time,luo.status,luo.price,luo.final_price,luo.user_id,luo.store_id,luo.order_no,luo.pay_time,luo.cancel_time,luo.finish_time,luo.order_str,luo.expert_order_id,luo.order_appraise,\n" +
+            "si.store_name,si.commission_rate,si.business_section store_type,si.store_status,si.business_status,\n" +
+            "count(ocm.coupon_code) coupon_count,\n" +
+            "simg.img_url,\n" +
+            "lu.user_phone,\n" +
+            "IF(sc.id is null,false,true) as hasComment,\n" +
+            "tc.*,\n" +
+            "CASE\n" +
+            "        WHEN si.delete_flag = 1 OR si.logout_flag = 1 THEN 1\n" +
+            "        ELSE 0\n" +
+            "    END AS abnormalStateFlag,\n" +
+            "ldc.nominal_value,ldc.type\n" +
+            "from life_user_order luo\n" +
+            "left join store_info si on si.id = luo.store_id  -- 查询店铺相关 \n" +
+            "left join life_user lu on lu.id = luo.user_id and lu.delete_flag = 0 -- 查询用户相关 \n" +
+            "left join order_coupon_middle ocm on ocm.order_id = luo.id \n" +
+            "left join total_coupon tc on tc.coupon_id = ocm.coupon_id and tc.coupon_type = luo.coupon_type\n" +
+            "left join  store_img simg on simg.id = tc.image_id and simg.delete_flag = 0 \n" +
+            "left join  store_comment sc on sc.business_id = luo.id and sc.delete_flag = 0 and sc.business_type = 5\n" +
+            "left join life_discount_coupon_user ldcu on ldcu .id = luo.quan_id \n" +
+            "left join life_discount_coupon ldc on ldc.id = ldcu.coupon_id \n" +
+            "${ew.customSqlSegment}")
+    IPage<LifeUserOrderVo> queryPlatformOrderList(IPage<LifeUserOrderVo> brandedPage,@Param(Constants.WRAPPER) QueryWrapper<LifeUserOrderVo> lifeUserOrderQueryWrapper);
 }

+ 100 - 0
alien-entity/src/main/java/shop/alien/mapper/LifeUserViolationMapper.java

@@ -1,7 +1,16 @@
 package shop.alien.mapper;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
 import shop.alien.entity.store.LifeUserViolation;
+import shop.alien.entity.store.dto.LifeUserViolationDto;
+import shop.alien.entity.store.vo.LifeUserViolationVo;
+
+import java.util.List;
 
 /**
  * <p>
@@ -13,4 +22,95 @@ import shop.alien.entity.store.LifeUserViolation;
  */
 public interface LifeUserViolationMapper extends BaseMapper<LifeUserViolation> {
 
+    /**
+     * 分页查询用户举报信息
+     *
+     * @param page         分页对象
+     * @param queryWrapper 查询条件包装器
+     * @return 分页结果
+     */
+    @Select("<script>" +
+            " WITH userInfo AS ( " +
+            " SELECT " +
+            " su.phone, " +
+            " su.id, " +
+            " CASE su.delete_flag " +
+            " WHEN 1 THEN CONCAT(su.nick_name, '(账号已注销)') " +
+            " ELSE su.nick_name " +
+            " END AS nick_name, " +
+            " '1' AS type " +
+            " FROM store_user su " +
+            " UNION ALL " +
+            " SELECT " +
+            " lu.user_phone AS phone, " +
+            " lu.id, " +
+            " CASE lu.delete_flag " +
+            " WHEN 1 THEN CONCAT(lu.user_name, '(账号已注销)') " +
+            " ELSE lu.user_name " +
+            " END AS nick_name, " +
+            " '2' AS type " +
+            " FROM life_user lu " +
+            " ) " +
+            " SELECT " +
+            " luv.*, " +
+            " ui.nick_name AS nickname, " +
+            " ui.phone, " +
+            " img.img_url image" +
+            " FROM life_user_violation luv " +
+            " LEFT JOIN userInfo ui ON ui.type = luv.reporting_user_type " +
+            " AND ui.id = luv.reporting_user_id " +
+            " left join store_img img on luv.id = img.store_id and img.delete_flag = 0 " +
+            " ${ew.customSqlSegment}" +
+            "</script>")
+    IPage<LifeUserViolationVo> getViolationPage(
+            IPage<LifeUserViolationVo> page,
+            @Param(Constants.WRAPPER) QueryWrapper<LifeUserViolationVo> queryWrapper
+    );
+
+    @Select("select luv.*, img.img_url image " +
+            "FROM life_user_violation luv " +
+            "left join store_img img on luv.id = img.store_id and img.delete_flag = 0 " +
+            "${ew.customSqlSegment}")
+    LifeUserViolationDto getDetailById(@Param(Constants.WRAPPER) QueryWrapper<LifeUserViolationDto> queryWrapper);
+
+    /**
+     * 查询用户举报信息列表
+     *
+     * @param queryWrapper 查询条件包装器
+     * @return 举报信息列表
+     */
+    @Select("<script>" +
+            "WITH userInfo AS (" +
+            "    SELECT " +
+            "        su.phone, " +
+            "        su.id, " +
+            "        CASE su.delete_flag " +
+            "            WHEN 1 THEN CONCAT(su.nick_name, '(账号已注销)') " +
+            "            ELSE su.nick_name " +
+            "        END AS nick_name, " +
+            "        '1' AS type " +
+            "    FROM store_user su " +
+            "    UNION ALL " +
+            "    SELECT " +
+            "        lu.user_phone AS phone, " +
+            "        lu.id, " +
+            "        CASE lu.delete_flag " +
+            "            WHEN 1 THEN CONCAT(lu.user_name, '(账号已注销)') " +
+            "            ELSE lu.user_name " +
+            "        END AS nick_name, " +
+            "        '2' AS type " +
+            "    FROM life_user lu " +
+            ") " +
+            "SELECT " +
+            "    luv.*, " +
+            "    ui.nick_name AS nickname, " +
+            "    ui.phone " +
+            "FROM life_user_violation luv " +
+            "LEFT JOIN userInfo ui ON ui.type = luv.reporting_user_type " +
+            "    AND ui.id = luv.reporting_user_id " +
+            "    ${ew.customSqlSegment}" +
+            "</script>")
+    List<LifeUserViolationVo> getViolationList(
+            @Param(Constants.WRAPPER) QueryWrapper<LifeUserViolationVo> queryWrapper
+    );
 }

+ 15 - 0
alien-entity/src/main/java/shop/alien/mapper/StoreAliPayErrorLogMapper.java

@@ -0,0 +1,15 @@
+package shop.alien.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import shop.alien.entity.store.StoreAliPayErrorLog;
+
+/**
+ * <p>
+ * 支付宝转账错误记录表 Mapper 接口
+ * </p>
+ *
+ * @author qxy
+ * @since 2025-10-27
+ */
+public interface StoreAliPayErrorLogMapper extends BaseMapper<StoreAliPayErrorLog> {
+}

+ 13 - 0
alien-entity/src/main/java/shop/alien/mapper/StoreCashOutRecordMapper.java

@@ -1,14 +1,27 @@
 package shop.alien.mapper;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
 import shop.alien.entity.store.StoreCashOutRecord;
 
+import java.util.List;
+
 /**
  * 商户提现记录表 Mapper 接口
  *
  * @author ssk
  * @since 2025-02-25
  */
+@Mapper
 public interface StoreCashOutRecordMapper extends BaseMapper<StoreCashOutRecord> {
 
+    @Select("select scor.*, If(su.alipay_account is not null,su.alipay_account,su.phone) settlementAccount\n" +
+            "from store_cash_out_record scor\n" +
+            "left join store_user su on su.store_id = scor.store_id and su.delete_flag = 0\n" +
+            "${ew.customSqlSegment}")
+    List<StoreCashOutRecord> selectCashoutRecordList(@Param(Constants.WRAPPER) QueryWrapper<StoreCashOutRecord> wrapper);
 }

+ 1 - 1
alien-entity/src/main/java/shop/alien/mapper/StoreCommentAppealMapper.java

@@ -26,7 +26,7 @@ public interface StoreCommentAppealMapper extends BaseMapper<StoreCommentAppeal>
      * @param queryWrapper 查询条件
      * @return IPage<StoreCommentAppealVo>
      */
-    @Select("select a.*, b.dict_detail appeal_status_str, c.comment_content, c.comment_star, c.score score, c.other_score,c.is_anonymous, d.user_name, d.user_image, e.store_name, f.phone store_phone, f.name store_contact, e.store_type " +
+    @Select("select a.*, b.dict_detail appeal_status_str, c.comment_content, c.comment_star, c.score score, c.other_score,c.is_anonymous,c.img_id commentImgId, d.user_name, d.user_image, e.store_name, f.phone store_phone, f.name store_contact, e.store_type " +
             "from store_comment_appeal a " +
             "left join store_dictionary b on a.appeal_status = b.dict_id and b.type_name = 'appealStatus' and b.delete_flag = 0 " +
             "left join store_comment c on a.comment_id = c.id " +

+ 40 - 4
alien-entity/src/main/java/shop/alien/mapper/StoreCommentMapper.java

@@ -129,19 +129,55 @@ public interface StoreCommentMapper extends BaseMapper<StoreComment> {
             "AND store_id = #{storeId}")
     StoreInfoScoreVo getCommentCountAndScoreInfo(@Param("storeId") Integer storeId);
 
-
+/*
+    with total_coupon as (
+select lgbm.id,lgbm.group_type,lgbm.group_name,lgbm.image_id,2 coupon_type
+from life_group_buy_main lgbm
+union all
+select lc.id,0 group_type,lc.name group_name,0 image_id,1 coupon_type
+from life_coupon lc
+)
+SELECT
+	luo.*,
+	tc.group_type groupBuyType,
+	tc.group_name groupBuyName,
+	tc.image_id groupBuyImgId,
+	store.business_section storeType
+FROM
+	life_user_order luo
+LEFT JOIN order_coupon_middle ocm ON
+	luo.id = ocm.order_id
+LEFT JOIN total_coupon tc ON
+	ocm.coupon_id = tc.id
+	and tc.coupon_type = luo.coupon_type
+LEFT JOIN store_info store on
+	luo.store_id = store.id
+WHERE
+	luo.`status` in (2, 7)
+	AND luo.delete_flag = 0
+	AND luo.user_id = 142
+	AND luo.id NOT IN (
+	SELECT
+		business_id
+	FROM
+		store_comment
+	WHERE
+		business_type = 5
+		AND user_id = 142
+		AND delete_flag = 0)
+ */
     @Select("SELECT " +
-            "luo.*,lgbm.group_type groupBuyType,lgbm.group_name groupBuyName,lgbm.image_id groupBuyImgId,store.business_section storeType " +
+            "luo.*,lgbm.group_type groupBuyType,lgbm.group_name groupBuyName,lgbm.image_id groupBuyImgId,store.business_section storeType, store.business_types_name businessTypesName, store.store_name storeName " +
             "FROM life_user_order luo LEFT JOIN order_coupon_middle ocm ON luo.id = ocm.order_id LEFT JOIN life_group_buy_main lgbm ON ocm.coupon_id = lgbm.id LEFT JOIN store_info store on luo.store_id = store.id " +
             "WHERE luo.`status` in (2,7) " +
             "AND luo.coupon_type = 2 " +
             "AND luo.delete_flag = 0 " +
             "AND luo.user_id = #{userId} " +
-            "AND luo.id NOT IN (SELECT business_id FROM store_comment WHERE business_type = 5 AND user_id = #{userId} AND delete_flag = 0)")
+            "AND luo.id NOT IN (SELECT business_id FROM store_comment WHERE business_type = 5 AND user_id = #{userId})")
     IPage<LifeUserOrderCommentVo> getCommentOrderWPJPage(IPage<LifeUserOrderCommentVo> page, @Param("userId") String userId);
 
     @Select("SELECT " +
-            "luo.*,lgbm.group_type groupBuyType,lgbm.group_name groupBuyName,lgbm.image_id groupBuyImgId,store.business_section storeType " +
+            "luo.*,lgbm.group_type groupBuyType,lgbm.group_name groupBuyName,lgbm.image_id groupBuyImgId,store.business_section storeType, store.business_types_name businessTypesName, store.store_name storeName " +
             "FROM life_user_order luo LEFT JOIN order_coupon_middle ocm ON luo.id = ocm.order_id LEFT JOIN life_group_buy_main lgbm ON ocm.coupon_id = lgbm.id LEFT JOIN store_info store on luo.store_id = store.id " +
             "WHERE luo.`status` in (2,7) " +
             "AND luo.coupon_type = 2 " +

+ 40 - 0
alien-entity/src/main/java/shop/alien/mapper/StoreCommentSummaryInterestMapper.java

@@ -0,0 +1,40 @@
+package shop.alien.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Insert;
+import org.apache.ibatis.annotations.Mapper;
+import shop.alien.entity.store.StoreCommentSummaryInterest;
+
+import java.util.List;
+
+/**
+ * qxy
+ * AI 服务 店铺趣味信息
+ */
+@Mapper
+public interface StoreCommentSummaryInterestMapper extends BaseMapper<StoreCommentSummaryInterest> {
+    @Insert({
+            "<script>", // 开启动态 SQL 脚本
+            "INSERT INTO store_comment_summary_interest (",
+            "  id, store_id, store_name, summary, task_id, delete_flag, created_time, created_user_id,",
+            "  updated_time, updated_user_id",
+            ")",
+            "VALUES",
+            "<foreach collection='list' item='item' separator=','>",
+            "(",
+            "  #{item.id},",
+            "  #{item.storeId},",
+            "  #{item.storeName},",
+            "  #{item.summary},",
+            "  #{item.taskId},",
+            "  #{item.deleteFlag},",
+            "  #{item.createdTime},",
+            "  #{item.createdUserId},",
+            "  #{item.updatedTime},",
+            "  #{item.updatedUserId}",
+            ")",
+            "</foreach>",
+            "</script>" // 关闭动态 SQL 脚本
+    })
+    int insertBatchStoreCommentSummaryInterest(List<StoreCommentSummaryInterest> storeCommentSummaryInterests);
+}

+ 1 - 1
alien-entity/src/main/java/shop/alien/mapper/StoreIncomeDetailsRecordMapper.java

@@ -43,7 +43,7 @@ public interface StoreIncomeDetailsRecordMapper extends BaseMapper<StoreIncomeDe
             "SELECT\n" +
             "\tsidr.id,sidr.updated_time,sidr.created_user_id,sidr.created_time,sidr.income_type,sidr.business_id,sidr.cash_out_id,sidr.store_id,sidr.user_order_id,sidr.delete_flag,sidr.money,sidr.commission,sidr.updated_user_id,\n" +
             "\tluo.buy_time orderTime,\n" +
-            "\tocm.created_time checkTime,\n" +
+            "\tsidr.created_time checkTime,\n" +
             "\tADDDATE(sidr.created_time, 4) incomeTime,\n" +
             "\ttc.name couponName\n" +
             "FROM\n" +

+ 20 - 0
alien-entity/src/main/java/shop/alien/mapper/StoreInfoMapper.java

@@ -53,6 +53,19 @@ public interface StoreInfoMapper extends BaseMapper<StoreInfo> {
             " ${ew.customSqlSegment}")
     List<StoreInfoVo> getStoreInfoVoList(@Param(Constants.WRAPPER) QueryWrapper<StoreInfoVo> queryWrapper);
 
+    @Select("with menu as (select store_id,GROUP_CONCAT(dish_name) dish_name from store_menu GROUP BY store_id) " +
+            "select a.*, b.name store_contact, b.phone store_phone, b.password, c.dish_name, a.store_type, img.img_url entranceImage, d.img_url, dict.dict_detail storeTypeStr, dict2.dict_detail businessStatusStr," +
+            "            ROUND(ST_Distance_Sphere(ST_GeomFromText(CONCAT('POINT(', REPLACE(#{position}, ',', ' '), ')' )), ST_GeomFromText(CONCAT('POINT(', REPLACE(a.store_position, ',', ' '), ')' ))) / 1000, 2) dist " +
+            "from store_info a " +
+            "left join store_user b on a.id = b.store_id  AND b.delete_flag = 0 " +
+            "left join menu c on a.id = c.store_id " +
+            "left join store_img img on img.store_id = a.id and img.img_type = 1 and img.delete_flag = 0 " +
+            "left join store_dictionary dict on dict.type_name = 'storeType' and dict.dict_id = a.store_type and dict.delete_flag = 0 " +
+            "left join store_dictionary dict2 on dict2.type_name = 'businessStatus' and a.business_status = dict2.dict_id and dict2.delete_flag = 0 " +
+            "left join store_img d on d.store_id = a.id and d.img_type = 10 and d.delete_flag = 0" +
+            " ${ew.customSqlSegment}")
+    List<StoreInfoVo> getStoreInfoVoListNew(@Param(Constants.WRAPPER) QueryWrapper<StoreInfoVo> queryWrapper,  @Param("position") String position);
+
     /**
      * web端-门店列表
      *
@@ -110,4 +123,11 @@ public interface StoreInfoMapper extends BaseMapper<StoreInfo> {
     @Select("SELECT a.* FROM store_info a " +
             "left join store_user b on a.id =b.store_id  where b.phone = #{phoneIdNew} limit 1")
     StoreMainInfoVo getStoreNameByPhone(String phoneIdNew);
+
+    @Select(
+            "select " +
+            "            ROUND(ST_Distance_Sphere(ST_GeomFromText(CONCAT('POINT(', REPLACE(#{position}, ',', ' '), ')' )), ST_GeomFromText(CONCAT('POINT(', REPLACE(store_position, ',', ' '), ')' ))) / 1000, 1) dist " +
+            "from store_info where id = #{storeId}"
+            )
+    Double getStoreDistance(@Param("position") String position,@Param("storeId") Integer storeId);
 }

+ 27 - 0
alien-entity/src/main/java/shop/alien/mapper/second/LifeUserLogMapper.java

@@ -0,0 +1,27 @@
+package shop.alien.mapper.second;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+import shop.alien.entity.second.LifeUserLog;
+
+import java.util.List;
+
+@Mapper
+public interface LifeUserLogMapper extends BaseMapper<LifeUserLog> {
+
+    /**
+     * 查询时间段内同一个macip地址的登录记录
+     *
+     * @param starDate 开始日期
+     * @param endDate 结束日期
+     * @return 同一个macip地址的登录记录
+     */
+    @Select(" SELECT user_id, user_name, mac_ip FROM life_user_log " +
+            " WHERE created_time BETWEEN DATE_FORMAT(#{starDate}, '%Y-%m-%d %H:%i:%s') " +
+            " AND DATE_FORMAT(#{endDate}, '%Y-%m-%d %H:%i:%s') AND mac_ip = #{macIp} " +
+            " GROUP BY user_id, user_name, mac_ip ")
+    List<LifeUserLog> getLifeUserLogByDate(@Param("starDate") String starDate, @Param("endDate") String endDate, @Param("macIp") String macIp);
+
+}

+ 17 - 0
alien-entity/src/main/java/shop/alien/mapper/second/SecondGoodsMapper.java

@@ -74,6 +74,23 @@ public interface SecondGoodsMapper extends BaseMapper<SecondGoods> {
     List<SecondGoods> getCollectTop10();
 
     /**
+     * 商品列表
+     * @return 结果列表
+     */
+    @Select("SELECT " +
+            "sg.*, " +
+            "sgc1.category_name as categoryOneName, " +
+            "sgc2.category_name as categoryTwoName "+
+            " FROM second_goods sg " +
+            "left JOIN second_goods_category sgc1 " +
+            "on sg.category_one_id = sgc1.id " +
+            "left JOIN second_goods_category sgc2 " +
+            "on sg.category_two_id = sgc2.id "+
+            "${ew.customSqlSegment}")
+    List<SecondGoodsVo> selectGoodsList(@Param(Constants.WRAPPER) QueryWrapper<SecondGoodsVo> queryWrapper);
+
+
+    /**
      * 搜索结果-商品列表
      * @param page 分页参数
      * @return 搜索结果列表

+ 39 - 0
alien-entity/src/main/java/shop/alien/mapper/second/SecondRiskControlRecordMapper.java

@@ -0,0 +1,39 @@
+package shop.alien.mapper.second;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+import shop.alien.entity.second.SecondGoodsRecord;
+import shop.alien.entity.second.SecondRiskControlRecord;
+import shop.alien.entity.second.vo.SecondRiskControlRecordVo;
+
+import java.util.List;
+
+/**
+ * 二手商品风控记录映射器
+ */
+public interface SecondRiskControlRecordMapper extends BaseMapper<SecondRiskControlRecord> {
+
+
+    @Select(" select r.*, case when r.rule_type = 1 then '洗钱嫌疑' when r.rule_type = 2 then '账号异常' " +
+            " when r.rule_type = 3 then '交易欺诈' when r.rule_type = 4 then '异常发布' end ruleTypeName,  " +
+            " case when r.rule_type = 1 then '高频高价交易' when r.rule_type = 2 then '同一设备/mac 24小时内注册超过3个账号' " +
+            " when r.rule_type = 3 then '用户频繁修改商品' when r.rule_type = 4 then '短时间大量发布同类商品' end ruleName, " +
+            " case when r.rule_type = 1 or r.rule_type = 2 then '中风险' when r.rule_type = 3 or r.rule_type = 4 then '高风险' end ruleRisk,  " +
+            " case when r.risk_status = 0 then '待处理' when r.risk_status = 1 then '已处理' " +
+            " when r.risk_status = 2 then '已忽略' end riskStatusName,  " +
+            " case when r.rule_type = 1 or r.rule_type = 3 or r.rule_type = 4 then u.user_phone " +
+            " else '--' end userPhone " +
+            " from second_risk_control_record r left join life_user u on r.user_id = u.id " +
+            " ${ew.customSqlSegment} ")
+    IPage<SecondRiskControlRecordVo> queryRiskControlRecords(IPage<SecondRiskControlRecordVo> page, @Param(Constants.WRAPPER) QueryWrapper<SecondRiskControlRecordVo> queryWrapper);
+
+
+    @Select(" select * from second_risk_control_record " +
+            " WHERE created_time BETWEEN DATE_FORMAT(#{starDate}, '%Y-%m-%d %H:%i:%s') " +
+            " AND DATE_FORMAT(#{endDate}, '%Y-%m-%d %H:%i:%s') AND business_id = #{macIp} ")
+    List<SecondRiskControlRecord> selectByBusinessId(@Param("starDate") String starDate, @Param("endDate") String endDate, @Param("macIp") String macIp);
+}

+ 4 - 4
alien-entity/src/main/java/shop/alien/mapper/second/SecondTradeRecordMapper.java

@@ -55,13 +55,13 @@ public interface SecondTradeRecordMapper extends BaseMapper<SecondTradeRecord> {
     SecondTradeRecordVo getTradeRecordById(@Param("id") Integer id);
 
     @Select("with record as ( " +
-            "    select buyer_id userId, count(1) num, 'buyer' flag " +
+            "    select buyer_id userId, count(1) num, 'buyer' flag, max(transaction_time) time " +
             "    from second_trade_record " +
             "    where delete_flag = 0 and trade_status = 4 and failure_flag = 0 " +
             "    and transaction_time >= #{beginTime} and transaction_time <= #{endTime} " +
             "    group by buyer_id " +
             "    union all " +
-            "    select seller_id userId, count(1) num, 'seller' flag " +
+            "    select seller_id userId, count(1) num, 'seller' flag, max(transaction_time) time " +
             "    from second_trade_record " +
             "    where delete_flag = 0 and trade_status = 4 and failure_flag = 0 " +
             "    and transaction_time >= #{beginTime} and transaction_time <= #{endTime} " +
@@ -69,14 +69,14 @@ public interface SecondTradeRecordMapper extends BaseMapper<SecondTradeRecord> {
             ") " +
             "select a.*, ifnull(b.num, 0) buyer, ifnull(c.num, 0) seller, user.user_name userName, concat('user_', user.user_phone) phoneId, user.user_phone userPhone " +
             "from ( " +
-            "    select userId, sum(num) num " +
+            "    select userId, sum(num) num, max(time) time " +
             "    from record " +
             "    group by userId " +
             ") a " +
             "left join record b on a.userId = b.userId and b.flag = 'buyer' " +
             "left join record c on a.userId = c.userId and c.flag = 'seller' " +
             "join life_user user on user.id = a.userId and user.delete_flag = 0 " +
-            "order by a.num desc " +
+            "order by a.num desc, a.time " +
             "limit 20 ")
     List<JSONObject> getRankingList(@Param("beginTime") String beginTime, @Param("endTime") String endTime);
 }

+ 20 - 0
alien-entity/src/main/java/shop/alien/mapper/second/SecondUserCreditMapper.java

@@ -0,0 +1,20 @@
+package shop.alien.mapper.second;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+import shop.alien.entity.second.SecondUserCredit;
+
+
+/**
+ * 二手商品映射器
+ */
+@Mapper
+public interface SecondUserCreditMapper extends BaseMapper<SecondUserCredit> {
+
+    @Select("update second_user_credit set user_points = user_points + #{points} " +
+            "where user_id = #{userId} and delete_flag = 0 ")
+    void updatePointsByUserId(@Param("userId") int userId, @Param("points") int points);
+
+}

+ 12 - 0
alien-entity/src/main/java/shop/alien/mapper/second/SecondUserCreditRecordMapper.java

@@ -0,0 +1,12 @@
+package shop.alien.mapper.second;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import shop.alien.entity.second.SecondUserCreditRecord;
+
+
+/**
+ * 二手商品映射器
+ */
+public interface SecondUserCreditRecordMapper extends BaseMapper<SecondUserCreditRecord> {
+
+}

+ 20 - 0
alien-entity/src/main/java/shop/alien/mapper/second/SecondUserViolationMapper.java

@@ -0,0 +1,20 @@
+package shop.alien.mapper.second;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.apache.ibatis.annotations.Param;
+import shop.alien.entity.second.vo.SecondUserViolationDetailVo;
+import shop.alien.entity.second.vo.SecondUserViolationVo;
+
+
+/**
+ * 二手交易举报
+ */
+public interface SecondUserViolationMapper extends BaseMapper<SecondUserViolationVo> {
+
+    IPage<SecondUserViolationVo> getUserViolationByPage(IPage<SecondUserViolationVo> page, @Param("reportingUserName") String reportingUserName,
+                                                        @Param("reportingDate") String reportingDate, @Param("processingStatus") String processingStatus,
+                                                        @Param("reportContextType") String reportContextType);
+
+    SecondUserViolationDetailVo getUserViolationInfo(@Param("id") Integer id);
+}

+ 5 - 1
alien-entity/src/main/resources/mapper/LifeAppealManageMapper.xml

@@ -18,13 +18,16 @@
     <select id="getAppealManagement" resultType="shop.alien.entity.store.vo.LifeAppealManageVo">
         SELECT
         appeal.id,
+        appeal.store_id,
         store.store_name,
         su.`name` AS store_contact,
-        lu.user_phone AS store_phone,
+        lu.user_phone AS user_phone,
+        store.store_tel AS store_phone,
         `comment`.comment_content AS customer_report,
         appeal.appeal_reason,
         appeal.appeal_status AS appeal_type,
         si.img_url as appeal_image,
+        sg.img_url AS commentImage,
         CASE
         appeal.appeal_status
         WHEN 0 THEN
@@ -52,6 +55,7 @@
         LEFT JOIN store_comment `comment` ON `comment`.id = appeal.comment_id
         LEFT JOIN life_user lu ON `comment`.user_id = lu.id
         LEFT JOIN store_img si ON appeal.img_id = si.id
+        LEFT JOIN store_img sg ON sg.id = `comment`.img_id
         WHERE
         1 = 1
         <if test="storeName != null and storeName != ''">

+ 86 - 0
alien-entity/src/main/resources/mapper/LifeUserDynamicsMapper.xml

@@ -88,4 +88,90 @@
         GROUP by dyna1.id order by dyna1.top_status desc, dyna1.top_time desc
     </select>
 
+    <select id="getStoreDynamicslist" resultType="shop.alien.entity.store.vo.LifeUserDynamicsVo">
+        select
+        dyna1.*,
+        COUNT(dyna1.id) AS fansCount
+        from
+        (
+        select
+        dyna.*,
+        COUNT(sc.id) AS commentCount,
+        COUNT(lm.id) AS transferNum
+        from
+        (
+        with dynamice as(
+        select
+        CASE
+        WHEN image_path REGEXP '.mp4|.avi|.flv|.mkv|.rmvb|.wmv|.3gp|.mov' THEN 2
+        WHEN image_path REGEXP '.jpg|.jpeg|.png|.bmp|.webp|.gif|.svg' THEN 1
+        ELSE 0
+        END AS dynamicsType, id, title, phone_id phoneId, context, image_path, address, address_name, address_context, liulan_count, dianzan_count, type, created_time, substring_index(phone_id, '_', 1) userType, substring_index(phone_id, '_', -1) phone, draft , address_province, top_status, top_time, enable_status,
+        business_id
+        from life_user_dynamics
+        where phone_id = #{phoneId} and delete_flag = 0 and draft = 0 order by created_time desc
+        )
+        select
+        dynamice.*,
+        user.nick_name userName,
+        user.head_img userImage,
+        info.id storeUserId,
+        info.store_name storeName,
+        user.id storeOrUserId,
+        0 isExpert,
+        IF(llr.huifu_id IS NOT NULL or llr1.huifu_id IS NOT NULL, 1, 0) AS isLike
+        from
+        dynamice
+        left join store_user user on
+        dynamice.phone = user.phone
+        and user.delete_flag = 0
+        left join store_info info on
+        info.id = user.store_id
+        and info.delete_flag = 0
+        left join store_img img on
+        img.store_id = user.store_id
+        and img.img_type = '10'
+        and img.delete_flag = 0
+        left join life_like_record llr on
+        llr.huifu_id = dynamice.id
+        and llr.delete_flag = 0
+        and llr.dianzan_id = (
+        select
+        CONCAT('user_', lu1.user_phone)
+        from
+        life_user lu1
+        where
+        lu1.id = #{userId})
+        left join life_like_record llr1 on
+        llr1.huifu_id = dynamice.id
+        and llr1.delete_flag = 0
+        and llr1.dianzan_id = (
+        select
+        CONCAT('store_', lu2.phone)
+        from
+        store_user lu2
+        where
+        lu2.id = #{userId})
+        where
+        dynamice.userType = 'store') dyna
+        left join life_comment lc on
+        lc.dongtai_shequ_id = dyna.id
+        left join store_comment sc on
+        sc.business_id = dyna.id
+        and sc.business_type = 2
+        and sc.delete_flag = 0
+        left join life_message lm on
+        lm.business_id = dyna.id
+        GROUP BY
+        dyna.id
+        order by
+        dyna.created_time desc) dyna1
+        left join life_fans lf1 on
+        lf1.followed_id = dyna1.phoneId
+        GROUP by
+        dyna1.id
+        order by
+        dyna1.top_status desc,
+        dyna1.top_time desc
+    </select>
 </mapper>

+ 35 - 10
alien-entity/src/main/resources/mapper/LifeUserOrderMapper.xml

@@ -30,6 +30,7 @@
         <result column="img_url" property="imgUrl"/>
         <result column="user_name" property="userName"/>
         <result column="order_status" property="status"/>
+        <result column="order_status_value" property="orderStatusValue"/>
         <result column="dist" property="dist"/>
         <result column="store_address" property="storeAddress"/>
         <result column="effective_date_type" property="effectiveDateType"/>
@@ -43,7 +44,8 @@
         <result column="total_refund_time" property="totalRefundTime"/>
         <result column="business_status" property="businessStatus"/>
         <result column="type" property="type"/>
-
+        <result column="store_type" property="storeType"/>
+        <result column="store_status" property="storeStatus"/>
         <result column="business_type" property="businessType"/>
         <result column="collect_num" property="collectNum"/>
         <result column="business_date" property="businessDate"/>
@@ -53,6 +55,10 @@
         <result column="reservation_rules" property="reservationRules"/>
         <result column="original_price" property="originalPrice"/>
         <result column="order_str" property="orderStr"/>
+        <result column="expert_order_id" property="expertOrderId"/>
+        <result column="order_appraise" property="orderAppraise"/>
+        <result column="user_id" property="userId"/>
+        <result column="imgIds" property="imgIds"/>
 
         <collection property="orderCouponMiddleList" ofType="shop.alien.entity.store.vo.OrderCouponMiddleVo">
             <id column="ocmId" property="id" />
@@ -61,6 +67,7 @@
             <result column="refund_time" property="refundTime"/>
             <result column="refund_reason" property="refundReason"/>
             <result column="refundPrice" property="price"/>
+            <result column="used_time" property="usedTime"/>
         </collection>
     </resultMap>
 
@@ -68,21 +75,35 @@
     <!-- 查询用户订单详情 -->
     <select id="queryUserOrderDetail" resultMap="BaseResultMap">
         with total_coupon as(
-        select id coupon_id,2 coupon_type,lgbm.group_name coupon_name,preferential_price offprice,original_price, SUBSTRING_INDEX(image_id, ',', 1) AS image_id,
+        select id coupon_id,2 coupon_type,lgbm.group_name coupon_name,preferential_price offprice,original_price, SUBSTRING_INDEX(image_id, ',', 1) AS image_id, image_id AS imgIds,
                effective_date_type,effective_date_value,use_rules,reservation_rules,applicable_num,quota_type,quota_value,inventory_num single_qty
         from life_group_buy_main lgbm where lgbm.delete_flag = 0
         union all
-        select id coupon_id,1 coupon_type,lc.name coupon_name,lc.offprice offprice,price original_price,SUBSTRING_INDEX(image_path, ',', 1) AS image_id,
-               0 effective_date_type,expiration_date effective_date_value,use_rule use_rules,reservation_rules,applicable_num,1 quota_type,buy_limit quota_value,single_qty
+        select id coupon_id,1 coupon_type,lc.name coupon_name,lc.offprice offprice,price original_price,SUBSTRING_INDEX(image_path, ',', 1) AS image_id, image_path AS imgIds,
+        case when expiration_type = 1 then 0 else 1 end effective_date_type, case when expiration_type = 1 then expiration_date else validity_period end  effective_date_value,use_rule use_rules,reservation_rules,applicable_num,1 quota_type,buy_limit quota_value,single_qty
         from life_coupon lc where lc.delete_flag = 0
         )
-        select luo.id,luo.order_no,luo.created_time , luo.price ,luo.final_price,luo.order_str,
-        luo.pay_method,luo.buy_time,luo.cancel_time,luo.pay_time,luo.finish_time,luo.status order_status,luo.quan_id,luo.refund_time total_refund_time,
+        select luo.id,luo.order_no,luo.created_time , luo.price ,
+        luo.final_price,
+        luo.order_str,
+        luo.pay_method,luo.buy_time,luo.cancel_time,luo.pay_time,luo.finish_time,luo.status order_status,
+        CASE luo.status
+        WHEN 0 THEN '待支付'
+        WHEN 1 THEN '已支付/待使用'
+        WHEN 2 THEN '已核销'
+        WHEN 3 THEN '已过期'
+        WHEN 4 THEN '已取消'
+        WHEN 5 THEN '已退款'
+        WHEN 6 THEN '退款失败'
+        WHEN 7 THEN '已完成'
+        END AS order_status_value,
+        luo.quan_id,luo.refund_time total_refund_time,luo.expert_order_id,luo.order_appraise,
         tc.*,
         ldc.nominal_value,ldc.type,
         lu.user_phone,lu.user_name,lu.id user_id,
         ocm.id ocmId,ocm.status,ocm.coupon_code,ocm.refund_time,ocm.refund_reason,ocm.price refundPrice,
-        si.id store_id,si.store_name,si.commission_rate,si.store_address,si.store_tel,si.business_status,si.collect_num,
+        si.id store_id,si.store_name,si.commission_rate,si.store_address,si.store_tel,si.business_status,si.collect_num,si.business_section store_type,si.store_status,
+        su.phone store_user_tel,
         <if test="position != null and position != ''">
             ROUND(
             ST_Distance_Sphere(
@@ -103,6 +124,7 @@
         left join life_user lu on lu.id = luo.user_id and lu.delete_flag = 0
         left join store_img simg on simg.id = tc.image_id and simg.delete_flag = 0
         left join store_business_info sbi on sbi.store_id = si.id and sbi.delete_flag = 0
+        left join store_user su on su.store_id = si.id and su.delete_flag = 0
         where luo.id = #{orderId}
         order by luo.created_time desc
     </select>
@@ -114,7 +136,7 @@
         from life_group_buy_main lgbm where lgbm.delete_flag = 0
         union all
         select id coupon_id,1 coupon_type,lc.name coupon_name,lc.offprice offprice,SUBSTRING_INDEX(image_path, ',', 1) AS image_id,
-        0 effective_date_type,expiration_date effective_date_value,use_rule use_rules,reservation_rules,applicable_num,1 quota_type,buy_limit quota_value,single_qty,end_date
+        case when expiration_type = 1 then 0 else 1 end effective_date_type,case when expiration_type = 1 then expiration_date else validity_period end  effective_date_value,use_rule use_rules,reservation_rules,applicable_num,1 quota_type,buy_limit quota_value,single_qty,end_date
         from life_coupon lc where lc.delete_flag = 0
         )
         select luo.id,luo.order_no,luo.created_time , luo.price ,luo.final_price
@@ -129,13 +151,16 @@
         from life_user_order luo
         left join store_info si on si.id = luo.store_id and si.delete_flag = 0
         left join order_coupon_middle ocm on ocm.order_id = luo.id and ocm.delete_flag = 0
-        left join total_coupon tc on tc.coupon_id = ocm.coupon_id and tc.coupon_type = luo.coupon_type
+        inner join total_coupon tc on tc.coupon_id = ocm.coupon_id and tc.coupon_type = luo.coupon_type
         left join life_discount_coupon_user ldcu on ldcu.id = luo.quan_id and ldcu.delete_flag = 0
         left join life_discount_coupon ldc on ldc.id = ldcu.coupon_id and ldc.delete_flag = 0
         left join life_user lu on lu.id = luo.user_id and lu.delete_flag = 0
         left join store_img simg on simg.id = tc.image_id and simg.delete_flag = 0
         left join store_business_info sbi on sbi.store_id = si.id and sbi.delete_flag = 0
-        where luo.status = 1
+        <where>
+            <!-- 引用 LambdaQueryWrapper 构建的条件 -->
+            ${ew.sqlSegment}
+        </where>
         order by luo.created_time desc
     </select>
 </mapper>

+ 235 - 134
alien-entity/src/main/resources/mapper/ManagementInfoMapper.xml

@@ -152,7 +152,7 @@
                 END AS type_name,
             coupon.`name`,
             "1" AS buy_count,
-            ROUND(userOrder.price / 100,2) AS buy_amount,
+            ROUND(userOrder.price ,2) AS buy_amount,
             userOrder.buy_time AS buy_time,
             userOrder.used_time AS used_time,
             userOrder.refund_time AS refund_time,
@@ -170,7 +170,8 @@
                 WHEN 4 THEN
                     "已退款"
                 END AS status_name,
-        userOrder.order_no
+        userOrder.order_no,
+        userOrder.coupon_type
         FROM
             life_user_order userOrder
                 LEFT JOIN life_coupon coupon ON coupon.id = userOrder.id
@@ -252,6 +253,7 @@
         <if test="storeName != null and storeName != ''">
             AND store.store_name LIKE CONCAT('%', #{storeName}, '%')
         </if>
+        ORDER BY cash.created_time DESC
     </select>
 
     <select id="getCashOutDetail" resultType="shop.alien.entity.store.vo.ManagementInfoVo">
@@ -284,52 +286,35 @@
     </select>
 
     <select id="getPlatformNetProfit" resultType="shop.alien.entity.store.vo.ManagementInfoVo">
-        select IFNULL(ROUND(sum(all_data.platform_profit),2), 0) AS profit from
-        (SELECT
-        ROUND(SUM(final_price) * (IFNULL(store.commission_rate, 3)/100),2) AS platform_profit
-        FROM
-        life_user_order `order`
-        LEFT JOIN store_info store ON store.id = `order`.store_id
-        WHERE
-        `status` = 2
+
+        select IFNULL(ROUND(sum(sidr.commission)/100,2), 0) AS profit
+        from store_income_details_record sidr
+        where 1=1
         <if test="dataTime != null and dataTime != ''">
             AND
-            `order`.used_time > #{dataTime}
+            sidr.created_time > #{dataTime}
         </if>
-        GROUP BY
-        store.id) all_data
     </select>
     <select id="getOrderQuantity" resultType="shop.alien.entity.store.vo.ManagementInfoVo">
-        SELECT
-            IFNULL(COUNT( 1 ) ,0) AS count
-        FROM
-            life_user_order
-        WHERE
-            ( `status` in (1, 2)
-            <if test="dataTime != null and dataTime != ''">
-                AND
-                buy_time > #{dataTime}
-            </if>
-             )
+        select count(*) count
+        from life_user_order luo
+        where luo.status in (1, 7)
+        <if test="dataTime != null and dataTime != ''">
+            and luo.pay_time > #{dataTime}
+        </if>
     </select>
     <select id="getTradingVolume" resultType="shop.alien.entity.store.vo.ManagementInfoVo">
+       select IFNULL(ROUND(sum(all_data.profit_a), 2 ),0) profit from (
         SELECT
-            IFNULL(ROUND( sum( final_price ), 2 ),0) AS profit
+            IFNULL(ROUND(luo.final_price , 2 ),0) AS profit_a
         FROM
-            life_user_order
+            life_user_order luo
         WHERE
-            ( `status` = 2
-                <if test="dataTime != null and dataTime != ''">
-                    AND
-                    used_time > #{dataTime}
-                </if>
-            )
-           OR ( `status` = 1
+            luo.status in (1, 7)
             <if test="dataTime != null and dataTime != ''">
-                AND
-                buy_time > #{dataTime}
+                and luo.pay_time > #{dataTime}
             </if>
-            )
+        ) all_data
     </select>
     <select id="getQueryNetProfitDay" resultType="shop.alien.entity.store.vo.ManagementInfoVo">
         -- 使用递归 CTE 生成 1 到 23 的小时序列
@@ -339,20 +324,23 @@
         SELECT hour_num + 1
         FROM hours
         WHERE hour_num &lt; 23
+        ),
+        order_data AS (
+        SELECT
+        sidr.commission,
+        sidr.created_time
+        FROM store_income_details_record sidr where 1=1
+        <if test="dataTime != null and dataTime != ''">
+            AND sidr.created_time >= #{dataTime}
+        </if>
         )
+
         SELECT
         concat(h.hour_num,":00") AS hour_num,
-        COALESCE(ROUND(SUM(o.final_price) * 0.04, 2), 0) AS profit
+        COALESCE(IFNULL(ROUND(sum(o.commission)/100,2), 0)) AS profit
         FROM
         hours h
-        LEFT JOIN
-        life_user_order o
-        ON
-        h.hour_num = HOUR(o.used_time)
-        AND o.`status` = 1
-        <if test="dataTime != null and dataTime != ''">
-            AND o.used_time >= #{dataTime}
-        </if>
+        LEFT JOIN order_data o ON h.hour_num = HOUR(o.created_time)
         GROUP BY
         h.hour_num
         ORDER BY
@@ -365,17 +353,21 @@
         SELECT hour_num + INTERVAL 1 DAY
         FROM date_sequence
         WHERE hour_num &lt; DATE_SUB(#{dataTime}, INTERVAL WEEKDAY(#{dataTime}) DAY) + INTERVAL 6 DAY
+        ),
+        order_data AS (
+        SELECT
+        sidr.commission,
+        sidr.created_time
+        FROM store_income_details_record sidr
         )
         SELECT
         DATE_FORMAT(ds.hour_num, '%c-%d') AS hour_num,
-        COALESCE(ROUND(SUM(luo.final_price) * 0.04, 2), 0) AS profit
+        COALESCE(IFNULL(ROUND(sum(o.commission)/100,2), 0)) AS profit
         FROM
         date_sequence ds
-        LEFT JOIN
-        life_user_order luo
-        ON
-        luo.used_time >= ds.hour_num AND luo.used_time &lt; ds.hour_num + INTERVAL 1 DAY
-        AND luo.`status` = 1
+        LEFT JOIN order_data o ON
+        o.created_time >= ds.hour_num
+        AND o.created_time &lt; ds.hour_num + INTERVAL 1 DAY
         GROUP BY
         ds.hour_num
         ORDER BY
@@ -388,17 +380,20 @@
         SELECT DATE_ADD(hour_num, INTERVAL 1 DAY)
         FROM date_sequence
         WHERE DATE_ADD(hour_num, INTERVAL 1 DAY)  &lt;= LAST_DAY(#{dataTime})
+        ),
+        order_data AS (
+        SELECT
+        sidr.commission,
+        sidr.created_time
+        FROM store_income_details_record sidr
         )
         SELECT
         DATE_FORMAT(ds.hour_num, '%c-%d') AS hour_num,
-        COALESCE(ROUND(SUM(luo.final_price) * 0.04, 2), 0) AS profit
+        COALESCE(IFNULL(ROUND(sum(o.commission)/100,2), 0)) AS profit
         FROM
         date_sequence ds
-        LEFT JOIN
-        life_user_order luo
-        ON
-        luo.used_time >= ds.hour_num AND luo.used_time &lt; DATE_ADD(ds.hour_num, INTERVAL 1 DAY)
-        AND luo.`status` = 1
+        LEFT JOIN order_data o ON
+        o.created_time >= ds.hour_num AND o.created_time &lt; DATE_ADD(ds.hour_num, INTERVAL 1 DAY)
         GROUP BY
         ds.hour_num
         ORDER BY
@@ -411,18 +406,21 @@
         SELECT hour_num + 1
         FROM month_sequence
         WHERE hour_num &lt; 12
+        ),
+        order_data AS (
+        SELECT
+        sidr.commission,
+        sidr.created_time
+        FROM store_income_details_record sidr
         )
         SELECT
         CONCAT(ms.hour_num,'月') AS hour_num,
-        COALESCE(ROUND(SUM(luo.final_price) * 0.04, 2), 0) AS profit
+        COALESCE(IFNULL(ROUND(sum(o.commission)/100,2), 0)) AS profit
         FROM
         month_sequence ms
-        LEFT JOIN
-        life_user_order luo
-        ON
-        MONTH(luo.used_time) = ms.hour_num
-        AND YEAR(luo.used_time) = YEAR(#{dataTime})
-        AND luo.`status` = 1
+        LEFT JOIN order_data o ON
+        MONTH(o.created_time) = ms.hour_num
+        AND YEAR(o.created_time) = YEAR(#{dataTime})
         GROUP BY
         ms.hour_num
         ORDER BY
@@ -435,16 +433,28 @@
         SELECT hour_num + 1
         FROM hours
         WHERE hour_num &lt; 23
+        ),
+        order_data AS (
+        SELECT
+        o.id,
+        si.commission_rate,
+        o.final_price,
+        ocm.used_time,
+        o.pay_time,
+        o.status
+        FROM life_user_order o
+        LEFT JOIN order_coupon_middle ocm ON ocm.order_id = o.id
+        LEFT JOIN store_info si ON si.id = o.store_id
+        WHERE o.delete_flag = 0
         )
         SELECT
         concat(h.hour_num,":00") AS hour_num,
         COALESCE(ROUND(SUM(o.final_price), 2), 0) AS profit
         FROM
         hours h
-        LEFT JOIN
-        life_user_order o
-        ON ( h.hour_num = HOUR( o.used_time ) AND ( o.`status` = 1 AND o.used_time >= #{dataTime} ) )
-        OR ( h.hour_num = HOUR( o.buy_time ) AND ( o.`status` = 0 AND o.buy_time >= #{dataTime} ) )
+        LEFT JOIN order_data o
+        ON ( h.hour_num = HOUR( o.used_time ) AND ( o.`status` = 2 AND o.used_time >= #{dataTime} ) )
+        OR ( h.hour_num = HOUR( o.pay_time ) AND ( o.`status` = 1 AND o.pay_time >= #{dataTime} ) )
         GROUP BY
         h.hour_num
         ORDER BY
@@ -457,22 +467,35 @@
             SELECT hour_num + INTERVAL 1 DAY
         FROM date_sequence
         WHERE hour_num &lt; DATE_SUB(#{dataTime}, INTERVAL WEEKDAY(#{dataTime}) DAY) + INTERVAL 6 DAY
-            )
+            ),
+        order_data AS (
+        SELECT
+        o.id,
+        si.commission_rate,
+        o.final_price,
+        ocm.used_time,
+        o.pay_time,
+        o.status
+        FROM life_user_order o
+        LEFT JOIN order_coupon_middle ocm ON ocm.order_id = o.id
+        LEFT JOIN store_info si ON si.id = o.store_id
+        WHERE o.delete_flag = 0
+        )
         SELECT
             DATE_FORMAT(ds.hour_num, '%c-%d') AS hour_num,
-            COALESCE(ROUND(SUM(luo.final_price), 2), 0) AS profit
+            COALESCE(ROUND(SUM(o.final_price), 2), 0) AS profit
         FROM
             date_sequence ds
                 LEFT JOIN
-            life_user_order luo
+        order_data o
             ON
-                (luo.used_time >= ds.hour_num
-                AND luo.used_time &lt; ds.hour_num + INTERVAL 1 DAY
-                AND luo.`status` = 1 )
+                (o.used_time >= ds.hour_num
+                AND o.used_time &lt; ds.hour_num + INTERVAL 1 DAY
+                AND o.`status` = 2 )
             OR
-                (luo.buy_time >= ds.hour_num
-                AND luo.buy_time &lt; ds.hour_num + INTERVAL 1 DAY
-                AND luo.`status` = 0 )
+                (o.pay_time >= ds.hour_num
+                AND o.pay_time &lt; ds.hour_num + INTERVAL 1 DAY
+                AND o.`status` = 1 )
         GROUP BY
             ds.hour_num
         ORDER BY
@@ -485,22 +508,35 @@
             SELECT DATE_ADD(hour_num, INTERVAL 1 DAY)
             FROM date_sequence
             WHERE DATE_ADD(hour_num, INTERVAL 1 DAY)  &lt;= LAST_DAY(#{dataTime})
+        ),
+        order_data AS (
+        SELECT
+        o.id,
+        si.commission_rate,
+        o.final_price,
+        ocm.used_time,
+        o.pay_time,
+        o.status
+        FROM life_user_order o
+        LEFT JOIN order_coupon_middle ocm ON ocm.order_id = o.id
+        LEFT JOIN store_info si ON si.id = o.store_id
+        WHERE o.delete_flag = 0
         )
         SELECT
             DATE_FORMAT(ds.hour_num, '%c-%d') AS hour_num,
-            COALESCE(ROUND(SUM(luo.final_price), 2), 0) AS profit
+            COALESCE(ROUND(SUM(o.final_price), 2), 0) AS profit
         FROM
             date_sequence ds
-                LEFT JOIN
-            life_user_order luo
+            LEFT JOIN
+            order_data o
             ON
-                (luo.used_time >= ds.hour_num
-                AND luo.used_time &lt; DATE_ADD( ds.hour_num, INTERVAL 1 DAY )
-                AND luo.`status` = 1 )
+                (o.used_time >= ds.hour_num
+                AND o.used_time &lt; DATE_ADD( ds.hour_num, INTERVAL 1 DAY )
+                AND o.`status` = 2 )
             OR
-                (luo.buy_time >= ds.hour_num
-                AND luo.buy_time &lt; DATE_ADD( ds.hour_num, INTERVAL 1 DAY )
-                AND luo.`status` = 0 )
+                (o.pay_time >= ds.hour_num
+                AND o.pay_time &lt; DATE_ADD( ds.hour_num, INTERVAL 1 DAY )
+                AND o.`status` = 1 )
         GROUP BY
             ds.hour_num
         ORDER BY
@@ -513,22 +549,35 @@
             SELECT hour_num + 1
             FROM month_sequence
             WHERE hour_num &lt; 12
+        ),
+        order_data AS (
+        SELECT
+        o.id,
+        si.commission_rate,
+        o.final_price,
+        ocm.used_time,
+        o.pay_time,
+        o.status
+        FROM life_user_order o
+        LEFT JOIN order_coupon_middle ocm ON ocm.order_id = o.id
+        LEFT JOIN store_info si ON si.id = o.store_id
+        WHERE o.delete_flag = 0
         )
         SELECT
             CONCAT(ms.hour_num,'月') AS hour_num,
-            COALESCE(ROUND(SUM(luo.final_price), 2), 0) AS profit
+            COALESCE(ROUND(SUM(o.final_price), 2), 0) AS profit
         FROM
             month_sequence ms
-                LEFT JOIN
-            life_user_order luo
+        LEFT JOIN
+        order_data o
             ON
-                (MONTH( luo.used_time ) = ms.hour_num
-                    AND YEAR( luo.used_time ) = YEAR( #{dataTime} )
-                    AND luo.`status` = 1 )
+                (MONTH( o.used_time ) = ms.hour_num
+                    AND YEAR( o.used_time ) = YEAR( #{dataTime} )
+                    AND o.`status` = 1 )
             OR
-                (MONTH( luo.buy_time ) = ms.hour_num
-                    AND YEAR( luo.buy_time ) = YEAR( #{dataTime} )
-                    AND luo.`status` = 0 )
+                (MONTH( o.pay_time ) = ms.hour_num
+                    AND YEAR( o.pay_time ) = YEAR( #{dataTime} )
+                    AND o.`status` = 0 )
         GROUP BY
             ms.hour_num
         ORDER BY
@@ -561,6 +610,19 @@
             UNION ALL SELECT 21
             UNION ALL SELECT 22
             UNION ALL SELECT 23
+        ),
+        order_data AS (
+        SELECT
+        o.id,
+        si.commission_rate,
+        o.final_price,
+        ocm.used_time,
+        o.pay_time,
+        o.status
+        FROM life_user_order o
+        LEFT JOIN order_coupon_middle ocm ON ocm.order_id = o.id
+        LEFT JOIN store_info si ON si.id = o.store_id
+        WHERE o.delete_flag = 0
         )
 -- 主查询,左连接小时序列和原查询结果
         SELECT
@@ -570,21 +632,21 @@
             hours h
                 LEFT JOIN (
                 SELECT
-                    HOUR(CASE WHEN `status` = 1 THEN used_time ELSE buy_time END) AS hour_of_day,
+                    HOUR(CASE WHEN  oa.`status` = 1 THEN  oa.used_time ELSE  oa.pay_time END) AS hour_of_day,
                     COUNT(*) AS order_count
                 FROM
-                    life_user_order
+                  order_data oa
                 WHERE
                     (
-                    `status` = 1
-                  AND used_time > #{dataTime}
+                  oa.`status` = 2
+                  AND oa.used_time > #{dataTime}
                     )
                    OR (
-                    `status` = 0
-                  AND buy_time > #{dataTime}
+                    oa.`status` = 1
+                  AND oa.pay_time > #{dataTime}
                     )
                 GROUP BY
-                    HOUR(CASE WHEN `status` = 1 THEN used_time ELSE buy_time END)
+                    HOUR(CASE WHEN  oa.`status` = 2 THEN  oa.used_time ELSE  oa.pay_time END)
             ) orders ON h.hour_of_day = orders.hour_of_day
         ORDER BY
             h.hour_of_day;
@@ -596,19 +658,32 @@
             SELECT hour_num + INTERVAL 1 DAY
         FROM date_sequence
         WHERE hour_num &lt; DATE_SUB(#{dataTime}, INTERVAL WEEKDAY(#{dataTime}) DAY) + INTERVAL 6 DAY
-            )
+            ),
+        order_data AS (
+        SELECT
+        o.id,
+        si.commission_rate,
+        o.final_price,
+        ocm.used_time,
+        o.pay_time,
+        o.status
+        FROM life_user_order o
+        LEFT JOIN order_coupon_middle ocm ON ocm.order_id = o.id
+        LEFT JOIN store_info si ON si.id = o.store_id
+        WHERE o.delete_flag = 0
+        )
         SELECT
             DATE_FORMAT(ds.hour_num, '%c-%d') AS hour_num,
-            COALESCE(count(luo.id), 0) AS profit
+            COALESCE(count(o.id), 0) AS profit
         FROM
             date_sequence ds
                 LEFT JOIN
-            life_user_order luo
+        order_data o
             ON
-               (luo.used_time >= ds.hour_num AND luo.used_time &lt; ds.hour_num + INTERVAL 1 DAY
-                   AND luo.`status` = 1)  or
-               (luo.buy_time >= ds.hour_num AND luo.buy_time &lt; ds.hour_num + INTERVAL 1 DAY
-                   AND luo.`status` = 0)
+               (o.used_time >= ds.hour_num AND o.used_time &lt; ds.hour_num + INTERVAL 1 DAY
+                   AND o.`status` = 2)  or
+               (o.pay_time >= ds.hour_num AND o.pay_time &lt; ds.hour_num + INTERVAL 1 DAY
+                   AND o.`status` = 1)
         GROUP BY
             ds.hour_num
         ORDER BY
@@ -621,19 +696,32 @@
             SELECT DATE_ADD(hour_num, INTERVAL 1 DAY)
             FROM date_sequence
             WHERE DATE_ADD(hour_num, INTERVAL 1 DAY)  &lt;= LAST_DAY(#{dataTime})
+        ),
+        order_data AS (
+        SELECT
+        o.id,
+        si.commission_rate,
+        o.final_price,
+        ocm.used_time,
+        o.pay_time,
+        o.status
+        FROM life_user_order o
+        LEFT JOIN order_coupon_middle ocm ON ocm.order_id = o.id
+        LEFT JOIN store_info si ON si.id = o.store_id
+        WHERE o.delete_flag = 0
         )
         SELECT
             DATE_FORMAT(ds.hour_num, '%c-%d') AS hour_num,
-            COALESCE(count(luo.id), 0) AS profit
+            COALESCE(count(o.id), 0) AS profit
         FROM
             date_sequence ds
                 LEFT JOIN
-            life_user_order luo
+        order_data o
                 ON
-                (luo.used_time >= ds.hour_num AND luo.used_time &lt; ds.hour_num + INTERVAL 1 DAY
-                   AND luo.`status` = 1)  or
-               (luo.buy_time >= ds.hour_num AND luo.buy_time &lt; ds.hour_num + INTERVAL 1 DAY
-                   AND luo.`status` = 0)
+                (o.used_time >= ds.hour_num AND o.used_time &lt; ds.hour_num + INTERVAL 1 DAY
+                   AND o.`status` = 2)  or
+               (o.pay_time >= ds.hour_num AND o.pay_time &lt; ds.hour_num + INTERVAL 1 DAY
+                   AND o.`status` = 1)
         GROUP BY
             ds.hour_num
         ORDER BY
@@ -649,29 +737,42 @@
             SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 UNION ALL
             SELECT 10 UNION ALL SELECT 11 UNION ALL SELECT 12
             ) seq
-            )
+            ),
+        order_data AS (
+        SELECT
+        o.id,
+        si.commission_rate,
+        o.final_price,
+        ocm.used_time,
+        o.pay_time,
+        o.status
+        FROM life_user_order o
+        LEFT JOIN order_coupon_middle ocm ON ocm.order_id = o.id
+        LEFT JOIN store_info si ON si.id = o.store_id
+        WHERE o.delete_flag = 0
+        )
         SELECT
-            CONCAT(MONTH(STR_TO_DATE(m.MONTH, '%Y-%m')),'月') AS hour_num,
+            m.MONTH AS hour_num,
             COALESCE(orders.order_count, 0) AS profit
         FROM
             months m
                 LEFT JOIN (
                 SELECT
-                    DATE_FORMAT(CASE WHEN `status` = 1 THEN used_time ELSE buy_time END, '%Y-%m') AS month,
+                    DATE_FORMAT(CASE WHEN oa.`status` = 1 THEN oa.used_time ELSE oa.pay_time END, '%Y-%m') AS month,
         COUNT(*) AS order_count
                 FROM
-                    life_user_order
+              order_data oa
                 WHERE
                     (
-                    `status` = 1
-                  AND used_time > #{dataTime}
+                    oa.`status` = 2
+                  AND oa.used_time > #{dataTime}
                     )
                    OR (
-                    `status` = 0
-                  AND buy_time > #{dataTime}
+                    oa.`status` = 1
+                  AND pay_time > #{dataTime}
                     )
                 GROUP BY
-                    DATE_FORMAT(CASE WHEN `status` = 1 THEN used_time ELSE buy_time END, '%Y-%m')
+                    DATE_FORMAT(CASE WHEN `status` = 2 THEN used_time ELSE pay_time END, '%Y-%m')
             ) orders ON m.month = orders.month
         ORDER BY
             m.month;
@@ -689,15 +790,15 @@
         FROM
         life_user_order
         WHERE
-        ( `status` = 1 AND used_time >= #{startTime} AND used_time &lt; #{endTime})
-        OR ( `status` = 0  AND buy_time >= #{startTime} AND buy_time &lt; #{endTime})
+        ( `status` = 7 AND finish_time >= #{startTime} AND finish_time &lt; #{endTime})
+        OR ( `status` = 1  AND pay_time >= #{startTime} AND pay_time &lt; #{endTime})
         GROUP BY
         store_id
         LIMIT 10
         ) statistic
         LEFT JOIN store_info store ON store.id = statistic.store_id
         ORDER BY
-        profit DESC
+        profit DESC limit 10
     </select>
     <select id="getStorePlatformProfitDetails" resultType="shop.alien.entity.store.vo.ManagementInfoVo">
         SELECT
@@ -712,10 +813,10 @@
         WHERE
             `status` = 2
         <if test="startTime != null and startTime != ''" >
-            AND used_time > #{startTime}
+            AND `order`.updated_time > #{startTime}
         </if>
         <if test="endTime != null and endTime != ''" >
-            AND used_time &lt; #{endTime}
+            AND `order`.updated_time &lt; #{endTime}
         </if>
         <if test="storeId != null and storeId != ''" >
             AND store_id like concat('%',#{storeId},'%')
@@ -745,9 +846,9 @@
         FROM
             life_user_order `order`
         WHERE
-            delete_flag = 0
+            1=1
                 <if test="dataTime != null and dataTime != ''">
-                         AND buy_time > #{dataTime}
+                         AND created_time > #{dataTime}
                 </if>
     </select>
     <select id="getStorePlatformOrderVolume" resultType="shop.alien.entity.store.vo.ManagementInfoVo">
@@ -809,8 +910,8 @@
                 AND store.store_name like concat('%',#{storeName},'%')
             </if>
         </where>
-        ORDER BY
-        `order`.created_time DESC
+        GROUP by `order`.`id`
+        ORDER BY `order`.created_time DESC
     </select>
     <select id="getRefundAmount" resultType="shop.alien.entity.store.vo.ManagementInfoVo">
         SELECT
@@ -818,7 +919,7 @@
         FROM
             life_user_order `order`
         WHERE
-            `status` = 4
+            `status` = 5
         <if test="dataTime != null and dataTime != ''" >
             AND `order`.refund_time > #{dataTime}
         </if>

+ 5 - 4
alien-entity/src/main/resources/mapper/PlatformLifeUserMapper.xml

@@ -28,10 +28,11 @@
         ifnull(orders.consume_num, 0) consume_num,
         ifnull(orders.consume_price, 0) consume_price,
         IFNULL(comment.bad_num, 0) AS bad_num,
-        (
-        IFNULL((SELECT SUM(like_count) FROM store_comment WHERE user_id = user.id), 0) +
-        IFNULL((SELECT SUM(dianzan_count) FROM life_user_dynamics WHERE phone_id = user.user_phone), 0)
-        ) AS likesNumber,
+--         (
+--         IFNULL((SELECT SUM(like_count) FROM store_comment WHERE user_id = user.id), 0) +
+        IFNULL((SELECT SUM(dianzan_count) FROM life_user_dynamics WHERE phone_id = phoneId), 0)
+--         )
+            AS likesNumber,
         COUNT(lf.id) AS fans_count,
         lue.id as expert_id,
         lue.expert_code as expert_code

+ 3 - 0
alien-entity/src/main/resources/mapper/second/SecondGoodsInfoMapper.xml

@@ -66,6 +66,7 @@
             g.goods_status,
             g.delete_flag,
             g.release_time,
+            g.video_first_frame,
             ROUND(ST_Distance_Sphere(ST_GeomFromText(CONCAT('POINT(', REPLACE(#{position}, ',', ' '), ')' )), ST_GeomFromText(CONCAT('POINT(', REPLACE(g.position, ',', ' '), ')' ))) / 1000, 2) AS dist,
             case when llr.id is null then '0' else '1' end likeStatus,
             g.home_image,
@@ -115,6 +116,7 @@
             CONCAT('user_', u.user_phone) as user_phone,
             g.goods_status,
             g.home_image,
+            g.video_first_frame,
             case when llr.id is null then '0' else '1' end likeStatus,
             case when lc.id is null then '0' else '1' end collectStatus,
             (select count(1) from (SELECT id FROM store_comment c where c.business_id = g.id and c.business_type = 7 and c.delete_flag = 0 UNION ALL
@@ -198,6 +200,7 @@
             g.delete_flag,
             ROUND(ST_Distance_Sphere(ST_GeomFromText(CONCAT('POINT(', REPLACE(#{position}, ',', ' '), ')' )), ST_GeomFromText(CONCAT('POINT(', REPLACE(g.position, ',', ' '), ')' ))) / 1000, 2) AS dist,
             g.home_image,
+            g.video_first_frame,
             case when llr.id is null then '0' else '1' end likeStatus,
             case when lc.id is null then '0' else '1' end collectStatus,
             (select count(1) from (SELECT id FROM store_comment c where c.business_id = g.id and c.business_type = 7 and c.delete_flag = 0 UNION ALL

+ 95 - 0
alien-entity/src/main/resources/mapper/second/SecondUserViolationMapper.xml

@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="shop.alien.mapper.second.SecondUserViolationMapper">
+    <resultMap id="BaseResultMap" type="shop.alien.entity.second.vo.SecondUserViolationVo">
+        <!--@mbggenerated-->
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="reported_user_name" property="reportedUserName" jdbcType="VARCHAR"/>
+        <result column="reported_user_phone" property="reportedUserPhone" jdbcType="VARCHAR"/>
+        <result column="reporting_user_name" property="reportingUserName" jdbcType="VARCHAR"/>
+        <result column="reporting_user_phone" property="reportingUserPhone" jdbcType="VARCHAR"/>
+        <result column="report_context" property="reportContext" jdbcType="VARCHAR"/>
+        <result column="report_context_type" property="reportContextType" jdbcType="VARCHAR"/>
+        <result column="dict_detail" property="dictDetail" jdbcType="VARCHAR"/>
+        <result column="processing_context" property="processingContext" jdbcType="VARCHAR"/>
+        <result column="processing_status" property="processingStatus" jdbcType="VARCHAR"/>
+        <result column="business_id" property="businessId" jdbcType="INTEGER"/>
+        <result column="created_time" property="reportingDate" jdbcType="TIMESTAMP"/>
+        <result column="other_reason_content" property="otherReasonContent" jdbcType="VARCHAR"/>
+        <result column="report_evidence_img" property="reportEvidenceImg" jdbcType="VARCHAR"/>
+        <result column="processing_time" property="processingTime" jdbcType="TIMESTAMP"/>
+        <result column="report_result" property="reportResult" jdbcType="VARCHAR"/>
+        <result column="video_first_frame" property="videoFirstFrame" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <!-- 分页查询举报信息 -->
+    <select id="getUserViolationByPage" resultType="shop.alien.entity.second.vo.SecondUserViolationVo">
+        select
+            v.id,
+            u.user_name reporting_user_name,
+            u.user_phone reporting_user_phone,
+            case when v.report_context_type = 4 then '二手商品' else '二手用户' end report_context,
+            v.report_context_type,
+            d.dict_detail dict_detail,
+            case when v.processing_status = 0 then '待处理'
+                when v.processing_status = 1 then '已通过'
+                else '已驳回' end processing_context,
+            v.processing_status,
+            v.created_time as reportingDate,
+            v.business_id
+        from
+        life_user_violation v
+        left join store_dictionary d on v.dict_type = d.type_name and v.dict_id = d.dict_id
+        left join life_user u on u.id = v.reporting_user_id
+        where 1 = 1
+        <if test="reportingUserName != null and reportingUserName != ''">
+            and u.user_name like concat('%',#{reportingUserName},'%')
+        </if>
+        <if test="reportingDate != null and reportingDate != ''">
+            and DATE_FORMAT(v.created_time, '%Y-%m-%d') = #{reportingDate}
+        </if>
+        <if test="processingStatus != null and processingStatus != ''">
+            and v.processing_status = #{processingStatus}
+        </if>
+        <if test="reportContextType != null and reportContextType != ''">
+            and v.report_context_type = #{reportContextType}
+        </if>
+        <if test="reportContextType == null or reportContextType == ''">
+            and (v.report_context_type = 4 or v.report_context_type = 5)
+        </if>
+        order by v.created_time desc
+    </select>
+
+    <!-- 分页查询举报信息 -->
+    <select id="getUserViolationInfo" resultType="shop.alien.entity.second.vo.SecondUserViolationDetailVo">
+        select
+            v.id,
+            case when v.report_context_type = 4 then lu1.user_name else u.user_name end reported_user_name,
+            case when v.report_context_type = 4 then lu1.user_phone else u.user_phone end reported_user_phone,
+            lu.user_name reporting_user_name,
+            lu.user_phone reporting_user_phone,
+            v.created_time,
+            case when v.processing_status = 0 then '待处理' when v.processing_status = 1 then '已通过' else '已驳回' end processing_status,
+            d.dict_detail,
+            v.business_id,
+            v.report_context_type,
+            v.processing_status,
+            v.other_reason_content,
+            v.report_evidence_img,
+            v.processing_time,
+            v.report_result,
+            v.video_first_frame
+        from
+        life_user_violation v
+        left join life_user u on v.reported_user_id = u.id
+        left join life_user lu on v.reporting_user_id = lu.id
+        left join store_dictionary d on v.dict_type = d.type_name
+            and v.dict_id = d.dict_id
+        left join second_goods_record g on g.id = v.business_id
+        left join life_user lu1 on g.user_id = lu1.id
+        <if test="id != null and id != ''">
+            where v.id = #{id}
+        </if>
+    </select>
+
+</mapper>

+ 13 - 0
alien-gateway/pom.xml

@@ -103,6 +103,13 @@
             <artifactId>fastjson</artifactId>
         </dependency>
 
+        <!-- 验证码 -->
+        <dependency>
+            <groupId>pro.fessional</groupId>
+            <artifactId>kaptcha</artifactId>
+        </dependency>
+
+
         <!--Swagger Start-->
         <dependency>
             <groupId>io.springfox</groupId>
@@ -180,10 +187,16 @@
         </dependency>
 
         <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+        </dependency>
+
+        <dependency>
             <groupId>javax.xml.bind</groupId>
             <artifactId>jaxb-api</artifactId>
         </dependency>
 
+
     </dependencies>
 
     <build>

+ 4 - 2
alien-gateway/src/main/java/shop/alien/gateway/AlienGatewayApplication.java

@@ -3,6 +3,7 @@ package shop.alien.gateway;
 import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.context.annotation.ComponentScan;
 
 /**
@@ -13,7 +14,8 @@ import org.springframework.context.annotation.ComponentScan;
  * @date 2025/1/21 16:58
  */
 @ComponentScan({"shop.alien.gateway.*"})
-@MapperScan({"shop.alien.gateway.mapper"})
+@MapperScan(basePackages = {"shop.alien.gateway.mapper", "shop.alien.mapper"})
+@EnableFeignClients(basePackages = "shop.alien.gateway.feign")
 @SpringBootApplication
 public class AlienGatewayApplication {
 
@@ -26,4 +28,4 @@ public class AlienGatewayApplication {
         SpringApplication.run(AlienGatewayApplication.class, args);
     }
 
-}
+}

+ 57 - 0
alien-gateway/src/main/java/shop/alien/gateway/config/BeanConfig.java

@@ -0,0 +1,57 @@
+package shop.alien.gateway.config;
+
+import com.google.code.kaptcha.impl.DefaultKaptcha;
+import com.google.code.kaptcha.util.Config;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import java.util.Properties;
+
+import static com.google.code.kaptcha.Constants.*;
+
+/**
+ * @author ssk
+ * @version 1.0
+ * @date 2025/10/31 14:46
+ */
+@Configuration
+public class BeanConfig {
+
+    @Bean(name = "captchaProducerMath")
+    public DefaultKaptcha getKaptchaBeanMath() {
+        DefaultKaptcha defaultKaptcha = new DefaultKaptcha();
+        Properties properties = new Properties();
+        // 是否有边框 默认为true 我们可以自己设置yes,no
+        properties.setProperty(KAPTCHA_BORDER, "yes");
+        // 边框颜色 默认为Color.BLACK
+        properties.setProperty(KAPTCHA_BORDER_COLOR, "105,179,90");
+        // 验证码文本字符颜色 默认为Color.BLACK
+        properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_COLOR, "blue");
+        // 验证码图片宽度 默认为200
+        properties.setProperty(KAPTCHA_IMAGE_WIDTH, "160");
+        // 验证码图片高度 默认为50
+        properties.setProperty(KAPTCHA_IMAGE_HEIGHT, "60");
+        // 验证码文本字符大小 默认为40
+        properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_SIZE, "35");
+        // KAPTCHA_SESSION_KEY
+        properties.setProperty(KAPTCHA_SESSION_CONFIG_KEY, "kaptchaCodeMath");
+        // 验证码文本生成器 使用默认实现
+        properties.setProperty(KAPTCHA_TEXTPRODUCER_IMPL, "shop.alien.gateway.util.KaptchaTextCreator");
+        // 验证码文本字符间距 默认为2
+        properties.setProperty(KAPTCHA_TEXTPRODUCER_CHAR_SPACE, "3");
+        // 验证码文本字符长度 默认为5
+        properties.setProperty(KAPTCHA_TEXTPRODUCER_CHAR_LENGTH, "6");
+        // 验证码文本字体样式 默认为new Font("Arial", 1, fontSize), new Font("Courier", 1, fontSize)
+        properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_NAMES, "Arial,Courier");
+        // 验证码噪点颜色 默认为Color.BLACK
+        properties.setProperty(KAPTCHA_NOISE_COLOR, "white");
+        // 干扰实现类
+        properties.setProperty(KAPTCHA_NOISE_IMPL, "com.google.code.kaptcha.impl.NoNoise");
+        // 图片样式 水纹com.google.code.kaptcha.impl.WaterRipple 鱼眼com.google.code.kaptcha.impl.FishEyeGimpy 阴影com.google.code.kaptcha.impl.ShadowGimpy
+        properties.setProperty(KAPTCHA_OBSCURIFICATOR_IMPL, "com.google.code.kaptcha.impl.ShadowGimpy");
+        Config config = new Config(properties);
+        defaultKaptcha.setConfig(config);
+        return defaultKaptcha;
+    }
+
+}

+ 4 - 4
alien-gateway/src/main/java/shop/alien/gateway/config/JwtTokenFilter.java

@@ -25,8 +25,8 @@ import reactor.core.publisher.Flux;
 import reactor.core.publisher.Mono;
 import shop.alien.entity.store.LifeUser;
 import shop.alien.entity.store.StoreUser;
-import shop.alien.gateway.mapper.LifeUserMapper;
-import shop.alien.gateway.mapper.StoreUserMapper;
+import shop.alien.gateway.mapper.LifeUserGatewayMapper;
+import shop.alien.gateway.mapper.StoreUserGatewayMapper;
 import shop.alien.util.common.JwtUtil;
 
 import java.nio.charset.StandardCharsets;
@@ -57,10 +57,10 @@ public class JwtTokenFilter implements GlobalFilter, Ordered {
     private BaseRedisService baseRedisService;
 
     @Autowired
-    private StoreUserMapper storeUserMapper;
+    private StoreUserGatewayMapper storeUserMapper;
 
     @Autowired
-    private LifeUserMapper lifeUserMapper;
+    private LifeUserGatewayMapper lifeUserMapper;
 
     /**
      * 过滤器

+ 120 - 0
alien-gateway/src/main/java/shop/alien/gateway/config/RiskControlProperties.java

@@ -0,0 +1,120 @@
+package shop.alien.gateway.config;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.cloud.context.config.annotation.RefreshScope;
+import org.springframework.stereotype.Component;
+
+@Data
+@Component
+@RefreshScope
+@ConfigurationProperties(prefix = "risk-control")
+public class RiskControlProperties {
+
+    /**
+     * 洗钱嫌疑规则配置
+     */
+    private MoneyLaundering moneyLaundering = new MoneyLaundering();
+
+    /**
+     * 账号异常规则配置
+     */
+    private AccountAbnormal accountAbnormal = new AccountAbnormal();
+
+    /**
+     * 交易欺诈规则配置
+     */
+    private TradeFraud tradeFraud = new TradeFraud();
+
+    /**
+     * 异常发布规则配置
+     */
+    private AbnormalPublish abnormalPublish = new AbnormalPublish();
+
+    @Data
+    public static class MoneyLaundering {
+        /**
+         * 每天交易次数阈值
+         */
+        private int dailyCount = 5;
+
+        /**
+         * 每笔交易金额阈值(元)
+         */
+        private double amountThreshold = 200.0;
+
+        /**
+         * 风险类型
+         */
+        private String riskType = "洗钱嫌疑";
+
+        /**
+         * 检测指标
+         */
+        private String detectIndicator = "高频高价交易";
+    }
+
+    @Data
+    public static class AccountAbnormal {
+        /**
+         * 24小时内同一设备/mac注册账号数量阈值
+         */
+        private int regCount24h = 3;
+
+        /**
+         * 风险类型
+         */
+        private String riskType = "账号异常";
+
+        /**
+         * 检测指标
+         */
+        private String detectIndicator = "同一设备24小时内注册超过3个账号";
+    }
+
+    @Data
+    public static class TradeFraud {
+        /**
+         * 24小时内发布成功记录次数阈值
+         */
+        private int publishCount24h = 3;
+
+        /**
+         * 时间窗口(小时)
+         */
+        private int timeWindowHours = 24;
+
+        /**
+         * 风险类型
+         */
+        private String riskType = "交易欺诈";
+
+        /**
+         * 检测指标
+         */
+        private String detectIndicator = "用户频繁修改商品";
+    }
+
+    @Data
+    public static class AbnormalPublish {
+        /**
+         * 24小时内发布同类商品数量阈值
+         */
+        private int sameCategoryCount24h = 10;
+        
+        /**
+         * 时间窗口(小时)
+         */
+        private int timeWindowHours = 24;
+
+        /**
+         * 风险类型
+         */
+        private String riskType = "异常发布";
+
+        /**
+         * 检测指标
+         */
+        private String detectIndicator = "短时间大量发布同类商品";
+    }
+}

+ 70 - 0
alien-gateway/src/main/java/shop/alien/gateway/controller/CaptchaImageController.java

@@ -0,0 +1,70 @@
+package shop.alien.gateway.controller;
+
+import com.google.code.kaptcha.Producer;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.FastByteArrayOutputStream;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import reactor.core.publisher.Mono;
+import shop.alien.entity.result.R;
+import shop.alien.gateway.config.BaseRedisService;
+import shop.alien.gateway.util.Base64;
+
+import javax.annotation.Resource;
+import javax.imageio.ImageIO;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+/**
+ * @author ssk
+ * @version 1.0
+ * @date 2025/10/31 14:12
+ */
+@RestController
+@RequestMapping("/captcha")
+public class CaptchaImageController {
+
+    @Resource(name = "captchaProducerMath")
+    private Producer captchaProducerMath;
+
+    @Autowired
+    private BaseRedisService redisCache;
+
+    /**
+     * 5分钟
+     */
+    private Long CAPTCHA_EXPIRATION = 5 * 60 * 1000L;
+
+    /**
+     * 生成验证码
+     */
+    @GetMapping("/captchaImage")
+    public Mono<R<Map<String, String>>> getCode() {
+        Map<String, String> resultMap = new HashMap<>();
+        // 保存验证码信息
+        String uuid = UUID.randomUUID().toString();
+        String verifyKey = "captcha_codes:" + uuid;
+        String capStr, code;
+        BufferedImage image;
+        String capText = captchaProducerMath.createText();
+        capStr = capText.substring(0, capText.lastIndexOf("@"));
+        code = capText.substring(capText.lastIndexOf("@") + 1);
+        image = captchaProducerMath.createImage(capStr);
+        redisCache.setString(verifyKey, code, CAPTCHA_EXPIRATION);
+        // 转换流信息写出
+        FastByteArrayOutputStream os = new FastByteArrayOutputStream();
+        try {
+            ImageIO.write(image, "jpg", os);
+        } catch (IOException e) {
+            return Mono.just(R.fail("验证码生成失败"));
+        }
+        resultMap.put("uuid", uuid);
+        resultMap.put("img", "data:image/gif;base64," + Base64.encode(os.toByteArray()));
+        return Mono.just(R.data(resultMap));
+    }
+
+}

+ 35 - 5
alien-gateway/src/main/java/shop/alien/gateway/controller/LifeUserController.java

@@ -3,9 +3,12 @@ package shop.alien.gateway.controller;
 import io.swagger.annotations.*;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang.StringUtils;
 import org.springframework.web.bind.annotation.*;
 import shop.alien.entity.result.R;
 import shop.alien.entity.store.vo.LifeUserVo;
+import shop.alien.gateway.config.BaseRedisService;
+import shop.alien.gateway.service.ActivityInviteConfigService;
 import shop.alien.gateway.service.LifeUserService;
 
 /**
@@ -19,18 +22,45 @@ import shop.alien.gateway.service.LifeUserService;
 @RequiredArgsConstructor
 public class LifeUserController {
 
-    private final LifeUserService service;
+    private final LifeUserService lifeUserService;
+
+    private final BaseRedisService baseRedisService;
+
+    private final ActivityInviteConfigService activityInviteConfigService;
 
     @ApiOperation("用户登录")
     @ApiOperationSupport(order = 1)
-    @ApiImplicitParams({@ApiImplicitParam(name = "phoneNum", value = "手机号", dataType = "String", paramType = "query", required = true)})
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "phoneNum", value = "手机号", dataType = "String", paramType = "query", required = true),
+            @ApiImplicitParam(name = "code", value = "验证码", dataType = "String", paramType = "query", required = true),
+            @ApiImplicitParam(name = "inviteCode", value = "邀请码", dataType = "String", paramType = "query", required = false),
+            @ApiImplicitParam(name = "inviteCode", value = "邀请码", dataType = "String", paramType = "query", required = false)
+    })
     @GetMapping("/userLogin")
-    public R<LifeUserVo> userLogin(@RequestParam("phoneNum") String phoneNum) {
-        log.info("LifeUserController.userLogin?phoneNum={}", phoneNum);
-        LifeUserVo userVo = service.userLogin(phoneNum);
+    public R<LifeUserVo> userLogin(@RequestParam("phoneNum") String phoneNum,
+                                   @RequestParam("code") String code,
+                                   @RequestParam(value = "macIp", required = false) String macIp,
+                                   @RequestParam(value = "inviteCode", required = false) String inviteCode) {
+        log.info("LifeUserController.userLogin?phoneNum={}&code={}", phoneNum, code);
+        // 2025-11-04 验证码-用户端登录
+        String cacheCode = baseRedisService.getString("verification_user_login_" + phoneNum);
+        if (null == cacheCode) {
+            return R.fail("当验证码过期或未发送");
+        }
+        if (!cacheCode.trim().equals(code.trim())) {
+            return R.fail("验证码错误");
+        }
+        LifeUserVo userVo = lifeUserService.userLogin(phoneNum, inviteCode, macIp);
         if (null == userVo) {
             return R.fail("登录失败");
         }
+
+        if(StringUtils.isNotBlank(inviteCode)){
+           String bindResult =  activityInviteConfigService.bindInviteCode(userVo.getId(), inviteCode);
+           if(StringUtils.isNotBlank(bindResult) && !bindResult.equals("绑定成功")){
+               return R.fail(bindResult);
+           }
+        }
         return R.data(userVo);
     }
 

+ 27 - 7
alien-gateway/src/main/java/shop/alien/gateway/controller/StoreUserController.java

@@ -8,7 +8,8 @@ import org.springframework.web.bind.annotation.*;
 import shop.alien.entity.result.R;
 import shop.alien.entity.store.StoreUser;
 import shop.alien.entity.store.vo.StoreUserVo;
-import shop.alien.gateway.mapper.StoreUserMapper;
+import shop.alien.gateway.config.BaseRedisService;
+import shop.alien.gateway.mapper.StoreUserGatewayMapper;
 import shop.alien.gateway.service.StoreUserService;
 
 import java.util.Objects;
@@ -30,17 +31,36 @@ import java.util.Optional;
 public class StoreUserController {
 
     private final StoreUserService storeUserService;
-    private final StoreUserMapper storeUserMapper;
+
+    private final StoreUserGatewayMapper storeUserMapper;
+
+    private final BaseRedisService baseRedisService;
 
     @ApiOperation("门店用户登录")
     @ApiOperationSupport(order = 1)
-    @ApiImplicitParams({@ApiImplicitParam(name = "phone", value = "手机号", dataType = "String", paramType = "query", required = true),
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "phone", value = "手机号", dataType = "String", paramType = "query", required = true),
             @ApiImplicitParam(name = "password", value = "密码", dataType = "String", paramType = "query", required = true),
-            @ApiImplicitParam(name = "isPassword", value = "是否密码登录", dataType = "Boolean", paramType = "query", required = true)})
+            @ApiImplicitParam(name = "isPassword", value = "是否密码登录", dataType = "Boolean", paramType = "query", required = true),
+            @ApiImplicitParam(name = "code", value = "验证码", dataType = "String", paramType = "query", required = true)
+    })
     @GetMapping("/login")
-    public R<StoreUserVo> login(String phone, String password,
-                                @RequestParam(defaultValue = "true", required = false) Boolean isPassword) {
-        log.info("StoreUserController.login?phone={}&password={}&isPassword={}", phone, password, isPassword);
+    public R<StoreUserVo> login(
+            @RequestParam("phone") String phone,
+            @RequestParam("password") String password,
+            @RequestParam("isPassword") Boolean isPassword,
+            @RequestParam("code") String code) {
+        log.info("StoreUserController.login?phone={}&password={}&isPassword={}&code={}", phone, password, isPassword, code);
+        if (!isPassword) {
+            // 2025-11-04 验证码-商户端登录
+            String cacheCode = baseRedisService.getString("verification_store_login_" + phone);
+            if (null == cacheCode) {
+                return R.fail("验证码过期或未发送");
+            }
+            if (!cacheCode.trim().equals(code.trim())) {
+                return R.fail("验证码错误");
+            }
+        }
         StoreUser storeUser = storeUserMapper.selectOne(new LambdaQueryWrapper<StoreUser>()
                 .eq(StoreUser::getPhone, phone));
         if (null == storeUser) {

+ 36 - 0
alien-gateway/src/main/java/shop/alien/gateway/feign/SecondServiceFeign.java

@@ -0,0 +1,36 @@
+package shop.alien.gateway.feign;
+
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+@FeignClient(name = "alien-second", url = "${feign.alienSecond.url}")
+public interface SecondServiceFeign {
+    
+    /**
+     * 记录风控数据
+     *
+     * @param userId     用户ID
+     * @param ruleType   规则类型 1:洗钱嫌疑 2:账号异常 3:交易欺诈 4:异常发布
+     * @param ruleName   规则名称
+     * @param businessId 业务ID
+     * @param detailInfo 详细信息(JSON格式)
+     */
+    @PostMapping("/riskControl/record")
+    void recordRiskControlData(@RequestParam("userId") Integer userId,
+                               @RequestParam("ruleType") Integer ruleType,
+                               @RequestParam("ruleName") String ruleName,
+                               @RequestParam("businessId") String businessId,
+                               @RequestParam("detailInfo") String detailInfo);
+
+    /**
+     * 用户积分数据
+     *
+     * @param userId     用户ID
+     * @param initialPoints   用户积分
+     */
+    @PostMapping("/userPoints/create")
+    void createPointsRecord(@RequestParam("userId") Integer userId,
+                            @RequestParam("initialPoints") Integer initialPoints,
+                            @RequestParam("pointsType") Integer pointsType);
+}

+ 1 - 1
alien-gateway/src/main/java/shop/alien/gateway/mapper/LifeSysMapper.java → alien-gateway/src/main/java/shop/alien/gateway/mapper/LifeSysGatewayMapper.java

@@ -8,5 +8,5 @@ import shop.alien.entity.store.LifeSys;
  * 系统用户
  */
 @Mapper
-public interface LifeSysMapper extends BaseMapper<LifeSys> {
+public interface LifeSysGatewayMapper extends BaseMapper<LifeSys> {
 }

+ 1 - 1
alien-gateway/src/main/java/shop/alien/gateway/mapper/LifeUserMapper.java → alien-gateway/src/main/java/shop/alien/gateway/mapper/LifeUserGatewayMapper.java

@@ -8,6 +8,6 @@ import shop.alien.entity.store.LifeUser;
  * 用户
  */
 @Mapper
-public interface LifeUserMapper extends BaseMapper<LifeUser> {
+public interface LifeUserGatewayMapper extends BaseMapper<LifeUser> {
 
 }

+ 27 - 0
alien-gateway/src/main/java/shop/alien/gateway/mapper/LifeUserLogGatewayMapper.java

@@ -0,0 +1,27 @@
+package shop.alien.gateway.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+import shop.alien.entity.second.LifeUserLog;
+
+import java.util.List;
+
+@Mapper
+public interface LifeUserLogGatewayMapper extends BaseMapper<LifeUserLog> {
+
+    /**
+     * 查询时间段内同一个macip地址的登录记录
+     *
+     * @param starDate 开始日期
+     * @param endDate 结束日期
+     * @return 同一个macip地址的登录记录
+     */
+    @Select("SELECT user_id, user_name, mac_ip FROM life_user_log " +
+            " WHERE created_time BETWEEN DATE_FORMAT(#{starDate}, '%Y-%m-%d %H:%i:%s') " +
+            " AND DATE_FORMAT(#{endDate}, '%Y-%m-%d %H:%i:%s') AND mac_ip = #{macIp} " +
+            " GROUP BY user_id, user_name, mac_ip ")
+    List<LifeUserLog> getLifeUserLogByDate(@Param("starDate") String starDate, @Param("endDate") String endDate, @Param("macIp") String macIp);
+
+}

+ 1 - 1
alien-gateway/src/main/java/shop/alien/gateway/mapper/StoreInfoMapper.java → alien-gateway/src/main/java/shop/alien/gateway/mapper/StoreInfoGatewayMapper.java

@@ -11,5 +11,5 @@ import shop.alien.entity.store.StoreInfo;
  * @since 2024-12-05
  */
 @Mapper
-public interface StoreInfoMapper extends BaseMapper<StoreInfo> {
+public interface StoreInfoGatewayMapper extends BaseMapper<StoreInfo> {
 }

+ 1 - 1
alien-gateway/src/main/java/shop/alien/gateway/mapper/StoreUserMapper.java → alien-gateway/src/main/java/shop/alien/gateway/mapper/StoreUserGatewayMapper.java

@@ -13,5 +13,5 @@ import shop.alien.entity.store.StoreUser;
  * @since 2024-12-11
  */
 @Mapper
-public interface StoreUserMapper extends BaseMapper<StoreUser> {
+public interface StoreUserGatewayMapper extends BaseMapper<StoreUser> {
 }

+ 15 - 0
alien-gateway/src/main/java/shop/alien/gateway/service/ActivityInviteConfigService.java

@@ -0,0 +1,15 @@
+package shop.alien.gateway.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import shop.alien.entity.store.ActivityInviteConfig;
+
+/**
+ * @author zhangchen
+ * @version 1.0
+ * @date 2025/09/05 10:00
+ */
+public interface ActivityInviteConfigService extends IService<ActivityInviteConfig> {
+
+    String bindInviteCode(Integer invitedUserId, String inviteCode);
+
+}

+ 119 - 35
alien-gateway/src/main/java/shop/alien/gateway/service/LifeUserService.java

@@ -1,59 +1,59 @@
 package shop.alien.gateway.service;
 
-import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson2.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.RequiredArgsConstructor;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+import shop.alien.entity.second.LifeUserLog;
+import shop.alien.entity.second.SecondRiskControlRecord;
 import shop.alien.entity.store.LifeUser;
 import shop.alien.entity.store.vo.LifeUserVo;
 import shop.alien.gateway.config.BaseRedisService;
-import shop.alien.gateway.mapper.LifeUserMapper;
+import shop.alien.gateway.config.RiskControlProperties;
+import shop.alien.gateway.feign.SecondServiceFeign;
+import shop.alien.gateway.mapper.LifeUserLogGatewayMapper;
+import shop.alien.gateway.mapper.LifeUserGatewayMapper;
+import shop.alien.mapper.second.SecondRiskControlRecordMapper;
 import shop.alien.util.common.JwtUtil;
 
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * 用户
  */
 @Service
 @RequiredArgsConstructor
-public class LifeUserService extends ServiceImpl<LifeUserMapper, LifeUser> {
+public class LifeUserService extends ServiceImpl<LifeUserGatewayMapper, LifeUser> {
 
-    private final LifeUserMapper lifeUserMapper;
+    private final LifeUserGatewayMapper lifeUserMapper;
+
+    private final LifeUserLogGatewayMapper lifeUserLogMapper;
 
     private final BaseRedisService baseRedisService;
 
+    private final SecondServiceFeign alienSecondFeign;
+
+    private final ActivityInviteConfigService activityInviteConfigService;
+
+    private final SecondRiskControlRecordMapper secondRiskControlRecordMapper;
+
+    @Autowired
+    private RiskControlProperties riskControlProperties;
+
     @Value("${jwt.expiration-time}")
     private String effectiveTime;
 
-    public LifeUserVo userLogin(String phoneNum) {
-        int effectiveTimeInt = Integer.parseInt(effectiveTime.substring(0, effectiveTime.length() - 1));
-        String effectiveTimeUnit = effectiveTime.substring(effectiveTime.length() - 1);
-        long effectiveTimeIntLong = 0L;
-        switch (effectiveTimeUnit) {
-            case "s": {
-                effectiveTimeIntLong = effectiveTimeInt * 1000L;
-                break;
-            }
-            case "m": {
-                effectiveTimeIntLong = effectiveTimeInt * 60L * 1000L;
-                break;
-            }
-            case "h": {
-                effectiveTimeIntLong = effectiveTimeInt * 60L * 60L * 1000L;
-                break;
-            }
-            case "d": {
-                effectiveTimeIntLong = effectiveTimeInt * 24L * 60L * 60L * 1000L;
-                break;
-            }
-        }
-
+    public LifeUserVo userLogin(String phoneNum, String inviteCode, String macIp) {
         LifeUser user = getUserByPhone(phoneNum);
         if (user == null) {
             LifeUser lifeUser = new LifeUser();
@@ -71,9 +71,13 @@ public class LifeUserService extends ServiceImpl<LifeUserMapper, LifeUser> {
                 tokenMap.put("userName", lifeUser.getUserName());
                 tokenMap.put("userId", lifeUser.getId().toString());
                 tokenMap.put("userType", "user");
-                userVo.setToken(JwtUtil.createJWT("user_" + phoneNum, lifeUser.getUserName(), JSONObject.toJSONString(tokenMap), effectiveTimeIntLong));
-//                userVo.setToken(JWTUtils.createToken(tokenMap));
-                baseRedisService.setString("user_" + phoneNum, userVo.getToken());
+//                userVo.setToken(JWTUtils1.createToken(tokenMap));
+                String token = getToken(phoneNum, userVo.getUserName(), tokenMap);
+                userVo.setToken(token);
+                baseRedisService.setString("user_" + phoneNum, token);
+                // 二手平台登录log,同一个macip登录多账号记录
+                addLifeUserLogInfo(user2, macIp);
+
                 return userVo;
             } else {
                 return null;
@@ -86,18 +90,98 @@ public class LifeUserService extends ServiceImpl<LifeUserMapper, LifeUser> {
             tokenMap.put("userName", user.getUserName());
             tokenMap.put("userId", user.getId().toString());
             tokenMap.put("userType", "user");
-//            String token = JWTUtils.createToken(tokenMap);
-            String token = JwtUtil.createJWT("user_" + phoneNum, user.getUserName(), JSONObject.toJSONString(tokenMap), effectiveTimeIntLong);
+            String token = getToken(phoneNum, user.getUserName(), tokenMap);
             userVo.setToken(token);
             baseRedisService.setString("user_" + phoneNum, token);
+            // 二手平台登录log,同一个macip登录多账号记录
+            addLifeUserLogInfo(user, macIp);
+
             return userVo;
         }
     }
 
+    private String getToken(String phoneNum, String userVo, Map<String, String> tokenMap) {
+        int effectiveTimeInt = Integer.parseInt(effectiveTime.substring(0, effectiveTime.length() - 1));
+        String effectiveTimeUnit = effectiveTime.substring(effectiveTime.length() - 1);
+        long effectiveTimeIntLong = 0L;
+        switch (effectiveTimeUnit) {
+            case "s": {
+                effectiveTimeIntLong = effectiveTimeInt * 1000L;
+                break;
+            }
+            case "m": {
+                effectiveTimeIntLong = effectiveTimeInt * 60L * 1000L;
+                break;
+            }
+            case "h": {
+                effectiveTimeIntLong = effectiveTimeInt * 60L * 60L * 1000L;
+                break;
+            }
+            case "d": {
+                effectiveTimeIntLong = effectiveTimeInt * 24L * 60L * 60L * 1000L;
+                break;
+            }
+        }
+        String token = JwtUtil.createJWT("user_" + phoneNum, userVo, JSONObject.toJSONString(tokenMap), effectiveTimeIntLong);
+        return token;
+    }
+
     public LifeUser getUserByPhone(String phoneNum) {
         LambdaQueryWrapper<LifeUser> lambdaQueryWrapper = new LambdaQueryWrapper<>();
         lambdaQueryWrapper.eq(LifeUser::getUserPhone, phoneNum);
         return this.getOne(lambdaQueryWrapper);
     }
 
+
+    /**
+     * 用户登录log存放(加入mac地址)
+     */
+    @Transactional
+    public void addLifeUserLogInfo(LifeUser user, String macIp) {
+        try {
+            LifeUserLog lifeUserLog = new LifeUserLog();
+            lifeUserLog.setUserId(user.getId());
+            lifeUserLog.setUserName(user.getUserName());
+            lifeUserLog.setMacIp(macIp);
+            lifeUserLog.setCreatedTime(new Date());
+            int count = lifeUserLogMapper.insert(lifeUserLog);
+            if (count > 0) {
+                String startDate = LocalDateTime.now().minusHours(24L).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
+                String endDate = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
+                // 使用一个新的事务来查询,确保能看到刚才插入的数据
+                List<LifeUserLog> lsit = getLifeUserLogByDateInNewTransaction(startDate, endDate, macIp);
+
+                if (lsit.size() > riskControlProperties.getAccountAbnormal().getRegCount24h() && !isViolation(startDate, endDate, macIp, user.getId())) {
+                    String detailInfo = lsit.stream()
+                            .map(row -> row.getUserId().toString())
+                            .collect(Collectors.joining(","));
+                    alienSecondFeign.recordRiskControlData(user.getId(), 2, "账号异常", macIp, detailInfo);
+                }
+            }
+            // 第一次登录,添加用户基础积分
+            alienSecondFeign.createPointsRecord(user.getId(), 300, 1);
+        } catch (Exception e) {
+            log.error("用户登录log存放异常:{}", e);
+        }
+
+    }
+
+    @Transactional(propagation = Propagation.REQUIRES_NEW)
+    public List<LifeUserLog> getLifeUserLogByDateInNewTransaction(String startDate, String endDate, String macIp) {
+        return lifeUserLogMapper.getLifeUserLogByDate(startDate, endDate, macIp);
+    }
+
+    public boolean isViolation(String startDate, String endDate, String macIp, Integer userId) {
+        List<SecondRiskControlRecord> list = secondRiskControlRecordMapper.selectByBusinessId(startDate, endDate, macIp);
+        for (SecondRiskControlRecord record : list) {
+            // 将数组转换为包含整数的列表
+            List<Integer> userIdList = Arrays.stream(record.getDetailInfo().split(","))
+                    .map(Integer::parseInt)
+                    .collect(Collectors.toList());
+            if (userIdList.contains(userId)) {
+                return true;
+            }
+        }
+        return false;
+    }
 }

+ 15 - 0
alien-gateway/src/main/java/shop/alien/gateway/service/UserPointService.java

@@ -0,0 +1,15 @@
+package shop.alien.gateway.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import shop.alien.entity.store.UserPoint;
+
+/**
+ * @author zhangchen
+ * @version 1.0
+ * @date 2025/09/05 10:00
+ */
+public interface UserPointService extends IService<UserPoint> {
+
+    UserPoint addPoint(Integer userId, Integer point);
+
+}

+ 120 - 0
alien-gateway/src/main/java/shop/alien/gateway/service/impl/ActivityInviteConfigServiceImpl.java

@@ -0,0 +1,120 @@
+package shop.alien.gateway.service.impl;
+
+import com.alibaba.nacos.common.utils.CollectionUtils;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.stereotype.Service;
+import shop.alien.entity.store.ActivityInviteConfig;
+import shop.alien.entity.store.ActivityInviteLog;
+import shop.alien.entity.store.LifeUser;
+import shop.alien.gateway.service.ActivityInviteConfigService;
+import shop.alien.gateway.service.UserPointService;
+import shop.alien.mapper.ActivityInviteConfigMapper;
+import shop.alien.mapper.ActivityInviteLogMapper;
+import shop.alien.mapper.LifeUserMapper;
+
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.util.Date;
+import java.util.List;
+
+@Slf4j
+@Service
+@RequiredArgsConstructor
+public class ActivityInviteConfigServiceImpl extends ServiceImpl<ActivityInviteConfigMapper, ActivityInviteConfig> implements ActivityInviteConfigService {
+
+    private final UserPointService userPointService;
+
+    private final ActivityInviteConfigMapper activityInviteConfigMapper;
+
+    private final LifeUserMapper lifeUserMapper;
+
+    private final ActivityInviteLogMapper activityInviteLogMapper;
+
+
+    @Override
+    public String bindInviteCode(Integer invitedUserId, String inviteCode) {
+        if (StringUtils.isNotBlank(inviteCode) && invitedUserId != null) {
+            // 根据邀请码查询邀请用户
+            LambdaQueryWrapper<LifeUser> lifeUserLambdaQueryWrapper = new LambdaQueryWrapper<>();
+            lifeUserLambdaQueryWrapper.eq(LifeUser::getDeleteFlag, 0);
+            lifeUserLambdaQueryWrapper.apply("BINARY invite_code = {0}", inviteCode);
+            List<LifeUser> lifeUserList = lifeUserMapper.selectList(lifeUserLambdaQueryWrapper);
+            if (CollectionUtils.isEmpty(lifeUserList)) {
+                return "邀请码异常或邀请用户已注销";
+            }
+            LifeUser originalLifeUser = lifeUserList.get(0);
+            int inviteUserId = originalLifeUser.getId();
+            LifeUser invitedLifeUser = lifeUserMapper.selectById(invitedUserId);
+            if (invitedLifeUser == null) {
+                return "被邀请用户异常";
+            } else if (StringUtils.isNotBlank(invitedLifeUser.getBindInviteCode())) {
+                return "已经绑定邀请码不能重复绑定";
+            } else if (StringUtils.isNotBlank(invitedLifeUser.getInviteCode()) && invitedLifeUser.getInviteCode().equals(inviteCode)) {
+                return "不能绑定自己的邀请码";
+            } else {
+                LambdaQueryWrapper<ActivityInviteConfig> activityInviteConfigLambdaQueryWrapper = new LambdaQueryWrapper<>();
+                activityInviteConfigLambdaQueryWrapper.eq(ActivityInviteConfig::getDeleteFlag, 0);
+                List<ActivityInviteConfig> activityInviteConfigList = activityInviteConfigMapper.selectList(activityInviteConfigLambdaQueryWrapper);
+                if (CollectionUtils.isNotEmpty(activityInviteConfigList)) {
+                    ActivityInviteConfig activityInviteConfig = activityInviteConfigList.get(0);
+
+                    // 判断是否达到当天邀请最大次数
+                    Integer maxInviteNum = activityInviteConfig.getMaxInviteNum();
+                    if (maxInviteNum != null) {
+                        LambdaQueryWrapper<ActivityInviteLog> activityInviteLogLambdaQueryWrapper = new LambdaQueryWrapper<>();
+                        activityInviteLogLambdaQueryWrapper.eq(ActivityInviteLog::getInviteUserId, inviteUserId);
+                        activityInviteLogLambdaQueryWrapper.eq(ActivityInviteLog::getDeleteFlag, 0);
+                        // 使用 Date 对象而不是字符串,确保类型匹配
+                        LocalDate today = LocalDate.now();
+                        LocalDateTime startOfDay = today.atStartOfDay();
+                        LocalDateTime endOfDay = today.atTime(23, 59, 59);
+                        Date startDate = Date.from(startOfDay.atZone(ZoneId.systemDefault()).toInstant());
+                        Date endDate = Date.from(endOfDay.atZone(ZoneId.systemDefault()).toInstant());
+                        activityInviteLogLambdaQueryWrapper.between(ActivityInviteLog::getInviteTime, startDate, endDate);
+                        int todayInviteCount = activityInviteLogMapper.selectCount(activityInviteLogLambdaQueryWrapper);
+                        if (todayInviteCount > maxInviteNum) {
+                            return "绑定数量已超过当天最大绑定数量";
+                        }
+                    }
+
+                    ActivityInviteLog activityInviteLog = new ActivityInviteLog();
+                    activityInviteLog.setInviteUserId(inviteUserId);
+                    activityInviteLog.setInvitedUserId(invitedUserId);
+                    activityInviteLog.setActivityId(activityInviteConfig.getId());
+
+                    // 邀请奖励
+                    activityInviteLog.setInviteRewardType(activityInviteConfig.getInviteRewardType());
+                    activityInviteLog.setInviteRewardCoupon(activityInviteConfig.getInviteRewardCoupon());
+                    activityInviteLog.setInviteRewardPoint(activityInviteConfig.getInviteRewardPoint());
+                    // 被邀请奖励
+                    activityInviteLog.setInvitedRewardType(activityInviteConfig.getInvitedRewardType());
+                    activityInviteLog.setInvitedRewardCoupon(activityInviteConfig.getInvitedRewardCoupon());
+                    activityInviteLog.setInvitedRewardPoint(activityInviteConfig.getInvitedRewardPoint());
+                    activityInviteLog.setInviteTime(Date.from(Instant.now()));
+                    activityInviteLogMapper.insert(activityInviteLog);
+
+                    if (activityInviteConfig.getInviteRewardType() == 2) {
+                        userPointService.addPoint(inviteUserId, activityInviteConfig.getInviteRewardPoint());
+                    }
+                    if (activityInviteConfig.getInvitedRewardType() == 2) {
+                        userPointService.addPoint(invitedUserId, activityInviteConfig.getInvitedRewardPoint());
+                    }
+                    LifeUser updateLifeUser = new LifeUser();
+                    updateLifeUser.setId(invitedLifeUser.getId());
+                    updateLifeUser.setBindInviteCode(inviteCode);
+                    lifeUserMapper.updateById(updateLifeUser);
+                    return "绑定成功";
+                } else {
+                    return "活动未开始或已结束";
+                }
+            }
+        }
+        return "参数异常";
+    }
+}

+ 2 - 2
alien-gateway/src/main/java/shop/alien/gateway/service/impl/StoreInfoServiceImpl.java

@@ -5,7 +5,7 @@ import lombok.RequiredArgsConstructor;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import shop.alien.entity.store.StoreInfo;
-import shop.alien.gateway.mapper.StoreInfoMapper;
+import shop.alien.gateway.mapper.StoreInfoGatewayMapper;
 import shop.alien.gateway.service.StoreInfoService;
 
 /**
@@ -17,6 +17,6 @@ import shop.alien.gateway.service.StoreInfoService;
 @Service
 @RequiredArgsConstructor
 @Transactional
-public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo> implements StoreInfoService {
+public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoGatewayMapper, StoreInfo> implements StoreInfoService {
 
 }

+ 4 - 4
alien-gateway/src/main/java/shop/alien/gateway/service/impl/StoreUserServiceImpl.java

@@ -12,8 +12,8 @@ import shop.alien.entity.store.StoreInfo;
 import shop.alien.entity.store.StoreUser;
 import shop.alien.entity.store.vo.StoreUserVo;
 import shop.alien.gateway.config.BaseRedisService;
-import shop.alien.gateway.mapper.StoreInfoMapper;
-import shop.alien.gateway.mapper.StoreUserMapper;
+import shop.alien.gateway.mapper.StoreInfoGatewayMapper;
+import shop.alien.gateway.mapper.StoreUserGatewayMapper;
 import shop.alien.gateway.service.StoreUserService;
 import shop.alien.util.common.JwtUtil;
 
@@ -29,7 +29,7 @@ import java.util.Map;
 @Transactional
 @Service
 @RequiredArgsConstructor
-public class StoreUserServiceImpl extends ServiceImpl<StoreUserMapper, StoreUser> implements StoreUserService {
+public class StoreUserServiceImpl extends ServiceImpl<StoreUserGatewayMapper, StoreUser> implements StoreUserService {
 
     @Value("${jwt.expiration-time}")
     private String effectiveTime;
@@ -38,7 +38,7 @@ public class StoreUserServiceImpl extends ServiceImpl<StoreUserMapper, StoreUser
      * 设定初始化默认密码
      */
 
-    private final StoreInfoMapper storeInfoMapper;
+    private final StoreInfoGatewayMapper storeInfoMapper;
 
     private final BaseRedisService baseRedisService;
 

+ 2 - 2
alien-gateway/src/main/java/shop/alien/gateway/service/impl/SystemServiceImpl.java

@@ -9,7 +9,7 @@ import shop.alien.entity.store.LifeSys;
 import shop.alien.entity.store.UserLoginInfo;
 import shop.alien.entity.store.vo.SystemLoginVo;
 import shop.alien.gateway.config.BaseRedisService;
-import shop.alien.gateway.mapper.LifeSysMapper;
+import shop.alien.gateway.mapper.LifeSysGatewayMapper;
 import shop.alien.gateway.service.SystemService;
 import shop.alien.util.common.JwtUtil;
 
@@ -30,7 +30,7 @@ import java.util.Map;
 @RequiredArgsConstructor
 public class SystemServiceImpl implements SystemService {
 
-    private final LifeSysMapper lifeSysMapper;
+    private final LifeSysGatewayMapper lifeSysMapper;
 
     private final BaseRedisService baseRedisService;
 

+ 50 - 0
alien-gateway/src/main/java/shop/alien/gateway/service/impl/UserPointServiceImpl.java

@@ -0,0 +1,50 @@
+package shop.alien.gateway.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+import shop.alien.entity.store.UserPoint;
+import shop.alien.gateway.service.UserPointService;
+import shop.alien.mapper.UserPointMapper;
+
+import java.util.List;
+
+/**
+ * 签到类型活动服务
+ *
+ * @author zhangchen
+ * @since 2025-9-8
+ */
+@Slf4j
+@Service
+@RequiredArgsConstructor
+public class UserPointServiceImpl extends ServiceImpl<UserPointMapper, UserPoint> implements UserPointService {
+
+    private final UserPointMapper userPointMapper;
+
+    @Override
+    public UserPoint addPoint(Integer userId, Integer point) {
+        UserPoint userPoint = new UserPoint();
+        if (userId != null && point != null) {
+            LambdaQueryWrapper<UserPoint> userPointLambdaQueryWrapper = new LambdaQueryWrapper<>();
+            userPointLambdaQueryWrapper.eq(UserPoint::getUserId, userId);
+            userPointLambdaQueryWrapper.eq(UserPoint::getDeleteFlag, 0);
+            List<UserPoint> userPointList = userPointMapper.selectList(userPointLambdaQueryWrapper);
+            if (!CollectionUtils.isEmpty(userPointList)) {
+                userPoint = userPointList.get(0);
+                int totalPoint = point + userPoint.getUserPoint();
+                userPoint.setUserPoint(totalPoint);
+                userPointMapper.updateById(userPoint);
+            } else {
+                userPoint.setUserId(userId);
+                userPoint.setUserPoint(point);
+                userPointMapper.insert(userPoint);
+            }
+        }
+        return userPoint;
+    }
+
+}

+ 253 - 0
alien-gateway/src/main/java/shop/alien/gateway/util/Base64.java

@@ -0,0 +1,253 @@
+package shop.alien.gateway.util;
+
+/**
+ * Base64工具类
+ *
+ * @author ssk
+ */
+public final class Base64 {
+    static private final int BASELENGTH = 128;
+    static private final int LOOKUPLENGTH = 64;
+    static private final int TWENTYFOURBITGROUP = 24;
+    static private final int EIGHTBIT = 8;
+    static private final int SIXTEENBIT = 16;
+    static private final int FOURBYTE = 4;
+    static private final int SIGN = -128;
+    static private final char PAD = '=';
+    static final private byte[] base64Alphabet = new byte[BASELENGTH];
+    static final private char[] lookUpBase64Alphabet = new char[LOOKUPLENGTH];
+
+    static {
+        for (int i = 0; i < BASELENGTH; ++i) {
+            base64Alphabet[i] = -1;
+        }
+        for (int i = 'Z'; i >= 'A'; i--) {
+            base64Alphabet[i] = (byte) (i - 'A');
+        }
+        for (int i = 'z'; i >= 'a'; i--) {
+            base64Alphabet[i] = (byte) (i - 'a' + 26);
+        }
+
+        for (int i = '9'; i >= '0'; i--) {
+            base64Alphabet[i] = (byte) (i - '0' + 52);
+        }
+
+        base64Alphabet['+'] = 62;
+        base64Alphabet['/'] = 63;
+
+        for (int i = 0; i <= 25; i++) {
+            lookUpBase64Alphabet[i] = (char) ('A' + i);
+        }
+
+        for (int i = 26, j = 0; i <= 51; i++, j++) {
+            lookUpBase64Alphabet[i] = (char) ('a' + j);
+        }
+
+        for (int i = 52, j = 0; i <= 61; i++, j++) {
+            lookUpBase64Alphabet[i] = (char) ('0' + j);
+        }
+        lookUpBase64Alphabet[62] = (char) '+';
+        lookUpBase64Alphabet[63] = (char) '/';
+    }
+
+    private static boolean isWhiteSpace(char octect) {
+        return (octect == 0x20 || octect == 0xd || octect == 0xa || octect == 0x9);
+    }
+
+    private static boolean isPad(char octect) {
+        return (octect == PAD);
+    }
+
+    private static boolean isData(char octect) {
+        return (octect < BASELENGTH && base64Alphabet[octect] != -1);
+    }
+
+    /**
+     * Encodes hex octects into Base64
+     *
+     * @param binaryData Array containing binaryData
+     * @return Encoded Base64 array
+     */
+    public static String encode(byte[] binaryData) {
+        if (binaryData == null) {
+            return null;
+        }
+
+        int lengthDataBits = binaryData.length * EIGHTBIT;
+        if (lengthDataBits == 0) {
+            return "";
+        }
+
+        int fewerThan24bits = lengthDataBits % TWENTYFOURBITGROUP;
+        int numberTriplets = lengthDataBits / TWENTYFOURBITGROUP;
+        int numberQuartet = fewerThan24bits != 0 ? numberTriplets + 1 : numberTriplets;
+        char encodedData[] = null;
+
+        encodedData = new char[numberQuartet * 4];
+
+        byte k = 0, l = 0, b1 = 0, b2 = 0, b3 = 0;
+
+        int encodedIndex = 0;
+        int dataIndex = 0;
+
+        for (int i = 0; i < numberTriplets; i++) {
+            b1 = binaryData[dataIndex++];
+            b2 = binaryData[dataIndex++];
+            b3 = binaryData[dataIndex++];
+
+            l = (byte) (b2 & 0x0f);
+            k = (byte) (b1 & 0x03);
+
+            byte val1 = ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0);
+            byte val2 = ((b2 & SIGN) == 0) ? (byte) (b2 >> 4) : (byte) ((b2) >> 4 ^ 0xf0);
+            byte val3 = ((b3 & SIGN) == 0) ? (byte) (b3 >> 6) : (byte) ((b3) >> 6 ^ 0xfc);
+
+            encodedData[encodedIndex++] = lookUpBase64Alphabet[val1];
+            encodedData[encodedIndex++] = lookUpBase64Alphabet[val2 | (k << 4)];
+            encodedData[encodedIndex++] = lookUpBase64Alphabet[(l << 2) | val3];
+            encodedData[encodedIndex++] = lookUpBase64Alphabet[b3 & 0x3f];
+        }
+
+        // form integral number of 6-bit groups
+        if (fewerThan24bits == EIGHTBIT) {
+            b1 = binaryData[dataIndex];
+            k = (byte) (b1 & 0x03);
+            byte val1 = ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0);
+            encodedData[encodedIndex++] = lookUpBase64Alphabet[val1];
+            encodedData[encodedIndex++] = lookUpBase64Alphabet[k << 4];
+            encodedData[encodedIndex++] = PAD;
+            encodedData[encodedIndex++] = PAD;
+        } else if (fewerThan24bits == SIXTEENBIT) {
+            b1 = binaryData[dataIndex];
+            b2 = binaryData[dataIndex + 1];
+            l = (byte) (b2 & 0x0f);
+            k = (byte) (b1 & 0x03);
+
+            byte val1 = ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0);
+            byte val2 = ((b2 & SIGN) == 0) ? (byte) (b2 >> 4) : (byte) ((b2) >> 4 ^ 0xf0);
+
+            encodedData[encodedIndex++] = lookUpBase64Alphabet[val1];
+            encodedData[encodedIndex++] = lookUpBase64Alphabet[val2 | (k << 4)];
+            encodedData[encodedIndex++] = lookUpBase64Alphabet[l << 2];
+            encodedData[encodedIndex++] = PAD;
+        }
+        return new String(encodedData);
+    }
+
+    /**
+     * Decodes Base64 data into octects
+     *
+     * @param encoded string containing Base64 data
+     * @return Array containind decoded data.
+     */
+    public static byte[] decode(String encoded) {
+        if (encoded == null) {
+            return null;
+        }
+
+        char[] base64Data = encoded.toCharArray();
+        // remove white spaces
+        int len = removeWhiteSpace(base64Data);
+
+        if (len % FOURBYTE != 0) {
+            return null;// should be divisible by four
+        }
+
+        int numberQuadruple = (len / FOURBYTE);
+
+        if (numberQuadruple == 0) {
+            return new byte[0];
+        }
+
+        byte decodedData[] = null;
+        byte b1 = 0, b2 = 0, b3 = 0, b4 = 0;
+        char d1 = 0, d2 = 0, d3 = 0, d4 = 0;
+
+        int i = 0;
+        int encodedIndex = 0;
+        int dataIndex = 0;
+        decodedData = new byte[(numberQuadruple) * 3];
+
+        for (; i < numberQuadruple - 1; i++) {
+
+            if (!isData((d1 = base64Data[dataIndex++])) || !isData((d2 = base64Data[dataIndex++]))
+                    || !isData((d3 = base64Data[dataIndex++])) || !isData((d4 = base64Data[dataIndex++]))) {
+                return null;
+            } // if found "no data" just return null
+
+            b1 = base64Alphabet[d1];
+            b2 = base64Alphabet[d2];
+            b3 = base64Alphabet[d3];
+            b4 = base64Alphabet[d4];
+
+            decodedData[encodedIndex++] = (byte) (b1 << 2 | b2 >> 4);
+            decodedData[encodedIndex++] = (byte) (((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf));
+            decodedData[encodedIndex++] = (byte) (b3 << 6 | b4);
+        }
+
+        if (!isData((d1 = base64Data[dataIndex++])) || !isData((d2 = base64Data[dataIndex++]))) {
+            return null;// if found "no data" just return null
+        }
+
+        b1 = base64Alphabet[d1];
+        b2 = base64Alphabet[d2];
+
+        d3 = base64Data[dataIndex++];
+        d4 = base64Data[dataIndex++];
+        if (!isData((d3)) || !isData((d4))) {// Check if they are PAD characters
+            if (isPad(d3) && isPad(d4)) {
+                if ((b2 & 0xf) != 0)// last 4 bits should be zero
+                {
+                    return null;
+                }
+                byte[] tmp = new byte[i * 3 + 1];
+                System.arraycopy(decodedData, 0, tmp, 0, i * 3);
+                tmp[encodedIndex] = (byte) (b1 << 2 | b2 >> 4);
+                return tmp;
+            } else if (!isPad(d3) && isPad(d4)) {
+                b3 = base64Alphabet[d3];
+                if ((b3 & 0x3) != 0)// last 2 bits should be zero
+                {
+                    return null;
+                }
+                byte[] tmp = new byte[i * 3 + 2];
+                System.arraycopy(decodedData, 0, tmp, 0, i * 3);
+                tmp[encodedIndex++] = (byte) (b1 << 2 | b2 >> 4);
+                tmp[encodedIndex] = (byte) (((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf));
+                return tmp;
+            } else {
+                return null;
+            }
+        } else { // No PAD e.g 3cQl
+            b3 = base64Alphabet[d3];
+            b4 = base64Alphabet[d4];
+            decodedData[encodedIndex++] = (byte) (b1 << 2 | b2 >> 4);
+            decodedData[encodedIndex++] = (byte) (((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf));
+            decodedData[encodedIndex++] = (byte) (b3 << 6 | b4);
+
+        }
+        return decodedData;
+    }
+
+    /**
+     * remove WhiteSpace from MIME containing encoded Base64 data.
+     *
+     * @param data the byte array of base64 data (with WS)
+     * @return the new length
+     */
+    private static int removeWhiteSpace(char[] data) {
+        if (data == null) {
+            return 0;
+        }
+
+        // count characters that's not whitespace
+        int newSize = 0;
+        int len = data.length;
+        for (int i = 0; i < len; i++) {
+            if (!isWhiteSpace(data[i])) {
+                data[newSize++] = data[i];
+            }
+        }
+        return newSize;
+    }
+}

+ 56 - 0
alien-gateway/src/main/java/shop/alien/gateway/util/KaptchaTextCreator.java

@@ -0,0 +1,56 @@
+package shop.alien.gateway.util;
+
+import com.google.code.kaptcha.text.impl.DefaultTextCreator;
+
+import java.util.Random;
+
+/**
+ * 验证码文本生成器
+ *
+ * @author ruoyi
+ */
+public class KaptchaTextCreator extends DefaultTextCreator {
+    private static final String[] CNUMBERS = "0,1,2,3,4,5,6,7,8,9,10".split(",");
+
+    @Override
+    public String getText() {
+        Integer result = 0;
+        Random random = new Random();
+        int x = random.nextInt(10);
+        int y = random.nextInt(10);
+        StringBuilder suChinese = new StringBuilder();
+        int randomoperands = random.nextInt(3);
+        if (randomoperands == 0) {
+            result = x * y;
+            suChinese.append(CNUMBERS[x]);
+            suChinese.append("*");
+            suChinese.append(CNUMBERS[y]);
+        } else if (randomoperands == 1) {
+            if ((x != 0) && y % x == 0) {
+                result = y / x;
+                suChinese.append(CNUMBERS[y]);
+                suChinese.append("/");
+                suChinese.append(CNUMBERS[x]);
+            } else {
+                result = x + y;
+                suChinese.append(CNUMBERS[x]);
+                suChinese.append("+");
+                suChinese.append(CNUMBERS[y]);
+            }
+        } else {
+            if (x >= y) {
+                result = x - y;
+                suChinese.append(CNUMBERS[x]);
+                suChinese.append("-");
+                suChinese.append(CNUMBERS[y]);
+            } else {
+                result = y - x;
+                suChinese.append(CNUMBERS[y]);
+                suChinese.append("-");
+                suChinese.append(CNUMBERS[x]);
+            }
+        }
+        suChinese.append("=?@" + result);
+        return suChinese.toString();
+    }
+}

+ 2 - 2
alien-gateway/src/main/resources/mapper/StoreUserMapper.xml → alien-gateway/src/main/resources/mapper/StoreUserGatewayMapper.xml

@@ -2,10 +2,10 @@
 <!DOCTYPE mapper
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="shop.alien.gateway.mapper.StoreUserMapper">
+<mapper namespace="shop.alien.gateway.mapper.StoreUserGatewayMapper">
 
     <!-- 查询已删除的用户 -->
     <select id="getRemoveUser" resultType="shop.alien.entity.store.StoreUser">
-        select concat(name,"(账号已注销)") as name,phone FROM store_user where id = #{id}
+        select concat(nick_name,"(账号已注销)") as name,phone FROM store_user where id = #{id}
     </select>
 </mapper>

+ 1 - 1
alien-job/src/main/java/shop/alien/job/feign/AlienStoreFeign.java

@@ -50,7 +50,7 @@ public interface AlienStoreFeign {
      * @param refundReason 退款原因
      * @return
      */
-    @GetMapping("/processRefund")
+    @GetMapping("/ali/processRefund")
     public String processRefund(@RequestParam(value = "outTradeNo") String outTradeNo,
                                    @RequestParam(value = "refundAmount") String refundAmount,
                                    @RequestParam(value = "refundReason") String refundReason,

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