package com.seamew.lottery.infrastructure.repository;

import com.seamew.lottery.domain.award.repository.IOrderRepository;
import com.seamew.lottery.infrastructure.dao.IUserStrategyExportDao;
import com.seamew.lottery.infrastructure.po.UserStrategyExport;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

/**
 * @Author: seamew
 * @Title: AwardRepository
 * @CreateTime: 2023年02月15日 10:39:00
 * @Description: 奖品表仓储服务
 * @Version: 1.0
 */
@Repository
public class OrderRepository implements IOrderRepository {

    @Resource
    private IUserStrategyExportDao userStrategyExportDao;

    @Override
    public void updateUserAwardState(String uId, Long orderId, String awardId, Integer grantState) {
        UserStrategyExport userStrategyExport = new UserStrategyExport();
        userStrategyExport.setUId(uId);
        userStrategyExport.setOrderId(orderId);
        userStrategyExport.setAwardId(awardId);
        userStrategyExport.setGrantState(grantState);
        userStrategyExportDao.updateUserAwardState(userStrategyExport);
    }
}


