JN專案-app首頁訂票功能實現

ZHOU_VIP發表於2017-12-08






為了得到optid,需要修改檢視v_culture_hd


DELIMITER $$

USE `jnwhfwpt`$$

DROP VIEW IF EXISTS `v_culture_hd`$$

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `jnwhfwpt`.`v_culture_hd` AS 
SELECT CONCAT('gzl@',`jnwhfwpt`.`m_cultureact_gzl`.`msgCode`) AS `msgCode`,
`jnwhfwpt`.`m_cultureact_gzl`.`sender` AS `sender`,
`jnwhfwpt`.`m_cultureact_gzl`.`sendeDate` AS `sendeDate`,
`jnwhfwpt`.`m_cultureact_gzl`.`msgTitle` AS `msgTitle`,
`jnwhfwpt`.`m_cultureact_gzl`.`msgType` AS `msgType`,
`jnwhfwpt`.`m_cultureact_gzl`.`msgContent` AS `msgContent`,
`jnwhfwpt`.`m_cultureact_gzl`.`shCode` AS `shCode`,
`jnwhfwpt`.`m_cultureact_gzl`.`shDate` AS `shDate`,
`jnwhfwpt`.`m_cultureact_gzl`.`shState` AS `shState`,
`jnwhfwpt`.`m_cultureact_gzl`.`shContent` AS `shContent`,
`jnwhfwpt`.`m_cultureact_gzl`.`unitcode` AS `unitcode`,
`jnwhfwpt`.`m_cultureact_gzl`.`showstate` AS `showstate`,
`jnwhfwpt`.`m_cultureact_gzl`.`content_note` AS `content_note`,
`jnwhfwpt`.`m_cultureact_gzl`.`img` AS `img`,
`jnwhfwpt`.`m_cultureact_gzl`.`imgtype` AS `imgtype`,
`jnwhfwpt`.`m_cultureact_gzl`.`imgfilename` AS `imgfilename`,
'觀展覽' AS `lmname` ,
'WHHDGLGZL' AS `optid` 
FROM `jnwhfwpt`.`m_cultureact_gzl` 
UNION ALL 
SELECT CONCAT('kyc@',`jnwhfwpt`.`m_cultureact_kyc`.`msgCode`) AS `msgCode`,
`jnwhfwpt`.`m_cultureact_kyc`.`sender` AS `sender`,
`jnwhfwpt`.`m_cultureact_kyc`.`sendeDate` AS `sendeDate`,
`jnwhfwpt`.`m_cultureact_kyc`.`msgTitle` AS `msgTitle`,
`jnwhfwpt`.`m_cultureact_kyc`.`msgType` AS `msgType`,
`jnwhfwpt`.`m_cultureact_kyc`.`msgContent` AS `msgContent`,
`jnwhfwpt`.`m_cultureact_kyc`.`shCode` AS `shCode`,
`jnwhfwpt`.`m_cultureact_kyc`.`shDate` AS `shDate`,
`jnwhfwpt`.`m_cultureact_kyc`.`shState` AS `shState`,
`jnwhfwpt`.`m_cultureact_kyc`.`shContent` AS `shContent`,
`jnwhfwpt`.`m_cultureact_kyc`.`unitcode` AS `unitcode`,
`jnwhfwpt`.`m_cultureact_kyc`.`showstate` AS `showstate`,
`jnwhfwpt`.`m_cultureact_kyc`.`content_note` AS `content_note`,
`jnwhfwpt`.`m_cultureact_kyc`.`img` AS `img`,
`jnwhfwpt`.`m_cultureact_kyc`.`imgtype` AS `imgtype`,
`jnwhfwpt`.`m_cultureact_kyc`.`imgfilename` AS `imgfilename`,
'看演出' AS `lmname` ,
'WHHDGLKYC' AS `optid` 
FROM `jnwhfwpt`.`m_cultureact_kyc`
$$

DELIMITER ;



頁面要顯示三種狀態:訂票(灰色的,不可點選),訂票(可以點選進行訂票),已訂(點選檢視訂票詳情)





相關文章