puzhibing
2024-02-05 640ff18d2d7f4be02ddb7f8f75e899f05545eb98
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dsh.other.mapper.StoreMapper">
 
 
    <select id="queryProvince" resultType="com.dsh.other.model.ProvinceAndCityVo">
        select province as name, provinceCode as code from t_store where state = 1 group by province, provinceCode
    </select>
 
 
    <select id="queryCity" resultType="com.dsh.other.model.ProvinceAndCityVo">
        select city as name, cityCode as code from t_store where state = 1
        <if test="null != pcode and '' != pcode">
            and provinceCode = #{pcode}
        </if>
        group by city, cityCode
    </select>
 
    <select id="queryStoreByCityCode" resultType="com.dsh.other.model.BaseVo">
        select id, name from t_store where state = 1
        and provinceCode = #{provinceCode}
        <if test="cityCode !=null and cityCode !='' ">
            and cityCode = #{cityCode}
        </if>
 
    </select>
    <select id="getStoreByCityManagerId" resultType="com.dsh.other.entity.Store">
        select * from t_store where operatorId = #{id}
    </select>
    <select id="getStoreByStoreStaffId" resultType="com.dsh.other.entity.Store">
        select * from t_store where id = #{id}
    </select>
    <select id="getOName" resultType="java.lang.String">
        select name from t_operator where id =#{operatorId}
    </select>
    <select id="game" resultType="java.util.Map">
        select time,money from t_game_record where userId =#{appUserId} and payType =3
    </select>
    <select id="queryByStoreId" resultType="com.dsh.other.entity.OperatorUser">
 
 
 
        SELECT * from t_operator_user WHERE operatorId =
 
                                            (SELECT ts.operatorId
                                             from t_store ts
                                             WHERE ts.id = #{id})
 
 
    </select>
    <select id="getStoreInfo" resultType="com.dsh.other.model.dto.siteDto.StoreInfoDto">
        select CONCAT(t2.name,"-",t2.phone) as info
        from sys_user t2
        where id = #{id}
    </select>
</mapper>