国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Home Backend Development PHP Tutorial 關(guān)于php二次開發(fā)的疑點(diǎn)

關(guān)于php二次開發(fā)的疑點(diǎn)

Jun 13, 2016 pm 12:02 PM
nbsp quote

關(guān)于php二次開發(fā)的疑問
我現(xiàn)在要做一個(gè)功能就是關(guān)于交易流程的,1)前臺(tái)賣家發(fā)布服務(wù)信息,2)經(jīng)過后臺(tái)管理員審核,審核通過,賣方的服務(wù)信息可以發(fā)布到網(wǎng)站上。。3)買方通過搜索搜索到合適的服務(wù),4)買方付款(通過支付寶)5)管理員審核。審核通過后,賣方收到通知。6)等待賣方確認(rèn),同意后服務(wù)達(dá)成。之后就是賣方提供服務(wù)。服務(wù)進(jìn)行過程中,賣方可以發(fā)布信息,買方可以實(shí)時(shí)查看服務(wù)進(jìn)度。服務(wù)完成后雙方可以互評(píng)。至此流程結(jié)束。后臺(tái)管理員要可以監(jiān)控整個(gè)交易流程。而我現(xiàn)在的任務(wù)就是要實(shí)現(xiàn)第2步還有第5步的功能,也就是說整個(gè)流程中網(wǎng)站后臺(tái)需要做的事情??墒乾F(xiàn)在流程的其他部分都沒有做,老板就要我做后臺(tái)的這兩步,我大腦里面根本就沒有思路。這是我工作以來第一次做二次開發(fā),PHP斷斷續(xù)續(xù)剛學(xué)了一個(gè)來月,就被老板趕鴨子上架,也算是對(duì)小弟的依次工作考核,所以現(xiàn)在小弟求各位大大指導(dǎo)一下啊。
------解決方案--------------------
1)賣家發(fā)布服務(wù)信息時(shí),你可以把數(shù)據(jù)庫(kù)里的字段,比如status置為0
2)將status為0的服務(wù)信息取出來審核,通過后置為1
4)將買方付款記錄status字段置為0
5)將status為0的交易記錄取出進(jìn)行審核,通過后置為1,再進(jìn)行其它操作,如賣方收到通知

思路就是這樣,status字段的值可以自己定義,不一定是0,或1,根據(jù)自己的實(shí)際情況定
------解決方案--------------------
服務(wù)信息表字段:tb_ser?????sid(服務(wù)信息id)?,?mc?,?status(審核標(biāo)志字段)??...(其他信息字段);
收款記錄表?:???????tb_pay????id(收款記錄id),?sid(服務(wù)信息id)?,?status(收費(fèi)審核標(biāo)志字段)?...??(收款方和付款方的一些信息字段,不要怕產(chǎn)生冗余,也不要和其他表關(guān)聯(lián),收費(fèi)記錄信息不能隨其他表記錄更改而改變)

前臺(tái)顯示和搜索服務(wù)信息時(shí)??取???tb_ser.status='1'????;
------解決方案--------------------
如果不是二次開發(fā),讓你完整開發(fā)你會(huì)嗎?
估計(jì)也不會(huì)吧?
所以,這個(gè)跟二次開發(fā)沒什么關(guān)系。
業(yè)務(wù)邏輯搞清楚了,代碼上實(shí)現(xiàn)就好了。
無(wú)非就是CRUD
------解決方案--------------------
2)經(jīng)過后臺(tái)管理員審核,審核通過,賣方的服務(wù)信息可以發(fā)布到網(wǎng)站上。
5)管理員審核。審核通過后,賣方收到通知。
這不就是模塊化嗎?
流程都是:
獲取未審核的條目
填寫已審核標(biāo)記
發(fā)出消息

至于未審核數(shù)據(jù)的來源和消息發(fā)往何處,都由配置文件指定,開發(fā)時(shí)可虛擬一個(gè)
------解決方案--------------------

引用:
Quote: 引用:

服務(wù)信息表字段:tb_ser?????sid(服務(wù)信息id)?,?mc?,?status(審核標(biāo)志字段)??...(其他信息字段);
收款記錄表?:???????tb_pay????id(收款記錄id),?sid(服務(wù)信息id)?,?status(收費(fèi)審核標(biāo)志字段)?...??(收款方和付款方的一些信息字段,不要怕產(chǎn)生冗余,也不要和其他表關(guān)聯(lián),收費(fèi)記錄信息不能隨其他表記錄更改而改變)

前臺(tái)顯示和搜索服務(wù)信息時(shí)??取???tb_ser.status='1'????;
那服務(wù)表和收款表里的sid需要關(guān)聯(lián)么。還有“mc”是啥意思。。。如果服務(wù)信息里面要包含服務(wù)介紹包括文字介紹還有圖片介紹。那學(xué)不需要,見一個(gè)附表啥的,把這些內(nèi)容放在附表里。


