puzhibing
2024-02-05 640ff18d2d7f4be02ddb7f8f75e899f05545eb98
cloud-server-management/src/main/resources/mapper/TStoreMapper.xml
@@ -12,12 +12,31 @@
                                        state,pageId,typeId
                                        ) value (null ,#{url},#{name},#{s},#{s1},#{turnId},#{sort},1,#{page},#{type})
    </insert>
    <update id="updateBasicConfig">
        update t_img_config
        set content = #{p1}
        where `position` =#{position}
    </update>
    <update id="updateBasicBenefits">
        update t_img_config
        set content = #{p1}
        where `position` =#{position}
    </update>
    <update id="inset">
        update t_js
        set jieshao = #{jieshao} ,vedio = #{vedio}
        where id = #{id}
    </update>
    <delete id="delete1">
        delete from t_store_other_config where id =#{id}
    </delete>
    <select id="listAll" resultType="com.dsh.guns.modular.system.model.TStoreListVo">
        select t1.*,t2.name userName,t2.phone userPhone,t3.name yysName from t_store t1 left join sys_user t2 on t1.storeStaffId = t2.id left  join t_operator t3 on t1.operatorId = t3.id
        select t1.*,t2.name userName,t2.phone userPhone,t3.name yysName
        from t_store t1 left join sys_user t2 on t1.storeStaffId = t2.id left  join t_operator t3 on t1.operatorId = t3.id
        where 1=1
        <if test="provinceCode !=null and provinceCode !=''">
            and t1.provinceCode = #{provinceCode}
@@ -33,6 +52,9 @@
        </if>
        <if test="shopName !=null and shopName !=''">
            and t1.name like concat("%",#{shopName},"%")
        </if>
        <if test="operatorId !=null and operatorId !=''">
            and t1.operatorId = #{operatorId}
        </if>
    </select>
    <select id="queryProvince" resultType="map">
@@ -55,18 +77,24 @@
        group by cityCode
        ) as aa order by aa.code
    </select>
    <select id="queryCity1" resultType="map">
        select * from (
        select cityCode as code, city as name from t_store where state = 1
        group by cityCode
        ) as aa order by aa.code
    </select>
    <select id="queryListOfpage" resultType="java.util.Map">
        SELECT `id`, `cityManagerId`, `province`, `city`, `name`
        SELECT `id`, `operatorId`, `province`, `city`, `name`,ids
        from t_store
        where 1=1
        <if test="provinceCode != null">
        where state=1
        <if test="provinceCode != null and provinceCode!=''">
            and provinceCode = #{provinceCode}
        </if>
        <if test="cityCode != null">
        <if test="cityCode != null and cityCode!=''">
            and cityCode = #{cityCode}
        </if>
        <if test="cityManagerId != null">
            and cityManagerId = #{cityManagerId}
        <if test="operatorId != null and operatorId!=''">
            and operatorId = #{operatorId}
        </if>
        <if test="storeName != null and storeName != ''">
            and `name` like CONCAT('%',#{storeName},'%')
@@ -102,4 +130,45 @@
    <select id="pageList" resultType="com.dsh.guns.modular.system.model.TTurn">
        select * from t_turn where pid = 0
    </select>
    <select id="get" resultType="com.dsh.course.dto.JsDto">
        select * from t_js where  id = #{id}
    </select>
    <select id="getConfig1" resultType="com.dsh.guns.modular.system.model.TImgConfig">
        select * from t_img_config
    </select>
    <select id="getSelect" resultType="com.dsh.guns.modular.system.model.dto.SelectDto">
        SELECT op.id , CONCAT(us.name,'-',us.`phone`) as value
        FROM t_operator op
            LEFT JOIN sys_user us on op.userId = us.id
    </select>
    <select id="listAllStore" resultType="com.dsh.guns.modular.system.model.TStoreListVo">
        select t1.*,t2.name userName,t2.phone userPhone,t3.name yysName from t_store t1 left join sys_user t2 on t1.storeStaffId = t2.id left  join t_operator t3 on t1.operatorId = t3.id
        where t1.id =#{id}
        <if test="provinceCode !=null and provinceCode !=''">
            and t1.provinceCode = #{provinceCode}
        </if>
        <if test="cityCode !=null and cityCode !=''">
            and t1.cityCode = #{cityCode}
        </if>
        <if test="name !=null and name !=''">
            and t2.name like concat("%",#{name},"%")
        </if>
        <if test="phone !=null and phone !=''">
            and t2.phone like concat("%",#{phone},"%")
        </if>
        <if test="shopName !=null and shopName !=''">
            and t1.name like concat("%",#{shopName},"%")
        </if>
    </select>
</mapper>