yanyang #2
@ -1,7 +1,6 @@
|
||||
package com.cnbm.basic.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.cnbm.basic.dto.ProductTypeDTO;
|
||||
import com.cnbm.common.dao.BaseDao;
|
||||
import com.cnbm.basic.entity.ProductType;
|
||||
@ -18,5 +17,5 @@ import java.util.Map;
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProductTypeMapper extends BaseDao<ProductType> {
|
||||
IPage<ProductTypeDTO> page(Page<Object> objectPage, @Param("param") Map<String, Object> params);
|
||||
IPage<ProductTypeDTO> page(IPage<ProductType> objectPage, @Param("param") Map<String, Object> params);
|
||||
}
|
@ -3,6 +3,7 @@ package com.cnbm.basic.service.impl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.cnbm.common.constant.Constant;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.service.impl.CrudServiceImpl;
|
||||
import com.cnbm.basic.dto.ProductTypeDTO;
|
||||
@ -40,11 +41,10 @@ public class ProductTypeServiceImpl extends CrudServiceImpl<ProductTypeMapper, P
|
||||
|
||||
@Override
|
||||
public PageData<ProductTypeDTO> page (Map<String, Object> params){
|
||||
PageData<ProductTypeDTO> data = null;
|
||||
QueryWrapper<ProductTypeDTO> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("id",params.get("id"));
|
||||
IPage<ProductTypeDTO> page = productTypeMapper.page(new Page<>((Long) params.get("current"),(Long)params.get("size")), params);
|
||||
return data;
|
||||
IPage<ProductTypeDTO> page = productTypeMapper.page(getPage(params, Constant.CREATE_DATE, false), params);
|
||||
return getPageData(page,ProductTypeDTO.class);
|
||||
}
|
||||
|
||||
}
|
@ -6,7 +6,7 @@
|
||||
select *
|
||||
from product_type
|
||||
<where>
|
||||
id = #{params.get("id")}
|
||||
id = #{id)}
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue
Block a user