6 changed files with 72 additions and 7 deletions
			
			
		@ -0,0 +1,34 @@ | 
				
			|||
package com.epmet.processor; | 
				
			|||
 | 
				
			|||
import com.epmet.commons.rocketmq.messages.IcResiUserAddMQMsg; | 
				
			|||
import com.epmet.constant.SystemMessageType; | 
				
			|||
import com.epmet.dto.form.SystemMsgFormDTO; | 
				
			|||
import com.epmet.feign.EpmetMessageOpenFeignClient; | 
				
			|||
import lombok.extern.slf4j.Slf4j; | 
				
			|||
import org.springframework.beans.factory.annotation.Autowired; | 
				
			|||
import org.springframework.stereotype.Component; | 
				
			|||
 | 
				
			|||
import java.util.Map; | 
				
			|||
 | 
				
			|||
@Slf4j | 
				
			|||
@Component | 
				
			|||
public class ResiImportDyzxhPostProcessor extends ResiImportPostProcessor{ | 
				
			|||
    @Autowired | 
				
			|||
    private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; | 
				
			|||
 | 
				
			|||
 | 
				
			|||
    @Override | 
				
			|||
    public void consume(Map<String, String> resiInfoMap) { | 
				
			|||
        System.out.println(resiInfoMap); | 
				
			|||
        String customerId=resiInfoMap.get("CUSTOMER_ID"); | 
				
			|||
        String userId=resiInfoMap.get("ID"); | 
				
			|||
        //推送MQ事件
 | 
				
			|||
        IcResiUserAddMQMsg mqMsg = new IcResiUserAddMQMsg(); | 
				
			|||
        mqMsg.setCustomerId(customerId); | 
				
			|||
        mqMsg.setIcResiUser(userId); | 
				
			|||
        SystemMsgFormDTO form = new SystemMsgFormDTO(); | 
				
			|||
        form.setMessageType(SystemMessageType.IC_RESI_USER_ADD); | 
				
			|||
        form.setContent(mqMsg); | 
				
			|||
        epmetMessageOpenFeignClient.sendSystemMsgByMQ(form); | 
				
			|||
    } | 
				
			|||
} | 
				
			|||
@ -0,0 +1,21 @@ | 
				
			|||
package com.epmet.processor; | 
				
			|||
 | 
				
			|||
import java.util.Map; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * @Description 居民信息导入之后的处理方法 | 
				
			|||
 * @Author wangxianzhang | 
				
			|||
 * @Time 2023/5/17 1:33 PM | 
				
			|||
 */ | 
				
			|||
public abstract class ResiImportPostProcessor { | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * @Description: 居民信息导入之后的消费方法 | 
				
			|||
     * @param resiInfoMap: 居民信息map | 
				
			|||
     * @Return void | 
				
			|||
     * @Author: wangxianzhang | 
				
			|||
     * @Date: 2023/5/17 1:33 PM | 
				
			|||
     */ | 
				
			|||
    public abstract void consume(Map<String, String> resiInfoMap); | 
				
			|||
 | 
				
			|||
} | 
				
			|||
					Loading…
					
					
				
		Reference in new issue