当前位置:网站首页>Tiktok practice ~ personal Center

Tiktok practice ~ personal Center

2022-06-22 09:46:00 gblfy

 Insert picture description here
 Insert picture description here
 Insert picture description here

One 、 Home page
1. Home page elements
  • essential information :
 nickname 
 Tiktok 
 Head portrait 
 Gender  1: male   0: Woman   2: A secret 
 Personal profile 
 Birthday 
 Background picture of personal introduction 

 Focus on ~ The total number of bloggers I follow 
 fans ~ My total number of fans 
 Be praised ~ Total number of user likes , Video Blogger ( give the thumbs-up / like ) The sum of the 

 Follow the list of details 
 List of fan details 

  • Edit data elements
 Country 
 Province 
 City 
 District and county 
  • Set up
 Head portrait 、 nickname 、 Introduction to personal advantages 、 personal works 
  • Video related
 works 、 Private 、 I like 
2. Table design

 Insert picture description here

-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
  `id` varchar(24) NOT NULL,
  `mobile` varchar(32) NOT NULL COMMENT ' cell-phone number ',
  `nickname` varchar(16) NOT NULL COMMENT ' nickname , Media number ',
  `imooc_num` varchar(16) NOT NULL COMMENT ' Tiktok , official account , Unique identification , You need to limit the number of modifications , Like a lifetime 1 Time , Every year, 1 Time , Every six months 1 Second grade , It can be used for paid modification .',
  `face` varchar(128) NOT NULL COMMENT ' Head portrait ',
  `sex` int(11) NOT NULL COMMENT ' Gender  1: male  0: Woman  2: A secret ',
  `birthday` date NOT NULL COMMENT ' Birthday ',
  `country` varchar(32) DEFAULT NULL COMMENT ' Country ',
  `province` varchar(32) DEFAULT NULL COMMENT ' Province ',
  `city` varchar(32) DEFAULT NULL COMMENT ' City ',
  `district` varchar(32) DEFAULT NULL COMMENT ' District and county ',
  `description` varchar(100) NOT NULL COMMENT ' brief introduction ',
  `bg_img` varchar(255) DEFAULT NULL COMMENT ' Background picture of personal introduction ',
  `can_imooc_num_be_updated` int(1) NOT NULL COMMENT ' Can the Moke number be modified ,1: Default , You can modify ;0, Can't modify ',
  `created_time` datetime NOT NULL COMMENT ' Creation time   Creation time ',
  `updated_time` datetime NOT NULL COMMENT ' Update time   Update time ',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `mobile` (`mobile`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT=' User table ';
3. Counting scheme evaluation

The personal center page has 3 Place belongs to the counting category :
Focus on ~ The total number of bloggers I follow
fans ~ My total number of fans
Be praised ~ Total number of user likes , Video Blogger ( give the thumbs-up / like ) The sum of the

Traditional scheme :
Storage database , Count use the total to find conut, When the amount of data reaches hundreds of millions, the pressure on the database , It's very big , Real Tiktok app this 3 The item count is very impressive .

Elegant solution :
redis It supports counting , When we count, we just need to get 2 Just a function , Very convenient . therefore , The following count related function points all adopt redis To count .

Two 、 Interface design
2.1. Classify and archive
  • Basic interface

  • Count correlation

 Follow the list of details 
 List of fan details 
  • Video related
 List of works 、 Private list 、 Like the video list 
原网站

版权声明
本文为[gblfy]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206220936395736.html