select * from mall_footprint where id = #{value}
SELECT DISTINCT
a.*,
b.nickname AS user_name,
c.NAME AS goods_name
FROM
mall_product_store_rela r
INNER JOIN mall_footprint a ON r.goods_id = a.goods_id
INNER JOIN mall_store s ON r.store_id = s.id
INNER JOIN mall_goods c ON r.goods_id = c.id
INNER JOIN mall_merch_user d ON r.store_id = d.store_id
AND r.merch_sn = d.merch_sn
INNER JOIN mall_user b ON a.user_id = b.id
AND d.user_id = b.id
WHERE 1=1
AND s.third_party_merch_code = #{thirdPartyMerchCode}
and r.store_id = #{storeId}
and c.merch_sn = #{merchSn}
AND b.username LIKE concat('%',#{userName},'%')
order by ${sidx} ${order}
order by a.id desc
limit #{offset}, #{limit}
select count(distinct a.id) FROM
mall_product_store_rela r
INNER JOIN mall_footprint a ON r.goods_id = a.goods_id
INNER JOIN mall_store s ON r.store_id = s.id
INNER JOIN mall_goods c ON r.goods_id = c.id
INNER JOIN mall_merch_user d ON r.store_id = d.store_id
AND r.merch_sn = d.merch_sn
INNER JOIN mall_user b ON a.user_id = b.id
AND d.user_id = b.id
WHERE 1=1
AND s.third_party_merch_code = #{thirdPartyMerchCode}
and r.store_id = #{storeId}
and c.merch_sn = #{merchSn}
AND b.username LIKE concat('%',#{name},'%')
insert into mall_footprint
(
`user_id`,
`goods_id`,
`add_time`
)
values
(
#{userId},
#{goodsId},
#{addTime}
)
update mall_footprint
`user_id` = #{userId},
`goods_id` = #{goodsId},
`add_time` = #{addTime}
where id = #{id}
delete from mall_footprint where id = #{value}
delete from mall_footprint where id in
#{id}