com.macro.mall.model.SmsHomeRecommendSubject Java Examples

The following examples show how to use com.macro.mall.model.SmsHomeRecommendSubject. 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: SmsHomeRecommendSubjectController.java    From macrozheng with Apache License 2.0 5 votes vote down vote up
@ApiOperation("添加首页推荐专题")
@RequestMapping(value = "/create", method = RequestMethod.POST)
@ResponseBody
public CommonResult create(@RequestBody List<SmsHomeRecommendSubject> homeBrandList) {
    int count = recommendSubjectService.create(homeBrandList);
    if (count > 0) {
        return CommonResult.success(count);
    }
    return CommonResult.failed();
}
 
Example #2
Source File: SmsHomeRecommendSubjectServiceImpl.java    From mall-swarm with Apache License 2.0 5 votes vote down vote up
@Override
public int create(List<SmsHomeRecommendSubject> recommendSubjectList) {
    for (SmsHomeRecommendSubject recommendProduct : recommendSubjectList) {
        recommendProduct.setRecommendStatus(1);
        recommendProduct.setSort(0);
        recommendProductMapper.insert(recommendProduct);
    }
    return recommendSubjectList.size();
}
 
Example #3
Source File: SmsHomeRecommendSubjectController.java    From macrozheng-mall with MIT License 5 votes vote down vote up
@ApiOperation("分页查询推荐")
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ResponseBody
public Object list(@RequestParam(value = "subjectName", required = false) String subjectName,
                   @RequestParam(value = "recommendStatus", required = false) Integer recommendStatus,
                   @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                   @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
    List<SmsHomeRecommendSubject> homeBrandList = recommendSubjectService.list(subjectName,recommendStatus,pageSize,pageNum);
    return new CommonResult().pageSuccess(homeBrandList);
}
 
Example #4
Source File: SmsHomeRecommendSubjectController.java    From mall-swarm with Apache License 2.0 5 votes vote down vote up
@ApiOperation("添加首页推荐专题")
@RequestMapping(value = "/create", method = RequestMethod.POST)
@ResponseBody
public CommonResult create(@RequestBody List<SmsHomeRecommendSubject> homeBrandList) {
    int count = recommendSubjectService.create(homeBrandList);
    if (count > 0) {
        return CommonResult.success(count);
    }
    return CommonResult.failed();
}
 
Example #5
Source File: SmsHomeRecommendSubjectServiceImpl.java    From macrozheng-mall with MIT License 5 votes vote down vote up
@Override
public int create(List<SmsHomeRecommendSubject> recommendSubjectList) {
    for (SmsHomeRecommendSubject recommendProduct : recommendSubjectList) {
        recommendProduct.setRecommendStatus(1);
        recommendProduct.setSort(0);
        recommendProductMapper.insert(recommendProduct);
    }
    return recommendSubjectList.size();
}
 
Example #6
Source File: SmsHomeRecommendSubjectServiceImpl.java    From macrozheng-mall with MIT License 5 votes vote down vote up
@Override
public int updateSort(Long id, Integer sort) {
    SmsHomeRecommendSubject recommendProduct = new SmsHomeRecommendSubject();
    recommendProduct.setId(id);
    recommendProduct.setSort(sort);
    return recommendProductMapper.updateByPrimaryKeySelective(recommendProduct);
}
 
Example #7
Source File: SmsHomeRecommendSubjectController.java    From mall-swarm with Apache License 2.0 5 votes vote down vote up
@ApiOperation("分页查询推荐")
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ResponseBody
public CommonResult<CommonPage<SmsHomeRecommendSubject>> list(@RequestParam(value = "subjectName", required = false) String subjectName,
                                                              @RequestParam(value = "recommendStatus", required = false) Integer recommendStatus,
                                                              @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                              @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
    List<SmsHomeRecommendSubject> homeBrandList = recommendSubjectService.list(subjectName, recommendStatus, pageSize, pageNum);
    return CommonResult.success(CommonPage.restPage(homeBrandList));
}
 
