优惠券接口修改
This commit is contained in:
@@ -73,6 +73,14 @@ public class PmsProductController {
|
||||
return new CommonResult().pageSuccess(productList);
|
||||
}
|
||||
|
||||
@ApiOperation("根据商品名称或货号模糊查询")
|
||||
@RequestMapping(value = "/simpleList", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object getList(String keyword) {
|
||||
List<PmsProduct> productList = productService.list(keyword);
|
||||
return new CommonResult().success(productList);
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改审核状态")
|
||||
@RequestMapping(value = "/update/verifyStatus",method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
|
||||
@@ -46,11 +46,28 @@ public interface PmsProductService {
|
||||
@Transactional
|
||||
int updateVerifyStatus(List<Long> ids, Integer verifyStatus, String detail);
|
||||
|
||||
/**
|
||||
* 批量修改商品上架状态
|
||||
*/
|
||||
int updatePublishStatus(List<Long> ids, Integer publishStatus);
|
||||
|
||||
/**
|
||||
* 批量修改商品推荐状态
|
||||
*/
|
||||
int updateRecommendStatus(List<Long> ids, Integer recommendStatus);
|
||||
|
||||
/**
|
||||
* 批量修改新品状态
|
||||
*/
|
||||
int updateNewStatus(List<Long> ids, Integer newStatus);
|
||||
|
||||
/**
|
||||
* 批量删除商品
|
||||
*/
|
||||
int updateDeleteStatus(List<Long> ids, Integer deleteStatus);
|
||||
|
||||
/**
|
||||
* 根据商品名称或者货号模糊查询
|
||||
*/
|
||||
List<PmsProduct> list(String keyword);
|
||||
}
|
||||
|
||||
@@ -248,6 +248,18 @@ public class PmsProductServiceImpl implements PmsProductService {
|
||||
return productMapper.updateByExampleSelective(record, example);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PmsProduct> list(String keyword) {
|
||||
PmsProductExample productExample = new PmsProductExample();
|
||||
PmsProductExample.Criteria criteria = productExample.createCriteria();
|
||||
criteria.andDeleteStatusEqualTo(0);
|
||||
if(!StringUtils.isEmpty(keyword)){
|
||||
criteria.andNameLike("%" + keyword + "%");
|
||||
productExample.or().andDeleteStatusEqualTo(0).andProductSnLike("%" + keyword + "%");
|
||||
}
|
||||
return productMapper.selectByExample(productExample);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated 旧版创建
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user