gongzuming
2024-10-11 34a5c00c80235213fca81689636c79fbad47a5fe
src/main/java/com/mzl/flower/web/customer/CustomerController.java
@@ -4,15 +4,11 @@
import com.mzl.flower.base.BaseController;
import com.mzl.flower.base.R;
import com.mzl.flower.base.ReturnDataDTO;
import com.mzl.flower.config.exception.ValidationException;
import com.mzl.flower.config.security.SecurityUtils;
import com.mzl.flower.dto.request.customer.BindPartnerDTO;
import com.mzl.flower.dto.request.customer.ChangePartnerDTO;
import com.mzl.flower.dto.request.customer.QueryCustomerDTO;
import com.mzl.flower.dto.request.customer.UpdateCustomerDTO;
import com.mzl.flower.dto.request.supplier.AuditSupplierDTO;
import com.mzl.flower.dto.request.supplier.QuerySupplierDTO;
import com.mzl.flower.dto.request.supplier.UpdateSupplierDTO;
import com.mzl.flower.dto.response.customer.CustomerDTO;
import com.mzl.flower.dto.response.supplier.SupplierDTO;
import com.mzl.flower.service.customer.CustomerService;
@@ -24,6 +20,7 @@
import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@RestController
@RequestMapping("/api/customer")
@@ -82,7 +79,14 @@
    @GetMapping("/partner/name")
    @ApiOperation(value = "商户(花店)详情", notes = "商户(花店)详情")
    public ResponseEntity<ReturnDataDTO<SupplierDTO>> getPartnerName(@NotBlank(message = "参数不能为空") String partnerUserId) {
        return returnData(R.SUCCESS.getCode(),customerService.getPartnerName(partnerUserId));
    public ResponseEntity<ReturnDataDTO<SupplierDTO>> getPartnerName(@NotBlank(message = "参数不能为空") String id) {
        return returnData(R.SUCCESS.getCode(),customerService.getPartnerName(id));
    }
    @GetMapping("/page/isEnable")
    @ApiOperation(value = "启用/禁用", notes = "启用/禁用商品")
    public ResponseEntity<ReturnDataDTO<String>> isEnable(@NotNull(message = "id不能为空") Long id) {
        customerService.isEnable(id);
        return returnData(R.SUCCESS.getCode(),null);
    }
}