拆分think模块包

This commit is contained in:
2024-08-13 17:51:18 +08:00
parent 9dc17cd63e
commit 09a752e12a
1547 changed files with 88305 additions and 10329 deletions
@@ -0,0 +1,47 @@
package com.gxwebsoft.shop.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gxwebsoft.shop.mapper.BrandMapper;
import com.gxwebsoft.shop.service.BrandService;
import com.gxwebsoft.shop.entity.Brand;
import com.gxwebsoft.shop.param.BrandParam;
import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.PageResult;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 品牌Service实现
*
* @author 科技小王子
* @since 2024-04-04 11:38:21
*/
@Service
public class BrandServiceImpl extends ServiceImpl<BrandMapper, Brand> implements BrandService {
@Override
public PageResult<Brand> pageRel(BrandParam param) {
PageParam<Brand, BrandParam> page = new PageParam<>(param);
page.setDefaultOrder("sort_number asc, create_time desc");
List<Brand> list = baseMapper.selectPageRel(page, param);
return new PageResult<>(list, page.getTotal());
}
@Override
public List<Brand> listRel(BrandParam param) {
List<Brand> list = baseMapper.selectListRel(param);
// 排序
PageParam<Brand, BrandParam> page = new PageParam<>();
page.setDefaultOrder("sort_number asc, create_time desc");
return page.sortRecords(list);
}
@Override
public Brand getByIdRel(Integer brandId) {
BrandParam param = new BrandParam();
param.setBrandId(brandId);
return param.getOne(baseMapper.selectListRel(param));
}
}