| | |
| | | import com.ruoyi.sales.mapper.PaymentShippingMapper; |
| | | import com.ruoyi.sales.pojo.PaymentShipping; |
| | | import com.ruoyi.sales.service.PaymentShippingService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/paymentShipping") |
| | | @Api(tags = "支付与发货管理") |
| | | @Tag(name = "支付与发货管理") |
| | | @AllArgsConstructor |
| | | public class PaymentShippingController extends BaseController { |
| | | |
| | | @Autowired |
| | | private PaymentShippingService paymentShippingService; |
| | | |
| | | @Autowired |
| | | private PaymentShippingMapper paymentShippingMapper; |
| | | |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("分页查询支付与发货信息") |
| | | @Operation(summary = "分页查询支付与发货信息") |
| | | public AjaxResult listPage(Page page, PaymentShipping paymentShipping) { |
| | | IPage<PaymentShipping> listPage = paymentShippingService.listPage(page, paymentShipping); |
| | | return AjaxResult.success(listPage); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @ApiOperation("添加支付与发货信息") |
| | | @Operation(summary = "添加支付与发货信息") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult add(@RequestBody PaymentShipping paymentShipping) { |
| | | String ord = OrderUtils.countTodayByCreateTime(paymentShippingMapper, "ORD","order_no"); |
| | |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | @ApiOperation("修改支付与发货信息") |
| | | @Operation(summary = "修改支付与发货信息") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult update(@RequestBody PaymentShipping paymentShipping) { |
| | | boolean update = paymentShippingService.updateById(paymentShipping); |
| | |
| | | } |
| | | |
| | | @DeleteMapping("/delete") |
| | | @ApiOperation("删除支付与发货信息") |
| | | @Operation(summary = "删除支付与发货信息") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult delete(@RequestBody List<Long> ids){ |
| | | if (CollectionUtils.isEmpty(ids)){ |