Selaa lähdekoodia

240924-1745-Kim

EricKIm 1 kuukausi sitten
vanhempi
commit
7c6748da1d
43 muutettua tiedostoa jossa 45 lisäystä ja 5 poistoa
  1. 1 0
      function-in-db/functions/curr-yyyymmdd-func.sql
  2. 1 0
      function-in-db/functions/date-day-func.sql
  3. 1 0
      function-in-db/functions/date-month-func.sql
  4. 1 0
      function-in-db/functions/date-week-func-old1.sql
  5. 1 0
      function-in-db/functions/date-week-func.sql
  6. 1 0
      function-in-db/functions/one-to-check-func.sql
  7. 1 0
      function-in-db/functions/rdecimal.sql
  8. 1 0
      function-in-db/procedures/accounting/lt1-accounting-cash-sum-bal.sql
  9. 1 0
      function-in-db/procedures/accounting/pl1_accounting_cash_ledger_detail.sql
  10. 1 0
      function-in-db/procedures/clo_branch_closing.sql
  11. 1 0
      function-in-db/procedures/clo_pos_closing.sql
  12. 1 0
      function-in-db/procedures/common/file_cal_format.sql
  13. 1 0
      function-in-db/procedures/common/fnc_curr_item_bal.sql
  14. 1 0
      function-in-db/procedures/common/fnc_curr_reward_bal.sql
  15. 1 0
      function-in-db/procedures/conv_eyetest_sorder.sql
  16. 1 0
      function-in-db/procedures/dash_board/shop_dash/lt1_shop_dash_2_left_top.sql
  17. 1 3
      function-in-db/procedures/dash_board/shop_dash/lt1_shop_dash_order_delayed.sql
  18. 1 0
      function-in-db/procedures/dash_board/shop_dash/zds_door_sales_cancel_month.sql
  19. 1 0
      function-in-db/procedures/point/credit_bd_act.sql
  20. 1 0
      function-in-db/procedures/point/credit_bd_sync.sql
  21. 1 0
      function-in-db/procedures/point/lt1-credit-bd-sum-bal.sql
  22. 1 0
      function-in-db/procedures/point/lt1-credit-bd-sum-bal.sql--
  23. 1 0
      function-in-db/procedures/point/lt1-reward-bd-sum-bal.sql
  24. 1 0
      function-in-db/procedures/point/pl1_credit_bd_ledger_detail.sql
  25. 1 0
      function-in-db/procedures/point/pl1_reward_bd_ledger_detail.sql
  26. 2 1
      function-in-db/procedures/point/reward_bd_act.sql
  27. 1 0
      function-in-db/procedures/point/reward_bd_sync.sql
  28. 1 0
      function-in-db/procedures/purch/lt1-purch-sum-bal.sql
  29. 1 0
      function-in-db/procedures/purch/pl1_purch_ledger_detail.sql
  30. 1 0
      function-in-db/procedures/sales/lt1-sales-sum-bal.sql
  31. 1 0
      function-in-db/procedures/sales/pl1_sales_ledger_detail.sql
  32. 1 0
      function-in-db/procedures/stock-io/lt1-stock-io-sum-bal.sql
  33. 1 0
      function-in-db/procedures/stock-io/pl1_stock_io_ledger_detail.sql
  34. 1 0
      function-in-db/procedures/stock-io/trash/lt1-stock-io-sum-bal-bf-turbo.sql
  35. 1 0
      function-in-db/procedures/stock-io/trash/pl1_stock_io_ledger_detail-bf-turbo.sql
  36. 1 0
      function-in-db/procedures/stock-io/trash/stock_io_act.sql
  37. 1 0
      function-in-db/procedures/stock-io/trash/stock_io_sync.sql
  38. 2 1
      function-in-db/triggers/credit_bd_insert.sql_확인해서다시구현요
  39. 1 0
      table-controls/select-json.sql
  40. 1 0
      table-controls/truncate-all-tables(위험).sql
  41. 1 0
      table-controls/z-auto-increment-0.sql
  42. 1 0
      table-controls/z-tmp-집계표.sql
  43. 1 0
      z-tmp-집계표.sql

