Commit f8bc1077 authored by 赵啸非's avatar 赵啸非

添加水印图片

parent 2827b329
......@@ -6,6 +6,8 @@ import com.mortals.framework.common.Rest;
import com.mortals.xhx.base.system.upload.service.UploadService;
import com.mortals.xhx.common.key.Constant;
import com.mortals.xhx.common.utils.WatermarkImgUtils;
import com.mortals.xhx.module.certificate.model.CertificateIndustryTreeSelect;
import com.mortals.xhx.module.certificate.service.CertificateIndustryService;
import com.mortals.xhx.module.child.model.ChildLicenseEntity;
import com.mortals.xhx.module.child.model.ChildLicenseQuery;
import com.mortals.xhx.module.child.service.ChildLicenseService;
......@@ -37,6 +39,8 @@ public class TestSendMsgController {
private UploadService uploadService;
@Autowired
private ChildLicenseService childLicenseService;
@Autowired
private CertificateIndustryService certificateIndustryService;
@GetMapping("refreshWaterMark")
......@@ -117,6 +121,15 @@ public class TestSendMsgController {
return Rest.ok();
}
@GetMapping("subtree")
public Rest<Void> subtree(Long parentId) {
// List<CertificateIndustryTreeSelect> allListByParentId = certificateIndustryService.getAllListByParentId(parentId, null)
return Rest.ok();
}
public static void main(String[] args) {
......
......@@ -2,6 +2,7 @@ package com.mortals.xhx.module.certificate.service;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.certificate.dao.CertificateIndustryDao;
import com.mortals.xhx.module.certificate.model.CertificateIndustryEntity;
import com.mortals.xhx.module.certificate.model.CertificateIndustryTreeSelect;
......@@ -16,6 +17,8 @@ import java.util.List;
* @date 2022-10-14
*/
public interface CertificateIndustryService extends ICRUDService<CertificateIndustryEntity, Long> {
CertificateIndustryDao getDao();
/**
* 是否存在行业目录节点
*
......
......@@ -176,10 +176,6 @@ public class CertificateIndustryServiceImpl extends AbstractCRUDServiceImpl<Cert
recursionFn(list, certificateIndustryEntity);
returnList.add(certificateIndustryEntity);
}
if (returnList.isEmpty()) {
returnList = list;
}
return returnList.stream().map(CertificateIndustryTreeSelect::new).collect(Collectors.toList());
}
......
......@@ -105,13 +105,18 @@ public class ApplyLogController extends BaseCRUDJsonBodyMappingController<ApplyL
query.setCatalogId(-1L);
return;
}
List<Long> industryIdList = certificateIndustryService.find(new CertificateIndustryQuery()
List<CertificateIndustryEntity> childsEntities = certificateIndustryService.getDao().selectChildrenCertificateIndustryById(query.getIndustryId().toString());
List<Long> industryIdList = childsEntities.stream().map(x -> x.getId()).collect(Collectors.toList());
industryIdList.add(query.getIndustryId());
/* List<Long> industryIdList = certificateIndustryService.find(new CertificateIndustryQuery()
.ancestors(industryEntity.getAncestors() + "%"))
.stream().map(x -> x.getId()).collect(Collectors.toList());
if(ObjectUtils.isEmpty(industryIdList)) {
query.setCatalogId(-1L);
return;
}
}*/
List<Long> catalogIdlist = certificateCatalogService.find(new CertificateCatalogQuery().industryIdList(industryIdList))
.stream().map(x -> x.getId()).collect(Collectors.toList());
if(ObjectUtils.isEmpty(catalogIdlist)) {
......
......@@ -58,6 +58,6 @@ Content-Type: application/json
{
"industryId": 19
"industryId": 18
}
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