com.macro.mall.model.OmsOrderReturnReason Java Examples

The following examples show how to use com.macro.mall.model.OmsOrderReturnReason. 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: OmsOrderReturnReasonServiceImpl.java    From macrozheng with Apache License 2.0 5 votes vote down vote up
@Override
public int updateStatus(List<Long> ids, Integer status) {
    if(!status.equals(0)&&!status.equals(1)){
        return 0;
    }
    OmsOrderReturnReason record = new OmsOrderReturnReason();
    record.setStatus(status);
    OmsOrderReturnReasonExample example = new OmsOrderReturnReasonExample();
    example.createCriteria().andIdIn(ids);
    return returnReasonMapper.updateByExampleSelective(record,example);
}
 
Example #2
Source File: OmsOrderReturnReasonServiceImpl.java    From mall with Apache License 2.0 5 votes vote down vote up
@Override
public List<OmsOrderReturnReason> list(Integer pageSize, Integer pageNum) {
    PageHelper.startPage(pageNum,pageSize);
    OmsOrderReturnReasonExample example = new OmsOrderReturnReasonExample();
    example.setOrderByClause("sort desc");
    return returnReasonMapper.selectByExample(example);
}
 
Example #3
Source File: OmsOrderReturnReasonServiceImpl.java    From mall with Apache License 2.0 5 votes vote down vote up
@Override
public int updateStatus(List<Long> ids, Integer status) {
    if(!status.equals(0)&&!status.equals(1)){
        return 0;
    }
    OmsOrderReturnReason record = new OmsOrderReturnReason();
    record.setStatus(status);
    OmsOrderReturnReasonExample example = new OmsOrderReturnReasonExample();
    example.createCriteria().andIdIn(ids);
    return returnReasonMapper.updateByExampleSelective(record,example);
}
 
Example #4
Source File: OmsOrderReturnReasonController.java    From mall with Apache License 2.0 5 votes vote down vote up
@ApiOperation("获取单个退货原因详情信息")
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ResponseBody
public CommonResult<OmsOrderReturnReason> getItem(@PathVariable Long id) {
    OmsOrderReturnReason reason = orderReturnReasonService.getItem(id);
    return CommonResult.success(reason);
}
 
Example #5
Source File: OmsOrderReturnReasonController.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<OmsOrderReturnReason>> list(@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                           @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
    List<OmsOrderReturnReason> reasonList = orderReturnReasonService.list(pageSize, pageNum);
    return CommonResult.success(CommonPage.restPage(reasonList));
}
 
Example #6
Source File: OmsOrderReturnReasonController.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 OmsOrderReturnReason returnReason) {
    int count = orderReturnReasonService.create(returnReason);
    if (count > 0) {
        return CommonResult.success(count);
    }
    return CommonResult.failed();
}
 
Example #7
Source File: OmsOrderReturnReasonController.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 OmsOrderReturnReason returnReason) {
    int count = orderReturnReasonService.create(returnReason);
    if (count > 0) {
        return CommonResult.success(count);
    }
    return CommonResult.failed();
}
 
Example #8
Source File: OmsOrderReturnReasonController.java    From mall with Apache License 2.0 5 votes vote down vote up
@ApiOperation("修改退货原因")
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
@ResponseBody
public CommonResult update(@PathVariable Long id, @RequestBody OmsOrderReturnReason returnReason) {
    int count = orderReturnReasonService.update(id, returnReason);
    if (count > 0) {
        return CommonResult.success(count);
    }
    return CommonResult.failed();
}
 
Example #9
Source File: OmsOrderReturnReasonController.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 OmsOrderReturnReason returnReason) {
    int count = orderReturnReasonService.create(returnReason);
    if(count>0){
        return new CommonResult().success(count);
    }
    return new CommonResult().failed();
}
 
Example #10
Source File: OmsOrderReturnReasonController.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<OmsOrderReturnReason>> list(@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                           @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
    List<OmsOrderReturnReason> reasonList = orderReturnReasonService.list(pageSize, pageNum);
    return CommonResult.success(CommonPage.restPage(reasonList));
}
 
Example #11
Source File: OmsOrderReturnReasonServiceImpl.java    From mall-swarm with Apache License 2.0 5 votes vote down vote up
@Override
public int updateStatus(List<Long> ids, Integer status) {
    if(!status.equals(0)&&!status.equals(1)){
        return 0;
    }
    OmsOrderReturnReason record = new OmsOrderReturnReason();
    record.setStatus(status);
    OmsOrderReturnReasonExample example = new OmsOrderReturnReasonExample();
    example.createCriteria().andIdIn(ids);
    return returnReasonMapper.updateByExampleSelective(record,example);
}
 
Example #12
Source File: OmsOrderReturnReasonController.java    From macrozheng-mall with MIT License 5 votes vote down vote up
@ApiOperation("修改退货原因")
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
@ResponseBody
public Object update(@PathVariable Long id, @RequestBody OmsOrderReturnReason returnReason) {
    int count = orderReturnReasonService.update(id,returnReason);
    if(count>0){
        return new CommonResult().success(count);
    }
    return new CommonResult().failed();
}
 
Example #13
Source File: OmsOrderReturnReasonController.java    From macrozheng with Apache License 2.0 5 votes vote down vote up
@ApiOperation("获取单个退货原因详情信息")
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ResponseBody
public CommonResult<OmsOrderReturnReason> getItem(@PathVariable Long id) {
    OmsOrderReturnReason reason = orderReturnReasonService.getItem(id);
    return CommonResult.success(reason);
}
 
Example #14
Source File: OmsOrderReturnReasonController.java    From mall-swarm with Apache License 2.0 5 votes vote down vote up
@ApiOperation("获取单个退货原因详情信息")
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ResponseBody
public CommonResult<OmsOrderReturnReason> getItem(@PathVariable Long id) {
    OmsOrderReturnReason reason = orderReturnReasonService.getItem(id);
    return CommonResult.success(reason);
}
 
Example #15
Source File: OmsOrderReturnReasonServiceImpl.java    From macrozheng-mall with MIT License 5 votes vote down vote up
@Override
public int updateStatus(List<Long> ids, Integer status) {
    if(!status.equals(0)&&!status.equals(1)){
        return 0;
    }
    OmsOrderReturnReason record = new OmsOrderReturnReason();
    record.setStatus(status);
    OmsOrderReturnReasonExample example = new OmsOrderReturnReasonExample();
    example.createCriteria().andIdIn(ids);
    return returnReasonMapper.updateByExampleSelective(record,example);
}
 
Example #16
Source File: OmsOrderReturnReasonServiceImpl.java    From macrozheng-mall with MIT License 5 votes vote down vote up
@Override
public List<OmsOrderReturnReason> list(Integer pageSize, Integer pageNum) {
    PageHelper.startPage(pageNum,pageSize);
    OmsOrderReturnReasonExample example = new OmsOrderReturnReasonExample();
    example.setOrderByClause("sort desc");
    return returnReasonMapper.selectByExample(example);
}
 
Example #17
Source File: OmsOrderReturnReasonServiceImpl.java    From macrozheng with Apache License 2.0 5 votes vote down vote up
@Override
public List<OmsOrderReturnReason> list(Integer pageSize, Integer pageNum) {
    PageHelper.startPage(pageNum,pageSize);
    OmsOrderReturnReasonExample example = new OmsOrderReturnReasonExample();
    example.setOrderByClause("sort desc");
    return returnReasonMapper.selectByExample(example);
}
 
Example #18
Source File: OmsOrderReturnReasonController.java    From macrozheng-mall with MIT License 5 votes vote down vote up
@ApiOperation("获取单个退货原因详情信息")
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ResponseBody
public Object getItem(@PathVariable Long id) {
    OmsOrderReturnReason reason = orderReturnReasonService.getItem(id);
    return new CommonResult().success(reason);
}
 
