package com.hzs.member.base.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hzs.common.core.utils.DateUtils;
import com.hzs.common.domain.member.ext.CuMemberHonorWallExt;
import com.hzs.common.domain.member.honor.CuMemberHonorWall;
import com.hzs.common.security.utils.SecurityUtils;
import com.hzs.member.base.mapper.CuMemberHonorWallMapper;
import com.hzs.member.base.service.ICuMemberHonorWallService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 会员荣誉墙关联表 服务实现类
 * </p>
 *
 * @author hzs
 * @since 2023-04-26
 */
@Service
public class CuMemberHonorWallServiceImpl extends ServiceImpl<CuMemberHonorWallMapper, CuMemberHonorWall> implements ICuMemberHonorWallService {
    /**
     * 查询会员荣誉墙
     * @param memberId
     * @return
     */
    @Override
    public List<CuMemberHonorWallExt> getByMemberHonorWall(Long memberId) {
        return baseMapper.getByMemberHonorWall(memberId);
    }

    /**
     * 插入会员勋章
     * @param memberHonorWall
     */
    @Override
    public void saveCuMemberHonorWall(CuMemberHonorWall memberHonorWall) {
     //   memberHonorWall.setPkCountry(SecurityUtils.getPkCountry());
        memberHonorWall.setCreationTime(DateUtils.currentDateTime());
        memberHonorWall.setCreationTime(DateUtils.currentDateTime());
        baseMapper.insert(memberHonorWall);
    }
}
