| @@ -119,7 +119,7 @@ public class DataTowerController extends BaseController { | |||||
| @ApiOperation("调取图片") | @ApiOperation("调取图片") | ||||
| @GetMapping("/getWiWidePic") | @GetMapping("/getWiWidePic") | ||||
| @SystemControllerLog(description = "数据塔台-获取图片") | @SystemControllerLog(description = "数据塔台-获取图片") | ||||
| public String getWiWidePic(String type,String id) { | |||||
| public byte[] getWiWidePic(String type,String id) { | |||||
| logger.debug("[" + getIpAddr() + "] DataTowerController::getWiWidePic"); | logger.debug("[" + getIpAddr() + "] DataTowerController::getWiWidePic"); | ||||
| if(StringUtils.isBlank(type) || StringUtils.isBlank(id)){ | if(StringUtils.isBlank(type) || StringUtils.isBlank(id)){ | ||||
| return null; | return null; | ||||
| @@ -6,6 +6,13 @@ ADD COLUMN `other_rent_price_info` json COMMENT '其他租金单价' AFTER `rent | |||||
| --单店铺 | --单店铺 | ||||
| update wx_rent_contract set cashtype_lsit = '[{"label": "一般押金", "value": "0", "disabled": true}, {"label": "合同保证金", "value": "1", "disabled": false}, {"label": "质量保证金", "value": "2", "disabled": false}]', cashtype_content_lsit = concat('[{"value": "',ROUND(deposit/100,2),'", "deposit": "1"}]') | |||||
| where (LENGTH(shop_name) - LENGTH( REPLACE (shop_name, ',',''))) <= 1 | |||||
| --多店铺合铺 | --多店铺合铺 | ||||
| --多店铺分铺 | --多店铺分铺 | ||||
| @@ -23,5 +23,5 @@ public interface DataTowerService { | |||||
| ResultData queryWiWideDataUrl(TenantEntity tenantInfo, String url, Map<String, Object> params); | ResultData queryWiWideDataUrl(TenantEntity tenantInfo, String url, Map<String, Object> params); | ||||
| String getWiWidePic(TenantEntity tenantInfo, String type, String id); | |||||
| byte[] getWiWidePic(TenantEntity tenantInfo, String type, String id); | |||||
| } | } | ||||
| @@ -960,7 +960,7 @@ public class DataTowerServiceImpl implements DataTowerService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public String getWiWidePic(TenantEntity tenantEntity, String type, String id) { | |||||
| public byte[] getWiWidePic(TenantEntity tenantEntity, String type, String id) { | |||||
| WxWiWideInfo wiWideInfo = new WxWiWideInfo(); | WxWiWideInfo wiWideInfo = new WxWiWideInfo(); | ||||
| wiWideInfo.updateTenantInfo(tenantEntity); | wiWideInfo.updateTenantInfo(tenantEntity); | ||||
| List<WxWiWideInfo> list = wxWiwideInfoMapper.findList(wiWideInfo); | List<WxWiWideInfo> list = wxWiwideInfoMapper.findList(wiWideInfo); | ||||
| @@ -221,7 +221,7 @@ public class WiwideUtil implements SMSExcutor { | |||||
| return data; | return data; | ||||
| } | } | ||||
| public static String getWiWidePic(String url,String sign, String type, String id) { | |||||
| public static byte[] getWiWidePic(String url,String sign, String type, String id) { | |||||
| return HttpUtil.doWiwidePicGet(url+"/api/reports/pictures/get_picture?type="+type+"&id="+id,sign); | return HttpUtil.doWiwidePicGet(url+"/api/reports/pictures/get_picture?type="+type+"&id="+id,sign); | ||||
| } | } | ||||
| @@ -243,7 +243,7 @@ public class WiwideUtil implements SMSExcutor { | |||||
| String sign = WiwideEntry.encrypt(wiWideInfo); | String sign = WiwideEntry.encrypt(wiWideInfo); | ||||
| String s = HttpUtil.doWiwidePicGet("http://140.143.33.245" + "/api/reports/pictures/get_picture?type=pic&id=b3b30445674bb49840e64c2f8b0be347", sign); | |||||
| byte[] s = HttpUtil.doWiwidePicGet("http://140.143.33.245" + "/api/reports/pictures/get_picture?type=pic&id=b3b30445674bb49840e64c2f8b0be347", sign); | |||||
| System.out.println(s); | System.out.println(s); | ||||
| // Map<String, Object> param = new HashMap<>(); | // Map<String, Object> param = new HashMap<>(); | ||||
| @@ -83,7 +83,7 @@ public class HttpUtil { | |||||
| * get请求 | * get请求 | ||||
| * @return | * @return | ||||
| */ | */ | ||||
| public static String doWiwidePicGet(String url, String signature) { | |||||
| public static byte[] doWiwidePicGet(String url, String signature) { | |||||
| try { | try { | ||||
| CloseableHttpClient client = HttpClients.createDefault(); | CloseableHttpClient client = HttpClients.createDefault(); | ||||
| //发送get请求 | //发送get请求 | ||||
| @@ -95,9 +95,10 @@ public class HttpUtil { | |||||
| /**请求发送成功,并得到响应**/ | /**请求发送成功,并得到响应**/ | ||||
| if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { | if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { | ||||
| /**读取服务器返回过来的json字符串数据**/ | /**读取服务器返回过来的json字符串数据**/ | ||||
| String strResult = EntityUtils.toString(response.getEntity()); | |||||
| return strResult; | |||||
| byte[] bytes = EntityUtils.toByteArray(response.getEntity()); | |||||
| return bytes; | |||||
| } | } | ||||
| } | } | ||||
| catch (IOException e) { | catch (IOException e) { | ||||