Example #19
Source File: OmsOrderReturnReasonController.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 = "pageSize", defaultValue = "5") Integer pageSize,
                   @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
    List<OmsOrderReturnReason> reasonList = orderReturnReasonService.list(pageSize,pageNum);
    return new CommonResult().pageSuccess(reasonList);
}
 
Example #20
Source File: OmsOrderReturnReasonController.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 OmsOrderReturnReason returnReason) {
    int count = orderReturnReasonService.create(returnReason);
    if (count > 0) {
        return CommonResult.success(count);
    }
    return CommonResult.failed();
}
 
Example #21
Source File: OmsOrderReturnReasonController.java    From mall-swarm with Apache License 2.0 5 votes vote down vote up
@ApiOperation("修改退货原因")
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
@ResponseBody
public CommonResult update(@PathVariable Long id, @RequestBody OmsOrderReturnReason returnReason) {
    int count = orderReturnReasonService.update(id, returnReason);
    if (count > 0) {
        return CommonResult.success(count);
    }
    return CommonResult.failed();
}
 
Example #22
Source File: OmsOrderReturnReasonController.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<OmsOrderReturnReason>> list(@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                           @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
    List<OmsOrderReturnReason> reasonList = orderReturnReasonService.list(pageSize, pageNum);
    return CommonResult.success(CommonPage.restPage(reasonList));
}
 
Example #23
Source File: OmsOrderReturnReasonServiceImpl.java    From macrozheng with Apache License 2.0 4 votes vote down vote up
@Override
public int update(Long id, OmsOrderReturnReason returnReason) {
    returnReason.setId(id);
    return returnReasonMapper.updateByPrimaryKey(returnReason);
}
 
Example #24
Source File: OmsOrderReturnReasonServiceImpl.java    From macrozheng with Apache License 2.0 4 votes vote down vote up
@Override
public int create(OmsOrderReturnReason returnReason) {
    returnReason.setCreateTime(new Date());
    return returnReasonMapper.insert(returnReason);
}
 
Example #25
Source File: OmsOrderReturnReasonServiceImpl.java    From macrozheng-mall with MIT License 4 votes vote down vote up
@Override
public OmsOrderReturnReason getItem(Long id) {
    return returnReasonMapper.selectByPrimaryKey(id);
}
 
Example #26
Source File: OmsOrderReturnReasonServiceImpl.java    From mall with Apache License 2.0 4 votes vote down vote up
@Override
public int create(OmsOrderReturnReason returnReason) {
    returnReason.setCreateTime(new Date());
    return returnReasonMapper.insert(returnReason);
}
 
Example #27
Source File: OmsOrderReturnReasonServiceImpl.java    From macrozheng-mall with MIT License 4 votes vote down vote up
@Override
public int create(OmsOrderReturnReason returnReason) {
    returnReason.setCreateTime(new Date());
    return returnReasonMapper.insert(returnReason);
}
 
Example #28
Source File: OmsOrderReturnReasonServiceImpl.java    From mall-swarm with Apache License 2.0 4 votes vote down vote up
@Override
public int update(Long id, OmsOrderReturnReason returnReason) {
    returnReason.setId(id);
    return returnReasonMapper.updateByPrimaryKey(returnReason);
}
 
Example #29
Source File: OmsOrderReturnReasonServiceImpl.java    From mall-swarm with Apache License 2.0 4 votes vote down vote up
@Override
public int create(OmsOrderReturnReason returnReason) {
    returnReason.setCreateTime(new Date());
    return returnReasonMapper.insert(returnReason);
}
 
Example #30
Source File: OmsOrderReturnReasonServiceImpl.java    From mall with Apache License 2.0 4 votes vote down vote up
@Override
public OmsOrderReturnReason getItem(Long id) {
    return returnReasonMapper.selectByPrimaryKey(id);
}