zouyu
14 小时以前 75b7a414ef821a07426790cb79c37811ae2f07ac
src/main/java/com/ruoyi/purchase/controller/TicketRegistrationController.java
@@ -23,9 +23,11 @@
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.parameters.P;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@@ -87,7 +89,8 @@
    @ApiOperation("删除付款流水")
    @DeleteMapping("/delPaymentRegistration")
    public AjaxResult delPaymentRegistration(@RequestBody Long id) {
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult delPaymentRegistration(@RequestBody List<Long> id) {
        return toAjax(paymentRegistrationService.delPaymentRegistration(id));
    }
@@ -127,17 +130,20 @@
     */
    @Log(title = "来票登记", businessType = BusinessType.INSERT)
    @PostMapping("/addOrUpdateRegistration")
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult addOrUpdateRegistration(@RequestBody TicketRegistrationDto ticketRegistrationDto) throws IOException {
        return toAjax(ticketRegistrationService.addOrUpdateRegistration(ticketRegistrationDto));
        if(ObjectUtils.isEmpty(ticketRegistrationDto)) return AjaxResult.error("请选择要保存的记录");
        ticketRegistrationService.addOrUpdateRegistration(ticketRegistrationDto);
        return toAjax(1);
    }
    @GetMapping("/getProductRecordById")
    public AjaxResult getProductRecordById(Long id) {
        if (id == null) {
    @PostMapping("/getProductRecordById")
    public AjaxResult getProductRecordById(@RequestBody ProductRecordDto productRecordDto) {
        if (productRecordDto.getId() == null) {
            return AjaxResult.error("参数错误");
        }
        return AjaxResult.success(productRecordService.getProductRecordById(id));
        return AjaxResult.success(productRecordService.getProductRecordById(productRecordDto));
    }
    @ApiModelProperty("修改来票登记")