xiaoyong931011
2021-07-02 abf323cc9a96877ead8aa5e5caacff8c75e4d2e7
gc-shop/src/main/java/com/xzx/gc/shop/service/ScoreDetailsService.java
@@ -5,11 +5,16 @@
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.xzx.gc.common.utils.StringUtils;
import com.xzx.gc.entity.AccountInfo;
import com.xzx.gc.shop.dto.QueryScoreDetailsListDto;
import com.xzx.gc.shop.dto.XcxScoreDetailsDto;
import com.xzx.gc.shop.mapper.AccountInfoMapper;
import com.xzx.gc.shop.mapper.ScoreDetailsMapper;
import com.xzx.gc.shop.vo.QueryOrderListVo;
import com.xzx.gc.shop.vo.QueryScoreDetailsListVo;
import com.xzx.gc.shop.vo.XcxScoreDetailsVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -25,6 +30,9 @@
    @Resource
    ScoreDetailsMapper scoreDetailsMapper;
    @Autowired
    private AccountInfoMapper accountInfoMapper;
    public Map<String, Object> queryScoreDetailsList(QueryScoreDetailsListDto model) {
        PageHelper.startPage(model.getPage(), model.getLimit());
@@ -44,5 +52,16 @@
        return map;
    }
    public Map<String, Object> scoreDetails(XcxScoreDetailsDto xcxScoreDetailsDto) {
        PageHelper.startPage(xcxScoreDetailsDto.getPageNo(), xcxScoreDetailsDto.getPageSize());
        List<XcxScoreDetailsVo> details = scoreDetailsMapper.selectXcxScoreDetailsList(xcxScoreDetailsDto);
        AccountInfo accountInfo = accountInfoMapper.selectAccountInfoByUserId(xcxScoreDetailsDto.getUserId());
        Map<String, Object> map = new HashMap<>();
        map.put("score", accountInfo.getCollectScore());
        map.put("data", details);
        return map;
    }
}