]> insang Git - newton-cn_pos.git/commitdiff
일회용 적립개발 참고.txt 기록
authornewton-cn <insang@kakao.com>
Sat, 11 Jan 2025 03:36:29 +0000 (12:36 +0900)
committernewton-cn <insang@kakao.com>
Sat, 11 Jan 2025 03:36:29 +0000 (12:36 +0900)
포인트적립개발_db쿼리 및 방향성.txt [new file with mode: 0644]

diff --git a/포인트적립개발_db쿼리 및 방향성.txt b/포인트적립개발_db쿼리 및 방향성.txt
new file mode 100644 (file)
index 0000000..26b68d3
--- /dev/null
@@ -0,0 +1,32 @@
+ * db 쿼리
+select
+       CONVERT(CHAR(19), a1.ps_date, 20) as ps_date, a2.ct_code, a2.ct_name, a1.ps_prname,
+       a1.ps_qty, a2.pe_bamt, a1.pe_id, a1.ps_no, isnull(a3.is_earn, 0) as is_earn
+from
+       ps a1
+       join pe a2
+               on a1.pe_id= a2.pe_id and a2.ct_code != ''
+       left join disposable_earn_point_status a3
+               on a3.pe_id= a1.pe_id and a3.ps_no= a1.ps_no
+       join ac a4
+               on a4.pe_id= a1.pe_id and a4.ac_fncd2 not in ('01', '00')
+where 
+       a1.ps_prcode in (
+               select pr_code from pr where kind_code= '1099'
+       )
+       and a1.ps_date between '2025-01-05' and '2025-10-11'
+order by
+       a1.pe_id desc;
+       
+create table disposable_earn_point_status(
+       pe_id varchar,
+       ps_no varchar,
+       is_earn bit default 0,
+       udate datetime default getdate()
+);
+
+
+
+
+ * 방향성
+현금 낸만큼 - 포인트사용 빼고 적립
\ No newline at end of file