sid?要關(guān)聯(lián);mc是名稱啊(mc可能會(huì)改動(dòng)別關(guān)聯(lián)),還有服務(wù)信息表是查詢頻率非常高的,最好要顯示的信息一表搞定,你建附表動(dòng)不動(dòng)就要幾表聯(lián)查影響效率。
------解決方案--------------------
是的

引用:
Quote: 引用:

Quote: 引用:

Quote: 引用:

服務(wù)信息表字段:tb_ser?????sid(服務(wù)信息id)?,?mc?,?status(審核標(biāo)志字段)??...(其他信息字段);
收款記錄表?:???????tb_pay????id(收款記錄id),?sid(服務(wù)信息id)?,?status(收費(fèi)審核標(biāo)志字段)?...??(收款方和付款方的一些信息字段,不要怕產(chǎn)生冗余,也不要和其他表關(guān)聯(lián),收費(fèi)記錄信息不能隨其他表記錄更改而改變)

前臺(tái)顯示和搜索服務(wù)信息時(shí)??取???tb_ser.status='1'????;
那服務(wù)表和收款表里的sid需要關(guān)聯(lián)么。還有“mc”是啥意思。。。如果服務(wù)信息里面要包含服務(wù)介紹包括文字介紹還有圖片介紹。那學(xué)不需要,見一個(gè)附表啥的,把這些內(nèi)容放在附表里。


sid?要關(guān)聯(lián);mc是名稱啊(mc可能會(huì)改動(dòng)別關(guān)聯(lián)),還有服務(wù)信息表是查詢頻率非常高的,最好要顯示的信息一表搞定,你建附表動(dòng)不動(dòng)就要幾表聯(lián)查影響效率。
哦,那好吧,最后一個(gè)問題,那個(gè)關(guān)聯(lián)是不是設(shè)置設(shè)置外鍵啊


是的
------解決方案--------------------
引用:
Quote: 引用:

Quote: 引用:

Quote: 引用:

服務(wù)信息表字段:tb_ser?????sid(服務(wù)信息id)?,?mc?,?status(審核標(biāo)志字段)??...(其他信息字段);
收款記錄表?:???????tb_pay????id(收款記錄id),?sid(服務(wù)信息id)?,?status(收費(fèi)審核標(biāo)志字段)?...??(收款方和付款方的一些信息字段,不要怕產(chǎn)生冗余,也不要和其他表關(guān)聯(lián),收費(fèi)記錄信息不能隨其他表記錄更改而改變)

前臺(tái)顯示和搜索服務(wù)信息時(shí)??取???tb_ser.status='1'????;
那服務(wù)表和收款表里的sid需要關(guān)聯(lián)么。還有“mc”是啥意思。。。如果服務(wù)信息里面要包含服務(wù)介紹包括文字介紹還有圖片介紹。那學(xué)不需要,見一個(gè)附表啥的,把這些內(nèi)容放在附表里。


sid?要關(guān)聯(lián);mc是名稱啊(mc可能會(huì)改動(dòng)別關(guān)聯(lián)),還有服務(wù)信息表是查詢頻率非常高的,最好要顯示的信息一表搞定,你建附表動(dòng)不動(dòng)就要幾表聯(lián)查影響效率。
哦,那好吧,最后一個(gè)問題,那個(gè)關(guān)聯(lián)是不是設(shè)置設(shè)置外鍵啊

關(guān)聯(lián)不一定要設(shè)置外鍵,數(shù)據(jù)庫(kù)字段數(shù)據(jù)做好關(guān)聯(lián)就行了,從程序上做好數(shù)據(jù)關(guān)聯(lián)約束。你去了解下數(shù)據(jù)設(shè)計(jì)的范式。
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Solution: Your organization requires you to change your PIN Solution: Your organization requires you to change your PIN Oct 04, 2023 pm 05:45 PM

The message "Your organization has asked you to change your PIN" will appear on the login screen. This happens when the PIN expiration limit is reached on a computer using organization-based account settings, where they have control over personal devices. However, if you set up Windows using a personal account, the error message should ideally not appear. Although this is not always the case. Most users who encounter errors report using their personal accounts. Why does my organization ask me to change my PIN on Windows 11? It's possible that your account is associated with an organization, and your primary approach should be to verify this. Contacting your domain administrator can help! Additionally, misconfigured local policy settings or incorrect registry keys can cause errors. Right now

How to adjust window border settings on Windows 11: Change color and size How to adjust window border settings on Windows 11: Change color and size Sep 22, 2023 am 11:37 AM

