From 8a53c3f624ca12877d066a3360e7209b70d86fbf Mon Sep 17 00:00:00 2001 From: wangliwen Date: Fri, 24 Jun 2022 16:38:36 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E5=8C=85=E5=A4=B4=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- renren-admin/src/main/resources/domain/baotou.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renren-admin/src/main/resources/domain/baotou.properties b/renren-admin/src/main/resources/domain/baotou.properties index f59252f2..76812636 100644 --- a/renren-admin/src/main/resources/domain/baotou.properties +++ b/renren-admin/src/main/resources/domain/baotou.properties @@ -1 +1 @@ -baotou.hlsurl=http://10.110.205.1:18088/server/device/hisdeviceapplylist/url/%s \ No newline at end of file +baotou.hlsurl=http://172.16.10.11:8088/server/device/hisdeviceapplylist/url/%s \ No newline at end of file From d95fd0496a7eb38bc84b7a53591e2bd48da9a23c Mon Sep 17 00:00:00 2001 From: wangliwen Date: Fri, 24 Jun 2022 17:02:46 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E3=80=82=E3=80=82=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../videoPreview/domain/BaoTouVideoPreviewService.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/resource/videoPreview/domain/BaoTouVideoPreviewService.java b/renren-admin/src/main/java/io/renren/modules/resource/videoPreview/domain/BaoTouVideoPreviewService.java index b76882b7..f628a5da 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/videoPreview/domain/BaoTouVideoPreviewService.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/videoPreview/domain/BaoTouVideoPreviewService.java @@ -33,10 +33,14 @@ public class BaoTouVideoPreviewService extends AbstractVideoPreviewService { @Override public String getHls(String key) { String hls = null; - Request request = new Request.Builder().url(String.format(baoTouProperties.getHlsurl(), key)).build(); + String url = String.format(baoTouProperties.getHlsurl(), key); + logger.info("包头预览:" + url); + Request request = new Request.Builder().url(url).build(); try (Response response = client.newCall(request).execute()) { if (response.isSuccessful()) { - JSONObject jsonObject = JSON.parseObject(response.body().string()); + String body = response.body().string(); + logger.error("包头预览返回:" + body); + JSONObject jsonObject = JSON.parseObject(body); if (jsonObject.containsKey("data")) { hls = jsonObject.getString("data"); } From f185f943dee4e7e34177eb9ff2b26da2c29bb50a Mon Sep 17 00:00:00 2001 From: wangliwen Date: Fri, 24 Jun 2022 17:40:56 +0800 Subject: [PATCH 3/8] npe --- .../java/io/renren/common/controller/CensusControllerV2.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java b/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java index c0658802..9495a5e3 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java +++ b/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java @@ -292,7 +292,7 @@ public class CensusControllerV2 { }); }); CompletableFuture allKnowledgeVisitsAmount = CompletableFuture.supplyAsync(() -> { // 获取平台知识库浏览量 - return jdbcTemplate.queryForObject("SELECT SUM(visits) visits FROM tb_data_resource WHERE type ='知识库' AND del_flag = 0;", Long.class); + return jdbcTemplate.queryForObject("SELECT IFNULL(SUM(visits),0) visits FROM tb_data_resource WHERE type ='知识库' AND del_flag = 0;", Long.class); }).thenAccept(sum -> { result.add(new HashMap() { { @@ -434,7 +434,7 @@ public class CensusControllerV2 { List lists = JSON.parseArray(ja, Map.class); ArrayList list = new ArrayList<>(); lists.forEach(item -> { - list.add(new HashMap(){{ + list.add(new HashMap() {{ put("服务名称", item.get("zyname")); put("申请次数", item.get("syqk")); }}); From c5f8697a4314c399c02c3125d139549bf40a4e94 Mon Sep 17 00:00:00 2001 From: dinggang <2498628697@qq.com> Date: Fri, 24 Jun 2022 18:00:02 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E4=BC=A0=E8=BE=93?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF=E6=94=B9=E4=B8=BA=E5=8A=A0?= =?UTF-8?q?=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../security/controller/LoginController.java | 3 ++- .../security/password/PasswordUtils.java | 27 ++++++++++++++++++- .../sys/controller/SysUserController.java | 9 ++++--- .../sys/service/impl/SysUserServiceImpl.java | 19 ++++++------- 4 files changed, 43 insertions(+), 15 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/security/controller/LoginController.java b/renren-admin/src/main/java/io/renren/modules/security/controller/LoginController.java index 43552c1e..f68847b6 100644 --- a/renren-admin/src/main/java/io/renren/modules/security/controller/LoginController.java +++ b/renren-admin/src/main/java/io/renren/modules/security/controller/LoginController.java @@ -87,7 +87,8 @@ public class LoginController { LoginDTO login = new LoginDTO(); login.setUsername(String.valueOf(params.get("username"))); - login.setPassword(String.valueOf(params.get("password"))); + String password = PasswordUtils.desEncrypt(String.valueOf(params.get("password"))); + login.setPassword(password); // login.setCaptcha(String.valueOf(params.get("captcha"))); login.setUuid(String.valueOf(params.get("uuid"))); //效验数据 diff --git a/renren-admin/src/main/java/io/renren/modules/security/password/PasswordUtils.java b/renren-admin/src/main/java/io/renren/modules/security/password/PasswordUtils.java index 93afeb62..2bbd0e4a 100644 --- a/renren-admin/src/main/java/io/renren/modules/security/password/PasswordUtils.java +++ b/renren-admin/src/main/java/io/renren/modules/security/password/PasswordUtils.java @@ -1,12 +1,21 @@ package io.renren.modules.security.password; +import javax.crypto.Cipher; +import javax.crypto.spec.IvParameterSpec; +import javax.crypto.spec.SecretKeySpec; +import java.util.Base64; + /** * 密码工具类 * * @since 1.0.0 */ public class PasswordUtils { - private static PasswordEncoder passwordEncoder = new BCryptPasswordEncoder(); + private static final PasswordEncoder passwordEncoder = new BCryptPasswordEncoder(); + + // 密码传输密钥 + private static final String pwdKey = "YwwqhsxBkywjgm01"; + private static final String pwdIv = "SSXXZYZYBABA30TM"; /** * 加密 @@ -28,4 +37,20 @@ public class PasswordUtils { return passwordEncoder.matches(str, password); } + // 解密前端传输过来的密码加密串 + public static String desEncrypt(String data) { + try { + byte[] encrypted1 = Base64.getDecoder().decode(data); + Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding"); + SecretKeySpec keyspec = new SecretKeySpec(pwdKey.getBytes(), "AES"); + IvParameterSpec ivspec = new IvParameterSpec(pwdIv.getBytes()); + cipher.init(Cipher.DECRYPT_MODE, keyspec, ivspec); + byte[] original = cipher.doFinal(encrypted1); + return new String(original).trim(); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + } diff --git a/renren-admin/src/main/java/io/renren/modules/sys/controller/SysUserController.java b/renren-admin/src/main/java/io/renren/modules/sys/controller/SysUserController.java index 99efc1a3..126496af 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/controller/SysUserController.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/controller/SysUserController.java @@ -7,7 +7,6 @@ import io.renren.common.page.PageData; import io.renren.common.utils.ConvertUtils; import io.renren.common.utils.ExcelUtils; import io.renren.common.utils.Result; -import io.renren.common.validator.AssertUtils; import io.renren.common.validator.ValidatorUtils; import io.renren.common.validator.group.AddGroup; import io.renren.common.validator.group.DefaultGroup; @@ -25,7 +24,6 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; -import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import springfox.documentation.annotations.ApiIgnore; @@ -103,12 +101,15 @@ public class SysUserController { UserDetail user = SecurityUser.getUser(); + String password = PasswordUtils.desEncrypt(dto.getPassword()); + String newPassword = PasswordUtils.desEncrypt(dto.getNewPassword()); + //原密码不正确 - if(!PasswordUtils.matches(dto.getPassword(), user.getPassword())){ + if(!PasswordUtils.matches(password, user.getPassword())){ return new Result().error(ErrorCode.PASSWORD_ERROR); } - sysUserService.updatePassword(user.getId(), dto.getNewPassword()); + sysUserService.updatePassword(user.getId(), newPassword); return new Result(); } diff --git a/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysUserServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysUserServiceImpl.java index 666e44e3..b52d59b7 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysUserServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysUserServiceImpl.java @@ -108,9 +108,10 @@ public class SysUserServiceImpl extends BaseServiceImpl Date: Fri, 24 Jun 2022 19:10:51 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E5=B8=82=E5=B1=80=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=AF=B9=E6=8E=A5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/renren/common/controller/CensusControllerV2.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java b/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java index 9495a5e3..d8a7e283 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java +++ b/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java @@ -409,10 +409,9 @@ public class CensusControllerV2 { TsingtaoDataResourceService tsingtaoDataResourceService = new TsingtaoDataResourceService(); GetDataResourceListDto getDataResourceListDto = new GetDataResourceListDto().setPageNum(1).setPageSize(5); HashMap dataResource = (HashMap) tsingtaoDataResourceService.getDataResource(getDataResourceListDto); - JSONObject data = JSON.parseObject(JSON.toJSONString(dataResource.get("data"))); result.add(new HashMap() { { - put("amount", data.get("rows")); + put("amount", dataResource.get("rows")); put("type", "总数据量"); } }); @@ -430,8 +429,7 @@ public class CensusControllerV2 { }); result.add(new HashMap() { { - String ja = data.getString("data"); - List lists = JSON.parseArray(ja, Map.class); + List lists = (List) dataResource.get("data"); ArrayList list = new ArrayList<>(); lists.forEach(item -> { list.add(new HashMap() {{ @@ -468,7 +466,6 @@ public class CensusControllerV2 { logger.error("青岛西海岸失败", exception); } - OkHttpClient client1 = new OkHttpClient(); Request request1 = new Request.Builder().url(tsingtao_xhaProperties.getResourceapplyinfo()).build(); try (Response response = client1.newCall(request1).execute()) { From f4d0001b855ac1837421c888c0507355987814cc Mon Sep 17 00:00:00 2001 From: dinggang <2498628697@qq.com> Date: Fri, 24 Jun 2022 19:54:20 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/controller/CensusControllerV2.java | 2 +- .../service/impl/ResourceServiceImpl.java | 123 ++++++++++++------ 2 files changed, 82 insertions(+), 43 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java b/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java index d8a7e283..d5b6ea1c 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java +++ b/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java @@ -388,7 +388,7 @@ public class CensusControllerV2 { }); result.add(new HashMap() { { - put("amount", 0l); + put("amount", 0L); put("type", "总申请次数"); } }); diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java index d1a0347a..a13ad935 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java @@ -15,6 +15,8 @@ import io.renren.common.domain.Tsingtao_xhaProperties; import io.renren.common.service.impl.CrudServiceImpl; import io.renren.modules.resource.dao.AttrDao; import io.renren.modules.resource.dao.ResourceDao; +import io.renren.modules.resource.dataResource.domain.TsingtaoDataResourceService; +import io.renren.modules.resource.dto.GetDataResourceListDto; import io.renren.modules.resource.dto.ResourceDTO; import io.renren.modules.resource.entity.AttrEntity; import io.renren.modules.resource.entity.ResourceEntity; @@ -377,7 +379,8 @@ public class ResourceServiceImpl extends CrudServiceImpl index != null).findAny().orElse(0l); }).thenAccept(sum -> { re.add(new HashMap() { @@ -387,8 +390,44 @@ public class ResourceServiceImpl extends CrudServiceImpl() { + { + put("amount", finalTotal); + put("type", "数据资源"); + } + }); + } + } else { + logger.error("青岛西海岸获取失败"); + } + } catch (Exception exception) { + logger.error("青岛西海岸失败", exception); + } allAmount.join(); } + break; + case TSINGTAO: { + //青岛市局数据资源 + TsingtaoDataResourceService tsingtaoDataResourceService = new TsingtaoDataResourceService(); + GetDataResourceListDto getDataResourceListDto = new GetDataResourceListDto().setPageNum(1).setPageSize(5); + HashMap dataResource = (HashMap) tsingtaoDataResourceService.getDataResource(getDataResourceListDto); + re.add(new HashMap() { + { + put("count", dataResource.get("rows") + ""); + put("type", "数据资源"); + } + }); + } + break; } resultMap.put("total", re); return resultMap; @@ -860,8 +899,8 @@ public class ResourceServiceImpl extends CrudServiceImpl> resourceBusinessDetails(Map params){ - List> result = new CopyOnWriteArrayList<>(); + public List> resourceBusinessDetails(Map params) { + List> result = new CopyOnWriteArrayList<>(); List deptList = new ArrayList<>();//保存部门 发布总数 访问量 params.put("pageNum", (Integer.parseInt(params.get("page").toString()) - 1) * Integer.parseInt(params.get("limit").toString())); @@ -871,23 +910,23 @@ public class ResourceServiceImpl extends CrudServiceImpl> result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) as resourceNum,a.dept_id AS deptId,b.name AS deptName,\n" + + List> result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS resourceNum,a.dept_id AS deptId,b.name AS deptName,\n" + "SUM(a.visits) AS resourceVisits \n" + "FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id\n" + "WHERE a.type = '组件服务' AND a.del_flag = 0\n" + - "AND (b.ID = ? OR b.pids like CONCAT(CONCAT('%',?),'%'))\n" + + "AND (b.ID = ? OR b.pids LIKE CONCAT(CONCAT('%',?),'%'))\n" + "GROUP BY a.dept_id,b.name\n" + "ORDER BY a.dept_id,b.name\n" + - "LIMIT ?,?",pas); + "LIMIT ?,?", pas); result.addAll(result2); ConcurrentHashMap hashMap = new ConcurrentHashMap(); hashMap.putAll(params); - CompletableFuture voidCompletableFuture01 = CompletableFuture.runAsync(() -> { // 获取被申请数量 + CompletableFuture voidCompletableFuture01 = CompletableFuture.runAsync(() -> { // 获取被申请数量 result.forEach(dept -> { String id = dept.get("deptId").toString();//部门id hashMap.put("id", id); @@ -937,27 +976,27 @@ public class ResourceServiceImpl extends CrudServiceImpl all = CompletableFuture.allOf(voidCompletableFuture01, voidCompletableFuture02, voidCompletableFuture03,voidCompletableFuture04,voidCompletableFuture05); + CompletableFuture all = CompletableFuture.allOf(voidCompletableFuture01, voidCompletableFuture02, voidCompletableFuture03, voidCompletableFuture04, voidCompletableFuture05); all.join(); return result; } @Override - public List> resourceApplicationDetails(Map params){ + public List> resourceApplicationDetails(Map params) { List> result = new CopyOnWriteArrayList<>(); Integer page = Integer.parseInt(params.get("page").toString()) - 1; Integer pageSize = Integer.parseInt(params.get("limit").toString()); - Object[] pas = {params.get("id"),params.get("id"),page,pageSize}; + Object[] pas = {params.get("id"), params.get("id"), page, pageSize}; - List> result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) as resourceNum,a.dept_id AS deptId,b.name AS deptName\n" + + List> result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS resourceNum,a.dept_id AS deptId,b.name AS deptName\n" + "FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id\n" + "WHERE a.type = '应用资源' AND a.del_flag = 0\n" + - "AND (b.ID = ? OR b.pids like CONCAT(CONCAT('%',?),'%'))\n" + + "AND (b.ID = ? OR b.pids LIKE CONCAT(CONCAT('%',?),'%'))\n" + "GROUP BY a.dept_id,b.name\n" + "ORDER BY a.dept_id,b.name\n" + - "LIMIT ?,?",pas); + "LIMIT ?,?", pas); result.addAll(result2); CompletableFuture voidCompletableFuture01 = CompletableFuture.runAsync(() -> { //应用浏览数量 result.forEach(r -> { @@ -982,20 +1021,20 @@ public class ResourceServiceImpl extends CrudServiceImpl> resourceInfrastructureDetails(Map params){ + public List> resourceInfrastructureDetails(Map params) { List> result = new CopyOnWriteArrayList<>(); Integer page = Integer.parseInt(params.get("page").toString()) - 1; Integer pageSize = Integer.parseInt(params.get("limit").toString()); - Object[] pas = {params.get("id"),params.get("id"),page,pageSize}; + Object[] pas = {params.get("id"), params.get("id"), page, pageSize}; - List> result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) as resourceNum,a.dept_id AS deptId,b.name AS deptName\n" + + List> result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS resourceNum,a.dept_id AS deptId,b.name AS deptName\n" + "FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id\n" + "WHERE a.type = '基础设施' AND a.del_flag = 0\n" + - "AND (b.ID = ? OR b.pids like CONCAT(CONCAT('%',?),'%'))\n" + + "AND (b.ID = ? OR b.pids LIKE CONCAT(CONCAT('%',?),'%'))\n" + "GROUP BY a.dept_id,b.name\n" + "ORDER BY a.dept_id,b.name\n" + - "LIMIT ?,?",pas); + "LIMIT ?,?", pas); result.addAll(result2); CompletableFuture resourceCollectionNum01 = CompletableFuture.runAsync(() -> {//被申请数量 resourceCarNum @@ -1026,20 +1065,20 @@ public class ResourceServiceImpl extends CrudServiceImpl> resourceDatasDetails(Map params){ + public List> resourceDatasDetails(Map params) { List> result = new CopyOnWriteArrayList<>(); Integer page = Integer.parseInt(params.get("page").toString()) - 1; Integer pageSize = Integer.parseInt(params.get("limit").toString()); - Object[] pas = {params.get("id"),params.get("id"),page,pageSize}; + Object[] pas = {params.get("id"), params.get("id"), page, pageSize}; - List> result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) as resourceNum,a.dept_id AS deptId,b.name AS deptName\n" + + List> result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS resourceNum,a.dept_id AS deptId,b.name AS deptName\n" + "FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id\n" + "WHERE a.type = '数据资源' AND a.del_flag = 0\n" + - "AND (b.ID = ? OR b.pids like CONCAT(CONCAT('%',?),'%'))\n" + + "AND (b.ID = ? OR b.pids LIKE CONCAT(CONCAT('%',?),'%'))\n" + "GROUP BY a.dept_id,b.name\n" + "ORDER BY a.dept_id,b.name\n" + - "LIMIT ?,?",pas); + "LIMIT ?,?", pas); result.addAll(result2); CompletableFuture resourceCarNum = CompletableFuture.runAsync(() -> { //被申请数量 @@ -1070,26 +1109,26 @@ public class ResourceServiceImpl extends CrudServiceImpl> resourceKnowledgeDetails(Map params){ + public List> resourceKnowledgeDetails(Map params) { List> result = new CopyOnWriteArrayList<>(); Integer page = Integer.parseInt(params.get("page").toString()) - 1; Integer pageSize = Integer.parseInt(params.get("limit").toString()); - Object[] pas = {params.get("id"),params.get("id"),page,pageSize}; + Object[] pas = {params.get("id"), params.get("id"), page, pageSize}; - List> result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) as resourceNum,a.dept_id AS deptId,b.name AS deptName\n" + + List> result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS resourceNum,a.dept_id AS deptId,b.name AS deptName\n" + "FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id\n" + "WHERE a.type = '知识库' AND a.del_flag = 0\n" + - "AND (b.ID = ? OR b.pids like CONCAT(CONCAT('%',?),'%'))\n" + + "AND (b.ID = ? OR b.pids LIKE CONCAT(CONCAT('%',?),'%'))\n" + "GROUP BY a.dept_id,b.name\n" + "ORDER BY a.dept_id,b.name\n" + - "LIMIT ?,?",pas); + "LIMIT ?,?", pas); result.addAll(result2); return result; } -// @Override + // @Override // public List> selectDeptList(Map params){ // List> list = new ArrayList<>(); // Map map = new HashMap(); @@ -1112,8 +1151,8 @@ public class ResourceServiceImpl extends CrudServiceImpl> resourceBusinessUseDetails(Map params){ - List> result = new CopyOnWriteArrayList<>(); + public List> resourceBusinessUseDetails(Map params) { + List> result = new CopyOnWriteArrayList<>(); params.put("pageNum", (Integer.parseInt(params.get("page").toString()) - 1) * Integer.parseInt(params.get("limit").toString())); params.put("pageSize", params.get("limit")); result = baseDao.selectResurceCarDetails(params); @@ -1125,8 +1164,8 @@ public class ResourceServiceImpl extends CrudServiceImpl> resourceDatasUseDetails(Map params){ - List> result = new CopyOnWriteArrayList<>(); + public List> resourceDatasUseDetails(Map params) { + List> result = new CopyOnWriteArrayList<>(); params.put("pageNum", (Integer.parseInt(params.get("page").toString()) - 1) * Integer.parseInt(params.get("limit").toString())); params.put("pageSize", params.get("limit")); result = baseDao.selectResurceCarDetails(params); @@ -1134,15 +1173,15 @@ public class ResourceServiceImpl extends CrudServiceImpl> assemblerCarDetail(Map params){ - List> result = new ArrayList<>(); - Object[] ps = {params.get("id"),params.get("resourceType"),(Integer.parseInt(params.get("page").toString()) - 1) * Integer.parseInt(params.get("limit").toString()),Integer.parseInt(params.get("limit").toString())}; + public List> assemblerCarDetail(Map params) { + List> result = new ArrayList<>(); + Object[] ps = {params.get("id"), params.get("resourceType"), (Integer.parseInt(params.get("page").toString()) - 1) * Integer.parseInt(params.get("limit").toString()), Integer.parseInt(params.get("limit").toString())}; result = jdbcTemplate.queryForList("\n" + - "SELECT a.*,b.username,c.name as resourcename from tb_resource_car a inner join sys_user b on a.user_id = b.id \n" + - "inner join tb_data_resource c on a.resource_id = c.id \n" + - "where b.dept_id = ? and c.type = ?\n" + - "order by a.create_date desc \n" + - "limit ?,?\n",ps); + "SELECT a.*,b.username,c.name AS resourcename FROM tb_resource_car a INNER JOIN sys_user b ON a.user_id = b.id \n" + + "INNER JOIN tb_data_resource c ON a.resource_id = c.id \n" + + "WHERE b.dept_id = ? AND c.type = ?\n" + + "ORDER BY a.create_date DESC \n" + + "LIMIT ?,?\n", ps); return result; } From dfd3cbadb638e4e70256d125f019d43d9f21a10a Mon Sep 17 00:00:00 2001 From: dinggang <2498628697@qq.com> Date: Fri, 24 Jun 2022 20:22:31 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/resource/service/impl/ResourceServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java index a13ad935..3f841f4f 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java @@ -422,7 +422,7 @@ public class ResourceServiceImpl extends CrudServiceImpl() { { - put("count", dataResource.get("rows") + ""); + put("count", null == dataResource ? "0" : dataResource.get("rows") + ""); put("type", "数据资源"); } }); From 274e1bbfa8b6ddb18ae1dc3c1523d3132dad495e Mon Sep 17 00:00:00 2001 From: dinggang <2498628697@qq.com> Date: Fri, 24 Jun 2022 20:49:20 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E4=BF=AE=E6=94=B91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/renren/common/controller/CensusControllerV2.java | 6 +++--- .../modules/resource/service/impl/ResourceServiceImpl.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java b/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java index d5b6ea1c..664d43ab 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java +++ b/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java @@ -383,7 +383,7 @@ public class CensusControllerV2 { result.add(new HashMap() { { put("amount", 0L); - put("type", "总数据量"); + put("type", "总数据数"); } }); result.add(new HashMap() { @@ -412,7 +412,7 @@ public class CensusControllerV2 { result.add(new HashMap() { { put("amount", dataResource.get("rows")); - put("type", "总数据量"); + put("type", "总数据数"); } }); result.add(new HashMap() { @@ -455,7 +455,7 @@ public class CensusControllerV2 { result.add(new HashMap() { { put("amount", finalTotal); - put("type", "总数据量"); + put("type", "总数据数"); } }); } diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java index 3f841f4f..7df6b7d3 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java @@ -401,7 +401,7 @@ public class ResourceServiceImpl extends CrudServiceImpl() { { - put("amount", finalTotal); + put("count", finalTotal); put("type", "数据资源"); } });