zhuyifan

feat(customer): 添加通过 hisCustomerNo 查询客户信息接口

...@@ -37,6 +37,13 @@ public class ClientCustomerController { ...@@ -37,6 +37,13 @@ public class ClientCustomerController {
37 return clientCustomerService.getClientCustomerByHISCustomerId(hisCustomerId); 37 return clientCustomerService.getClientCustomerByHISCustomerId(hisCustomerId);
38 } 38 }
39 39
40 + @ApiOperation(value = "根据hisCustomerNo获取ClientCustomer")
41 + @GetMapping("/his/customer/{hisCustomerNo}")
42 + @ResponseStatus(HttpStatus.OK)
43 + public ClientCustomerDto getClientCustomerByHISCustomerNo(@PathVariable String hisCustomerNo) {
44 + return clientCustomerService.getClientCustomerByHISCustomerNo(hisCustomerNo);
45 + }
46 +
40 @ApiOperation(value = "根据customerId获取ClientCustomer") 47 @ApiOperation(value = "根据customerId获取ClientCustomer")
41 @GetMapping("/customers/{customerId}") 48 @GetMapping("/customers/{customerId}")
42 @ResponseStatus(HttpStatus.OK) 49 @ResponseStatus(HttpStatus.OK)
......
...@@ -8,6 +8,7 @@ import com.infoloop.tianting.model.dto.ClientLabelDTO.BatchCreateCustomerLabelRe ...@@ -8,6 +8,7 @@ import com.infoloop.tianting.model.dto.ClientLabelDTO.BatchCreateCustomerLabelRe
8 import com.infoloop.tianting.model.dto.ClientLabelDTO.BatchDeleteCustomerLabelRefRequestDto; 8 import com.infoloop.tianting.model.dto.ClientLabelDTO.BatchDeleteCustomerLabelRefRequestDto;
9 import com.infoloop.tianting.model.dto.ClientLabelDTO.BatchDeleteCustomerLabelRefResponseDto; 9 import com.infoloop.tianting.model.dto.ClientLabelDTO.BatchDeleteCustomerLabelRefResponseDto;
10 import com.infoloop.tianting.model.dto.ClientLabelDTO.CustomerLabelRefDetailDto; 10 import com.infoloop.tianting.model.dto.ClientLabelDTO.CustomerLabelRefDetailDto;
11 +
11 import java.util.List; 12 import java.util.List;
12 13
13 public interface ClientCustomerService { 14 public interface ClientCustomerService {
...@@ -34,4 +35,5 @@ public interface ClientCustomerService { ...@@ -34,4 +35,5 @@ public interface ClientCustomerService {
34 35
35 TodayOrderDto getTodayOrderStatisticForHis(String token); 36 TodayOrderDto getTodayOrderStatisticForHis(String token);
36 37
38 + ClientCustomerDto getClientCustomerByHISCustomerNo(String hisCustomerNo);
37 } 39 }
......
...@@ -547,4 +547,32 @@ public class ClientCustomerServiceImpl implements ClientCustomerService { ...@@ -547,4 +547,32 @@ public class ClientCustomerServiceImpl implements ClientCustomerService {
547 .build(); 547 .build();
548 } 548 }
549 549
550 + @Override
551 + public ClientCustomerDto getClientCustomerByHISCustomerNo(String hisCustomerNo) {
552 + var response = clientCustomerServiceRpcClient.getClientCustomerByHISCustomerNo(hisCustomerNo).getResponse();
553 + return ClientCustomerDto.builder()
554 + .id(response.getId())
555 + .clientId(response.getClientId())
556 + .enterpriseId(response.getEnterpriseId())
557 + .age(response.getAge())
558 + .height(response.getHeight())
559 + .HISCustomerId(response.getHISCustomerId())
560 + .identityCardNo(response.getIdentityCardNo())
561 + .mobile(response.getMobile())
562 + .name(response.getName())
563 + .openId(response.getOpenId())
564 + .sex(response.getSex())
565 + .stallId(response.getStallId())
566 + .weight(response.getWeight())
567 + .isDeleted(response.getIsDeleted())
568 + .birthday(DateUtil.formatDate(response.getBirthday()))
569 + .createdAt(DateUtil.formatDate(response.getCreatedAt()))
570 + .createdBy(response.getCreatedBy())
571 + .creationSource(response.getCreationSource())
572 + .updatedAt(DateUtil.formatDate(response.getUpdatedAt()))
573 + .updateSource(response.getUpdateSource())
574 + .updatedBy(response.getUpdatedBy())
575 + .build();
576 + }
577 +
550 } 578 }
......