package com.cool.store.service.close.impl;

import com.cool.store.entity.StoreDO;
import com.cool.store.request.huoma.AccountCloseRequest;
import com.cool.store.service.HuoMaService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 火码账号关闭
 * </p>
 *
 * @author wangff
 * @since 2025/10/8
 */
@Service
@RequiredArgsConstructor
public class HuomaAccountClose extends AbstractAccountClose {
    private final HuoMaService huoMaService;

    @Override
    public String getSystemCode() {
        return "huoma";
    }

    @Override
    public Boolean accountClose(String storeId) {
        StoreDO storeDO = getStore(storeId);
        AccountCloseRequest request = new AccountCloseRequest();
        request.setShop_sn(storeDO.getStoreNum());
        request.setEnable(0);
        return huoMaService.accountClose(request);
    }
}
