| | |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | * @date : 2025/8/29 10:28 |
| | | */ |
| | | @RestController |
| | | @Api(tags = "客户拜访") |
| | | @Tag(name = "客户拜访") |
| | | @RequestMapping("/customerVisits") |
| | | @AllArgsConstructor |
| | | public class CustomerVisitsController extends BaseController { |
| | | |
| | | @Autowired |
| | | private CustomerVisitsServiceImpl customerVisitsService; |
| | | |
| | | @GetMapping("/listPage") |
| | | @Log(title = "客户拜访-分页查询", businessType = BusinessType.OTHER) |
| | | @ApiOperation("客户拜访-分页查询") |
| | | @Operation(summary = "客户拜访-分页查询") |
| | | public AjaxResult listPage(Page page, CustomerVisits customerVisits) { |
| | | IPage<CustomerVisits> listPage = customerVisitsService.listPage(page, customerVisits); |
| | | return AjaxResult.success(listPage); |
| | | } |
| | | |
| | | @Log(title = "客户拜访-添加", businessType = BusinessType.INSERT) |
| | | @ApiOperation("客户拜访-添加") |
| | | @Operation(summary = "客户拜访-添加") |
| | | @PostMapping("/add") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult add(@RequestBody CustomerVisits customerVisits) { |
| | |
| | | } |
| | | |
| | | @Log(title = "客户拜访-编辑", businessType = BusinessType.UPDATE) |
| | | @ApiOperation("客户拜访-编辑") |
| | | @Operation(summary = "客户拜访-编辑") |
| | | @PostMapping("update") |
| | | public AjaxResult updateCustomerVisit(@RequestBody CustomerVisits customerVisits) { |
| | | boolean updateResult = customerVisitsService.updateCustomerVisit(customerVisits); |
| | |
| | | } |
| | | |
| | | @Log(title = "客户拜访-删除", businessType = BusinessType.DELETE) |
| | | @ApiOperation("客户拜访-删除") |
| | | @Operation(summary = "客户拜访-删除") |
| | | @DeleteMapping("{customerId}") |
| | | public AjaxResult deleteCustomerVisit(@PathVariable Integer customerId) { |
| | | if (customerId == null) { |