+ 1 - 0
function-in-db/functions/curr-yyyymmdd-func.sql

@@ -1,5 +1,6 @@
 DELIMITER $$
 CREATE DEFINER=`root`@`localhost` FUNCTION `CurrYyyymmdd`() RETURNS varchar(8) CHARSET utf8mb4
+SQL SECURITY INVOKER
 BEGIN
 
    DECLARE ret VARCHAR(8);

+ 1 - 0
function-in-db/functions/date-day-func.sql

@@ -3,6 +3,7 @@ DELIMITER //
 CREATE FUNCTION DateDay ( date VARCHAR(8) )
 RETURNS VARCHAR(10)
 
+SQL SECURITY INVOKER
 BEGIN
    DECLARE ret VARCHAR(10);
 	   set ret = concat(substring(date, 1,4),'.',substring(date, 5,2),'.',substring(date, 7,2));

+ 1 - 0
function-in-db/functions/date-month-func.sql

@@ -3,6 +3,7 @@ DELIMITER //
 CREATE FUNCTION DateMonth ( date VARCHAR(8) )
 RETURNS VARCHAR(5)
 
+SQL SECURITY INVOKER
 BEGIN
    DECLARE ret VARCHAR(5);
 	   set ret = concat(substring(date, 3,2),'.',substring(date, 5,2)) ;

+ 1 - 0
function-in-db/functions/date-week-func-old1.sql

@@ -1,6 +1,7 @@
 DELIMITER //
 CREATE FUNCTION DateWeek ( date VARCHAR(8) )
 RETURNS VARCHAR(8)
+SQL SECURITY INVOKER
 BEGIN
    DECLARE month VARCHAR(5);
    DECLARE ret VARCHAR(8);

+ 1 - 0
function-in-db/functions/date-week-func.sql

@@ -1,6 +1,7 @@
 DELIMITER //
 CREATE FUNCTION DateWeek ( date VARCHAR(8) )
 RETURNS VARCHAR(8)
+SQL SECURITY INVOKER
 BEGIN
    DECLARE month VARCHAR(5);
    DECLARE ret VARCHAR(8);

+ 1 - 0
function-in-db/functions/one-to-check-func.sql

@@ -3,6 +3,7 @@ DELIMITER //
 CREATE FUNCTION OneToCheck ( val CHAR(1) )
 RETURNS VARCHAR(1)
 
+SQL SECURITY INVOKER
 BEGIN
    DECLARE ret VARCHAR(1);
 	   set ret = IF(val = '1', '√', '');

+ 1 - 0
function-in-db/functions/rdecimal.sql

@@ -4,6 +4,7 @@ drop function if exists rdecimal;
 CREATE FUNCTION rdecimal ( f float, p int )
 RETURNS decimal(20,4)
 
+SQL SECURITY INVOKER
 BEGIN
 
    DECLARE ret DECIMAL(20,4);

+ 1 - 0
function-in-db/procedures/accounting/lt1-accounting-cash-sum-bal.sql

@@ -10,6 +10,7 @@ _s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
 _where varchar(386), _having varchar(386), _orderby varchar(64), 
 _branch int, _storage int)
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _sbal_date varchar(8);

+ 1 - 0
function-in-db/procedures/accounting/pl1_accounting_cash_ledger_detail.sql

@@ -10,6 +10,7 @@ _s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
 _where varchar(386), _having varchar(386), _orderby varchar(64), 
 _branch int, _storage int, _target int)
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _sbal_date varchar(8);

+ 1 - 0
function-in-db/procedures/clo_branch_closing.sql

@@ -5,6 +5,7 @@ drop procedure if exists clo_branch_closing;
 DELIMITER //
 create procedure clo_branch_closing( _curr_date varchar(8), _branch int, _user int)
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _sales_day decimal(20,4) default "0.0000";

+ 1 - 0
function-in-db/procedures/clo_pos_closing.sql

@@ -5,6 +5,7 @@ drop procedure if exists clo_pos_closing;
 DELIMITER //
 create procedure clo_pos_closing( _curr_date varchar(8), _branch int, _user int)
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _sales_day decimal(20,4) default "0.0000";

+ 1 - 0
function-in-db/procedures/common/file_cal_format.sql

@@ -2,6 +2,7 @@
 DROP PROCEDURE IF EXISTS fill_cal_format;
 DELIMITER |
 CREATE PROCEDURE fill_cal_format(dateStart DATE, dateEnd DATE)
+SQL SECURITY INVOKER
 BEGIN
   declare i date ;
   declare w int;

+ 1 - 0
function-in-db/procedures/common/fnc_curr_item_bal.sql

@@ -2,6 +2,7 @@ drop procedure if exists fnc_curr_item_bal;
 DELIMITER //
 create procedure fnc_curr_item_bal( _curr_date varchar(8), _storage int, _target int)
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _last_amt decimal(20,4) default "0.0000";

+ 1 - 0
function-in-db/procedures/common/fnc_curr_reward_bal.sql

@@ -2,6 +2,7 @@ drop procedure if exists fnc_curr_reward_bal;
 DELIMITER //
 create procedure fnc_curr_reward_bal( _curr_date varchar(8), _branch int, _target int)
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _bal_date varchar(8);

+ 1 - 0
function-in-db/procedures/conv_eyetest_sorder.sql

@@ -4,6 +4,7 @@ drop procedure if exists conv_eyetest_sorder;
 DELIMITER //
 create procedure conv_eyetest_sorder()
 
+SQL SECURITY INVOKER
 BEGIN
 
 -- Declare _json1 text;

+ 1 - 0
function-in-db/procedures/dash_board/shop_dash/lt1_shop_dash_2_left_top.sql

@@ -6,6 +6,7 @@ _s1 varchar(32), _e1 varchar(32), _s2 varchar(32), _e2 varchar(32),
 _s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
 _having varchar(386), _orderby varchar(64),
 _branch int, _storage int, _member_company_id int, _lt_filter int)
+SQL SECURITY INVOKER
 BEGIN
 
 -- 로컬 변수 선언

+ 1 - 3
function-in-db/procedures/dash_board/shop_dash/lt1_shop_dash_order_delayed.sql

@@ -6,6 +6,7 @@ _s1 varchar(32), _e1 varchar(32), _s2 varchar(32), _e2 varchar(32),
 _s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
 _having varchar(386), _orderby varchar(64),
 _branch int, _storage int, _member_company_id int, _lt_filter int)
+SQL SECURITY INVOKER
 BEGIN
 
 -- 로컬 변수 선언
@@ -65,6 +66,3 @@ FROM (
 END //
 
 DELIMITER ;
-
-CALL lt1_shop_dash_order_delayed('', '', '', '', '', '', '', '',
-'', '', '', '', '', '', 1, 1);

+ 1 - 0
function-in-db/procedures/dash_board/shop_dash/zds_door_sales_cancel_month.sql

@@ -6,6 +6,7 @@ _s1 varchar(32), _e1 varchar(32), _s2 varchar(32), _e2 varchar(32),
 _s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
 _having varchar(386), _orderby varchar(64),
 _branch int, _storage int, _member_company_id int, _lt_filter int)
+SQL SECURITY INVOKER
 BEGIN
 	  DECLARE start_date varchar(8);
 	  DECLARE end_date varchar(8);

+ 1 - 0
function-in-db/procedures/point/credit_bd_act.sql

@@ -2,6 +2,7 @@ drop procedure if exists credit_bd_act;
 
 create procedure credit_bd_act( _slip_code varchar(6), _target int, _act int)
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _created_on bigint ;

+ 1 - 0
function-in-db/procedures/point/credit_bd_sync.sql

