Commit 6f4ba060 by guojuxing

小程序装修:小程序列表

parent 49216e55
......@@ -7,6 +7,7 @@ import com.gic.member.config.api.dto.ServiceConfigSimpleOutputDTO;
import com.gic.member.config.api.service.AppletsConfigApiService;
import com.gic.member.config.api.service.ServiceConfigApiService;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -104,7 +105,8 @@ public class AppletServiceConfigController {
Integer enterpriseId = UserDetailUtils.getUserDetail().getEnterpriseId();
ServiceResponse<List<AppletsConfigSimpleOutputDTO>> serviceResponse = appletsConfigApiService.listValidAppletConfigAppId(enterpriseId);
if (serviceResponse.isSuccess() && CollectionUtils.isNotEmpty(serviceResponse.getResult())) {
return serviceResponse.getResult().stream().collect(Collectors.toMap(AppletsConfigSimpleOutputDTO::getAppId, AppletsConfigSimpleOutputDTO::getImg));
return serviceResponse.getResult().stream().filter(e -> StringUtils.isNotBlank(e.getAppId()) && StringUtils.isNotBlank(e.getImg()))
.collect(Collectors.toMap(AppletsConfigSimpleOutputDTO::getAppId, AppletsConfigSimpleOutputDTO::getImg));
}
return new HashMap<>();
}
......
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