huanghongfa
2021-09-02 177249c76aeea0b4bf8d8816d4994e3b445b45ce
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopStoreDAO.java
@@ -1,14 +1,15 @@
package com.panzhihua.service_community.dao;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.dtos.shop.PageComShopStoreDTO;
import com.panzhihua.common.model.vos.shop.PageShopStoreVO;
import com.panzhihua.service_community.model.dos.ComShopStoreDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
/**
 * @auther lyq
@@ -18,55 +19,39 @@
@Mapper
public interface ComShopStoreDAO extends BaseMapper<ComShopStoreDO> {
    @Select("<script>" +
            "select id,`name`,store_password,contacts,store_account,classify_id,logo,phone,delivery_type,remark,`status`," +
            "sale,sale_volume,store_detail,create_at, store_describe from com_shop_store c" +
            " <where>" +
            "c.delete_status=1 and c.status = 1" +
            "<if test='pageComShopStoreDTO.contacts != null and pageComShopStoreDTO.contacts.trim() != &quot;&quot;'>" +
            "and c.contacts like concat('%',#{pageComShopStoreDTO.contacts},'%') \n" +
            " </if> " +
            "<if test='pageComShopStoreDTO.account != null and pageComShopStoreDTO.account.trim() != &quot;&quot;'>" +
            "and c.store_account = #{pageComShopStoreDTO.account} \n" +
            " </if> " +
            "<if test='pageComShopStoreDTO.name != null and pageComShopStoreDTO.name.trim() != &quot;&quot;'>" +
            "and c.`name` like concat('%',#{pageComShopStoreDTO.name},'%') \n" +
            " </if> " +
            "<if test='pageComShopStoreDTO.deliveryType != null'>" +
            "and c.delivery_type =#{pageComShopStoreDTO.deliveryType}\n" +
            " </if> " +
            "<if test='pageComShopStoreDTO.status != null'>" +
            "and c.status =#{pageComShopStoreDTO.status} \n" +
            " </if> " +
            " </where>" +
            " order by c.create_at desc" +
            "</script>")
    IPage<PageShopStoreVO> pageShopStore(Page page, @Param("pageComShopStoreDTO") PageComShopStoreDTO pageComShopStoreDTO);
    @Select("<script>"
        + "select id,`name`,store_password,contacts,store_account,classify_id,logo,phone,delivery_type,remark,`status`,"
        + "sale,sale_volume,store_detail,create_at, store_describe from com_shop_store c" + " <where>"
        + "c.delete_status=1 and c.status = 1"
        + "<if test='pageComShopStoreDTO.contacts != null and pageComShopStoreDTO.contacts.trim() != &quot;&quot;'>"
        + "and c.contacts like concat('%',#{pageComShopStoreDTO.contacts},'%') \n" + " </if> "
        + "<if test='pageComShopStoreDTO.account != null and pageComShopStoreDTO.account.trim() != &quot;&quot;'>"
        + "and c.store_account = #{pageComShopStoreDTO.account} \n" + " </if> "
        + "<if test='pageComShopStoreDTO.name != null and pageComShopStoreDTO.name.trim() != &quot;&quot;'>"
        + "and c.`name` like concat('%',#{pageComShopStoreDTO.name},'%') \n" + " </if> "
        + "<if test='pageComShopStoreDTO.deliveryType != null'>"
        + "and c.delivery_type =#{pageComShopStoreDTO.deliveryType}\n" + " </if> "
        + "<if test='pageComShopStoreDTO.status != null'>" + "and c.status =#{pageComShopStoreDTO.status} \n"
        + " </if> " + " </where>" + " order by c.create_at desc" + "</script>")
    IPage<PageShopStoreVO> pageShopStore(Page page,
        @Param("pageComShopStoreDTO") PageComShopStoreDTO pageComShopStoreDTO);
    @Select("<script>" +
            "select id,`name`,store_password,contacts,store_account,classify_id,logo,phone,delivery_type,remark,`status`," +
            "sale,sale_volume,store_detail,create_at,store_describe from com_shop_store c" +
            " <where>" +
            " and c.delete_status=1 " +
            "<if test='pageComShopStoreDTO.contacts != null and pageComShopStoreDTO.contacts.trim() != &quot;&quot;'>" +
            "and c.contacts like concat('%',#{pageComShopStoreDTO.contacts},'%') \n" +
            " </if> " +
            "<if test='pageComShopStoreDTO.account != null and pageComShopStoreDTO.account.trim() != &quot;&quot;'>" +
            "and c.store_account = #{pageComShopStoreDTO.account} \n" +
            " </if> " +
            "<if test='pageComShopStoreDTO.name != null and pageComShopStoreDTO.name.trim() != &quot;&quot;'>" +
            "and c.`name` like concat('%',#{pageComShopStoreDTO.name},'%') \n" +
            " </if> " +
            "<if test='pageComShopStoreDTO.deliveryType != null'>" +
            "and c.delivery_type =#{pageComShopStoreDTO.deliveryType}\n" +
            " </if> " +
            "<if test='pageComShopStoreDTO.status != null'>" +
            "and c.status =#{pageComShopStoreDTO.status} \n" +
            " </if> " +
            " </where>" +
            " order by c.create_at desc" +
            "</script>")
    IPage<PageShopStoreVO> pageShopStoreByAdmin(Page page, @Param("pageComShopStoreDTO") PageComShopStoreDTO pageComShopStoreDTO);
    @Select("<script>"
        + "select id,`name`,store_password,contacts,store_account,classify_id,logo,phone,delivery_type,remark,`status`,"
        + "sale,sale_volume,store_detail,create_at,store_describe from com_shop_store c" + " <where>"
        + " and c.delete_status=1 "
        + "<if test='pageComShopStoreDTO.contacts != null and pageComShopStoreDTO.contacts.trim() != &quot;&quot;'>"
        + "and c.contacts like concat('%',#{pageComShopStoreDTO.contacts},'%') \n" + " </if> "
        + "<if test='pageComShopStoreDTO.account != null and pageComShopStoreDTO.account.trim() != &quot;&quot;'>"
        + "and c.store_account = #{pageComShopStoreDTO.account} \n" + " </if> "
        + "<if test='pageComShopStoreDTO.name != null and pageComShopStoreDTO.name.trim() != &quot;&quot;'>"
        + "and c.`name` like concat('%',#{pageComShopStoreDTO.name},'%') \n" + " </if> "
        + "<if test='pageComShopStoreDTO.deliveryType != null'>"
        + "and c.delivery_type =#{pageComShopStoreDTO.deliveryType}\n" + " </if> "
        + "<if test='pageComShopStoreDTO.status != null'>" + "and c.status =#{pageComShopStoreDTO.status} \n"
        + " </if> " + " </where>" + " order by c.create_at desc" + "</script>")
    IPage<PageShopStoreVO> pageShopStoreByAdmin(Page page,
        @Param("pageComShopStoreDTO") PageComShopStoreDTO pageComShopStoreDTO);
    @Select("delete from sys_user where user_id = #{sysUserId}")
    void deleteSysUserBySysUserId(@Param("sysUserId") Long sysUserId);