@@ -4,6 +4,7 @@ drop procedure if exists credit_bd_sync;
 DELIMITER //
 create procedure credit_bd_sync( _sdate varchar(8), _edate varchar(8) )
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _line_id int;

+ 1 - 0
function-in-db/procedures/point/lt1-credit-bd-sum-bal.sql

@@ -9,6 +9,7 @@ _s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
 _where varchar(386), _having varchar(386), _orderby varchar(64), 
 _branch int, _storage int)
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _sbal_date varchar(8);

+ 1 - 0
function-in-db/procedures/point/lt1-credit-bd-sum-bal.sql--

@@ -8,6 +8,7 @@ _s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
 _where varchar(386), _having varchar(386), _orderby varchar(64), 
 _branch int, _storage int)
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _sbal_date varchar(8);

+ 1 - 0
function-in-db/procedures/point/lt1-reward-bd-sum-bal.sql

@@ -9,6 +9,7 @@ _s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
 _where varchar(386), _having varchar(386), _orderby varchar(64), 
 _branch int, _storage int)
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _sbal_date varchar(8);

+ 1 - 0
function-in-db/procedures/point/pl1_credit_bd_ledger_detail.sql

@@ -9,6 +9,7 @@ _s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
 _where varchar(386), _having varchar(386), _orderby varchar(64), 
 _branch int, _storage int, _target int)
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _sbal_date varchar(8);

+ 1 - 0
function-in-db/procedures/point/pl1_reward_bd_ledger_detail.sql

@@ -10,6 +10,7 @@ _s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
 _where varchar(386), _having varchar(386), _orderby varchar(64), 
 _branch int, _storage int, _target int)
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _sbal_date varchar(8);

+ 2 - 1
function-in-db/procedures/point/reward_bd_act.sql

@@ -4,7 +4,8 @@ drop procedure if exists reward_bd_act;
 DELIMITER //
 create procedure reward_bd_act( _slip_code varchar(6), _target int, _act int)
 
-_procedure: BEGIN
+_procedure: SQL SECURITY INVOKER
+BEGIN
 
 Declare _created_on bigint ;
 Declare _updated_on bigint ;

+ 1 - 0
function-in-db/procedures/point/reward_bd_sync.sql

@@ -4,6 +4,7 @@ drop procedure if exists reward_bd_sync;
 DELIMITER //
 create procedure reward_bd_sync( _sdate varchar(8), _edate varchar(8) )
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _line_id int;

+ 1 - 0
function-in-db/procedures/purch/lt1-purch-sum-bal.sql

@@ -9,6 +9,7 @@ _s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
 _where varchar(386), _having varchar(386), _orderby varchar(64), 
 _branch int, _storage int)
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _sbal_date varchar(8);

+ 1 - 0
function-in-db/procedures/purch/pl1_purch_ledger_detail.sql

@@ -9,6 +9,7 @@ _s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
 _where varchar(386), _having varchar(386), _orderby varchar(64), 
 _branch int, _storage int, _target int)
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _sbal_date varchar(8);

+ 1 - 0
function-in-db/procedures/sales/lt1-sales-sum-bal.sql

@@ -9,6 +9,7 @@ _s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
 _where varchar(386), _having varchar(386), _orderby varchar(64), 
 _branch int, _storage int)
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _sbal_date varchar(8);

+ 1 - 0
function-in-db/procedures/sales/pl1_sales_ledger_detail.sql

@@ -9,6 +9,7 @@ _s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
 _where varchar(386), _having varchar(386), _orderby varchar(64), 
 _branch int, _storage int, _target int)
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _sbal_date varchar(8);

+ 1 - 0
function-in-db/procedures/stock-io/lt1-stock-io-sum-bal.sql

@@ -8,6 +8,7 @@ _s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
 _having varchar(386), _orderby varchar(64), 
 _branch int, _storage int, _member_company_id int, _lt_filter int)
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _sbal_date varchar(8);

