我现在要做一个功能就是关于交易流程的,1)前台卖家发布服务信息,2)经过后台管理员审核,审核通过,卖方的服务信息可以发布到网站上。。3)买方通过搜索搜索到合适的服务,4)买方付款(通过支付宝)5)管理员审核。审核通过后,卖方收到通知。6)等待卖方确认,同意后服务达成。之后就是卖方提供服务。服务进行过程中,卖方可以发布信息,买方可以实时查看服务进度。服务完成后双方可以互评。至此流程结束。后台管理员要可以监控整个交易流程。而我现在的任务就是要实现第2步还有第5步的功能,也就是说整个流程中网站后台需要做的事情。可是现在流程的其他部分都没有做,老板就要我做后台的这两步,我大脑里面根本就没有思路。这是我工作以来第一次做二次开发,PHP断断续续刚学了一个来月,就被老板赶鸭子上架,也算是对小弟的依次工作考核,所以现在小弟求各位大大指导一下啊。
回复讨论(解决方案)
1)卖家发布服务信息时,你可以把数据库里的字段,比如status置为0
2)将status为0的服务信息取出来审核,通过后置为1
4)将买方付款记录status字段置为0
5)将status为0的交易记录取出进行审核,通过后置为1,再进行其它操作,如卖方收到通知
思路就是这样,status字段的值可以自己定义,不一定是0,或1,根据自己的实际情况定
1)卖家发布服务信息时,你可以把数据库里的字段,比如status置为0
2)将status为0的服务信息取出来审核,通过后置为1
4)将买方付款记录status字段置为0
5)将status为0的交易记录取出进行审核,通过后置为1,再进行其它操作,如卖方收到通知
思路就是这样,status字段的值可以自己定义,不一定是0,或1,根据自己的实际情况定
源码项目我就不知道了
源码项目我就不知道了
哦,那好吧,谢谢你了 服务信息表字段:tb_ser sid(服务信息id) , mc , status(审核标志字段) ...(其他信息字段);
收款记录表 : tb_pay id(收款记录id), sid(服务信息id) , status(收费审核标志字段) ... (收款方和付款方的一些信息字段,不要怕产生冗余,也不要和其他表关联,收费记录信息不能随其他表记录更改而改变)
前台显示和搜索服务信息时 取 tb_ser.status='1' ;
如果不是二次开发,让你完整开发你会吗?
估计也不会吧?
所以,这个跟二次开发没什么关系。
业务逻辑搞清楚了,代码上实现就好了。
无非就是CRUD
如果不是二次开发,让你完整开发你会吗?
估计也不会吧?
所以,这个跟二次开发没什么关系。
业务逻辑搞清楚了,代码上实现就好了。
无非就是CRUD
2)经过后台管理员审核,审核通过,卖方的服务信息可以发布到网站上。
5)管理员审核。审核通过后,卖方收到通知。
这不就是模块化吗?
流程都是:
获取未审核的条目
填写已审核标记
发出消息
至于未审核数据的来源和消息发往何处,都由配置文件指定,开发时可虚拟一个
服务信息表字段:tb_ser sid(服务信息id) , mc , status(审核标志字段) ...(其他信息字段);
收款记录表 : tb_pay id(收款记录id), sid(服务信息id) , status(收费审核标志字段) ... (收款方和付款方的一些信息字段,不要怕产生冗余,也不要和其他表关联,收费记录信息不能随其他表记录更改而改变)
前台显示和搜索服务信息时 取 tb_ser.status='1' ;
服务信息表字段:tb_ser sid(服务信息id) , mc , status(审核标志字段) ...(其他信息字段);
收款记录表 : tb_pay id(收款记录id), sid(服务信息id) , status(收费审核标志字段) ... (收款方和付款方的一些信息字段,不要怕产生冗余,也不要和其他表关联,收费记录信息不能随其他表记录更改而改变)
前台显示和搜索服务信息时 取 tb_ser.status='1' ;
sid 要关联;mc是名称啊(mc可能会改动别关联),还有服务信息表是查询频率非常高的,最好要显示的信息一表搞定,你建附表动不动就要几表联查影响效率。
服务信息表字段:tb_ser sid(服务信息id) , mc , status(审核标志字段) ...(其他信息字段);
收款记录表 : tb_pay id(收款记录id), sid(服务信息id) , status(收费审核标志字段) ... (收款方和付款方的一些信息字段,不要怕产生冗余,也不要和其他表关联,收费记录信息不能随其他表记录更改而改变)
前台显示和搜索服务信息时 取 tb_ser.status='1' ;
sid 要关联;mc是名称啊(mc可能会改动别关联),还有服务信息表是查询频率非常高的,最好要显示的信息一表搞定,你建附表动不动就要几表联查影响效率。 哦,那好吧,最后一个问题,那个关联是不是设置设置外键啊
是的
服务信息表字段:tb_ser sid(服务信息id) , mc , status(审核标志字段) ...(其他信息字段);
收款记录表 : tb_pay id(收款记录id), sid(服务信息id) , status(收费审核标志字段) ... (收款方和付款方的一些信息字段,不要怕产生冗余,也不要和其他表关联,收费记录信息不能随其他表记录更改而改变)
前台显示和搜索服务信息时 取 tb_ser.status='1' ;
sid 要关联;mc是名称啊(mc可能会改动别关联),还有服务信息表是查询频率非常高的,最好要显示的信息一表搞定,你建附表动不动就要几表联查影响效率。 哦,那好吧,最后一个问题,那个关联是不是设置设置外键啊
是的
服务信息表字段:tb_ser sid(服务信息id) , mc , status(审核标志字段) ...(其他信息字段);
收款记录表 : tb_pay id(收款记录id), sid(服务信息id) , status(收费审核标志字段) ... (收款方和付款方的一些信息字段,不要怕产生冗余,也不要和其他表关联,收费记录信息不能随其他表记录更改而改变)
前台显示和搜索服务信息时 取 tb_ser.status='1' ;
sid 要关联;mc是名称啊(mc可能会改动别关联),还有服务信息表是查询频率非常高的,最好要显示的信息一表搞定,你建附表动不动就要几表联查影响效率。 哦,那好吧,最后一个问题,那个关联是不是设置设置外键啊
关联不一定要设置外键,数据库字段数据做好关联就行了,从程序上做好数据关联约束。你去了解下数据设计的范式。
服务信息表字段:tb_ser sid(服务信息id) , mc , status(审核标志字段) ...(其他信息字段);
收款记录表 : tb_pay id(收款记录id), sid(服务信息id) , status(收费审核标志字段) ... (收款方和付款方的一些信息字段,不要怕产生冗余,也不要和其他表关联,收费记录信息不能随其他表记录更改而改变)
前台显示和搜索服务信息时 取 tb_ser.status='1' ;
sid 要关联;mc是名称啊(mc可能会改动别关联),还有服务信息表是查询频率非常高的,最好要显示的信息一表搞定,你建附表动不动就要几表联查影响效率。 哦,那好吧,最后一个问题,那个关联是不是设置设置外键啊
关联不一定要设置外键,数据库字段数据做好关联就行了,从程序上做好数据关联约束。你去了解下数据设计的范式。 哦,好的,谢谢你了

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values and handle functions that may return null values.

