店铺管理-店铺配置:打印机设置相关接口
This commit is contained in:
65
src/main/resources/mapper/ShopPrinterMapper.xml
Normal file
65
src/main/resources/mapper/ShopPrinterMapper.xml
Normal file
@@ -0,0 +1,65 @@
|
||||
<?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.chaozhanggui.system.cashierservice.dao.ShopPrinterServiceMapper">
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, name, type, connection_type, address, port, sub_type, status, shop_id, category_ids, content_type, created_at, updated_at, sort, vendor_id, product_id
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
config, category_list
|
||||
</sql>
|
||||
|
||||
<select id="getList" resultType="com.chaozhanggui.system.cashierservice.entity.dto.ShopPrinterDTO">
|
||||
select
|
||||
<include refid="Base_Column_List" />,
|
||||
<include refid="Blob_Column_List" />
|
||||
from tb_print_machine
|
||||
where shop_id = #{shopId}
|
||||
<if test="name != null and name != ''">
|
||||
and name like concat(#{name}, '%')
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
and type = #{type}
|
||||
</if>
|
||||
<if test="connectionType != null and connectionType != ''">
|
||||
and connection_type = #{connectionType}
|
||||
</if>
|
||||
<if test="address != null and address != ''">
|
||||
and address = #{address}
|
||||
</if>
|
||||
<if test="port != null and port != ''">
|
||||
and port = #{port}
|
||||
</if>
|
||||
<if test="subType != null and subType != ''">
|
||||
and sub_type = #{subType}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
and status = #{status}
|
||||
</if>
|
||||
<if test="categoryIds != null and categoryIds != ''">
|
||||
and category_ids = #{categoryIds}
|
||||
</if>
|
||||
<if test="contentType != null and contentType != ''">
|
||||
and content_type = #{contentType}
|
||||
</if>
|
||||
<if test="config != null and config != ''">
|
||||
and config = #{config}
|
||||
</if>
|
||||
<if test="categoryList != null and categoryList != ''">
|
||||
and category_list = #{categoryList}
|
||||
</if>
|
||||
<if test="vendorId != null and vendorId != ''">
|
||||
and vendor_id = #{vendorId}
|
||||
</if>
|
||||
<if test="productId != null and productId != ''">
|
||||
and product_id = #{productId}
|
||||
</if>
|
||||
order by sort asc,id desc
|
||||
</select>
|
||||
|
||||
<update id="updateStatus">
|
||||
update tb_print_machine set status = #{status} where id = #{id}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user