commit message
This commit is contained in:
19
framework/src/main/resources/mapper/SpecificationMapper.xml
Normal file
19
framework/src/main/resources/mapper/SpecificationMapper.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?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="cn.lili.modules.goods.mapper.SpecificationMapper">
|
||||
|
||||
|
||||
<select id="findSpecList" resultType="cn.lili.modules.goods.entity.vos.SpecificationVO" parameterType="map">
|
||||
SELECT s.id, s.spec_name,s.create_time ,GROUP_CONCAT(sv.spec_value SEPARATOR ',') AS spec_value
|
||||
FROM li_specification s
|
||||
LEFT JOIN li_spec_values sv
|
||||
ON s.id = sv.spec_id
|
||||
WHERE 1=1
|
||||
<if test="specName != null and specName!=''">
|
||||
and s.spec_name like concat('%',#{specName},'%')
|
||||
</if>
|
||||
GROUP BY s.id
|
||||
ORDER BY s.create_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user