Commit 4a7abea5 authored by 周健威's avatar 周健威

添加免token接口

parent 07144e28
......@@ -89,6 +89,59 @@ public class AdminDataTempcacheController extends BaseController<DataTempcacheBi
return ObjectRestResponse.succ(resultUrl);
}
@RequestMapping(value = "/app/unauth/dealGtdataPath", method = RequestMethod.GET)
@IgnoreUserToken
public ObjectRestResponse dealGtdataPath(DataTempcache dataTempcache) throws Exception {
//查询dataTempcache 的上传方式
DataTempcache dataTempcacheDB = baseBiz.selectById(dataTempcache.getId());
String resultPath = "";
//判断是否存在处理GTDATA
if(null == dataTempcacheDB.getGtdataPath() || DataTempcache.HASGTDATA_FIN != dataTempcacheDB.getHasGtdata()) {
if(StrUtil.isBlank(dataTempcacheDB.getGtdataPath())) {
//生成gtdataPath
//根据id创建gtdata目录
String gtdataPath = "/rscloudmart"+ tempcachePath + "/" + dataTempcacheDB.getId();
gtDataRestClient.mkdirs(gtdataPath);
// gainData.setGtdataPath(gtdataPath);
String finalGtdataPath = gtdataPath;
// updateSelectiveById(new GainData() {{
// setId(gainData.getId());
// setGtdataPath(finalGtdataPath);
// setHasGtdata(HASGTDATA_FIN);
// }});
// Map<String, Object> result = gtDataRestClient.open(dataTempcacheDB.getGtdataPath());
// byte[] content = (byte[]) result.get("file");
// getResponse().setContentLength(content.length);
//
// String realPath = tempcachePath+"/"+dataTempcache.getId();
// String serverPath = baseUploadPath + realPath;
// //创建目录
// if(!FileUtil.exist(serverPath)) {
// FileUtil.mkdir(serverPath);
// }
//
// FileUtil.writeBytes(content, serverPath + "/" + dataTempcache.getFilename());
// baseBiz.updateSelectiveById(new DataTempcache(){{
// setId(dataTempcacheDB.getId());
// setFilepath(serverPath + "/" + dataTempcache.getFilename());
// setFileurl(xx_url+ SystemConfig.XXMP_URL + realPath + "/" + dataTempcache.getFilename());
// }});
// dataTempcacheDB.setFilepath(serverPath + "/" + dataTempcache.getFilename());
// dataTempcacheDB.setFileurl(xx_url+ SystemConfig.XXMP_URL + realPath + "/" + dataTempcache.getFilename());
}
// else if (DataTempcache.UPTYPE_URL == dataTempcacheDB.getUptype()) {
//
// }
}
resultPath = dataTempcacheDB.getGtdataPath();
return ObjectRestResponse.succ(resultPath);
}
@RequestMapping(value = "/getPageList",method = RequestMethod.GET)
public ObjectRestResponse<List<GainData>> getPageList(DataTempcacheDTO dto) {
PageDataVO pageDataVO = PageDataVO.pageInfo(dto.getPage(), dto.getLimit(), ()->baseBiz.pageList(dto));
......
......@@ -7,8 +7,10 @@ import cn.hutool.http.HttpUtil;
import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController;
import com.github.wxiaoqi.security.common.util.Query;
import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.github.wxiaoqi.security.common.util.process.SystemConfig;
import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.upyuns.platform.rs.gtdata.GtDataRestClient;
import com.upyuns.platform.rs.gtdata.GtFileInfo;
import com.upyuns.platform.rs.website.biz.DataTempcacheBiz;
......@@ -16,12 +18,10 @@ import com.upyuns.platform.rs.website.entity.DataTempcache;
import com.upyuns.platform.rs.website.entity.FileData;
import com.upyuns.platform.rs.website.entity.GainData;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal;
import java.util.List;
......@@ -45,6 +45,19 @@ public class DataTempcacheController extends BaseController<DataTempcacheBiz,Dat
@Value("${universal.url}")
private String xx_url ;
//BaseController.baseLogicPages
//BaseController.del
@ApiOperation("查询分页-ObjectRestResponse")
@RequestMapping(value = "/app/unauth/logicPages",method = RequestMethod.GET)
@IgnoreUserToken
@ResponseBody
public ObjectRestResponse<PageDataVO<DataTempcache>> unauthBaseLogicPages(@RequestParam Map<String, Object> params){
//查询列表数据
Query query = new Query(params);
return ObjectRestResponse.succ(baseBiz.selectByQueryLogicPage(query));
}
@ApiModelProperty("添加修改文件")
@RequestMapping(value = "/app/unauth/saveDataTempcache",method = RequestMethod.POST)
@IgnoreUserToken
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment