• 基于springboot+mybatis+thymeleaf+redis+html实现的农村在线交易平台项目(含支付模块)


    最近几周挺忙的,又要准备面试又要参加学校的实习什么的,而且还要准备web课的结课项目,说是老师帮助我们优秀的项目组申请软件著作权,所以这个在线支付的项目我还是比较重视的,在功能的实现上面下了比较多的功夫,因为不会真的上线有的功能能模拟就模拟了。算是比较满意的了,平时成绩100,结课项目评委分数92(说是前端页面不够美观,不然能给95加吧),综合成绩96,还行,不辜负我整个大三下的自学,大四即将到来,实习单位也找到了,七月份正式上班,最近几天能划水就划划水吧。

    本次采取的开发框架还是比较容易上手的微服务springboot开发框架,因为涉及到支付,采用另一个微服务负责支付端的响应。

    数据库设计(对应实体类)

    商品实体类

    1. @Data
    2. public class Good{
    3. private int goodId;
    4. private String goodName;
    5. private int goodInPrice;
    6. private int goodOutPrice;
    7. private int goodReserve;
    8. private String goodProduct;
    9. private String goodExTime;
    10. private int goodShopId;
    11. }

    订单实体类

    1. @Data
    2. public class Older implements Serializable {
    3. private int olderId;
    4. private int olderUserId;
    5. private int olderGoodId;
    6. private int olderShopId;
    7. private int olderGoodNumber;
    8. private String olderAddress;
    9. private String olderGoHomeTime;
    10. private boolean olderState;
    11. private String olderDate;
    12. }

    商家实体类

    1. @Data
    2. public class Shop {
    3. private int shopId;
    4. private String shopNickname;
    5. private String shopAddress;
    6. private String shopOwner;
    7. private String shopPhone;
    8. private String shopInfo;
    9. private String password;
    10. }

    用户实体类

    1. @Data
    2. public class User {
    3. private int userId;
    4. private String userNickname;
    5. private char userSex;
    6. private String userHead;
    7. private String userBrith;
    8. private String userAddress;
    9. private String userRegister;
    10. private String userPhone;
    11. private String password;
    12. }

    dao层(分为两个角色,分别是商家与用户,所以对应的操作也应该不同,当然管理员的角色我也有配置,这个就看大家自己加了,毕竟不是重点)

    shopMapper

    1. @Mapper
    2. public interface ShopMapper extends BaseMapper<Good> {
    3. @Select("SELECT * FROM ncds.shop WHERE shopPhone=#{shopPhone} AND password=#{password}")
    4. boolean loginShop(@Param("shopPhone") String shop_phone, @Param("password") String password);
    5. @Insert("INSERT INTO ncds.shop (shopPhone,password) VALUE (#{shopPhone},#{password})")
    6. boolean registerShop(@Param("shopPhone") String shopPhone, @Param("password") String password);
    7. @Update("UPDATE ncds.shop SET shopNickname=#{shopNickname},shopAddress=#{shopAddress},shopOwner=#{shopOwner},shopInfo=#{shopInfo} WHERE shopId=#{shopId}")
    8. boolean refineShop(@Param("shopNickname") String shopNickname, @Param("shopAddress") String shopAddress, @Param("shopOwner") String shopOwner, @Param("shopInfo") String shopInfo, @Param("shopId") int shopId);
    9. @Update("UPDATE ncds.shop SET password=#{password} WHERE shopId=#{shopId}")
    10. boolean updateShopPassword(@Param("shopId") int shopId, @Param("password") String password);
    11. @Select("SELECT * FROM ncds.good WHERE goodId=#{goodId}")
    12. List<Good> findHostGood(@Param("goodId") int goodId);
    13. @Insert("INSERT INTO ncds.good (goodName,goodInPrice,goodOutPrice,goodReserve,goodExTime,goodProduct,goodShopId) " +
    14. "VALUE (#{goodName},#{goodInPrice},#{goodOutPrice},#{goodReserve},#{goodExTime},#{goodProduct},#{goodShopId})")
    15. boolean saveGood(@Param("goodName") String goodName, @Param("goodInPrice") int goodInPrice, @Param("goodOutPrice") int goodOutPrice,
    16. @Param("goodReserve") int goodReserve, @Param("goodExTime") String goodExTime, @Param("goodProduct") String goodProduct, @Param("goodShopId") int goodShopId);
    17. @Delete("DELETE FROM ncds.good WHERE goodId=#{goodId}")
    18. boolean deleteGood(@Param("goodId") int goodId);
    19. @Update("UPDATE ncds.good SET goodReserve=#{goodNumber} WHERE goodId=#{goodId} AND goodName=#{goodName}")
    20. boolean addGood_number(@Param("goodId") int goodId, @Param("goodNumber") int goodNumber, @Param("goodName") String goodName);
    21. @Update("UPDATE ncds.good SET goodOutPrice=#{price} WHERE goodId=#{goodId}")
    22. boolean inSuPriceByGood_id(@Param("goodId") int goodId, @Param("price") int price);
    23. @Select("SELECT * FROM ncds.older WHERE olderShopId=#{olderShopId}")
    24. List<Older> findOlderByShopId(int olderShopId);
    25. @Select("SELECT * FROM ncds.older WHERE olderUserId=#{userId}")
    26. List<Older> findOlderByUserId(int userId);
    27. @Select("SELECT * FROM ncds.shop WHERE shopId=#{shopId}")
    28. Shop findShopById(@Param("shopId") int shopId);
    29. @Select("SELECT * FROM ncds.good WHERE goodShopId=#{goodShopId}")
    30. List<Good> findGoodByShopId(int goodShopId);
    31. @Select("SELECT shopId FROM ncds.shop WHERE shopPhone=#{shopPhone}")
    32. int findShopIdByShopPhone(String shopPhone);
    33. @Select("SELECT goodShopId FROM ncds.good WHERE goodId=#{goodId}")
    34. int findShopIdByGoodId(@Param("goodId") int goodId);
    35. @Select("SELECT shopPhone FROM ncds.shop WHERE shopId=#{shopId}")
    36. String findShopPhoneByShopId(@Param("shopId") int shopId);
    37. }

    userMapper

    1. @Mapper
    2. public interface UserMapper {
    3. /*1.登录*/
    4. @Select("SELECT * FROM ncds.user WHERE userPhone=#{userPhone} AND password=#{password}")
    5. boolean loginUser(@Param("userPhone") String userPhone, @Param("password") String password);
    6. /*2.注册*/
    7. @Insert("INSERT INTO ncds.user(userPhone,password) VALUE (#{userPhone},#{password})")
    8. boolean registerUser(@Param("userPhone") String userPhone, @Param("password") String password);
    9. /*补全信息(最开始注册仅仅按照电话与id以及密码 注册)*/
    10. /**
    11. * @param userId
    12. * @param userNickname
    13. * @param userSex
    14. * @param userHead 采取的是longblob的mysql数据库格式,利用load_file(文件磁盘路径)的方式
    15. * 只需要传入一个路径参数即可实现图片或者视频的存储。我们规定文件路径为D:/ncds/img/...
    16. * @param userBrith
    17. * @param userAddress
    18. * @param userRegister
    19. * @return boolean
    20. */
    21. @Update("UPDATE ncds.user SET userNickname=#{userNickname},userSex=#{userSex},userHead=load_file(#{userHead}),userBrith=#{userBrith},userAddress=#{userAddress},userRegister=#{userRegister},password=#{password} WHERE userId=#{userId}")
    22. boolean refineUser(@Param("userId") int userId, @Param("userNickname") String userNickname, @Param("userSex") char userSex,
    23. @Param("userHead") String userHead, @Param("userBrith") String userBrith, @Param("userAddress") String userAddress, @Param("userRegister") String userRegister, @Param("password") String password);
    24. /*4.查看热门商品(需要redis数据库查询返回的id排序)*/
    25. @Select("SELECT * FROM ncds.good WHERE goodId=#{goodId}")
    26. Good findHostGood(int goodId);
    27. /*5.搜素商家(分为两种,按照id查与按照name查)*/
    28. @Select("SELECT * FROM ncds.shop WHERE shopId=#{shopId}")
    29. Shop findShopById(int shopId);
    30. @Select("SELECT * FROM ncds.shop WHERE shopNickname=#{shopNickname}")
    31. Shop findShopByName(String shopNickname);
    32. /*6.模糊查询,搜索商品(可能不为一个商品)*/
    33. /**
    34. * @param goodName 注意测试时需要将传入的参数拼接为“%${goodName}%”的形式
    35. * @return List<Good>
    36. */
    37. @Select("SELECT * FROM ncds.good WHERE goodName LIKE #{goodName}")
    38. List<Good> findGoodByName(String goodName);
    39. @Insert("INSERT INTO ncds.older (olderUserId,olderGoodId,olderGoodNumber,olderAddress,olderGoHomeTime,olderState,olderDate,olderShopId)" +
    40. "VALUE (#{olderUserId},#{olderGoodId},#{olderGoodNumber},#{olderAddress},#{olderGoHomeTime},#{olderState},#{olderDate},#{olderShopId})")
    41. boolean saveOlder(@Param("olderUserId") int olderUserId, @Param("olderGoodId") int olderGoodId, @Param("olderGoodNumber") int olderGoodNumber, @Param("olderAddress") String olderAddress, @Param("olderGoHomeTime") String olderGoHomeTime, @Param("olderState") boolean olderState, @Param("olderDate") String olderDate, @Param("olderShopId") int olderShopId);
    42. /*8.支付*/
    43. @Update("UPDATE ncds.older SET olderState=TRUE WHERE olderId=#{olderId}")
    44. boolean updateOlderState(@Param("older_id") int olderId);
    45. /*9.退货处理(就是删除订单,商家的货物退还,计算退款资金)*/
    46. @Select("SELECT olderUserId FROM ncds.older WHERE olderId=#{olderId}")
    47. int findUserIdByOlderId(@Param("olderId") Integer olderId);
    48. @Delete("DELETE FROM ncds.older WHERE olderId=#{olderId}")
    49. boolean deleteOlder(int olderId);
    50. @Update("UPDATE ncds.good SET goodReserve=goodReserve+#{olderGoodNumber} WHERE goodShopId=#{shopId}")
    51. boolean addGood(int shopId, int olderGoodNumber);
    52. /*11.查询个人信息*/
    53. @Select("SELECT userPhone FROM ncds.user WHERE userId=#{userId}")
    54. String findUserPhoneByUserId(@Param("userId") Integer userId);
    55. @Select("SELECT * FROM ncds.user WHERE userId=#{userId}")
    56. User findUserById(@Param("userId") int userId);
    57. @Select("SELECT userId FROM ncds.user WHERE userPhone=#{userPhone}")
    58. int findUserIdByUserPhone(@Param("userPhone") String userPhone);
    59. /*13.查询全部商品*/
    60. @Select("SELECT * FROM ncds.good")
    61. List<Good> findAllGood();
    62. }

    serveice层(基本就是老样子)

    shopService与其实现类(service层是redis中间件操作注入层,我姑且是这么叫的)

    1. public interface ShopService {
    2. boolean loginShop(String shop_phone, String password);
    3. boolean registerShop(String shop_phone, String password);
    4. boolean refineShop(String shop_nickname, String shop_address, String shop_owner, String shop_info, int shopId);
    5. boolean updateShopPassword(int shop_id, String password);
    6. boolean saveGood(String goodName, int goodInPrice, int goodOutPrice, int goodReserve, String goodExTime, String goodProduct, int goodShopId);
    7. boolean deleteGood(int good_id);
    8. boolean addGood_number(int good_id, int good_number, String goodName);
    9. boolean inSuPriceByGood_id(int good_id, int price);
    10. List<Older> findOlderByShopId(int shopId);
    11. List<Older> findOlderByUserId(int userId);
    12. Shop findShopById(int shop_id);
    13. List<Good> findGoodByShopId(int goodShopId);
    14. int findShopIdByShopPhone(String shopPhone);
    15. boolean saveGoodByFile(MultipartFile file);
    16. int findShopIdByGoodId(int goodId);
    17. String findShopPhoneByShopId(int shopId);
    18. }
    19. @Service("ShopService")
    20. public class ShopServiceImpl implements ShopService {
    21. @Autowired
    22. private ShopMapper shopMapper;
    23. @Autowired
    24. private FileOption fileOption;
    25. @Override
    26. public boolean loginShop(String shop_phone, String password) {
    27. return shopMapper.loginShop(shop_phone, password);
    28. }
    29. @Override
    30. public boolean registerShop(String shop_phone, String password) {
    31. return shopMapper.registerShop(shop_phone, password);
    32. }
    33. @Override
    34. public boolean refineShop(String shop_nickname, String shop_address, String shop_owner, String shop_info, int shopId) {
    35. return shopMapper.refineShop(shop_nickname, shop_address, shop_owner, shop_info, shopId);
    36. }
    37. @Override
    38. public boolean updateShopPassword(int shop_id, String password) {
    39. return shopMapper.updateShopPassword(shop_id, password);
    40. }
    41. @Override
    42. public boolean saveGood(String goodName, int goodInPrice, int goodOutPrice, int goodReserve, String goodExTime, String goodProduct, int goodShopId) {
    43. return shopMapper.saveGood(goodName, goodInPrice, goodOutPrice, goodReserve, goodExTime, goodProduct, goodShopId);
    44. }
    45. @Override
    46. public boolean deleteGood(int good_id) {
    47. return shopMapper.deleteGood(good_id);
    48. }
    49. @Override
    50. public boolean addGood_number(int good_id, int good_number, String goodName) {
    51. return shopMapper.addGood_number(good_id, good_number, goodName);
    52. }
    53. @Override
    54. public boolean inSuPriceByGood_id(int good_id, int price) {
    55. return shopMapper.inSuPriceByGood_id(good_id, price);
    56. }
    57. @Override
    58. public List<Older> findOlderByShopId(int shopId) {
    59. return shopMapper.findOlderByShopId(shopId);
    60. }
    61. @Override
    62. public List<Older> findOlderByUserId(int userId) {
    63. return shopMapper.findOlderByUserId(userId);
    64. }
    65. @Override
    66. public Shop findShopById(int shop_id) {
    67. return shopMapper.findShopById(shop_id);
    68. }
    69. @Override
    70. public List<Good> findGoodByShopId(int goodShopId) {
    71. return shopMapper.findGoodByShopId(goodShopId);
    72. }
    73. @Override
    74. public int findShopIdByShopPhone(String shopPhone) {
    75. return shopMapper.findShopIdByShopPhone(shopPhone);
    76. }
    77. @Override
    78. public boolean saveGoodByFile(MultipartFile file) {
    79. boolean flag = true;
    80. List<Good> goodList = fileOption.fileOptions(file);
    81. for (Good good : goodList) {
    82. flag = saveGood(good.getGoodName(), good.getGoodInPrice(), good.getGoodOutPrice(),
    83. good.getGoodReserve(), good.getGoodExTime(), good.getGoodProduct()
    84. , good.getGoodShopId());
    85. }
    86. return flag;
    87. }
    88. @Override
    89. public int findShopIdByGoodId(int goodId) {
    90. return shopMapper.findShopIdByGoodId(goodId);
    91. }
    92. @Override
    93. public String findShopPhoneByShopId(int shopId) {
    94. return shopMapper.findShopPhoneByShopId(shopId);
    95. }
    96. }

    userService与其实现类

    1. public interface UserService {
    2. /*1.登录*/
    3. boolean loginUser(String user_phone, String password);
    4. /*2.注册*/
    5. boolean registerUser(String user_phone, String password);
    6. /*补全信息(最开始注册仅仅按照电话与id以及密码 注册)*/
    7. boolean refineUser(int user_id, String user_nickname, char user_sex,
    8. String user_head, String user_brith, String user_address, String user_register,String password);
    9. /*4.查看热门商品(需要redis数据库查询返回的id排序)*/
    10. Good findHostGood(int good_id);
    11. /*5.搜素商家(分为两种,按照id查与按照name查)*/
    12. Shop findShopById(int shop_id);
    13. Shop findShopByName(String shop_nickname);
    14. /*6.模糊查询,搜索商品(可能不为一个商品)*/
    15. /**
    16. * @param good_name 注意测试时需要将传入的参数拼接为“%${good_name}%”的形式
    17. * @return List<Good>
    18. */
    19. List<Good> findGoodByName(String good_name);
    20. boolean updateOlderState(int older_id);
    21. String findUserPhoneByUserId(Integer userId);
    22. boolean deleteOlder(int older_id);
    23. boolean addGood(int shop_id, int older_good_number);
    24. User findUserById(int user_id);
    25. int findUserIdByOlderId(Integer olderId);
    26. int findUserIdByUserPhone(String userPhone);
    27. List<Good> findAllGood();
    28. boolean saveOlder(int olderUserId,int olderGoodId,int olderGoodNumber,String olderAddress,String olderGoHomeTime,boolean olderState,String olderDate, int olderShopId);
    29. }
    30. @Service("UserService")
    31. public class UserServiceImpl implements UserService {
    32. @Autowired
    33. private UserMapper userMapper;
    34. @Override
    35. public boolean loginUser(String user_phone, String password) {
    36. return userMapper.loginUser(user_phone,password);
    37. }
    38. @Override
    39. public boolean registerUser(String user_phone, String password) {
    40. return userMapper.registerUser(user_phone,password);
    41. }
    42. @Override
    43. public boolean refineUser(int user_id, String user_nickname, char user_sex, String user_head, String user_brith, String user_address, String user_register,String password) {
    44. return userMapper.refineUser(user_id,user_nickname,user_sex,user_head,user_brith,user_address,user_register,password);
    45. }
    46. @Override
    47. public Good findHostGood(int good_id) {
    48. return userMapper.findHostGood(good_id);
    49. }
    50. @Override
    51. public Shop findShopById(int shop_id) {
    52. return userMapper.findShopById(shop_id);
    53. }
    54. @Override
    55. public Shop findShopByName(String shop_nickname) {
    56. return userMapper.findShopByName(shop_nickname);
    57. }
    58. @Override
    59. public List<Good> findGoodByName(String good_name) {
    60. return userMapper.findGoodByName(good_name);
    61. }
    62. @Override
    63. public boolean updateOlderState(int older_id) {
    64. return userMapper.updateOlderState(older_id);
    65. }
    66. @Override
    67. public String findUserPhoneByUserId(Integer userId) {
    68. return userMapper.findUserPhoneByUserId(userId);
    69. }
    70. @Override
    71. public boolean deleteOlder(int older_id) {
    72. return userMapper.deleteOlder(older_id);
    73. }
    74. @Override
    75. public boolean addGood(int shop_id, int older_good_number) {
    76. return userMapper.addGood(shop_id,older_good_number);
    77. }
    78. @Override
    79. public User findUserById(int user_id) {
    80. return userMapper.findUserById(user_id);
    81. }
    82. @Override
    83. public int findUserIdByOlderId(Integer olderId) {
    84. return userMapper.findUserIdByOlderId(olderId);
    85. }
    86. @Override
    87. public int findUserIdByUserPhone(String userPhone) {
    88. return userMapper.findUserIdByUserPhone(userPhone);
    89. }
    90. @Override
    91. public List<Good> findAllGood() {
    92. return userMapper.findAllGood();
    93. }
    94. @Override
    95. public boolean saveOlder(int olderUserId, int olderGoodId, int olderGoodNumber, String olderAddress, String olderGoHomeTime, boolean olderState, String olderDate, int olderShopId) {
    96. return userMapper.saveOlder(olderUserId,olderGoodId,olderGoodNumber,olderAddress,olderGoHomeTime,olderState,olderDate,olderShopId);
    97. }
    98. }

    controller层(各种Url能记住吗?)

    userController

    1. @RequestMapping("User")
    2. @RestController
    3. public class UserController {
    4. @Autowired
    5. private UserService userService;
    6. @Autowired
    7. private ShopService shopService;
    8. @Autowired
    9. private JedisFactory jedisFactory;
    10. /*注册*/
    11. @RequestMapping("register")
    12. public ModelAndView registerF() {
    13. return new ModelAndView("/register/register_user");
    14. }
    15. @PostMapping("register_user")
    16. public ModelAndView registerUser(String userPhone, String password) {
    17. boolean registerUser = userService.registerUser(userPhone, password);
    18. if (registerUser) {
    19. loginF();
    20. }
    21. return registerF();
    22. }
    23. /*登录*/
    24. @RequestMapping("login")
    25. public ModelAndView loginF() {
    26. return new ModelAndView("/login/login_user");
    27. }
    28. @PostMapping("login_user")
    29. public ModelAndView loginUser(String userPhone, String password) {
    30. boolean loginKey = jedisFactory.selectLoginKey(userPhone, password);
    31. if (loginKey) {
    32. return index_user(userPhone);
    33. } else {
    34. boolean loginUser = userService.loginUser(userPhone, password);
    35. if (loginUser) {
    36. return index_user(userPhone);
    37. }
    38. }
    39. return loginF();
    40. }
    41. /*主页*/
    42. @RequestMapping("index_user")
    43. public ModelAndView index_user(String userPhone) {
    44. List<Good> goodList = userService.findAllGood();
    45. ModelAndView modelAndView = new ModelAndView();
    46. modelAndView.addObject("goodList", goodList);
    47. modelAndView.addObject("userPhone", userPhone);
    48. modelAndView.setViewName("/index/user/index");
    49. return modelAndView;
    50. }
    51. @RequestMapping("index_user_return/{userPhone}")
    52. public ModelAndView index_user_return(@PathVariable("userPhone") String userPhone) {
    53. List<Good> goodList = userService.findAllGood();
    54. ModelAndView modelAndView = new ModelAndView();
    55. modelAndView.addObject("goodList", goodList);
    56. modelAndView.addObject("userPhone", userPhone);
    57. modelAndView.setViewName("/index/user/index");
    58. return modelAndView;
    59. }
    60. /*用户查看个人信息*/
    61. @RequestMapping("find_user/{userPhone}")
    62. public ModelAndView find_user(@PathVariable("userPhone") String userPhone) {
    63. int id = userService.findUserIdByUserPhone(userPhone);
    64. User user = userService.findUserById(id);
    65. ModelAndView modelAndView = new ModelAndView();
    66. modelAndView.addObject("User", user);
    67. modelAndView.addObject("userPhone", userPhone);
    68. modelAndView.setViewName("/index/user/find_user");
    69. return modelAndView;
    70. }
    71. /*用户修改个人信息*/
    72. @RequestMapping("update_userF/{userPhone}")
    73. public ModelAndView update_userF(@PathVariable("userPhone") String userPhone) {
    74. ModelAndView modelAndView = new ModelAndView();
    75. modelAndView.addObject("userPhone", userPhone);
    76. modelAndView.setViewName("index/user/update_user");
    77. return modelAndView;
    78. }
    79. @RequestMapping("update_user/{userPhone}")
    80. public ModelAndView update_user(@PathVariable("userPhone") String userPhone, @RequestParam("userNickname") String userNickname, @RequestParam("userSex") char userSex,
    81. @RequestParam("userHead") String userHead, @RequestParam("userBrith") String userBrith,
    82. @RequestParam("userAddress") String userAddress, @RequestParam("userRegister") String userRegister, @RequestParam("password") String password) {
    83. int id = userService.findUserIdByUserPhone(userPhone);
    84. boolean flag = userService.refineUser(id, userNickname, userSex, userHead, userBrith, userAddress, userRegister, password);
    85. if (flag)
    86. return find_user(userPhone);
    87. else
    88. return update_userF(userPhone);
    89. }
    90. /*查看订单*/
    91. @RequestMapping("older_user_list/{userPhone}")
    92. public ModelAndView older_user_list(@PathVariable("userPhone") String userPhone) {
    93. int id = userService.findUserIdByUserPhone(userPhone);
    94. List<Older> olderList = shopService.findOlderByUserId(id);
    95. ModelAndView modelAndView = new ModelAndView();
    96. modelAndView.addObject("userPhone", userPhone);
    97. modelAndView.addObject("olderList", olderList);
    98. modelAndView.setViewName("/List/older_user_list");
    99. return modelAndView;
    100. }
    101. /*用户下单弹窗*/
    102. @RequestMapping("older_user_addF/{userPhone}")
    103. public ModelAndView older_user_addF(@PathVariable("userPhone") String userPhone) {
    104. ModelAndView modelAndView = new ModelAndView();
    105. modelAndView.addObject("userPhone", userPhone);
    106. modelAndView.setViewName("/index/user/older_user_add");
    107. return modelAndView;
    108. }
    109. @RequestMapping("older_user_add/{userPhone}")
    110. public ModelAndView older_user_add(@PathVariable("userPhone") String userPhone,
    111. @RequestParam("olderGoodId") int olderGoodId, @RequestParam("olderGoodNumber") int olderGoodNumber,
    112. @RequestParam("olderAddress") String olderAddress, @RequestParam("olderGoHomeTime") String olderGoHomeTime, @RequestParam("date") String date) {
    113. int shopId = shopService.findShopIdByGoodId(olderGoodId);
    114. int userId = userService.findUserIdByUserPhone(userPhone);
    115. boolean state = false;
    116. boolean saveOlder = userService.saveOlder(userId, olderGoodId, olderGoodNumber, olderAddress, olderGoHomeTime, state, date, shopId);
    117. if (saveOlder)
    118. return older_user_list(userPhone);
    119. else
    120. return older_user_addF(userPhone);
    121. }
    122. /*用户取消订单*/
    123. @RequestMapping("del_older_user/{olderId}")
    124. public ModelAndView del_older_user(@PathVariable("olderId") Integer olderId) {
    125. int userId = userService.findUserIdByOlderId(olderId);
    126. String userPhone = userService.findUserPhoneByUserId(userId);
    127. boolean deleteOlder = userService.deleteOlder(olderId);
    128. if (deleteOlder)
    129. return older_user_list(userPhone);
    130. else
    131. return older_user_list(userPhone);
    132. }
    133. /*用户确认付款(跳转网址定位http://192.168.10.105:8081/order/form)*/
    134. /*用户查询商品按照商品名称,模糊查询*/
    135. /*用户查询订单按照日期查询*/
    136. }

    shopController

    1. @RestController
    2. @RequestMapping("Shop")
    3. public class ShopController {
    4. @Autowired
    5. private ShopService shopService;
    6. @Autowired
    7. private UserService userService;
    8. @Autowired
    9. private JedisFactory jedisFactory;
    10. /*注册*/
    11. @RequestMapping("register")
    12. public ModelAndView registerF() {
    13. return new ModelAndView("register/register_shop");
    14. }
    15. @PostMapping("register_shop")
    16. public ModelAndView registerShop(String shopPhone, String password) {
    17. boolean registerShop = shopService.registerShop(shopPhone, password);
    18. if (registerShop)
    19. return loginF();
    20. return registerF();
    21. }
    22. /*登录*/
    23. @RequestMapping("login")
    24. public ModelAndView loginF() {
    25. return new ModelAndView("login/login_shop");
    26. }
    27. @PostMapping("login_shop")
    28. public ModelAndView loginShop(String shopPhone, String password) {
    29. boolean loginKey = jedisFactory.selectLoginKey(shopPhone, password);
    30. if (loginKey) {
    31. return index_shop(shopPhone);
    32. } else {
    33. boolean loginShop = shopService.loginShop(shopPhone, password);
    34. if (loginShop)
    35. return index_shop(shopPhone);
    36. }
    37. return loginF();
    38. }
    39. /*商家主页数据加载与渲染*/
    40. @RequestMapping("index_shop")
    41. public ModelAndView index_shop(String shopPhone) {
    42. int id = shopService.findShopIdByShopPhone(shopPhone);
    43. List<Good> goodList = shopService.findGoodByShopId(id);
    44. ModelAndView modelAndView = new ModelAndView();
    45. modelAndView.addObject("shopPhone", shopPhone);
    46. modelAndView.addObject("goodList", goodList);
    47. modelAndView.setViewName("index/shop/index");
    48. return modelAndView;
    49. }
    50. /*跳转返回主页用,时刻拿着一个令牌*/
    51. @RequestMapping("index_shop_return/{shopPhone}")
    52. public ModelAndView index_shop_return(@PathVariable("shopPhone") String shopPhone) {
    53. List<Good> goodList = shopService.findGoodByShopId(shopService.findShopIdByShopPhone(shopPhone));
    54. ModelAndView modelAndView = new ModelAndView();
    55. modelAndView.addObject("shopPhone", shopPhone);
    56. modelAndView.addObject("goodList", goodList);
    57. modelAndView.setViewName("index/shop/index");
    58. return modelAndView;
    59. }
    60. /*主页面添加商品*/
    61. @RequestMapping("add_goodF/{shopPhone}")
    62. public ModelAndView add_goodF(@PathVariable("shopPhone") String shopPhone) {
    63. ModelAndView modelAndView = new ModelAndView();
    64. modelAndView.addObject("shopPhone", shopPhone);
    65. modelAndView.setViewName("index/shop/add_good");
    66. return modelAndView;
    67. }
    68. /*单个商品添加*/
    69. @RequestMapping("add_good/{shopPhone}")
    70. public ModelAndView add_good(@PathVariable("shopPhone") String shopPhone, @RequestParam("goodName") String goodName, @RequestParam("goodInPrice") Integer goodInPrice, @RequestParam("goodOutPrice") Integer goodOutPrice, @RequestParam("goodReserve") Integer goodReserve, @RequestParam("goodExTime") String goodExTime, @RequestParam("goodProduct") String goodProduct, @RequestParam("goodShopId") Integer goodShopId) {
    71. boolean saveGood = shopService.saveGood(goodName, goodInPrice, goodOutPrice, goodReserve, goodExTime, goodProduct, goodShopId);
    72. if (saveGood) {
    73. return index_shop(shopPhone);
    74. }
    75. return good_shop_list(shopPhone);
    76. }
    77. /*文件导入添加*/
    78. @RequestMapping("add_good_file/{shopPhone}")
    79. public ModelAndView add_good_file(@RequestParam("file") MultipartFile file, @PathVariable("shopPhone") String shopPhone) {
    80. boolean saveGoodByFile = shopService.saveGoodByFile(file);
    81. if (saveGoodByFile) {
    82. return index_shop(shopPhone);
    83. }
    84. return good_shop_list(shopPhone);
    85. }
    86. /*商家货架数据加载与渲染*/
    87. @RequestMapping("good_shop_list/{shopPhone}")
    88. public ModelAndView good_shop_list(@PathVariable("shopPhone") String shopPhone) {
    89. ModelAndView modelAndView = new ModelAndView();
    90. int id = shopService.findShopIdByShopPhone(shopPhone);
    91. List<Good> goodList = shopService.findGoodByShopId(id);
    92. modelAndView.addObject("shopPhone", shopPhone);
    93. modelAndView.addObject("goodList", goodList);
    94. modelAndView.setViewName("List/good_shop_list");
    95. return modelAndView;
    96. }
    97. /*删除商品*/
    98. @RequestMapping("delete_good/{goodId}")
    99. public ModelAndView delete_good(@PathVariable("goodId") Integer goodId) {
    100. int shopId = shopService.findShopIdByGoodId(goodId);
    101. boolean deleteGood = shopService.deleteGood(goodId);
    102. String shopPhone = shopService.findShopPhoneByShopId(shopId);
    103. /*这里需要加上一个删除失败的跳转逻辑*/
    104. return good_shop_list(shopPhone);
    105. }
    106. /*商家订单统计页面的查看*/
    107. @RequestMapping("older_shop_list/{shopPhone}")
    108. public ModelAndView older_shop_list(@PathVariable("shopPhone") String shopPhone) {
    109. ModelAndView modelAndView = new ModelAndView();
    110. int id = shopService.findShopIdByShopPhone(shopPhone);
    111. List<Older> olderList = shopService.findOlderByShopId(id);
    112. modelAndView.addObject("shopPhone", shopPhone);
    113. modelAndView.addObject("olderList", olderList);
    114. modelAndView.setViewName("List/older_shop_list");
    115. return modelAndView;
    116. }
    117. /*商家查询自己的商品按照商品名称查询*/
    118. @RequestMapping("shop_findGoodByGoodName/{shopPhone}")
    119. public ModelAndView shop_shop_findGoodByName(@RequestParam("goodName") String goodName, @PathVariable("shopPhone") String shopPhone) {
    120. /*模糊查询,手动拼接*/
    121. List<Good> goodList = userService.findGoodByName("%" + goodName + "%");
    122. if (goodList != null) {
    123. ModelAndView modelAndView = new ModelAndView();
    124. modelAndView.addObject("goodList", goodList);
    125. modelAndView.addObject("shopPhone", shopPhone);
    126. modelAndView.setViewName("List/good_shop_list");
    127. return modelAndView;
    128. }
    129. return index_shop(shopPhone);
    130. }
    131. /*商家搜索订单按照用户ID*/
    132. @RequestMapping("older_shop_list_select/{shopPhone}")
    133. public ModelAndView shop_findOlderByUserId(@RequestParam("userId") Integer userId, @PathVariable("shopPhone") String shopPhone) {
    134. List<Older> olderList = shopService.findOlderByUserId(userId);
    135. if (olderList != null) {
    136. ModelAndView modelAndView = new ModelAndView();
    137. modelAndView.addObject("olderList", olderList);
    138. modelAndView.addObject("shopPhone", shopPhone);
    139. modelAndView.setViewName("List/older_shop_list");
    140. return modelAndView;
    141. }
    142. return older_shop_list(shopPhone);
    143. }
    144. /*商家调整价格窗口的弹出*/
    145. @RequestMapping("update_good_priceF/{shopPhone}")
    146. public ModelAndView update_good_priceF(@PathVariable("shopPhone") String shopPhone) {
    147. ModelAndView modelAndView = new ModelAndView();
    148. modelAndView.addObject("shopPhone", shopPhone);
    149. modelAndView.setViewName("index/shop/update_good_price");
    150. return modelAndView;
    151. }
    152. @RequestMapping("update_good_price/{shopPhone}")
    153. public ModelAndView update_good_price(@PathVariable("shopPhone") String shopPhone, @RequestParam("goodId") Integer goodId, @RequestParam("goodName") String goodName, @RequestParam("goodPrice") Integer goodPrice) {
    154. boolean inSuPriceByGoodId = shopService.inSuPriceByGood_id(goodId, goodPrice);
    155. if (inSuPriceByGoodId)
    156. return good_shop_list(shopPhone);
    157. return update_good_priceF(shopPhone);
    158. }
    159. /*商家进货窗口弹出*/
    160. @RequestMapping("add_good_numberF/{shopPhone}")
    161. public ModelAndView add_good_numberF(@PathVariable("shopPhone") String shopPhone) {
    162. ModelAndView modelAndView = new ModelAndView();
    163. modelAndView.addObject("shopPhone", shopPhone);
    164. modelAndView.setViewName("index/shop/add_good_number");
    165. return modelAndView;
    166. }
    167. @RequestMapping("add_good_number/{shopPhone}")
    168. public ModelAndView add_good_number(@PathVariable("shopPhone") String shopPhone, @RequestParam("goodId") Integer goodId, @RequestParam("goodName") String goodName, @RequestParam("goodNumber") Integer goodNumber) {
    169. boolean addGoodNumber = shopService.addGood_number(goodId, goodNumber, goodName);
    170. if (addGoodNumber)
    171. return good_shop_list(shopPhone);
    172. System.out.println("----------------进货操作失败-------------------");
    173. return add_good_numberF(shopPhone);
    174. }
    175. /*商家查看自家店铺信息*/
    176. @RequestMapping("find_shop/{shopPhone}")
    177. public ModelAndView find_shop(@PathVariable("shopPhone") String shopPhone) {
    178. int id = shopService.findShopIdByShopPhone(shopPhone);
    179. Shop shop = shopService.findShopById(id);
    180. ModelAndView modelAndView = new ModelAndView();
    181. modelAndView.addObject("Shop", shop);
    182. modelAndView.setViewName("index/shop/find_shop");
    183. return modelAndView;
    184. }
    185. @RequestMapping("update_shopF/{shopPhone}")
    186. public ModelAndView update_shopF(@PathVariable("shopPhone") String shopPhone) {
    187. ModelAndView modelAndView = new ModelAndView();
    188. modelAndView.setViewName("index/shop/update_shop");
    189. modelAndView.addObject("shopPhone", shopPhone);
    190. return modelAndView;
    191. }
    192. @RequestMapping("update_shop/{shopPhone}")
    193. public ModelAndView update_shopInfo(@PathVariable("shopPhone") String shopPhone, @RequestParam("shopNickname") String shopNickname
    194. , @RequestParam("shopAddress") String shopAddress, @RequestParam("shopOwner") String shopOwner
    195. , @RequestParam("password") String password, @RequestParam("shopInfo") String shopInfo) {
    196. int id = shopService.findShopIdByShopPhone(shopPhone);
    197. boolean refineShop = shopService.refineShop(shopNickname, shopAddress, shopOwner, shopInfo, id);
    198. boolean updateShopPassword = shopService.updateShopPassword(id, password);
    199. if (refineShop && updateShopPassword) {
    200. return index_shop(shopPhone);
    201. }
    202. return update_shopF(shopPhone);
    203. }
    204. /*注销商家*/
    205. }

    辅助组件

    redis组件

    1、jedisUtils

    1. /*redis生成连接池JedisPool的配置工具*/
    2. public class JedisUntil {
    3. private static JedisPool jedisPool = null;
    4. public static JedisPool getJedisPoolFactory() {
    5. if (jedisPool == null) {
    6. synchronized (JedisUntil.class) {
    7. if (jedisPool == null) {
    8. JedisPoolConfig jedisPoolConfig = new JedisPoolConfig();
    9. jedisPoolConfig.setMaxIdle(32);
    10. jedisPoolConfig.setMaxTotal(200);
    11. jedisPoolConfig.setTestOnBorrow(false);
    12. jedisPoolConfig.setBlockWhenExhausted(true);
    13. jedisPool = new JedisPool(jedisPoolConfig, "192.168.20.150", 6379);
    14. }
    15. }
    16. }
    17. return jedisPool;
    18. }
    19. public void release(Jedis jedis, JedisPool jedisPool) {
    20. if (jedisPool != null) {
    21. jedis.close();
    22. }
    23. }
    24. }

    2、jedisFactory

    1. /*创建jedis生成工厂为我们创建jedis对象并操作redis数据库*/
    2. @Component
    3. public class JedisFactory {
    4. static JedisPool jedisPool = JedisUntil.getJedisPoolFactory();
    5. static Jedis jedis = jedisPool.getResource();
    6. /*登录走redis,第一次登录即将它加入redis数据库(用 phone-password 键值对存储)*/
    7. public void addLoginKey(String shopPhone, String password) {
    8. jedis.auth("hlc");
    9. jedis.setex(shopPhone, 120, password);
    10. jedis.close();
    11. }
    12. public boolean selectLoginKey(String shopPhone, String password) {
    13. jedis.auth("hlc");
    14. String V = jedis.get(shopPhone);
    15. if (V != null) {
    16. System.out.println("走缓存登录");
    17. jedis.close();
    18. return true;
    19. } else {
    20. addLoginKey(shopPhone, password);
    21. selectLoginKey(shopPhone, password);
    22. }
    23. jedis.close();
    24. return false;
    25. }
    26. public boolean addGoodHostKey(int goodId) {
    27. Long i = null;
    28. jedis.auth("hlc");
    29. i = jedis.zadd("hostGood", Double.parseDouble("1"), String.valueOf(goodId));
    30. jedis.close();
    31. return i != null;
    32. }
    33. /*访问一次就给该商品的热度增加1*/
    34. public boolean incrGoodHostKeyValue(int goodId) {
    35. jedis.auth("hlc");
    36. Long i = null;
    37. i = jedis.zrank("hostGood", String.valueOf(goodId));
    38. if (i != null) {
    39. jedis.zincrby("hostGood", 1, String.valueOf(goodId));
    40. jedis.close();
    41. return true;
    42. }
    43. return addGoodHostKey(goodId);
    44. }
    45. /*当商品下架时要删除热度*/
    46. public boolean delGoodHostKey(int goodId) {
    47. jedis.auth("hlc");
    48. Long i = null;
    49. i = jedis.zrem("host", String.valueOf(goodId));
    50. jedis.close();
    51. return i != null;
    52. }
    53. /*c查询热度在10以上的商品排行*/
    54. public List<Integer> selectHostGoodKey() {
    55. jedis.auth("hlc");
    56. Set<String> set = jedis.zrangeByScore("hostGood", 10, 1000);
    57. List<Integer> hostList = new ArrayList<>();
    58. for (String i : set) {
    59. hostList.add(Integer.valueOf(i));
    60. }
    61. jedis.close();
    62. System.out.println("走缓存查看热度商品");
    63. return hostList;
    64. }
    65. }

     文件导入自定义的Excel解析组件

    1. /*文件导入解析数据实现货物的批量导入*/
    2. @Component
    3. public class FileOption {
    4. public List<Good> fileOptions(MultipartFile file) {
    5. List<Good> goodArrayList = new ArrayList<>();
    6. /*获取文件名*/
    7. String fileName = file.getOriginalFilename();
    8. /*获取文件后缀*/
    9. String suffix = fileName.substring(fileName.lastIndexOf(".") + 1);
    10. /*创建文件输入流对象*/
    11. InputStream ins = null;
    12. try {
    13. ins = file.getInputStream();
    14. } catch (IOException e) {
    15. System.out.println("文件导入异常");
    16. e.printStackTrace();
    17. }
    18. /*获取工作薄对象*/
    19. Workbook wb = null;
    20. try {
    21. /*根据文件类型将文件输入流对象给到工作薄对象的内容里去*/
    22. if (suffix.equals("xlsx")) {
    23. wb = new XSSFWorkbook(ins);
    24. } else {
    25. wb = new HSSFWorkbook(ins);
    26. }
    27. } catch (IOException e) {
    28. e.printStackTrace();
    29. System.out.println("文件版本识别异常");
    30. }
    31. /*获取excel表单*/
    32. Sheet sheet = wb.getSheetAt(0);
    33. /* line = 2 :从表的第三行开始获取记录*/
    34. if (null != sheet) {
    35. for (int line = 2; line <= sheet.getLastRowNum(); line++) {
    36. /*创建对象,封装数据*/
    37. Good good = new Good();
    38. /*创建行对象,便于逐行操作单元格*/
    39. Row row = sheet.getRow(line);
    40. if (null == row) {
    41. continue;
    42. }
    43. /* 判断单元格类型是否为文本类型 */
    44. if (1 != row.getCell(0).getCellType()) {
    45. System.out.println("单元格类型不是文本类型");
    46. }
    47. /*获取第一个单元格的内容并设置对象的属性*/
    48. row.getCell(0).setCellType(Cell.CELL_TYPE_NUMERIC);
    49. Integer good_id = (int) row.getCell(0).getNumericCellValue();
    50. good.setGoodId(good_id);
    51. /* 获取第二个单元格的内容并设置对象的属性*/
    52. row.getCell(1).setCellType(Cell.CELL_TYPE_STRING);
    53. String good_name = row.getCell(1).getStringCellValue();
    54. good.setGoodName(good_name);
    55. /*获取第三个单元格内容并设置对象的属性*/
    56. row.getCell(2).setCellType(Cell.CELL_TYPE_NUMERIC);
    57. Integer good_inPrice = (int) row.getCell(2).getNumericCellValue();
    58. good.setGoodInPrice(good_inPrice);
    59. /*获取第四行数据并设置对象属性*/
    60. row.getCell(3).setCellType(Cell.CELL_TYPE_NUMERIC);
    61. Integer good_outPrice = (int) row.getCell(3).getNumericCellValue();
    62. good.setGoodOutPrice(good_outPrice);
    63. /*获取第五单元格并设置对象属性*/
    64. row.getCell(4).setCellType(Cell.CELL_TYPE_NUMERIC);
    65. Integer good_reserve = (int) row.getCell(4).getNumericCellValue();
    66. good.setGoodReserve(good_reserve);
    67. /*获取第六单元格并设置对象属性*/
    68. String good_product = String.valueOf(row.getCell(5).getDateCellValue());
    69. good.setGoodProduct(good_product);
    70. /*获取第七单元格并设置对象属性*/
    71. String good_exTime = String.valueOf(row.getCell(6).getDateCellValue());
    72. good.setGoodExTime(good_exTime);
    73. /*获取第八单元格并设置对象属性*/
    74. Integer good_shop_id = (int) row.getCell(7).getNumericCellValue();
    75. good.setGoodShopId(good_shop_id);
    76. /*将这个对象插入List容器里*/
    77. goodArrayList.add(good);
    78. }
    79. }
    80. return goodArrayList;
    81. }
    82. }

    MD5加密组件

    1. /*加密算法:MD5加密的使用,主要是二次加密加盐的技术*/
    2. @Component
    3. public class MD5 {
    4. public static String slat = "1a2b3c4d";
    5. public String md5_hlc(String src) {
    6. return DigestUtils.md5Hex(src);
    7. }
    8. /*前端加密的步骤与这一样,注意盐的位置与盐的值*/
    9. public String inputPassToFromPass(String inputPass) {
    10. String slat = "java_secKill";
    11. String str = slat.charAt(0) +
    12. slat.charAt(1) + inputPass +
    13. slat.charAt(2);
    14. return md5_hlc(str);
    15. }
    16. public String PassToDbPass(String FromPass, String slat) {
    17. String str = slat.charAt(2) +
    18. slat.charAt(1) + FromPass +
    19. slat.charAt(0);
    20. return md5_hlc(str);
    21. }
    22. public String inputPassToDbPass(String inputPass) {
    23. String fromPass = inputPassToFromPass(inputPass);
    24. return PassToDbPass(fromPass, slat);
    25. }
    26. /*测试加密技术*/
    27. /*444bcbf09f10ee179b8c8d52bf834033(数据库昵称:小年 的实体密码 / 前端加密出现的加密后密码)*/
    28. /*经过加密之后的密码因该不是这个,原始的密码经过MD5加密之后就发生了加密变化*/
    29. // public static void main(String[] args) {
    30. // MD5 m1 = new MD5();
    31. // System.out.println(m1.inputPassToFromPass("hlc123"));
    32. // System.out.println(m1.PassToDbPass(m1.inputPassToFromPass("hlc123"), slat));
    33. //
    34. // }
    35. }

    时间矫正组件(解决系统时间与数据库时间格式与时区不一致问题)

    1. /*
    2. * 日期矫正组件:java提取系统时间可能会减少8小时,由于时区问题,所以需要将时区调整到东八区,
    3. * 另外数据库日期格式可能与java封装工具包可能存在差异,所以需要转换格式。
    4. * */
    5. @Component
    6. public class TimeC {
    7. public String getSystemTime() throws ParseException {
    8. SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
    9. sdf.setTimeZone(TimeZone.getTimeZone("GMT+8"));
    10. Date date = sdf.parse(sdf.format(new Date()));
    11. return date.toString();
    12. }
    13. }

     前端页面

    需要的评论区留言我会回复的。

    application.yml文件

    1. spring:
    2. application:
    3. #应用名
    4. name: SecKill
    5. datasource:
    6. name: defaultDataSource
    7. driver-class-name: com.mysql.cj.jdbc.Driver
    8. url: jdbc:mysql://localhost:3306/ncds?serverTimezone=UTC
    9. username: root
    10. password: 123456
    11. #数据库连接池
    12. druid:
    13. name: NCDS
    14. min-idle: 32
    15. max-active: 100
    16. default-auto-commit: true
    17. max-wait: 3000
    18. mvc:
    19. static-path-pattern: /static/**
    20. thymeleaf:
    21. #是否利用缓存
    22. cache: false
    23. mode: HTML5
    24. redis:
    25. host: 192.168.20.150
    26. port: 6379
    27. password: hlc
    28. database: 1
    29. jedis:
    30. pool:
    31. max-idle: 32
    32. max-wait: 3000
    33. min-idle: 8
    34. max-active: 20
    35. server:
    36. port: 8080

    pom文件

    1. <dependencies>
    2. <!--跳转模板引擎-->
    3. <dependency>
    4. <groupId>org.springframework.boot</groupId>
    5. <artifactId>spring-boot-starter-thymeleaf</artifactId>
    6. </dependency>
    7. <!--springMVC-->
    8. <dependency>
    9. <groupId>org.springframework.boot</groupId>
    10. <artifactId>spring-boot-starter-web</artifactId>
    11. </dependency>
    12. <!--mybatis plus 依赖与代码生成器依赖-->
    13. <dependency>
    14. <groupId>com.baomidou</groupId>
    15. <artifactId>mybatis-plus-boot-starter</artifactId>
    16. <version>3.5.2</version>
    17. </dependency>
    18. <!--mysql数据库驱动-->
    19. <dependency>
    20. <groupId>mysql</groupId>
    21. <artifactId>mysql-connector-java</artifactId>
    22. <scope>runtime</scope>
    23. </dependency>
    24. <!--数据库连接池-->
    25. <dependency>
    26. <groupId>com.alibaba</groupId>
    27. <artifactId>druid-spring-boot-starter</artifactId>
    28. <version>1.2.8</version>
    29. </dependency>
    30. <!--lombok开发插件-->
    31. <dependency>
    32. <groupId>org.projectlombok</groupId>
    33. <artifactId>lombok</artifactId>
    34. <optional>true</optional>
    35. </dependency>
    36. <!--测试-->
    37. <dependency>
    38. <groupId>org.springframework.boot</groupId>
    39. <artifactId>spring-boot-starter-test</artifactId>
    40. <scope>test</scope>
    41. <exclusions>
    42. <exclusion>
    43. <groupId>org.junit.vintage</groupId>
    44. <artifactId>junit-vintage-engine</artifactId>
    45. </exclusion>
    46. </exclusions>
    47. </dependency>
    48. <!--md5依赖-->
    49. <dependency>
    50. <groupId>commons-codec</groupId>
    51. <artifactId>commons-codec</artifactId>
    52. </dependency>
    53. <dependency>
    54. <groupId>org.apache.commons</groupId>
    55. <artifactId>commons-lang3</artifactId>
    56. <version>3.12.0</version>
    57. </dependency>
    58. <!--redis数据库-->
    59. <dependency>
    60. <groupId>org.springframework.boot</groupId>
    61. <artifactId>spring-boot-starter-data-redis</artifactId>
    62. </dependency>
    63. <dependency>
    64. <groupId>org.apache.commons</groupId>
    65. <artifactId>commons-pool2</artifactId>
    66. <version>2.11.1</version>
    67. </dependency>
    68. <dependency>
    69. <groupId>redis.clients</groupId>
    70. <artifactId>jedis</artifactId>
    71. </dependency>
    72. <!--文件导入依赖-->
    73. <dependency>
    74. <groupId>org.apache.poi</groupId>
    75. <artifactId>poi</artifactId>
    76. <version>3.15</version>
    77. </dependency>
    78. <dependency>
    79. <groupId>org.apache.poi</groupId>
    80. <artifactId>poi-ooxml</artifactId>
    81. <version>3.15</version>
    82. </dependency>
    83. <dependency>
    84. <groupId>commons-fileupload</groupId>
    85. <artifactId>commons-fileupload</artifactId>
    86. <version>1.3.1</version>
    87. </dependency>
    88. <dependency>
    89. <groupId>commons-io</groupId>
    90. <artifactId>commons-io</artifactId>
    91. <version>2.4</version>
    92. </dependency>
    93. </dependencies>

    支付端口呢?当然是在我上一篇文章里了!那个就是解决支付实现的模块代码。

  • 相关阅读:
    c++ 动态分配内存
    剑指offer 04. 替换空格
    Unity3D TCP网络通讯核心意涵与基本原理详解
    计算机毕业设计(附源码)python疫情信息管理系统
    你有多了解Shiro认证-SSM?
    【云原生】五年博主教你用阿里云Serverless免费额度搭建个人应用服务, 还不赶快上车。
    springboot毕设项目大学生创新项目运维系统9y232(java+VUE+Mybatis+Maven+Mysql)
    Day10—SQL那些事(特殊场景的查询)
    android开发使用OkHttp自带的WebSocket实现IM功能
    基础算法--区间合并
  • 原文地址:https://blog.csdn.net/m0_59588838/article/details/125453402