com.macro.mall.model.CmsSubject Java Examples

The following examples show how to use com.macro.mall.model.CmsSubject. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HomeController.java    From mall-swarm with Apache License 2.0 5 votes vote down vote up
@ApiOperation("根据分类获取专题")
@RequestMapping(value = "/subjectList", method = RequestMethod.GET)
@ResponseBody
public CommonResult<List<CmsSubject>> getSubjectList(@RequestParam(required = false) Long cateId,
                                                     @RequestParam(value = "pageSize", defaultValue = "4") Integer pageSize,
                                                     @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
    List<CmsSubject> subjectList = homeService.getSubjectList(cateId,pageSize,pageNum);
    return CommonResult.success(subjectList);
}
 
Example #2
Source File: CmsSubjectServiceImpl.java    From macrozheng with Apache License 2.0 5 votes vote down vote up
@Override
public List<CmsSubject> list(String keyword, Integer pageNum, Integer pageSize) {
    PageHelper.startPage(pageNum, pageSize);
    CmsSubjectExample example = new CmsSubjectExample();
    CmsSubjectExample.Criteria criteria = example.createCriteria();
    if (!StringUtils.isEmpty(keyword)) {
        criteria.andTitleLike("%" + keyword + "%");
    }
    return subjectMapper.selectByExample(example);
}
 
Example #3
Source File: HomeController.java    From mall with Apache License 2.0 5 votes vote down vote up
@ApiOperation("根据分类获取专题")
@RequestMapping(value = "/subjectList", method = RequestMethod.GET)
@ResponseBody
public CommonResult<List<CmsSubject>> getSubjectList(@RequestParam(required = false) Long cateId,
                                                     @RequestParam(value = "pageSize", defaultValue = "4") Integer pageSize,
                                                     @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
    List<CmsSubject> subjectList = homeService.getSubjectList(cateId,pageSize,pageNum);
    return CommonResult.success(subjectList);
}
 
Example #4
Source File: CmsSubjectController.java    From macrozheng with Apache License 2.0 5 votes vote down vote up
@ApiOperation(value = "根据专题名称分页获取专题")
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ResponseBody
public CommonResult<CommonPage<CmsSubject>> getList(@RequestParam(value = "keyword", required = false) String keyword,
                                                    @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                                                    @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) {
    List<CmsSubject> subjectList = subjectService.list(keyword, pageNum, pageSize);
    return CommonResult.success(CommonPage.restPage(subjectList));
}
 
Example #5
Source File: CmsSubjectController.java    From macrozheng with Apache License 2.0 5 votes vote down vote up
@ApiOperation("获取全部商品专题")
@RequestMapping(value = "/listAll", method = RequestMethod.GET)
@ResponseBody
public CommonResult<List<CmsSubject>> listAll() {
    List<CmsSubject> subjectList = subjectService.listAll();
    return CommonResult.success(subjectList);
}
 
Example #6
Source File: CmsSubjectServiceImpl.java    From mall-swarm with Apache License 2.0 5 votes vote down vote up
@Override
public List<CmsSubject> list(String keyword, Integer pageNum, Integer pageSize) {
    PageHelper.startPage(pageNum, pageSize);
    CmsSubjectExample example = new CmsSubjectExample();
    CmsSubjectExample.Criteria criteria = example.createCriteria();
    if (!StringUtils.isEmpty(keyword)) {
        criteria.andTitleLike("%" + keyword + "%");
    }
    return subjectMapper.selectByExample(example);
}
 
Example #7
Source File: CmsSubjectController.java    From mall-swarm with Apache License 2.0 5 votes vote down vote up
@ApiOperation(value = "根据专题名称分页获取专题")
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ResponseBody
public CommonResult<CommonPage<CmsSubject>> getList(@RequestParam(value = "keyword", required = false) String keyword,
                                                    @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                                                    @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) {
    List<CmsSubject> subjectList = subjectService.list(keyword, pageNum, pageSize);
    return CommonResult.success(CommonPage.restPage(subjectList));
}
 
