one , Project brief

Features include : Foreground implementation : User browsing menu , Classification and screening of dishes , View menu details feeling , Add shopping cart , Shopping cart settlement , Membership certificate , Personal order query, etc etc .
Background implementation : Food management , Dish management , Order management , system management , You have prepared staff management, etc . The system is divided into : High or administrator , customer , cook , Delivery clerk, wait .

two , Project operation

Environment configuration : Jdk1.8 + Tomcat8.5 + mysql + Eclispe (IntelliJ
IDEA,Eclispe,MyEclispe,Sts All support )

Project technology : JSP +Spring + SpringMVC + MyBatis + html+ css + JavaScript + JQuery +
Ajax + layui+ maven wait .

 

Background user information control layer :
@RestController @RequestMapping("/backstage/user") public class
UserManageController { @Autowired private UserService userService; /** *
Find a list of users based on the criteria of the page * @param vo * @return */ @RequestMapping("/list") public String
findUserListByPage(UserVo vo){ LayuiTableDataResult userListByPage =
userService.findUserListByPage(vo); return JSON.toJSONString(userListByPage); }
/** * Adding users in the background * @param vo * @return */ @RequestMapping("/add") public String
addUser(UserVo vo){ Map<String, Object> map = userService.addUser(vo); return
JSON.toJSONString(map); } /** * Modify user information in the background * @param vo * @return */
@RequestMapping("/modify") public String modifyUserBackstage(UserVo vo){
Map<String, Object> map = userService.modifyUserBackstage(vo); return
JSON.toJSONString(map); } /** * Reset user password * @param userId * @return */
@RequestMapping("/resetPassword") public String resetPassword(Long userId){
Map<String, Object> map = userService.resetPassword(userId); return
JSON.toJSONString(map); } /** * Find roles owned by this user * @param userId * @return */
@RequestMapping("/findRole") public String findRoleListByUserId(Long userId){
LayuiTableDataResult roleListByUserId =
userService.findRoleListByUserId(userId); return
JSON.toJSONString(roleListByUserId); } /** * Authorize roles for users * @param roleIds * @param
userId * @return */ @RequestMapping("/grantRole") public String
grantRole(String roleIds, Long userId){ Map<String, Object> map =
userService.grantRole(roleIds, userId); return JSON.toJSONString(map); } /** *
Delete user information * @param userId * @return */ @RequestMapping("/delete") public String
deleteUser(Long userId){ Map<String, Object> map =
userService.deleteUser(userId); return JSON.toJSONString(map); } }

User address management controller :
/** * User address management controller */ @RestController @RequestMapping("/address") public class
AddressController { @Autowired private AddressService addressService; /** *
Find all address information for this role , return LayUI Data table format */ @RequestMapping("/list") public String
findAddressListByUserId(AddressVo vo, HttpSession session){
vo.setUserId(((UserEntity) session.getAttribute("userLogin")).getUserId());
LayuiTableDataResult addressListByUserId =
addressService.findAddressListByUserId(vo); return
JSON.toJSONString(addressListByUserId); } /** * Find all address information for this role , return Map format * @param
session * @return */ @RequestMapping("/listByUser") public String
findAddressListByUser(HttpSession session){ Map<String, Object> map =
addressService.findAddressListByUser(session); return JSON.toJSONString(map); }
/** * Add address * @param vo * @return */ @RequestMapping("/add") public String
addAddress(AddressVo vo, HttpSession session){ Map<String, Object> map =
addressService.addAddress(vo, session); return JSON.toJSONString(map); } /** *
Modify address * @param vo * @return */ @RequestMapping("/modify") public String
modifyAddress(AddressVo vo, HttpSession session){ Map<String, Object> map =
addressService.modifyAddress(vo, session); return JSON.toJSONString(map); } /**
* Delete address * @param addressId * @return */ @RequestMapping("/delete") public String
deleteAddress(Long addressId){ Map<String, Object> map =
addressService.deleteAddress(addressId); return JSON.toJSONString(map); } }

Foreground user information control layer :
@Controller @RequestMapping("/user") public class UserController { @Autowired
private UserService userService; /** * User login * @param username * @param password
* @param session * @return */ @ResponseBody @RequestMapping("/login") public
String login(String username, String password, HttpSession session){
Map<String, Object> map = userService.login(username, password, session);
return JSON.toJSONString(map); } /** * Log out * @param session * @return */
@RequestMapping("/exit") public String exit(HttpSession session){
userService.exit(session); return "redirect:/login.html"; } /** *
Verify whether the user name entered in user registration exists * @param username * @return */ @ResponseBody
@RequestMapping("/checkUsername") public String checkUsername(String username){
Map<String, Object> map = userService.checkUsername(username); return
JSON.toJSONString(map); } /** * User registration * @param vo * @param session * @return */
@ResponseBody @RequestMapping("/register") public String register(UserVo vo,
HttpSession session){ Map<String, Object> register = userService.register(vo,
session); return JSON.toJSONString(register); } /** * Query login user's profile * @param
session * @return */ @ResponseBody @RequestMapping("/findUserByUserId") public
String findUserByUserId(HttpSession session){ Long userId = ((UserEntity)
session.getAttribute(SystemConstant.USERLOGIN)).getUserId(); Map<String,
Object> userByUserId = userService.findUserByUserId(userId); return
JSON.toJSONString(userByUserId); } /** * Query a user's profile * @param vo * @return */
@ResponseBody @RequestMapping("/modifyUserInfo") public String
modifyUserInfo(UserVo vo, HttpSession session){ Map<String, Object> map =
userService.modifyUserReception(vo, session); return JSON.toJSONString(map); }
/** * User change password * @param oldPassword * @param newPassword * @param session *
@return */ @ResponseBody @RequestMapping("/modifyPassword") public String
modifyPassword(String oldPassword, String newPassword, HttpSession session){
Map<String, Object> map = userService.modifyPassword(oldPassword, newPassword,
session); return JSON.toJSONString(map); } }

Coupon mall controller :
/** * Coupon mall controller */ @RestController @RequestMapping("/reception/ticket") public
class TicketController { @Autowired private TicketService ticketService; /** *
Query all coupon categories on the shelf * @return */ @RequestMapping("/findAll") public String
findAllTicketOnShelf(){ Map<String, Object> map =
ticketService.findAllTicketOnShelf(); return JSON.toJSONString(map); } /** *
Collect coupons * @param ticketTypeId * @param session * @return */
@RequestMapping("/receiveTicket") public String receiveTicket(Long
ticketTypeId, HttpSession session){ Map<String, Object> map =
ticketService.receiveTicket(ticketTypeId, session); return
JSON.toJSONString(map); } /** * Query the coupon record of a user * @param session * @return */
@RequestMapping("/findByUser") public String findByUser(HttpSession session){
Map<String, Object> map = ticketService.findByUser(session); return
JSON.toJSONString(map); } /** * Query coupons not used by the user * @param session * @return */
@RequestMapping("/findByUserUnuse") public String findByUserUnuse(HttpSession
session){ Map<String, Object> map = ticketService.findByUserUnuse(session);
return JSON.toJSONString(map); } /** * Query coupons by coupon number * @param ticketId * @return
*/ @RequestMapping("/findTicketById") public String findTicketById(Long
ticketId){ Map<String, Object> map = ticketService.findTicketById(ticketId);
return JSON.toJSONString(map); } }

Shopping cart controller :
/** * Shopping cart controller */ @RestController @RequestMapping("/reception/shopcart") public
class ShopcartController { @Autowired private ShopcartService shopcartService;
/** * Add dishes SKU To the shopping cart * @param session * @param numCount * @param skuId * @return
*/ @RequestMapping("/add") public String addShopcart(Long skuId, Integer
numCount, HttpSession session){ Map<String, Object> map =
shopcartService.addShopcart(skuId, numCount, session); return
JSON.toJSONString(map); } /** * Find all shopping cart information under this user * @param session * @return */
@RequestMapping("/findByUserId") public String
findAllShopcartByUserId(HttpSession session){ Map<String, Object> map =
shopcartService.findAllShopcartByUserId(session); return
JSON.toJSONString(map); } /** * Add a new user SKU Number of dishes * @param shopcartId * @return
*/ @RequestMapping("/addNumCountOne") public String addNumCountOne(Long
shopcartId){ Map<String, Object> map =
shopcartService.addNumCountOne(shopcartId); return JSON.toJSONString(map); }
/** * Reduce the number of users SKU Number of dishes * @param shopcartId * @return */
@RequestMapping("/reduceNumCountOne") public String reduceNumCountOne(Long
shopcartId){ Map<String, Object> map =
shopcartService.reduceNumCountOne(shopcartId); return JSON.toJSONString(map); }
/** * Delete an entry in the shopping cart * @param shopcartId * @return */ @RequestMapping("/delete")
public String deleteShopcart(Long shopcartId){ Map<String, Object> map =
shopcartService.deleteShopcart(shopcartId); return JSON.toJSONString(map); } }

Technology
©2019-2020 Toolsou All rights reserved,
Android Using wechat in H5 Payment result refresh during payment shock !!C++ Can make a sound ! Basic operation of single linked list C Language explanation Java Implement an epidemic number management system 2021 year 11 World programming language ranking linux upper mysql Invalid command _linux lower mysql The command is useless Java project : Campus dormitory management system (java+jsp+javaweb+mysql+ajax) Wechat applet development project directory linux ubuntu Which version ,Ubuntu Which version is the best ?python Code painting cherry blossoms - How to use Python Draw a beautiful cherry blossom