Windows 11 brings fresh and elegant design to the forefront; the modern interface allows you to personalize and change the finest details, such as window borders. In this guide, we'll discuss step-by-step instructions to help you create an environment that reflects your style in the Windows operating system. How to change window border settings? Press + to open the Settings app. WindowsI go to Personalization and click Color Settings. Color Change Window Borders Settings Window 11" Width="643" Height="500" > Find the Show accent color on title bar and window borders option, and toggle the switch next to it. To display accent colors on the Start menu and taskbar To display the theme color on the Start menu and taskbar, turn on Show theme on the Start menu and taskbar

How to change title bar color on Windows 11? How to change title bar color on Windows 11? Sep 14, 2023 pm 03:33 PM

By default, the title bar color on Windows 11 depends on the dark/light theme you choose. However, you can change it to any color you want. In this guide, we'll discuss step-by-step instructions for three ways to change it and personalize your desktop experience to make it visually appealing. Is it possible to change the title bar color of active and inactive windows? Yes, you can change the title bar color of active windows using the Settings app, or you can change the title bar color of inactive windows using Registry Editor. To learn these steps, go to the next section. How to change title bar color in Windows 11? 1. Using the Settings app press + to open the settings window. WindowsI go to "Personalization" and then

How to enable or disable taskbar thumbnail previews on Windows 11 How to enable or disable taskbar thumbnail previews on Windows 11 Sep 15, 2023 pm 03:57 PM

Taskbar thumbnails can be fun, but they can also be distracting or annoying. Considering how often you hover over this area, you may have inadvertently closed important windows a few times. Another disadvantage is that it uses more system resources, so if you've been looking for a way to be more resource efficient, we'll show you how to disable it. However, if your hardware specs can handle it and you like the preview, you can enable it. How to enable taskbar thumbnail preview in Windows 11? 1. Using the Settings app tap the key and click Settings. Windows click System and select About. Click Advanced system settings. Navigate to the Advanced tab and select Settings under Performance. Select "Visual Effects"

OOBELANGUAGE Error Problems in Windows 11/10 Repair OOBELANGUAGE Error Problems in Windows 11/10 Repair Jul 16, 2023 pm 03:29 PM

Do you see "A problem occurred" along with the "OOBELANGUAGE" statement on the Windows Installer page? The installation of Windows sometimes stops due to such errors. OOBE means out-of-the-box experience. As the error message indicates, this is an issue related to OOBE language selection. There is nothing to worry about, you can solve this problem with nifty registry editing from the OOBE screen itself. Quick Fix – 1. Click the “Retry” button at the bottom of the OOBE app. This will continue the process without further hiccups. 2. Use the power button to force shut down the system. After the system restarts, OOBE should continue. 3. Disconnect the system from the Internet. Complete all aspects of OOBE in offline mode

Display scaling guide on Windows 11 Display scaling guide on Windows 11 Sep 19, 2023 pm 06:45 PM

We all have different preferences when it comes to display scaling on Windows 11. Some people like big icons, some like small icons. However, we all agree that having the right scaling is important. Poor font scaling or over-scaling of images can be a real productivity killer when working, so you need to know how to customize it to get the most out of your system's capabilities. Advantages of Custom Zoom: This is a useful feature for people who have difficulty reading text on the screen. It helps you see more on the screen at one time. You can create custom extension profiles that apply only to certain monitors and applications. Can help improve the performance of low-end hardware. It gives you more control over what's on your screen. How to use Windows 11

10 Ways to Adjust Brightness on Windows 11 10 Ways to Adjust Brightness on Windows 11 Dec 18, 2023 pm 02:21 PM

Screen brightness is an integral part of using modern computing devices, especially when you look at the screen for long periods of time. It helps you reduce eye strain, improve legibility, and view content easily and efficiently. However, depending on your settings, it can sometimes be difficult to manage brightness, especially on Windows 11 with the new UI changes. If you're having trouble adjusting brightness, here are all the ways to manage brightness on Windows 11. How to Change Brightness on Windows 11 [10 Ways Explained] Single monitor users can use the following methods to adjust brightness on Windows 11. This includes desktop systems using a single monitor as well as laptops. let's start. Method 1: Use the Action Center The Action Center is accessible

How to Fix Activation Error Code 0xc004f069 in Windows Server How to Fix Activation Error Code 0xc004f069 in Windows Server Jul 22, 2023 am 09:49 AM

The activation process on Windows sometimes takes a sudden turn to display an error message containing this error code 0xc004f069. Although the activation process is online, some older systems running Windows Server may experience this issue. Go through these initial checks, and if they don't help you activate your system, jump to the main solution to resolve the issue. Workaround – close the error message and activation window. Then restart the computer. Retry the Windows activation process from scratch again. Fix 1 – Activate from Terminal Activate Windows Server Edition system from cmd terminal. Stage – 1 Check Windows Server Version You have to check which type of W you are using

See all articles