Example #8
Source File: CmsSubjectController.java    From mall-swarm with Apache License 2.0 5 votes vote down vote up
@ApiOperation("获取全部商品专题")
@RequestMapping(value = "/listAll", method = RequestMethod.GET)
@ResponseBody
public CommonResult<List<CmsSubject>> listAll() {
    List<CmsSubject> subjectList = subjectService.listAll();
    return CommonResult.success(subjectList);
}
 
Example #9
Source File: CmsSubjectController.java    From mall with Apache License 2.0 5 votes vote down vote up
@ApiOperation("获取全部商品专题")
@RequestMapping(value = "/listAll", method = RequestMethod.GET)
@ResponseBody
public CommonResult<List<CmsSubject>> listAll() {
    List<CmsSubject> subjectList = subjectService.listAll();
    return CommonResult.success(subjectList);
}
 
Example #10
Source File: CmsSubjectController.java    From mall with Apache License 2.0 5 votes vote down vote up
@ApiOperation(value = "根据专题名称分页获取专题")
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ResponseBody
public CommonResult<CommonPage<CmsSubject>> getList(@RequestParam(value = "keyword", required = false) String keyword,
                                                    @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                                                    @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) {
    List<CmsSubject> subjectList = subjectService.list(keyword, pageNum, pageSize);
    return CommonResult.success(CommonPage.restPage(subjectList));
}
 
Example #11
Source File: CmsSubjectServiceImpl.java    From mall with Apache License 2.0 5 votes vote down vote up
@Override
public List<CmsSubject> list(String keyword, Integer pageNum, Integer pageSize) {
    PageHelper.startPage(pageNum, pageSize);
    CmsSubjectExample example = new CmsSubjectExample();
    CmsSubjectExample.Criteria criteria = example.createCriteria();
    if (!StringUtils.isEmpty(keyword)) {
        criteria.andTitleLike("%" + keyword + "%");
    }
    return subjectMapper.selectByExample(example);
}
 
Example #12
Source File: CmsSubjectController.java    From macrozheng-mall with MIT License 5 votes vote down vote up
@ApiOperation("获取全部商品专题")
@RequestMapping(value = "/listAll", method = RequestMethod.GET)
@ResponseBody
public Object listAll() {
    List<CmsSubject> subjectList = subjectService.listAll();
    return new CommonResult().success(subjectList);
}
 
Example #13
Source File: CmsSubjectController.java    From macrozheng-mall with MIT License 5 votes vote down vote up
@ApiOperation(value = "根据专题名称分页获取专题")
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ResponseBody
public Object getList(@RequestParam(value = "keyword", required = false) String keyword,
                      @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                      @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) {
    List<CmsSubject> subjectList = subjectService.list(keyword, pageNum, pageSize);
    return new CommonResult().pageSuccess(subjectList);
}
 
Example #14
Source File: CmsSubjectServiceImpl.java    From macrozheng-mall with MIT License 5 votes vote down vote up
@Override
public List<CmsSubject> list(String keyword, Integer pageNum, Integer pageSize) {
    PageHelper.startPage(pageNum, pageSize);
    CmsSubjectExample example = new CmsSubjectExample();
    CmsSubjectExample.Criteria criteria = example.createCriteria();
    if (!StringUtils.isEmpty(keyword)) {
        criteria.andTitleLike("%" + keyword + "%");
    }
    return subjectMapper.selectByExample(example);
}
 
Example #15
Source File: HomeController.java    From macrozheng with Apache License 2.0 5 votes vote down vote up
@ApiOperation("根据分类获取专题")
@RequestMapping(value = "/subjectList", method = RequestMethod.GET)
@ResponseBody
public CommonResult<List<CmsSubject>> getSubjectList(@RequestParam(required = false) Long cateId,
                                                     @RequestParam(value = "pageSize", defaultValue = "4") Integer pageSize,
                                                     @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
    List<CmsSubject> subjectList = homeService.getSubjectList(cateId,pageSize,pageNum);
    return CommonResult.success(subjectList);
}
 
Example #16
Source File: CmsSubjectServiceImpl.java    From mall with Apache License 2.0 4 votes vote down vote up
@Override
public List<CmsSubject> listAll() {
    return subjectMapper.selectByExample(new CmsSubjectExample());
}
 
Example #17
Source File: CmsSubjectServiceImpl.java    From mall-swarm with Apache License 2.0 4 votes vote down vote up
@Override
public List<CmsSubject> listAll() {
    return subjectMapper.selectByExample(new CmsSubjectExample());
}
 
Example #18
Source File: CmsSubjectServiceImpl.java    From macrozheng-mall with MIT License 4 votes vote down vote up
@Override
public List<CmsSubject> listAll() {
    return subjectMapper.selectByExample(new CmsSubjectExample());
}
 
Example #19
Source File: CmsSubjectServiceImpl.java    From macrozheng with Apache License 2.0 4 votes vote down vote up
@Override
public List<CmsSubject> listAll() {
    return subjectMapper.selectByExample(new CmsSubjectExample());
}
 
Example #20
Source File: HomeService.java    From mall-swarm with Apache License 2.0 2 votes vote down vote up
/**
 * 根据专题分类分页获取专题
 * @param cateId 专题分类id
 */
List<CmsSubject> getSubjectList(Long cateId, Integer pageSize, Integer pageNum);
 
Example #21
Source File: HomeService.java    From macrozheng with Apache License 2.0 2 votes vote down vote up
/**
 * 根据专题分类分页获取专题
 * @param cateId 专题分类id
 */
List<CmsSubject> getSubjectList(Long cateId, Integer pageSize, Integer pageNum);
 
Example #22
Source File: HomeDao.java    From macrozheng with Apache License 2.0 2 votes vote down vote up
/**
 * 获取推荐专题
 */
List<CmsSubject> getRecommendSubjectList(@Param("offset") Integer offset, @Param("limit") Integer limit);
 
Example #23
Source File: CmsSubjectService.java    From macrozheng with Apache License 2.0 2 votes vote down vote up
/**
 * 查询所有专题
 */
List<CmsSubject> listAll();
 
Example #24
Source File: CmsSubjectService.java    From macrozheng with Apache License 2.0 2 votes vote down vote up
/**
 * 分页查询专题
 */
List<CmsSubject> list(String keyword, Integer pageNum, Integer pageSize);
 
Example #25
Source File: HomeDao.java    From mall with Apache License 2.0 2 votes vote down vote up
/**
 * 获取推荐专题
 */
List<CmsSubject> getRecommendSubjectList(@Param("offset") Integer offset, @Param("limit") Integer limit);
 
Example #26
Source File: HomeService.java    From mall with Apache License 2.0 2 votes vote down vote up
/**
 * 根据专题分类分页获取专题
 * @param cateId 专题分类id
 */
List<CmsSubject> getSubjectList(Long cateId, Integer pageSize, Integer pageNum);
 
Example #27
Source File: CmsSubjectService.java    From mall with Apache License 2.0 2 votes vote down vote up
/**
 * 查询所有专题
 */
List<CmsSubject> listAll();
 
Example #28
Source File: CmsSubjectService.java    From mall with Apache License 2.0 2 votes vote down vote up
/**
 * 分页查询专题
 */
List<CmsSubject> list(String keyword, Integer pageNum, Integer pageSize);
 
Example #29
Source File: CmsSubjectService.java    From macrozheng-mall with MIT License 2 votes vote down vote up
/**
 * 查询所有专题
 */
List<CmsSubject> listAll();
 
Example #30
Source File: CmsSubjectService.java    From macrozheng-mall with MIT License 2 votes vote down vote up
/**
 * 分页查询专题
 */
List<CmsSubject> list(String keyword, Integer pageNum, Integer pageSize);