+ 1 - 0
function-in-db/procedures/stock-io/pl1_stock_io_ledger_detail.sql

@@ -9,6 +9,7 @@ _s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
 _having varchar(386), _orderby varchar(64), 
 _branch int, _storage int, _member_company_id int, _lt_filter int)
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _sbal_date varchar(8);

+ 1 - 0
function-in-db/procedures/stock-io/trash/lt1-stock-io-sum-bal-bf-turbo.sql

@@ -8,6 +8,7 @@ _s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
 _where varchar(386), _having varchar(386), _orderby varchar(64), 
 _branch int, _storage int)
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _sbal_date varchar(8);

+ 1 - 0
function-in-db/procedures/stock-io/trash/pl1_stock_io_ledger_detail-bf-turbo.sql

@@ -9,6 +9,7 @@ _s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
 _where varchar(386), _having varchar(386), _orderby varchar(64), 
 _branch int, _storage int, _target int)
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _sbal_date varchar(8);

+ 1 - 0
function-in-db/procedures/stock-io/trash/stock_io_act.sql

@@ -4,6 +4,7 @@ drop procedure if exists stock_io_act;
 DELIMITER //
 create procedure stock_io_act( _slip_code varchar(6), _target int, _act int)
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _created_on bigint ;

+ 1 - 0
function-in-db/procedures/stock-io/trash/stock_io_sync.sql

@@ -4,6 +4,7 @@ drop procedure if exists stock_io_sync;
 DELIMITER //
 create procedure stock_io_sync( _sdate varchar(8), _edate varchar(8) )
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _line_id int;

+ 2 - 1
function-in-db/triggers/credit_bd_insert.sql_확인해서다시구현요

@@ -1,6 +1,7 @@
 DELIMITER // 
 CREATE TRIGGER credit_bd_insert AFTER INSERT ON dbr_credit_bd
-    FOR EACH ROW BEGIN
+    FOR EACH ROW SQL SECURITY INVOKER
+BEGIN
         UPDATE dbr_company SET curr_credit_bal = new.bal_amt WHERE id = new.buyer_id;
     END//
 DELIMITER ;

+ 1 - 0
table-controls/select-json.sql

@@ -2,6 +2,7 @@ drop procedure if exists fnc_curr_reward_bal;
 
 create procedure fnc_curr_reward_bal()
 
+SQL SECURITY INVOKER
 BEGIN
 
 -- setup 변수들 --

+ 1 - 0
table-controls/truncate-all-tables(위험).sql

@@ -1,6 +1,7 @@
 DROP PROCEDURE IF EXISTS trunctables;
 DELIMITER ;;
 CREATE  PROCEDURE trunctables(theDb varchar(64))
+SQL SECURITY INVOKER
 BEGIN
     declare tname varchar(64);
     declare table_except text;

+ 1 - 0
table-controls/z-auto-increment-0.sql

@@ -8,6 +8,7 @@ ALTER TABLE `dbr_sort_menu`
 DELIMITER //
 
 CREATE PROCEDURE ResetAutoIncrement()
+SQL SECURITY INVOKER
 BEGIN
     DECLARE done INT DEFAULT FALSE;
     DECLARE tableName VARCHAR(255);

+ 1 - 0
table-controls/z-tmp-집계표.sql

@@ -2,6 +2,7 @@ drop procedure if exists fnc_curr_item_bal;
 DELIMITER //
 create procedure fnc_curr_item_bal( _curr_date varchar(8), _storage int, _target int)
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _curr_bal decimal(20,4) default "0.0000";

+ 1 - 0
z-tmp-집계표.sql

@@ -2,6 +2,7 @@ drop procedure if exists fnc_curr_item_bal;
 DELIMITER //
 create procedure fnc_curr_item_bal( _curr_date varchar(8), _storage int, _target int)
 
+SQL SECURITY INVOKER
 BEGIN
 
 Declare _curr_bal decimal(20,4) default "0.0000";