Skip to content

Commit bc90663

Browse files
committed
231025 Update 0613_SPLR.md
1 parent c2922db commit bc90663

File tree

1 file changed

+54
-1
lines changed

1 file changed

+54
-1
lines changed

notes/0613_SPLR.md

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,54 @@
1-
# ✅ 납품기업관리 CRUD
1+
# ✅ 납품기업관리 CRUD
2+
3+
4+
5+
- 요구사항
6+
- 임원진 및 영업팀 소속 구성원만 납품기업 정보 CRUD 가능
7+
8+
9+
10+
- SQL (MySQL 기준)
11+
12+
- 전체 데이터 목록조회
13+
14+
```xml
15+
<select id="splrlist" resultType="kr.happyjob.study.busSpm.model.SplrModel">
16+
SELECT
17+
sp.splr_no
18+
, sp.splr_name
19+
, sp.splr_tel
20+
, sp.splr_mng
21+
, sp.splr_hp
22+
, sp.splr_zip
23+
, sp.bk_cd
24+
, dc.detail_name AS bk_name
25+
, sp.splr_acc
26+
, sp.splr_add
27+
, sp.splr_add_dt
28+
, sp.splr_indst
29+
, sp.splr_indst_no
30+
, sp.splr_memo
31+
, sp.splr_email
32+
FROM tb_splr sp
33+
INNER JOIN tb_detail_code dc ON dc.group_code = 'bk_cd' AND dc.detail_code = sp.bk_cd
34+
<where>
35+
<if test="(sname != null) and (!sname.equals(''))">
36+
<choose>
37+
<when test="searchKey eq 'sp_name'.toString()">
38+
and sp.splr_name Like CONCAT('%', #{sname}, '%')
39+
</when>
40+
<when test="searchKey eq 'sp_indst_no'.toString()">
41+
and sp.splr_indst_no LIKE CONCAT('%', #{sname}, '%')
42+
</when>
43+
<otherwise>
44+
and ( sp.splr_name Like CONCAT('%', #{sname}, '%') or sp.splr_indst_no LIKE CONCAT('%', #{sname}, '%') )
45+
</otherwise>
46+
</choose>
47+
</if>
48+
</where>
49+
ORDER BY sp.splr_no
50+
LIMIT #{pageindex}, #{pageSize}
51+
</select>
52+
```
53+
54+

0 commit comments

Comments
 (0)