mitao
2024-07-08 022a7ff7abf82cd2546e18071ade5228b4e2339f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package com.sinata.modular.mall.dao;
 
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.sinata.modular.mall.model.MallUserReport;
import org.apache.ibatis.annotations.Select;
 
import java.util.Map;
 
/**
 * <p>
 * 用户举报 Mapper 接口
 * </p>
 *
 * @author goku
 * @since 2023-03-11
 */
public interface MallUserReportMapper extends BaseMapper<MallUserReport> {
 
 
    @Select(" SELECT " +
            "     IFNULL(m1.credit_score, 0) m, " +
            "     IFNULL(m2.credit_score, 0) u " +
            "   FROM mall_user_report mur" +
            "   LEFT JOIN mem_user_bank m1 ON m1.id = mur.merchant_id " +
            "   LEFT JOIN mem_user_bank m2 ON m2.id = mur.user_id " +
            " WHERE mur.id = #{id} ")
    public Map<String, String> findUserIntegral(String id);
 
}