java110
2022-05-05 df7a30aca95c93e072886f863a63e19cb06d6029
优化模糊查询
2个文件已修改
20 ■■■■■ 已修改文件
java110-db/src/main/resources/mapper/user/OwnerServiceDaoImplMapper.xml 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-user/src/main/java/com/java110/user/cmd/owner/QueryOwnersCmd.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/user/OwnerServiceDaoImplMapper.xml
@@ -383,6 +383,12 @@
        <if test="ownerTypeCd !=null and ownerTypeCd != ''">
            and t.owner_type_cd= #{ownerTypeCd}
        </if>
        <if test="ownerTypeCds != null ">
            and t.owner_type_cd in
            <foreach collection="ownerTypeCds" item="item" open="(" close=")" separator=",">
                #{item}
            </foreach>
        </if>
    </select>
@@ -431,6 +437,12 @@
        </if>
        <if test="ownerTypeCd !=null and ownerTypeCd != ''">
            and t.owner_type_cd= #{ownerTypeCd}
        </if>
        <if test="ownerTypeCds != null ">
            and t.owner_type_cd in
            <foreach collection="ownerTypeCds" item="item" open="(" close=")" separator=",">
                #{item}
            </foreach>
        </if>
@@ -492,6 +504,12 @@
        <if test="ownerTypeCd !=null and ownerTypeCd != ''">
            and t.owner_type_cd= #{ownerTypeCd}
        </if>
        <if test="ownerTypeCds != null ">
            and t.owner_type_cd in
            <foreach collection="ownerTypeCds" item="item" open="(" close=")" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
        </if>
service-user/src/main/java/com/java110/user/cmd/owner/QueryOwnersCmd.java
@@ -137,7 +137,7 @@
        //获取当前用户id
        String ownerTypeCd = reqJson.getString("ownerTypeCd");
        OwnerDto tmpOwnerDto = BeanConvertUtil.covertBean(reqJson, OwnerDto.class);
        if(!StringUtil.isEmpty(ownerTypeCd)&& ownerTypeCd.contains(",")){
        if(!StringUtil.isEmpty(ownerTypeCd) && ownerTypeCd.contains(",")){
            tmpOwnerDto.setOwnerTypeCd("");
            tmpOwnerDto.setOwnerTypeCds(ownerTypeCd.split(","));
        }