fix(PmsSpuServiceImpl.java): 商品排序

This commit is contained in:
有来技术 2021-08-17 00:46:00 +08:00
parent 983389904f
commit 2a1c6e1b94
3 changed files with 4 additions and 3 deletions

View File

@ -13,5 +13,5 @@ import java.util.List;
@Mapper
public interface PmsSpuMapper extends BaseMapper<PmsSpu> {
List<PmsSpu> list(Page<PmsSpu> page, String name, Long categoryId);
List<PmsSpu> list( String name, Long categoryId);
}

View File

@ -51,7 +51,7 @@ public class PmsSpuServiceImpl extends ServiceImpl<PmsSpuMapper, PmsSpu> impleme
*/
@Override
public IPage<PmsSpu> list(Page<PmsSpu> page, String name, Long categoryId) {
List<PmsSpu> list = this.baseMapper.list(page, name, categoryId);
List<PmsSpu> list = this.baseMapper.list( name, categoryId);
page.setRecords(list);
return page;
}

View File

@ -52,6 +52,7 @@
unit,description,detail,
status,gmt_create,gmt_modified
</sql>
<select id="list" resultMap="BaseResultMap">
SELECT
t1.id,
@ -75,7 +76,7 @@
<if test='name!=null and name neq ""'>
AND t1.name like concat('%',#{name},'%')
</if>
ORDER BY t1.gmt_create DESC
ORDER BY t1.gmt_modified DESC,t1.gmt_create DESC
</select>