refactor(sip): 优化项目信息查询功能
- 修改 ProjectInfoMapper.xml 中的 SQL 查询语句,将 id 列改为 user_id 列 - 在 ProjectInfoServiceImpl 类上添加 @Transactional 注解,开启事务管理master
parent
196a81e1e2
commit
a11879d098
|
@ -13,6 +13,7 @@ import com.ruoyi.sip.mapper.ProjectInfoMapper;
|
|||
import com.ruoyi.sip.service.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
@ -30,6 +31,7 @@ import java.util.stream.Stream;
|
|||
* @date 2025-05-29
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class ProjectInfoServiceImpl implements IProjectInfoService {
|
||||
@Autowired
|
||||
private ProjectInfoMapper projectInfoMapper;
|
||||
|
|
|
@ -119,7 +119,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
<select id="selectUserById" resultType="com.ruoyi.common.core.domain.entity.SysUser">
|
||||
select * from sys_user
|
||||
where id in <foreach collection="list" item="id" open="(" separator="," close=")">
|
||||
where user_id in <foreach collection="list" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
|
Loading…
Reference in New Issue