18 changed files with 102 additions and 39 deletions
			
			
		| @ -0,0 +1,32 @@ | |||||||
|  | package com.hnac.hzims.bigmodel.interactive.service.impl; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSON; | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | import com.hnac.hzims.bigmodel.interactive.factory.AnswerResolveFactory; | ||||||
|  | import com.hnac.hzims.bigmodel.interactive.service.IAnswerResolveService; | ||||||
|  | import com.hnac.hzims.bigmodel.interactive.vo.AnswerVO; | ||||||
|  | import com.hnac.hzims.bigmodel.interactive.vo.ExtraVO; | ||||||
|  | import lombok.extern.slf4j.Slf4j; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * @Author: huangxing | ||||||
|  |  * @Date: 2024/08/30 11:33 | ||||||
|  |  */ | ||||||
|  | @Service(AnswerResolveFactory.CONTROL_DEVICE_SERVICE) | ||||||
|  | @Slf4j | ||||||
|  | public class ControlAnswerResolveServiceImpl implements IAnswerResolveService { | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     public AnswerVO resolve(AnswerVO answer) { | ||||||
|  |         Object[] extraArray = this.extraStream(answer).map(this::getExtra).toArray(); | ||||||
|  |         answer.setExtras(extraArray); | ||||||
|  |         return answer; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     public ExtraVO getExtra(JSONObject originExtra) { | ||||||
|  |         log.info("控制指令传参为:{}", JSON.toJSONString(originExtra)); | ||||||
|  |         return null; | ||||||
|  |     } | ||||||
|  | } | ||||||
					Loading…
					
					
				
		Reference in new issue