Example #8
Source File: SmsHomeRecommendSubjectServiceImpl.java    From mall-swarm with Apache License 2.0 5 votes vote down vote up
@Override
public int updateRecommendStatus(List<Long> ids, Integer recommendStatus) {
    SmsHomeRecommendSubjectExample example = new SmsHomeRecommendSubjectExample();
    example.createCriteria().andIdIn(ids);
    SmsHomeRecommendSubject record = new SmsHomeRecommendSubject();
    record.setRecommendStatus(recommendStatus);
    return recommendProductMapper.updateByExampleSelective(record,example);
}
 
Example #9
Source File: SmsHomeRecommendSubjectServiceImpl.java    From macrozheng-mall with MIT License 5 votes vote down vote up
@Override
public int updateRecommendStatus(List<Long> ids, Integer recommendStatus) {
    SmsHomeRecommendSubjectExample example = new SmsHomeRecommendSubjectExample();
    example.createCriteria().andIdIn(ids);
    SmsHomeRecommendSubject record = new SmsHomeRecommendSubject();
    record.setRecommendStatus(recommendStatus);
    return recommendProductMapper.updateByExampleSelective(record,example);
}
 
Example #10
Source File: SmsHomeRecommendSubjectServiceImpl.java    From mall-swarm with Apache License 2.0 5 votes vote down vote up
@Override
public int updateSort(Long id, Integer sort) {
    SmsHomeRecommendSubject recommendProduct = new SmsHomeRecommendSubject();
    recommendProduct.setId(id);
    recommendProduct.setSort(sort);
    return recommendProductMapper.updateByPrimaryKeySelective(recommendProduct);
}
 
Example #11
Source File: SmsHomeRecommendSubjectServiceImpl.java    From macrozheng-mall with MIT License 5 votes vote down vote up
@Override
public List<SmsHomeRecommendSubject> list(String subjectName, Integer recommendStatus, Integer pageSize, Integer pageNum) {
    PageHelper.startPage(pageNum,pageSize);
    SmsHomeRecommendSubjectExample example = new SmsHomeRecommendSubjectExample();
    SmsHomeRecommendSubjectExample.Criteria criteria = example.createCriteria();
    if(!StringUtils.isEmpty(subjectName)){
        criteria.andSubjectNameLike("%"+subjectName+"%");
    }
    if(recommendStatus!=null){
        criteria.andRecommendStatusEqualTo(recommendStatus);
    }
    example.setOrderByClause("sort desc");
    return recommendProductMapper.selectByExample(example);
}
 
Example #12
Source File: SmsHomeRecommendSubjectServiceImpl.java    From mall-swarm with Apache License 2.0 5 votes vote down vote up
@Override
public List<SmsHomeRecommendSubject> list(String subjectName, Integer recommendStatus, Integer pageSize, Integer pageNum) {
    PageHelper.startPage(pageNum,pageSize);
    SmsHomeRecommendSubjectExample example = new SmsHomeRecommendSubjectExample();
    SmsHomeRecommendSubjectExample.Criteria criteria = example.createCriteria();
    if(!StringUtils.isEmpty(subjectName)){
        criteria.andSubjectNameLike("%"+subjectName+"%");
    }
    if(recommendStatus!=null){
        criteria.andRecommendStatusEqualTo(recommendStatus);
    }
    example.setOrderByClause("sort desc");
    return recommendProductMapper.selectByExample(example);
}
 
Example #13
Source File: SmsHomeRecommendSubjectController.java    From macrozheng-mall with MIT License 5 votes vote down vote up
@ApiOperation("添加首页推荐专题")
@RequestMapping(value = "/create", method = RequestMethod.POST)
@ResponseBody
public Object create(@RequestBody List<SmsHomeRecommendSubject> homeBrandList) {
    int count = recommendSubjectService.create(homeBrandList);
    if(count>0){
        return new CommonResult().success(count);
    }
    return new CommonResult().failed();
}
 
