package com.hzs.retail.member.provider;

import com.hzs.common.core.domain.R;
import com.hzs.retail.member.IMemberRetailApi;
import com.hzs.retail.member.service.ICuMemberRetailRegionService;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * 新零售会员dubbo服务
 */
@Slf4j
@DubboService
public class MemberRetailProvider implements IMemberRetailApi {

    @Autowired
    private ICuMemberRetailRegionService iCuMemberRetailRegionService;

    @Override
    public R<?> cancelRegion(List<Long> pkIdList) {
        try {
            iCuMemberRetailRegionService.cancelRegion(pkIdList);
            return R.ok();
        } catch (Exception e) {
            log.error("区域失效操作异常，pkIdList：{}", pkIdList, e);
            return R.fail(e.getMessage());
        }
    }

}
