fix(ai): 修复学习列表查询条件并启用测试环境SQL日志
- 移除AiMemberAnswerMapper中多余的member_id查询条件
- 删除AiMemberServiceImpl中未使用的对象初始化
- 启用application-test.yml中的p6spy SQL日志输出以便调试
| | |
| | | |
| | | @Override |
| | | public FebsResponse studyList(ApiCompanyStudyDto dto) { |
| | | List<ApiCompanyStudyVo> objects = new ArrayList<>(); |
| | | |
| | | String companyId = LoginUserUtil.getLoginUser().getCompanyId(); |
| | | String memberUuid = LoginUserUtil.getLoginUser().getMemberUuid(); |
| | |
| | | datasource: |
| | | dynamic: |
| | | # 是否开启 SQL日志输出,生产环境建议关闭,有性能损耗 |
| | | p6spy: false |
| | | p6spy: true |
| | | hikari: |
| | | connection-timeout: 30000 |
| | | max-lifetime: 1800000 |
| | |
| | | a.target as target |
| | | from ai_member_answer b |
| | | left join ai_product a on b.product_id = a.id and a.state = 1 |
| | | where b.member_id = #{record.memberUuid} |
| | | and b.company_id = #{record.companyId} |
| | | where b.company_id = #{record.companyId} |
| | | and b.state = 1 |
| | | group by b.product_id |
| | | order by b.CREATED_TIME desc |