WEB:分页查询设备列表

This commit is contained in:
2025-07-04 15:42:10 +08:00
parent d456236599
commit 3947f9b6f0
10 changed files with 70 additions and 30 deletions

View File

@ -57,6 +57,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
*/
@Override
public List<Customer> queryAllCustomers(UserQueryCriteria criteria) {
criteria.setPid(LoginHelper.getUserId());
List<Customer> users = customerMapper.queryAllCustomers(criteria);
return users;
}

View File

@ -148,7 +148,6 @@
</where>
</select>
<!-- 查询所有客户 -->
<select id="queryAllCustomers" resultType="com.fuyuanshen.customer.domain.Customer">
select u.user_id as customerId,
@ -165,6 +164,9 @@
#{item}
</foreach>
</if>
<if test="criteria.pid != null">
and u.pid = #{criteria.pid}
</if>
</where>
</select>
@ -187,16 +189,15 @@
<!-- 根据id查询客户 -->
<select id="queryCustomerById" resultType="com.fuyuanshen.customer.domain.Customer">
select u.*
select u.*,u.user_id as customerId
from sys_user u
<where>
<if test="customerId!= null">
and u.user_id = customerId)
and u.user_id = #{customerId}
</if>
<if test="pid != null">
and u.pid = pid)
and u.pid = #{pid}
</if>
</where>
</select>