|
@@ -3,6 +3,7 @@ package com.hwrj.cloud.admin.service.impl;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.hwrj.cloud.admin.dao.PmsBrandDao;
|
|
|
import com.hwrj.cloud.admin.dto.PmsBrandParam;
|
|
|
+import com.hwrj.cloud.admin.dto.param.PmsBrandWebFrom;
|
|
|
import com.hwrj.cloud.admin.mapper.PmsBrandMapper;
|
|
|
import com.hwrj.cloud.admin.mapper.PmsProductMapper;
|
|
|
import com.hwrj.cloud.admin.model.PmsBrand;
|
|
@@ -97,13 +98,17 @@ public class PmsBrandServiceImpl implements PmsBrandService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<PmsBrand> listBrand(String keyword, int pageNum, int pageSize) {
|
|
|
+ public List<PmsBrand> listBrand(PmsBrandWebFrom pmsBrandWebFrom) {
|
|
|
Long compId = CurrUserUtil.getCompIdInfo();
|
|
|
|
|
|
- PageHelper.startPage(pageNum, pageSize);
|
|
|
+ if(StringUtils.isEmpty(compId)){
|
|
|
+ compId = pmsBrandWebFrom.getCompId();
|
|
|
+ }
|
|
|
+ PageHelper.startPage(pmsBrandWebFrom.getPageNum(), pmsBrandWebFrom.getPageSize());
|
|
|
PmsBrandExample pmsBrandExample = new PmsBrandExample();
|
|
|
pmsBrandExample.setOrderByClause("sort desc");
|
|
|
PmsBrandExample.Criteria criteria = pmsBrandExample.createCriteria();
|
|
|
+ String keyword = pmsBrandWebFrom.getKeyword();
|
|
|
if (!StringUtils.isEmpty(keyword)) {
|
|
|
criteria.andNameLike("%" + keyword + "%");
|
|
|
}
|