Commit cdd76c17 by XiaHou

权星登录注册

parent 559c5e83
......@@ -89,11 +89,12 @@ public class PmsProductAttributeCategoryController {
return CommonResult.success(productAttributeCategoryResultList);
}
@ApiOperation("获取所有商品分类 (默认不传分页参数则不分页查询,不传父级id 则查所有分类)")
@ApiOperation("权星获取所有商品分类 (默认不传分页参数则不分页查询)")
@RequestMapping(value = "/getAttributeCategoryList", method = RequestMethod.GET)
@ResponseBody
public CommonResult getAttributeCategoryList(Integer pageSize, Integer pageNum, Long parentId){
return CommonResult.success(this.productAttributeCategoryService.getAttributeCategoryList(pageSize,pageNum,parentId));
public CommonResult getAttributeCategoryList(@ApiParam("页数") @RequestParam("page")Integer page, @ApiParam("大小") @RequestParam("size")Integer size,
@ApiParam("非必传 不传父级id 则查所有分类") @RequestParam("parentId")Long parentId){
return CommonResult.success(this.productAttributeCategoryService.getAttributeCategoryList(page,size,parentId));
}
......
......@@ -13,13 +13,13 @@ import org.springframework.web.bind.annotation.*;
@Controller
@RequestMapping("/pmsSupplierAudit")
@Api(tags = "申请供应商", description = "申请供应商控制器")
@Api(tags = "权星申请供应商", description = "申请供应商控制器")
public class PmsSupplierAuditController {
@Autowired
private IPmsSupplierAuditService pmsSupplierAuditService;
@ApiOperation("申请供应商")
@ApiOperation("权星申请供应商")
@ResponseBody
@RequestMapping(value = "/auditSupplier", method = RequestMethod.POST)
public CommonResult auditSupplier(@ApiParam("审核id") @RequestParam("id") Long id ,
......@@ -31,7 +31,7 @@ public class PmsSupplierAuditController {
return CommonResult.failed(res.getMsg());
}
@ApiOperation("申请供应商分页数据")
@ApiOperation("权星申请供应商分页数据")
@ResponseBody
@RequestMapping(value = "/getPageList", method = RequestMethod.POST)
public CommonResult getPageList(@ApiParam("页数") @RequestParam("page")Integer page,@ApiParam("每页大小")@RequestParam("size")Integer size,
......
......@@ -78,10 +78,10 @@ public class PmsProductAttributeCategoryServiceImpl implements PmsProductAttribu
* 查询所有分类 如果传入参数则根据对应参数查询
* @return
*/
public List<PmsProductAttributeCategory> getAttributeCategoryList(Integer pageSize, Integer pageNum, Long parentId){
public List<PmsProductAttributeCategory> getAttributeCategoryList(Integer page, Integer size, Long parentId){
PmsProductAttributeCategoryExample example = new PmsProductAttributeCategoryExample();
if( (pageSize !=null && pageNum!=null )||(pageSize ==0 && pageNum!=null ) ){//如果传入分页参数 则调用pageHelper
PageHelper.startPage(pageNum,pageSize);
if( (page !=null && size!=null )||(page ==0 && size!=null ) ){//如果传入分页参数 则调用pageHelper
PageHelper.startPage(page,size);
}
if(parentId != null){
example.createCriteria().andParentIdEqualTo(parentId);
......
......@@ -128,6 +128,9 @@ public class PmsProductServiceImpl implements PmsProductService {
if(!res.isFlag()){
return new ResultMsg(false,res.getMsg());
}
pmsProductRequestParam.getPmsProduct().setCreateDate(new Date());
pmsProductRequestParam.getPmsProduct().setUpdateDate(new Date());
this.pmsProductMapper.insertSelective(pmsProductRequestParam.getPmsProduct());
//商品规格值不为空 则执行插入操作
if(pmsProductRequestParam.getPmsProductSkuValueList() != null && pmsProductRequestParam.getPmsProductSkuValueList().size() > 0){
pmsProductRequestParam.getPmsProductSkuValueList().forEach(pmsProductSkuValue->{
......
Markdown is supported
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