| @@ -31,6 +31,7 @@ public class BaiduController extends BaseController { | |||||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | private final Logger logger = LoggerFactory.getLogger(this.getClass()); | ||||
| @AuthIgnore | |||||
| @ApiOperation("百度图片审核接口") | @ApiOperation("百度图片审核接口") | ||||
| @PostMapping(value = "checkPhoto", consumes = "multipart/*", headers = "content-type=multipart/form-data") | @PostMapping(value = "checkPhoto", consumes = "multipart/*", headers = "content-type=multipart/form-data") | ||||
| @ApiImplicitParam(name = "file", value = "file", dataType = "MultipartFile", paramType = "query", required = true) | @ApiImplicitParam(name = "file", value = "file", dataType = "MultipartFile", paramType = "query", required = true) | ||||
| @@ -211,7 +211,6 @@ public class MiniAppUserController extends BaseController { | |||||
| } | } | ||||
| Map resultMap = new HashMap(); | Map resultMap = new HashMap(); | ||||
| try { | try { | ||||
| @@ -221,7 +220,7 @@ public class MiniAppUserController extends BaseController { | |||||
| } | } | ||||
| // logger.info("ceshi "+user.getAppPlat()+"======"+user.getClass()); | // logger.info("ceshi "+user.getAppPlat()+"======"+user.getClass()); | ||||
| // 解密 并注册 | // 解密 并注册 | ||||
| WxCUserBasicInfo basicInfo = cuserFactory.getCUserService(user.getAppPlat()).decryptPhoneNoInfo(encryptedData, iv, user, wxAppinfo, false,from); | |||||
| WxCUserBasicInfo basicInfo = cuserFactory.getCUserService(appPlat).decryptPhoneNoInfo(encryptedData, iv, user, wxAppinfo, false,from); | |||||
| wxCUserBasicInfoService.handleLoginUser(basicInfo); | wxCUserBasicInfoService.handleLoginUser(basicInfo); | ||||
| resultMap.put("token", basicInfo.getToken()); | resultMap.put("token", basicInfo.getToken()); | ||||
| @@ -14,6 +14,7 @@ import com.iformall.service.ProductService; | |||||
| import com.iformall.service.UserBasicImageService; | import com.iformall.service.UserBasicImageService; | ||||
| import com.iformall.sm.AiCheckPhotoParam; | import com.iformall.sm.AiCheckPhotoParam; | ||||
| import com.iformall.sm.AiCheckPhotoResult; | import com.iformall.sm.AiCheckPhotoResult; | ||||
| import com.iformall.sm.AiDigitalAvatarHelper; | |||||
| import com.iformall.sm.AiVideoHelper; | import com.iformall.sm.AiVideoHelper; | ||||
| import com.iformall.utils.Base64Util; | import com.iformall.utils.Base64Util; | ||||
| import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
| @@ -58,11 +59,12 @@ public class UserBasicImageController extends BaseController { | |||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @AuthIgnore | |||||
| @ApiOperation("图片人脸检测") | @ApiOperation("图片人脸检测") | ||||
| @PostMapping(value = "checkPhoto", consumes = "multipart/*", headers = "content-type=multipart/form-data") | @PostMapping(value = "checkPhoto", consumes = "multipart/*", headers = "content-type=multipart/form-data") | ||||
| @ApiImplicitParam(name = "file", value = "file", dataType = "MultipartFile", paramType = "query", required = true) | @ApiImplicitParam(name = "file", value = "file", dataType = "MultipartFile", paramType = "query", required = true) | ||||
| public ResultData checkPhoto(@RequestPart("file") MultipartFile file) { | public ResultData checkPhoto(@RequestPart("file") MultipartFile file) { | ||||
| logger.debug("[" + getIpAddr() + "] PersonPhotoController::checkPhoto"); | |||||
| logger.debug("[" + getIpAddr() + "] UserBasicImageController::checkPhoto"); | |||||
| if (ObjectUtils.isEmpty(file) || file.getSize() <= 0) { | if (ObjectUtils.isEmpty(file) || file.getSize() <= 0) { | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "素材为空"); | return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "素材为空"); | ||||
| } | } | ||||
| @@ -71,7 +73,7 @@ public class UserBasicImageController extends BaseController { | |||||
| String imgStr = Base64Util.encode(fileBytes); | String imgStr = Base64Util.encode(fileBytes); | ||||
| AiCheckPhotoParam param = new AiCheckPhotoParam(); | AiCheckPhotoParam param = new AiCheckPhotoParam(); | ||||
| param.setImg(imgStr); | param.setImg(imgStr); | ||||
| AiCheckPhotoResult result = AiVideoHelper.checkPhoto(param); | |||||
| AiCheckPhotoResult result = AiDigitalAvatarHelper.checkPhoto(param); | |||||
| if (result.isSuccess()) { | if (result.isSuccess()) { | ||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @@ -139,7 +139,7 @@ public class UserDigitalAvatarPhotoController extends BaseController { | |||||
| return userDigitalAvatarPhotoService.createPhotoSupper(userDigitalAvatarPhoto); | return userDigitalAvatarPhotoService.createPhotoSupper(userDigitalAvatarPhoto); | ||||
| } | } | ||||
| @ApiOperation("获取视频是否生成成功") | |||||
| @ApiOperation("获取照片是否超分成功") | |||||
| @GetMapping("/getPhoto") | @GetMapping("/getPhoto") | ||||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | ||||
| public ResultData getPhoto(Long id) { | public ResultData getPhoto(Long id) { | ||||
| @@ -81,6 +81,7 @@ public class UserDigitalAvatarOrder extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | ||||
| private Date updateDate; | private Date updateDate; | ||||
| @TableField(exist = false) | |||||
| private List<UserDigitalAvatarPhoto> photoList; | private List<UserDigitalAvatarPhoto> photoList; | ||||
| } | } | ||||
| @@ -128,8 +128,8 @@ public class MaUtil { | |||||
| config.setAppId(appinfo.getAppId()); | config.setAppId(appinfo.getAppId()); | ||||
| config.setMchId(payAccount.getSubMchId()); | config.setMchId(payAccount.getSubMchId()); | ||||
| config.setMchKey(payAccount.getMerchantApiKey()); | config.setMchKey(payAccount.getMerchantApiKey()); | ||||
| config.setSubAppId(appinfo.getAppId()); | |||||
| config.setSubMchId(payAccount.getSubMchId()); | |||||
| // config.setSubAppId(appinfo.getAppId()); | |||||
| // config.setSubMchId(payAccount.getSubMchId()); | |||||
| config.setKeyPath(payAccount.getMerchantCertPath()); | config.setKeyPath(payAccount.getMerchantCertPath()); | ||||
| config.setPrivateKeyPath(payAccount.getMerchantKeyPath()); | config.setPrivateKeyPath(payAccount.getMerchantKeyPath()); | ||||
| config.setPrivateCertPath(payAccount.getMerchantCertPemPath()); | config.setPrivateCertPath(payAccount.getMerchantCertPemPath()); | ||||