|
|
@@ -2,6 +2,7 @@ package com.iformall.controller.sm; |
|
|
|
|
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.iformall.annotation.ApiVersion; |
|
|
|
import com.iformall.common.ErrorCode; |
|
|
|
import com.iformall.common.R; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.constant.SwaggerConstant; |
|
|
@@ -10,12 +11,15 @@ import com.iformall.domain.dto.sm.SaveServiceInfoDTO; |
|
|
|
import com.iformall.domain.dto.sm.UpdateServiceInfoDTO; |
|
|
|
import com.iformall.domain.dto.sm.UpdateServiceInfoStatusDTO; |
|
|
|
import com.iformall.domain.po.sm.ServiceInfo; |
|
|
|
import com.iformall.exception.BizException; |
|
|
|
import com.iformall.service.sm.ServiceInfoService; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
@RestController |
|
|
|
@RequestMapping("/serviceInfo") |
|
|
|
@Api(tags = "合作商接口") |
|
|
@@ -31,6 +35,16 @@ public class ServiceInfoController extends BaseController { |
|
|
|
return R.ok(serviceInfoService.pageServiceInfo(serviceInfo, pageNum, pageSize)); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiVersion(group = SwaggerConstant.V_1_0_0) |
|
|
|
@ApiOperation("单个查询合作商") |
|
|
|
@GetMapping("/get") |
|
|
|
public R<ServiceInfo> getServiceInfo(Long id) { |
|
|
|
if (id == null) { |
|
|
|
throw new BizException(ErrorCode.SYS_PARAMETER_NOT_NULL); |
|
|
|
} |
|
|
|
return R.ok(serviceInfoService.getServiceInfo(id)); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiVersion(group = SwaggerConstant.V_1_0_0) |
|
|
|
@ApiOperation("新增合作商") |
|
|
|
@PostMapping("/save") |
|
|
|