|
|
@@ -27,13 +27,17 @@ import com.sckw.manage.model.entity.KwmAddress;
|
|
|
import com.sckw.manage.model.vo.req.*;
|
|
|
import com.sckw.manage.model.vo.res.AddressDetailResVo;
|
|
|
import com.sckw.manage.model.vo.res.AddressQueryResVo;
|
|
|
+import com.sckw.stream.enums.MessageEnum;
|
|
|
+import com.sckw.stream.model.UserInfo;
|
|
|
import com.sckw.system.api.RemoteSystemService;
|
|
|
import com.sckw.system.api.model.dto.res.EntCacheResDto;
|
|
|
import com.sckw.system.api.model.dto.res.SysDictResDto;
|
|
|
import com.sckw.system.api.model.dto.res.UserCacheResDto;
|
|
|
+import jakarta.annotation.Resource;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.cloud.stream.function.StreamBridge;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
@@ -58,6 +62,9 @@ public class KwmAddressService {
|
|
|
@DubboReference(version = "1.0.0", group = "design", check = false)
|
|
|
private RemoteSystemService remoteSystemService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private StreamBridge streamBridge;
|
|
|
+
|
|
|
/**
|
|
|
* @param reqVo 分页入参
|
|
|
* @return HttpResult
|
|
|
@@ -414,7 +421,16 @@ public class KwmAddressService {
|
|
|
return addressDetailResVo;
|
|
|
}
|
|
|
|
|
|
- public Map<Long, List<EntAddressResDto>> test(Long id) {
|
|
|
- return remoteManageService.queryEntAddressByEntIdList(Collections.singletonList(id));
|
|
|
+ public void test() {
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ map.put("entName", "测试企业");
|
|
|
+ map.put("createByName", LoginUserHolder.getUserName());
|
|
|
+ commonBusinessService.sendSystemMessage(Collections.singletonList(new UserInfo().setUserId(LoginUserHolder.getUserId()).setEntId(LoginUserHolder.getEntId())),
|
|
|
+ MessageEnum.SUBMIT_COOPERATE,
|
|
|
+ map,
|
|
|
+ "testUrl");
|
|
|
+
|
|
|
+ String msg = "{\"createBy\":156382319433748480,\"messageEnum\":\"SUBMIT_COOPERATE\",\"msgUrl\":\"testUrl\",\"params\":{\"createByName\":\"楚镇豪-企业管理员\",\"entName\":\"徐长卿\"},\"requestId\":\"cefb6b5357ce48d9a11ffc94da83c879\",\"userInfos\":[{\"entId\":156382319450525696,\"userId\":156382319433748480}]}";
|
|
|
+ streamBridge.send("sckw-message", com.alibaba.fastjson2.JSON.toJSONString(msg));
|
|
|
}
|
|
|
}
|