3 커밋 40ac7f99af ... d6fd5f66b1

작성자 SHA1 메시지 날짜
  liyuan d6fd5f66b1 Merge branch 'dev' into ecp 17 시간 전
  bai 34c579d1d9 Merge remote-tracking branch 'origin/dev' into dev 17 시간 전
  bai 13a5ef749b TODO 修改---重要修复 userID需要修改成CUSTOMER_ID传参 17 시간 전

+ 0 - 6
blade-service/blade-factory/src/main/java/org/springblade/factory/api/controller/SalesForecastSummaryController.java

@@ -405,12 +405,6 @@ public class SalesForecastSummaryController {
 		ViewCustomerSel zcrmViewCustomerSel = customerSelService.selectZcrmViewCustomerSelByCustomerId(forecast.getCustomerId());
 		forecast.setCustomerCode(zcrmViewCustomerSel.getCustomerCode());
 		forecast.setCustomerName(zcrmViewCustomerSel.getCustomerName());
-
-
-
-
-
-
 		return forecastService.saveOrUpdateForecast(forecast);
 	}
 

+ 11 - 12
blade-service/blade-factory/src/main/java/org/springblade/factory/api/controller/SalesOrderController.java

@@ -677,11 +677,6 @@ public class SalesOrderController {
 //		so.setSaleDepartment(); // 部门编码
 //		so.setStatus(); // 状态 1未提交, 2提交, 3审核成功
 
-
-
-
-
-
 //		List<ZcrmU9cWebapiSo> orderList = new ArrayList<ZcrmU9cWebapiSo>();
 //		R<String> res = soService.syncSalesOrders(orderList);
 //		return R.data(res.getData());
@@ -745,7 +740,7 @@ public class SalesOrderController {
 	// 用户关联品牌和商品业务接口
 	@GetMapping("/getUserLinkGoods")
 	@ApiOperation(value = "用户关联品牌和商品业务接口", notes = "获取当前用户关联的品牌和商品信息")
-	public R<Map<String, Object>> getUserLinkGoods() {
+	public R<?> getUserLinkGoods() {
 		// 获取当前登录用户ID
 		Long userId = AuthUtil.getUserId();
 		System.err.println();
@@ -753,15 +748,18 @@ public class SalesOrderController {
 			return R.fail("未获取到登录用户信息,请先登录");
 		}
 
-		// TODO 修改---重要修复   userID需要修改成CUSTOMER_ID传参
-
-
-
-
+		//修改---重要修复   userID需要修改成CUSTOMER_ID传参
+		R<User> user = userClient.userInfoById(userId);
+		Long customer_id = new Long("0");
+		if (user.getData() == null && user.getData().getCustomerId() == null) {
+			return R.fail("用户不存在");
+		} else {
+			customer_id = user.getData().getCustomerId();
+		}
 
 		// 构建查询条件
 		QueryWrapper<PcBladeUserLinkGoods> queryWrapper = new QueryWrapper<>();
-		queryWrapper.eq("CUSTOMER_ID", userId)
+		queryWrapper.eq("CUSTOMER_ID", customer_id)
 			.eq("is_deleted", 0);  // 先只过滤已删除状态
 
 		// 增加调试信息:显示当前用户ID和查询条件
@@ -791,6 +789,7 @@ public class SalesOrderController {
 		Set<Long> brandIds = new HashSet<>();
 
 		for (PcBladeUserLinkGoods linkGoods : userLinkGoodsList) {
+			System.err.println(linkGoods);
 			if (linkGoods.getStockDescId() != null) {
 				stockIds.add(linkGoods.getStockDescId());
 			}