Commit 1b93d735 authored by 姬鋆屾's avatar 姬鋆屾
parents e6268553 12e03368
...@@ -59,6 +59,7 @@ public class FeedbackServiceImpl extends AbstractCRUDServiceImpl<FeedbackDao, Fe ...@@ -59,6 +59,7 @@ public class FeedbackServiceImpl extends AbstractCRUDServiceImpl<FeedbackDao, Fe
UserEntity userEntity = userMap.get(item.getCreateUserId()); UserEntity userEntity = userMap.get(item.getCreateUserId());
if(userEntity!=null) { if(userEntity!=null) {
item.setPhotoPath(userEntity.getPhotoPath()); item.setPhotoPath(userEntity.getPhotoPath());
item.setFeedbackName(userEntity.getRealName());
} }
} }
} }
......
...@@ -51,7 +51,7 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba ...@@ -51,7 +51,7 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
this.addDict(model, "feedbackType", paramService.getParamBySecondOrganize("Feedback","feedbackType")); this.addDict(model, "feedbackType", paramService.getParamBySecondOrganize("Feedback","feedbackType"));
this.addDict(model, "processStatus", paramService.getParamBySecondOrganize("Feedback","processStatus")); this.addDict(model, "processStatus", paramService.getParamBySecondOrganize("Feedback","processStatus"));
this.addDict(model, "deptId", deptService.find(new DeptQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getDeptName(), (o, n) -> n))); this.addDict(model, "deptId", paramService.getParamBySecondOrganize("Feedback","deptId"));
super.init(model, context); super.init(model, context);
......
...@@ -73,8 +73,7 @@ public class NewsController extends BaseCRUDJsonBodyMappingController<NewsServic ...@@ -73,8 +73,7 @@ public class NewsController extends BaseCRUDJsonBodyMappingController<NewsServic
this.addDict(model, "top", paramService.getParamBySecondOrganize("News", "top")); this.addDict(model, "top", paramService.getParamBySecondOrganize("News", "top"));
this.addDict(model, "viewNums", paramService.getParamBySecondOrganize("News", "viewNums")); this.addDict(model, "viewNums", paramService.getParamBySecondOrganize("News", "viewNums"));
this.addDict(model, "categoryId", newsCategoryService.find(new NewsCategoryQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getName(), (o, n) -> n))); this.addDict(model, "categoryId", newsCategoryService.find(new NewsCategoryQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getName(), (o, n) -> n)));
this.addDict(model, "deptId", deptService.find(new DeptQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getDeptName(), (o, n) -> n))); this.addDict(model, "deptId", paramService.getParamBySecondOrganize("News","deptId"));
this.addDict(model, "createUserId", userService.find(new UserQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getRealName(), (o, n) -> n))); this.addDict(model, "createUserId", userService.find(new UserQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getRealName(), (o, n) -> n)));
super.init(model, context); super.init(model, context);
......
...@@ -126,6 +126,10 @@ public class ProductServiceImpl extends AbstractCRUDCacheServiceImpl<ProductDao, ...@@ -126,6 +126,10 @@ public class ProductServiceImpl extends AbstractCRUDCacheServiceImpl<ProductDao,
if(StringUtils.isNotEmpty(item.getProductDetail())) { if(StringUtils.isNotEmpty(item.getProductDetail())) {
item.setProductDetail(item.getProductDetail().replaceAll(regex, replacement)); item.setProductDetail(item.getProductDetail().replaceAll(regex, replacement));
} }
String categoryIds = productCategoryService.find(new ProductCategoryQuery().productId(item.getId())).stream().map(i -> i.getCategoryId().toString()).distinct().collect(Collectors.joining(","));
String companyIds = companyProductService.find(new CompanyProductQuery().productId(item.getId())).stream().map(i -> i.getCompanyId().toString()).distinct().collect(Collectors.joining(","));
item.setCompanyId(companyIds);
item.setCategoryId(categoryIds);
}); });
} }
return productEntityResult; return productEntityResult;
...@@ -163,7 +167,17 @@ public class ProductServiceImpl extends AbstractCRUDCacheServiceImpl<ProductDao, ...@@ -163,7 +167,17 @@ public class ProductServiceImpl extends AbstractCRUDCacheServiceImpl<ProductDao,
@Override @Override
protected void findAfter(ProductEntity params, PageInfo pageInfo, Context context, List<ProductEntity> list) throws AppException { protected void findAfter(ProductEntity params, PageInfo pageInfo, Context context, List<ProductEntity> list) throws AppException {
String regex = "src=\"file";
String replacement;
if(domain.endsWith("/")){
replacement = "src=\"" + domain + "file";
}else {
replacement = "src=\"" + domain + "/file";
}
list.forEach(item -> { list.forEach(item -> {
if(StringUtils.isNotEmpty(item.getProductDetail())) {
item.setProductDetail(item.getProductDetail().replaceAll(regex, replacement));
}
String categoryIds = productCategoryService.find(new ProductCategoryQuery().productId(item.getId())).stream().map(i -> i.getCategoryId().toString()).distinct().collect(Collectors.joining(",")); String categoryIds = productCategoryService.find(new ProductCategoryQuery().productId(item.getId())).stream().map(i -> i.getCategoryId().toString()).distinct().collect(Collectors.joining(","));
String companyIds = companyProductService.find(new CompanyProductQuery().productId(item.getId())).stream().map(i -> i.getCompanyId().toString()).distinct().collect(Collectors.joining(",")); String companyIds = companyProductService.find(new CompanyProductQuery().productId(item.getId())).stream().map(i -> i.getCompanyId().toString()).distinct().collect(Collectors.joining(","));
item.setCompanyId(companyIds); item.setCompanyId(companyIds);
...@@ -307,6 +321,10 @@ public class ProductServiceImpl extends AbstractCRUDCacheServiceImpl<ProductDao, ...@@ -307,6 +321,10 @@ public class ProductServiceImpl extends AbstractCRUDCacheServiceImpl<ProductDao,
protected void removeAfter(Long[] ids, Context context, int result) throws AppException { protected void removeAfter(Long[] ids, Context context, int result) throws AppException {
List<ProductQuestionEntity> productQuestionlist = productQuestionService.find(new ProductQuestionQuery().productIdList(Arrays.asList(ids))); List<ProductQuestionEntity> productQuestionlist = productQuestionService.find(new ProductQuestionQuery().productIdList(Arrays.asList(ids)));
productQuestionService.removeList(productQuestionlist, context); productQuestionService.removeList(productQuestionlist, context);
List<ProductCategoryEntity> productCategoryList = productCategoryService.find(new ProductCategoryQuery().productIdList(Arrays.asList(ids)));
productCategoryService.removeList(productCategoryList,context);
List<CompanyProductEntity> companyProductList = companyProductService.find(new CompanyProductQuery().productIdList(Arrays.asList(ids)));
companyProductService.removeList(companyProductList,context);
super.removeAfter(ids, context, result); super.removeAfter(ids, context, result);
} }
......
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