contact_request and deliveryDate_get
gitea/salix/pipeline/pr-dev This commit looks good
Details
gitea/salix/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
ec9604323d
commit
7413644295
|
@ -0,0 +1,20 @@
|
|||
DROP PROCEDURE IF EXISTS floranet.contact_Request;
|
||||
|
||||
DELIMITER $$
|
||||
$$
|
||||
CREATE DEFINER=`root`@`localhost`
|
||||
PROCEDURE floranet.contact_Request(
|
||||
vName VARCHAR(100),
|
||||
vPhone VARCHAR(15),
|
||||
vEmail VARCHAR(100),
|
||||
vMessage TEXT)
|
||||
READS SQL DATA
|
||||
BEGIN
|
||||
/**
|
||||
* Set actions for contact request
|
||||
*
|
||||
* @param vPostalCode Delivery address postal code
|
||||
*/
|
||||
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -0,0 +1,35 @@
|
|||
DROP PROCEDURE IF EXISTS floranet.deliveryDate_get;
|
||||
|
||||
DELIMITER $$
|
||||
$$
|
||||
CREATE DEFINER=`root`@`localhost` PROCEDURE floranet.deliveryDate_get(vPostalCode VARCHAR(15))
|
||||
READS SQL DATA
|
||||
BEGIN
|
||||
/**
|
||||
* Returns available dates for this postalCode
|
||||
*
|
||||
* @param vPostalCode Delivery address postal code
|
||||
*/
|
||||
CREATE OR REPLACE TEMPORARY TABLE tmp.deliveryDate
|
||||
(dated DATE PRIMARY KEY)
|
||||
ENGINE = MEMORY;
|
||||
|
||||
IF vPostalCode != "00000" THEN
|
||||
INSERT INTO tmp.deliveryDate
|
||||
SET dated = CURDATE() + INTERVAL 1 DAY;
|
||||
|
||||
INSERT INTO tmp.deliveryDate
|
||||
SET dated = CURDATE() + INTERVAL 2 DAY;
|
||||
|
||||
INSERT INTO tmp.deliveryDate
|
||||
SET dated = CURDATE() + INTERVAL 4 DAY;
|
||||
|
||||
INSERT INTO tmp.deliveryDate
|
||||
SET dated = CURDATE() + INTERVAL 7 DAY;
|
||||
END IF;
|
||||
|
||||
SELECT * FROM tmp.deliveryDate;
|
||||
|
||||
DROP TEMPORARY TABLE tmp.deliveryDate;
|
||||
END$$
|
||||
DELIMITER ;
|
Loading…
Reference in New Issue