修改了各级查看自己要审核的商品的功能模块

This commit is contained in:
XinYi Song 2021-12-17 09:23:09 +08:00
parent 1c1bc5b7d9
commit ea85ad8c34
2 changed files with 4 additions and 4 deletions

View File

@ -129,7 +129,7 @@ public class ProductServiceImpl implements ProductService {
@Override
public String selectProductReviewType(Integer businessId, String productCity, String productCounty, String reviewType) {
Locale locale = LocaleContextHolder.getLocale();
List<ProductEntity> productEntities = query.selectProductCounty(businessId, productCity, productCounty, reviewType);
List<ProductEntity> productEntities = query.selectProductCounty(productCity, productCounty, reviewType);
if(productEntities == null || productEntities.size() == 0){
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE,"暂时没有任何要审核的商品信息!",locale);
}

View File

@ -31,14 +31,14 @@ public class Query {
* @param reviewType
* @return
*/
public List<ProductEntity> selectProductCounty(Integer businessId, String productCity, String productCounty, String reviewType) {
public List<ProductEntity> selectProductCounty(String productCity, String productCounty, String reviewType) {
Specification<ProductEntity> specification = new Specification<ProductEntity>() {
@Override
public Predicate toPredicate(Root<ProductEntity> root, CriteriaQuery<?> criteriaQuery, CriteriaBuilder criteriaBuilder) {
List<Predicate> list = new ArrayList<>();
if(businessId != null){
/*if(businessId != null){
list.add(criteriaBuilder.equal(root.get("businessId").as(Integer.class), businessId));
}
}*/
if(productCity != null && !"".equals(productCity)){
list.add(criteriaBuilder.equal(root.get("productCity").as(String.class), productCity));
}