| | |
| | | import com.mzl.flower.base.R; |
| | | import com.mzl.flower.base.ReturnDataDTO; |
| | | import com.mzl.flower.dto.request.supplier.*; |
| | | import com.mzl.flower.dto.response.payment.DeliveryOrderItemListDTO; |
| | | import com.mzl.flower.dto.response.supplier.SupplierSubVO; |
| | | import com.mzl.flower.entity.supplier.SupplierSub; |
| | | import com.mzl.flower.service.supplier.SupplierSubService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("/api/supplierSub") |
| | |
| | | |
| | | @GetMapping("/page") |
| | | @ApiOperation(value = "运营端-供应商子账号分页查询", notes = "运营端-供应商子账号分页查询") |
| | | public ResponseEntity<ReturnDataDTO<Page<SupplierSubDTO>>> querySupplier(QuerySupplierSubDTO dto, Page page) { |
| | | public ResponseEntity<ReturnDataDTO<Page<SupplierSubVO>>> querySupplier(QuerySupplierSubDTO dto, Page page) { |
| | | return returnData(R.SUCCESS.getCode(), supplierSubService.querySupplier(dto, page)); |
| | | } |
| | | |
| | |
| | | supplierSubService.delete(id); |
| | | return returnData(R.SUCCESS.getCode(), null); |
| | | } |
| | | |
| | | @GetMapping("/sub/all") |
| | | @ApiOperation(value = "获取当前用户下子账号信息", notes = "获取当前用户下子账号信息") |
| | | public ResponseEntity<ReturnDataDTO<List<SupplierSub>>> getSubSupplier() { |
| | | return returnData(R.SUCCESS.getCode(), supplierSubService.getSubSupplier()); |
| | | } |
| | | |
| | | @GetMapping("/getById") |
| | | @ApiOperation(value = "通过ID查询子账号", notes = "通过ID查询子账号") |
| | | public ResponseEntity<ReturnDataDTO<SupplierSub>> getById(@NotNull(message = "id不能为空") Long id) { |
| | | SupplierSub supplierSub = supplierSubService.getById(id); |
| | | return returnData(R.SUCCESS.getCode(), supplierSub); |
| | | } |
| | | } |