Example #14
Source File: SmsHomeRecommendSubjectController.java    From macrozheng with Apache License 2.0 5 votes vote down vote up
@ApiOperation("分页查询推荐")
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ResponseBody
public CommonResult<CommonPage<SmsHomeRecommendSubject>> list(@RequestParam(value = "subjectName", required = false) String subjectName,
                                                              @RequestParam(value = "recommendStatus", required = false) Integer recommendStatus,
                                                              @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                              @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
    List<SmsHomeRecommendSubject> homeBrandList = recommendSubjectService.list(subjectName, recommendStatus, pageSize, pageNum);
    return CommonResult.success(CommonPage.restPage(homeBrandList));
}
 
Example #15
Source File: SmsHomeRecommendSubjectServiceImpl.java    From macrozheng with Apache License 2.0 5 votes vote down vote up
@Override
public int create(List<SmsHomeRecommendSubject> recommendSubjectList) {
    for (SmsHomeRecommendSubject recommendProduct : recommendSubjectList) {
        recommendProduct.setRecommendStatus(1);
        recommendProduct.setSort(0);
        recommendProductMapper.insert(recommendProduct);
    }
    return recommendSubjectList.size();
}
 
Example #16
Source File: SmsHomeRecommendSubjectServiceImpl.java    From macrozheng with Apache License 2.0 5 votes vote down vote up
@Override
public int updateSort(Long id, Integer sort) {
    SmsHomeRecommendSubject recommendProduct = new SmsHomeRecommendSubject();
    recommendProduct.setId(id);
    recommendProduct.setSort(sort);
    return recommendProductMapper.updateByPrimaryKeySelective(recommendProduct);
}
 
Example #17
Source File: SmsHomeRecommendSubjectServiceImpl.java    From macrozheng with Apache License 2.0 5 votes vote down vote up
@Override
public int updateRecommendStatus(List<Long> ids, Integer recommendStatus) {
    SmsHomeRecommendSubjectExample example = new SmsHomeRecommendSubjectExample();
    example.createCriteria().andIdIn(ids);
    SmsHomeRecommendSubject record = new SmsHomeRecommendSubject();
    record.setRecommendStatus(recommendStatus);
    return recommendProductMapper.updateByExampleSelective(record,example);
}
 
Example #18
Source File: SmsHomeRecommendSubjectServiceImpl.java    From macrozheng with Apache License 2.0 5 votes vote down vote up
@Override
public List<SmsHomeRecommendSubject> list(String subjectName, Integer recommendStatus, Integer pageSize, Integer pageNum) {
    PageHelper.startPage(pageNum,pageSize);
    SmsHomeRecommendSubjectExample example = new SmsHomeRecommendSubjectExample();
    SmsHomeRecommendSubjectExample.Criteria criteria = example.createCriteria();
    if(!StringUtils.isEmpty(subjectName)){
        criteria.andSubjectNameLike("%"+subjectName+"%");
    }
    if(recommendStatus!=null){
        criteria.andRecommendStatusEqualTo(recommendStatus);
    }
    example.setOrderByClause("sort desc");
    return recommendProductMapper.selectByExample(example);
}
 
Example #19
Source File: SmsHomeRecommendSubjectServiceImpl.java    From mall with Apache License 2.0 5 votes vote down vote up
@Override
public List<SmsHomeRecommendSubject> list(String subjectName, Integer recommendStatus, Integer pageSize, Integer pageNum) {
    PageHelper.startPage(pageNum,pageSize);
    SmsHomeRecommendSubjectExample example = new SmsHomeRecommendSubjectExample();
    SmsHomeRecommendSubjectExample.Criteria criteria = example.createCriteria();
    if(!StringUtils.isEmpty(subjectName)){
        criteria.andSubjectNameLike("%"+subjectName+"%");
    }
    if(recommendStatus!=null){
        criteria.andRecommendStatusEqualTo(recommendStatus);
    }
    example.setOrderByClause("sort desc");
    return recommendProductMapper.selectByExample(example);
}
 
Example #20
Source File: SmsHomeRecommendSubjectServiceImpl.java    From mall with Apache License 2.0 5 votes vote down vote up
@Override
public int updateRecommendStatus(List<Long> ids, Integer recommendStatus) {
    SmsHomeRecommendSubjectExample example = new SmsHomeRecommendSubjectExample();
    example.createCriteria().andIdIn(ids);
    SmsHomeRecommendSubject record = new SmsHomeRecommendSubject();
    record.setRecommendStatus(recommendStatus);
    return recommendProductMapper.updateByExampleSelective(record,example);
}
 
