Commit 7d3b72bd authored by zhh's avatar zhh
Browse files

优惠券接口修改

parent 483721db
This diff is collapsed.
This diff is collapsed.
......@@ -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 旧版创建
*/
......
......@@ -12,8 +12,12 @@
c.*,
cpr.id cpr_id,
cpr.product_id cpr_product_id,
cpr.product_name cpr_product_name,
cpr.product_sn cpr_product_sn,
cpcr.id cpcr_id,
cpcr.product_category_id cpcr_product_category_id
cpcr.product_category_id cpcr_product_category_id,
cpcr.product_category_name cpcr_product_category_name,
cpcr.parent_category_name cpcr_parent_category_name
FROM
sms_coupon c
LEFT JOIN sms_coupon_product_relation cpr ON c.id = cpr.coupon_id
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment