Message, authorization, payment and refund Token authentication is used in the seller side login management system. I have been blocked in AOP because I do not have an authentication account of wechat open platform,……

【SpringBoot】 wechat ordering system

WeChat features

Template message, authorization, payment and refund

Token authentication

Login management system on the sellers end I have blocked in aop, because I have no WeChat open platform authentication account, unable to login You can go to cn. Chenhaoxiang. Aspect. SellerAuthorizeAspect annotation on the class

The WebSocket message

After the buyer places an order, there will be a message prompt for the buyer and music will be played

Redis cache + distributed lock

Redis cache, pay attention to add, delete, change and update the cache, otherwise there will be unpredictable consequences. Here, if there is a shopping activity, you can use Redis distributed lock

In my opinion, the project still needs to be improved. For example, the seller side does not have permission control. For example, the application is not independent

I learned a lot in this project. The most important thing I learned is not some knowledge points, but the architecture of the project, such as DTO, such as utility classes, such as From, entity classes of front-end form data submission, such as application independence, front-end and back-end separation, distribution and clustering, etc.

The account of wechat public platform and wechat open platform was used in the project. You need to apply for some permissions yourself. Currently, the permissions used include login and payment permissions of wechat public account and message push permissions. Login and message push can use test accounts in development documents. As for the payment authority, you need to find a friend to borrow the account. I am learning the video of Liao Shi developed, need to have the payment authority test, you can see this document: github.com/Pay-Group/b… There is also the login permission of wechat open platform, which also needs to be authenticated or borrowed from a friend.

Here wechat public number access development and wechat open platform access development did not repeat the wheel. Two open source SDKS are used. The link is at github.com/Wechat-Grou… This is very full, you see know github.com/Pay-Group/b… This is the SDK developed by Brother Liao, which is used for payment

Usage advocated by Centos7

CD /ets/systemd/system go to this directory and create a AAA. Service. You can set AAA to the project name

Vim AAA. Service Start:

Target network. Target # depend on [Service] Type=simple ExecStart= /usr/bin/java-jar ExecStop=/bin/kill -15 $MAINPID User=root Group=root [Install] WantedBy=multi-user.targetCopy the code

File END

Use systemctl start AAA or systemctl start AAA. Run systemctl daemon-reload and then systemctl start sell.service

Stop the service: systemctl stop AAA or systemctl stop aaa. service

Automatic startup upon startup: systemctl enable AAA or systemctl enable aaa. service

Do not want to start on the system: systemctl disable AAA or systemctl disable aaa.service

Thanks to Brother Liao for sharing this video tutorial.

GITHUB Project address: [click me to access]