|
|
|
@@ -17,6 +17,7 @@ import com.iformall.domain.po.WxMerchant; |
|
|
|
import com.iformall.domain.po.WxPropertyContract; |
|
|
|
import com.iformall.domain.po.WxRentContract; |
|
|
|
import com.iformall.domain.po.WxShop; |
|
|
|
import com.iformall.domain.po.base.TenantEntity; |
|
|
|
import com.iformall.domain.po.base.BaseEntity.SortField; |
|
|
|
import com.iformall.enums.EnumContractOperationType; |
|
|
|
import com.iformall.enums.EnumContractType; |
|
|
|
@@ -40,12 +41,14 @@ import com.iformall.video.entity.VideUploadResult; |
|
|
|
|
|
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.multipart.MultipartFile; |
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
@@ -70,12 +73,33 @@ public class VideoController extends BaseController { |
|
|
|
@Autowired |
|
|
|
String videoType; |
|
|
|
|
|
|
|
@GetMapping("/upload") |
|
|
|
@GetMapping("/test") |
|
|
|
@ApiImplicitParams({ |
|
|
|
@ApiImplicitParam(name = "title", value = "页数", dataType = "String", paramType = "query", required = true)}) |
|
|
|
public ResultData list(@ModelAttribute WxPropertyContract wxPropertyContract, String title) { |
|
|
|
VideUploadResult result = videoFactory.getExcutor(videoType).uploadLocalVideo("123123213", "/root/111.mp4"); |
|
|
|
return new ResultData(result); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 上传视频 |
|
|
|
* |
|
|
|
* @param multiReq |
|
|
|
* @return |
|
|
|
* @throws Exception |
|
|
|
*/ |
|
|
|
@PostMapping(value = "/upload", consumes = "multipart/*", headers = "content-type=multipart/form-data") |
|
|
|
@ApiOperation("上传视频") |
|
|
|
@SystemControllerLog(description = "文件上传") |
|
|
|
public ResultData awsfileUpload(@RequestParam("file") MultipartFile multiReq,@RequestParam Map<String, String> param) { |
|
|
|
try { |
|
|
|
String title = param.get("title"); |
|
|
|
VideUploadResult result = videoFactory.getExcutor(videoType).uploadLocalVideo(title, multiReq.getInputStream()); |
|
|
|
return new ResultData(result); |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error(e.getMessage()); |
|
|
|
return new ResultData(ErrorCode.PICTURE_ANALYZING_ERROR); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |