| @@ -112,10 +112,11 @@ public class CallbackSmController extends BaseController { | |||||
| @PostMapping(value = "/create/photo") | @PostMapping(value = "/create/photo") | ||||
| public ResultData createPhoto(@RequestBody Map<String, Object> paranMap) { | public ResultData createPhoto(@RequestBody Map<String, Object> paranMap) { | ||||
| logger.debug("[" + getIpAddr() + "] CallbackSmController::photoSpeak"); | logger.debug("[" + getIpAddr() + "] CallbackSmController::photoSpeak"); | ||||
| logger.info("照片生成视频结果通知{}"+JSONObject.toJSONString(paranMap)); | |||||
| Long task_id = (Long) paranMap.get("task_id");//任务ID | Long task_id = (Long) paranMap.get("task_id");//任务ID | ||||
| Integer code = (Integer) paranMap.get("code");//code | Integer code = (Integer) paranMap.get("code");//code | ||||
| String msg = (String) paranMap.get("msg"); | String msg = (String) paranMap.get("msg"); | ||||
| logger.info("照片生成视频结果通知{}task_id="+task_id+",code="+code); | |||||
| if (task_id == null){ | if (task_id == null){ | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"任务ID不能为空"); | return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"任务ID不能为空"); | ||||
| @@ -122,7 +122,7 @@ public class UserDigitalAvatarOrderServiceImpl implements UserDigitalAvatarOrder | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"照片为空"); | return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"照片为空"); | ||||
| } | } | ||||
| if(record.getUserImageList() == null || record.getUserImageList().isEmpty()){ | if(record.getUserImageList() == null || record.getUserImageList().isEmpty()){ | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"照片格式错误"); | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"照片数据格式错误"); | |||||
| } | } | ||||
| DigitalAvatarMould digitalAvatarMould = digitalAvatarMouldMapper.selectById(record.getDigitalAvatarId()); | DigitalAvatarMould digitalAvatarMould = digitalAvatarMouldMapper.selectById(record.getDigitalAvatarId()); | ||||
| if(digitalAvatarMould == null){ | if(digitalAvatarMould == null){ | ||||
| @@ -132,7 +132,7 @@ public class UserDigitalAvatarOrderServiceImpl implements UserDigitalAvatarOrder | |||||
| record.setDigitalAvatarType(digitalAvatarMould.getMouldType()); | record.setDigitalAvatarType(digitalAvatarMould.getMouldType()); | ||||
| record.setPrice(digitalAvatarMould.getSalePrice()); | record.setPrice(digitalAvatarMould.getSalePrice()); | ||||
| if(record.getUserImageList().size() != record.getDigitalAvatarType()){ | if(record.getUserImageList().size() != record.getDigitalAvatarType()){ | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"照片格式错误"); | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"照片数据格式错误"); | |||||
| } | } | ||||
| if(record.getPrice() > 0){ | if(record.getPrice() > 0){ | ||||
| @@ -72,7 +72,7 @@ public class AiDigitalAvatarHelper { | |||||
| // log.info("生成照片start request:" + param.getBg_img()); | // log.info("生成照片start request:" + param.getBg_img()); | ||||
| // String response = HttpUtil.doAiVideoPost("http://nas.pucao.cn:2005/make_face", JSONObject.toJSONString(param)); | // String response = HttpUtil.doAiVideoPost("http://nas.pucao.cn:2005/make_face", JSONObject.toJSONString(param)); | ||||
| String response = HttpUtil.doAiVideoPost(digital_avatar + "/make_face", JSONObject.toJSONString(param)); | String response = HttpUtil.doAiVideoPost(digital_avatar + "/make_face", JSONObject.toJSONString(param)); | ||||
| log.info("生成照片end response:"+response); | |||||
| log.info("生成照片end response:"); | |||||
| DigitalAvatarResult result = new DigitalAvatarResult(); | DigitalAvatarResult result = new DigitalAvatarResult(); | ||||