Example #21
Source File: SmsHomeRecommendSubjectServiceImpl.java    From mall with Apache License 2.0 5 votes vote down vote up
@Override
public int updateSort(Long id, Integer sort) {
    SmsHomeRecommendSubject recommendProduct = new SmsHomeRecommendSubject();
    recommendProduct.setId(id);
    recommendProduct.setSort(sort);
    return recommendProductMapper.updateByPrimaryKeySelective(recommendProduct);
}
 
Example #22
Source File: SmsHomeRecommendSubjectServiceImpl.java    From mall with Apache License 2.0 5 votes vote down vote up
@Override
public int create(List<SmsHomeRecommendSubject> recommendSubjectList) {
    for (SmsHomeRecommendSubject recommendProduct : recommendSubjectList) {
        recommendProduct.setRecommendStatus(1);
        recommendProduct.setSort(0);
        recommendProductMapper.insert(recommendProduct);
    }
    return recommendSubjectList.size();
}
 
Example #23
Source File: SmsHomeRecommendSubjectController.java    From mall with Apache License 2.0 5 votes vote down vote up
@ApiOperation("分页查询推荐")
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ResponseBody
public CommonResult<CommonPage<SmsHomeRecommendSubject>> list(@RequestParam(value = "subjectName", required = false) String subjectName,
                                                              @RequestParam(value = "recommendStatus", required = false) Integer recommendStatus,
                                                              @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                              @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
    List<SmsHomeRecommendSubject> homeBrandList = recommendSubjectService.list(subjectName, recommendStatus, pageSize, pageNum);
    return CommonResult.success(CommonPage.restPage(homeBrandList));
}
 
Example #24
Source File: SmsHomeRecommendSubjectController.java    From mall with Apache License 2.0 5 votes vote down vote up
@ApiOperation("添加首页推荐专题")
@RequestMapping(value = "/create", method = RequestMethod.POST)
@ResponseBody
public CommonResult create(@RequestBody List<SmsHomeRecommendSubject> homeBrandList) {
    int count = recommendSubjectService.create(homeBrandList);
    if (count > 0) {
        return CommonResult.success(count);
    }
    return CommonResult.failed();
}
 
Example #25
Source File: SmsHomeRecommendSubjectService.java    From macrozheng with Apache License 2.0 2 votes vote down vote up
/**
 * 添加首页推荐
 */
@Transactional
int create(List<SmsHomeRecommendSubject> recommendSubjectList);
 
Example #26
Source File: SmsHomeRecommendSubjectService.java    From macrozheng-mall with MIT License 2 votes vote down vote up
/**
 * 添加首页推荐
 */
@Transactional
int create(List<SmsHomeRecommendSubject> recommendSubjectList);
 
Example #27
Source File: SmsHomeRecommendSubjectService.java    From macrozheng-mall with MIT License 2 votes vote down vote up
/**
 * 分页查询推荐
 */
List<SmsHomeRecommendSubject> list(String subjectName, Integer recommendStatus, Integer pageSize, Integer pageNum);
 
Example #28
Source File: SmsHomeRecommendSubjectService.java    From mall with Apache License 2.0 2 votes vote down vote up
/**
 * 分页查询推荐
 */
List<SmsHomeRecommendSubject> list(String subjectName, Integer recommendStatus, Integer pageSize, Integer pageNum);
 
Example #29
Source File: SmsHomeRecommendSubjectService.java    From mall with Apache License 2.0 2 votes vote down vote up
/**
 * 添加首页推荐
 */
@Transactional
int create(List<SmsHomeRecommendSubject> recommendSubjectList);
 
Example #30
Source File: SmsHomeRecommendSubjectService.java    From mall-swarm with Apache License 2.0 2 votes vote down vote up
/**
 * 添加首页推荐
 */
@Transactional
int create(List<SmsHomeRecommendSubject> recommendSubjectList);