<%#
 Copyright 2013-2021 the original author or authors from the BegCode project.

 This file is part of the JHipster project, see https://www.jhipster.tech/
 for more information.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

      https://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-%>
<%_
const serviceBaseClassName = (serviceImpl || multiModule) ? entityClass + 'BaseServiceImpl' : entityClass + 'BaseService';
const serviceClassName = (serviceImpl || multiModule) ? entityClass + 'ServiceImpl' : entityClass + 'Service';
const beans = [];
_%>
package <%= entityAbsolutePackage %>.service<% if (serviceImpl || multiModule) { %>.impl<% } %>;

import <%= entityAbsolutePackage %>.domain.<%= persistClass %>;
import <%= entityAbsolutePackage %>.repository.<%= entityClass %>Repository;
<%_ if (isUsingMapsId === true) { _%>
import <%= entityAbsolutePackage %>.repository.<%= mapsIdAssoc.otherEntityNameCapitalized %>Repository;
<%_ } _%>
<%_ if (searchEngineElasticsearch) { _%>
import <%= entityAbsolutePackage %>.repository.search.<%= entityClass %>SearchRepository;
<%_ } _%>
<%_ if (dtoMapstruct) { _%>
import <%= entityAbsolutePackage %>.service.mapper.<%= entityClass %>Mapper;
<%_ } _%>
<%_ if (!cacheProviderNo) { _%>
import org.springframework.cache.CacheManager;
<%_ } _%>
<%_ if (extendData && ormTool === 'mybatis') { _%>
    <%_ if (entityClass !== 'CommonTable') { _%>
import <%= packageName %>.repository.CommonTableRepository;
    <%_ } _%>
import <%= packageName %>.repository.ExtDataRepository;
<%_ } _%>
<%_ if (extendData && ormTool === 'hibernate') { _%>
import <%= packageName %>.service.CommonExtDataService;
<%_ } _%>
<%_ if (serviceImpl || multiModule) { _%>
import <%= entityAbsolutePackage %>.service.impl.base.<%= serviceBaseClassName %>;
import <%= entityAbsolutePackage %>.service.<%= entityClass %>Service;
<%_ } else { _%>
import <%= entityAbsolutePackage %>.service.base.<%= serviceBaseClassName %>;
<%_ } _%>
<%_ if (databaseTypeSql && ormTool === 'hibernate') { _%>
import org.springframework.transaction.annotation.Transactional;
<%_ } _%>
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
<%_ if (addCustomMethod.indexOf('service') !== -1) { _%>
<%- include(`../../../_entityCustom_/${entityClass}.service.ejs`, {position: 'extendsImport'}); -%>
<%_ } _%>

/**
 * Service Implementation for managing {@link <%= persistClass %>}.
 */
@Service<% if (databaseTypeSql && ormTool === 'hibernate') { %>
@Transactional<% } %>
public class <%= serviceClassName %> extends <%= serviceBaseClassName %><% if (ormTool === 'mybatis') { %><<%= entityClass%>Repository, <%= entityClass%>><% } %><% if (serviceImpl || multiModule) { %> implements <%= entityClass %>Service<% } %> {

    private final Logger log = LoggerFactory.getLogger(<%= serviceClassName %>.class);

    <% if (addCustomMethod.indexOf('service') !== -1) { %><%- include(`../../../_entityCustom_/${entityClass}.construct.ejs`, {viaService: false,isController: false, beans: beans});-%><% } %>
<%- include('../../_partials_entity_/blank_inject_template', {viaService: false, constructorName: serviceClassName, queryService: false, isUsingMapsId: isUsingMapsId, mapsIdAssoc: mapsIdAssoc, isController: false, beans: beans}); -%>

    // begcode-please-regenerate-this-file 如果您不希望重新生成代码时被覆盖，将please修改为don't ！！！
}
