mapper User selectNickNameAndUserId(@Param(Constants.WRAPPER) LambdaQueryWrapperUser queryWrapper); mapper.xml select id=selectNickNameAndUserId resultType=com.example.demo.entity.User select if test=ew != null and ew.SqlSelect != null and
mapper
User selectNickNameAndUserId(@Param(Constants.WRAPPER) LambdaQueryWrapper<User> queryWrapper);mapper.xml
<select id="selectNickNameAndUserId" resultType="com.example.demo.entity.User"> select <if test="ew != null and ew.SqlSelect != null and ew.SqlSelect != ''"> ${ew.SqlSelect} </if> from user ${ew.customSqlSegment} </select>