In PHP, use the clone keyword to create a copy of the object and customize the cloning behavior through the \_\_clone magic method. 1. Use the clone keyword to make a shallow copy, cloning the object's properties but not the object's properties. 2. The \_\_clone method can deeply copy nested objects to avoid shallow copying problems. 3. Pay attention to avoid circular references and performance problems in cloning, and optimize cloning operations to improve efficiency.

PHP is suitable for web development and content management systems, and Python is suitable for data science, machine learning and automation scripts. 1.PHP performs well in building fast and scalable websites and applications and is commonly used in CMS such as WordPress. 2. Python has performed outstandingly in the fields of data science and machine learning, with rich libraries such as NumPy and TensorFlow.

Key players in HTTP cache headers include Cache-Control, ETag, and Last-Modified. 1.Cache-Control is used to control caching policies. Example: Cache-Control:max-age=3600,public. 2. ETag verifies resource changes through unique identifiers, example: ETag: "686897696a7c876b7e". 3.Last-Modified indicates the resource's last modification time, example: Last-Modified:Wed,21Oct201507:28:00GMT.

In PHP, password_hash and password_verify functions should be used to implement secure password hashing, and MD5 or SHA1 should not be used. 1) password_hash generates a hash containing salt values to enhance security. 2) Password_verify verify password and ensure security by comparing hash values. 3) MD5 and SHA1 are vulnerable and lack salt values, and are not suitable for modern password security.

PHP is a server-side scripting language used for dynamic web development and server-side applications. 1.PHP is an interpreted language that does not require compilation and is suitable for rapid development. 2. PHP code is embedded in HTML, making it easy to develop web pages. 3. PHP processes server-side logic, generates HTML output, and supports user interaction and data processing. 4. PHP can interact with the database, process form submission, and execute server-side tasks.

PHP has shaped the network over the past few decades and will continue to play an important role in web development. 1) PHP originated in 1994 and has become the first choice for developers due to its ease of use and seamless integration with MySQL. 2) Its core functions include generating dynamic content and integrating with the database, allowing the website to be updated in real time and displayed in personalized manner. 3) The wide application and ecosystem of PHP have driven its long-term impact, but it also faces version updates and security challenges. 4) Performance improvements in recent years, such as the release of PHP7, enable it to compete with modern languages. 5) In the future, PHP needs to deal with new challenges such as containerization and microservices, but its flexibility and active community make it adaptable.

The core benefits of PHP include ease of learning, strong web development support, rich libraries and frameworks, high performance and scalability, cross-platform compatibility, and cost-effectiveness. 1) Easy to learn and use, suitable for beginners; 2) Good integration with web servers and supports multiple databases; 3) Have powerful frameworks such as Laravel; 4) High performance can be achieved through optimization; 5) Support multiple operating systems; 6) Open source to reduce development costs.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

SublimeText3 Linux new version
SublimeText3 Linux latest version

Atom editor mac version download
The most popular open source editor

SublimeText3 Mac version
God-level code editing software (SublimeText3)

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft