Bläddra i källkod

增加客户地址信息接口--修复关联CustomerID

bai 1 månad sedan
förälder
incheckning
73ae057ca6

+ 11 - 1
blade-service/blade-factory/src/main/java/org/springblade/factory/controller/ZcrmViewCustomeraddressSelController.java

@@ -66,6 +66,16 @@ public class ZcrmViewCustomeraddressSelController {
 	@ApiOperation(value = "查询一条客户地址档案")
 	public R<ZcrmViewCustomerAddressSel> get(@PathVariable("id") Long id) {
 		ZcrmViewCustomerAddressSel customer = zcrmViewCustomeraddressSelService.selectZcrmViewCustomerAddressSelByCustomerId(id);
-		return R.data(customer);
+		Long userId = AuthUtil.getUserId();
+		R<User> userInfo = userClient.userInfoById(userId);
+		if (userInfo.getData() != null && userInfo.getData().getCustomerId() != null) {
+			if (customer.getCustomerId().equals(userInfo.getData().getCustomerId())) {
+				return R.data(customer);
+			} else {
+				return R.data(null);
+			}
+		} else {
+			return R.data(null);
+		}
 	}
 }