@Service
public class SimpleUserService {
@Autowired
private JooqTemplate jt;
public List<user> selectUserInDept(UserParam param) {
//If deptIDs==null or deptIDs. isEmpty automatically ignores this query condition
// SELECT * FROM user_table WHERE name LIKE '%?%' AND dept_id IN (?,?...);
return jt.queryv("user_table",User.class,"name%",param.getName(),"dept_id:in",param.getDeptIds());
}
public List<user> selectUserNotInDept(UserParam param) {
// SELECT * FROM user_table WHERE name LIKE '%?%' AND dept_id NOT IN (?,?...);
return jt.queryv("user_table",User.class,"name%",param.getName(),"dept_id:notin",param.getDeptIds());
}
}
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)