package com.jeesharp.business.modules.mall.service.impl;

import com.jeesharp.business.modules.mall.entity.MallProductTemplate;
import com.jeesharp.business.modules.mall.mapper.MallProductTemplateMapper;
import com.jeesharp.business.modules.mall.service.MallProductTemplateService;
import com.jeesharp.business.modules.mall.vo.MallProductTemplateQueryVO;
import com.jeesharp.framework.mybatis.core.service.CrudService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Arrays;

/**
 * 商品发布模板领域服务实现。
 *
 * @author jeesharp
 * @since 2026-05-15
 */
@Service
@Transactional(readOnly = true)
public class MallProductTemplateServiceImpl extends CrudService<MallProductTemplateMapper, MallProductTemplate, MallProductTemplateQueryVO> implements MallProductTemplateService {

    private static final String IDS_SEPARATOR = ",";

    @Override
    @Transactional(readOnly = false)
    public void createTemplate(MallProductTemplate entity) {
        save(entity);
    }

    @Override
    @Transactional(readOnly = false)
    public void updateTemplate(MallProductTemplate entity) {
        update(entity);
    }

}
