fix
Helius
2022-12-14 62a304eb5c68fc7f54a9bc247e76223cc2c7f243
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xcong.farmer.cms.modules.system.mapper.CmsFriendlyLinkMapper">
 
    <select id="selectInPage" resultType="com.xcong.farmer.cms.modules.system.entity.CmsFriendlyLinkEntity">
        select
         a.*,
         b.name groupName
        from cms_friendly_link a
            left join cms_group_info b on a.group_id=b.id
        <where>
            a.company_id=#{record.companyId}
            <if test="record.name != null and record.name != ''">
                and a.name like concat(concat('%', #{record.name}), '%')
            </if>
        </where>
    </select>
 
    <select id="selectByGroupIdAndCompanyId" resultType="com.xcong.farmer.cms.modules.system.entity.CmsFriendlyLinkEntity">
        select * from cms_friendly_link
        where group_id=#{groupId} and company_id=#{companyId}
    </select>
 
    <select id="selectByGroupCodeAndCompanyId" resultType="com.xcong.farmer.cms.modules.system.entity.CmsFriendlyLinkEntity">
        select
            *
        from cms_friendly_link a, cms_group_info b
        where a.group_id=b.id and b.code=#{code} and a.company_id=#{companyId}
    </select>
</mapper>