├── README.md ├── backend ├── febs_shiro_jwt.iml ├── pom.xml └── src │ └── main │ ├── java │ └── cc │ │ └── mrbird │ │ └── febs │ │ ├── FebsApplication.java │ │ ├── common │ │ ├── annotation │ │ │ ├── IsCron.java │ │ │ ├── Limit.java │ │ │ └── Log.java │ │ ├── aspect │ │ │ ├── LimitAspect.java │ │ │ └── LogAspect.java │ │ ├── authentication │ │ │ ├── JWTFilter.java │ │ │ ├── JWTToken.java │ │ │ ├── JWTUtil.java │ │ │ ├── ShiroConfig.java │ │ │ └── ShiroRealm.java │ │ ├── config │ │ │ ├── AsyncExecutorPoolConfig.java │ │ │ ├── MyWebMvcConfigurerAdapter.java │ │ │ ├── MybatisPlusConfig.java │ │ │ ├── P6spySqlFormatConfig.java │ │ │ └── RedisConfig.java │ │ ├── controller │ │ │ └── BaseController.java │ │ ├── converter │ │ │ └── TimeConverter.java │ │ ├── domain │ │ │ ├── ActiveUser.java │ │ │ ├── FebsConstant.java │ │ │ ├── FebsResponse.java │ │ │ ├── LimitType.java │ │ │ ├── QueryRequest.java │ │ │ ├── RedisInfo.java │ │ │ ├── RegexpConstant.java │ │ │ ├── Tree.java │ │ │ └── router │ │ │ │ ├── RouterMeta.java │ │ │ │ └── VueRouter.java │ │ ├── exception │ │ │ ├── FebsException.java │ │ │ ├── LimitAccessException.java │ │ │ ├── RedisConnectException.java │ │ │ └── TokenTimeoutException.java │ │ ├── function │ │ │ ├── CacheSelector.java │ │ │ └── JedisExecutor.java │ │ ├── generator │ │ │ └── CodeGenerator.java │ │ ├── handler │ │ │ └── GlobalExceptionHandler.java │ │ ├── properties │ │ │ ├── FebsProperties.java │ │ │ └── ShiroProperties.java │ │ ├── runner │ │ │ ├── CacheInitRunner.java │ │ │ └── StartedUpRunner.java │ │ ├── service │ │ │ ├── CacheService.java │ │ │ ├── RedisService.java │ │ │ └── impl │ │ │ │ ├── CacheServiceImpl.java │ │ │ │ └── RedisServiceImpl.java │ │ ├── task │ │ │ └── CacheTask.java │ │ ├── utils │ │ │ ├── AddressUtil.java │ │ │ ├── DateUtil.java │ │ │ ├── EncryptUtil.java │ │ │ ├── FebsUtil.java │ │ │ ├── FileNameUtils.java │ │ │ ├── FileUtil.java │ │ │ ├── HttpContextUtil.java │ │ │ ├── HttpUtil.java │ │ │ ├── IPUtil.java │ │ │ ├── MD5Util.java │ │ │ ├── R.java │ │ │ ├── SortUtil.java │ │ │ ├── SpringContextUtil.java │ │ │ └── TreeUtil.java │ │ └── validator │ │ │ └── CronValidator.java │ │ ├── cos │ │ ├── controller │ │ │ ├── BulletinInfoController.java │ │ │ ├── ClothesInfoController.java │ │ │ ├── CollectInfoController.java │ │ │ ├── FileController.java │ │ │ ├── FocusInfoController.java │ │ │ ├── HomeInfoController.java │ │ │ ├── MessageInfoController.java │ │ │ ├── PostInfoController.java │ │ │ ├── ReplyInfoController.java │ │ │ ├── SensitiveInfoController.java │ │ │ ├── StatementInfoController.java │ │ │ ├── TagInfoController.java │ │ │ └── UserInfoController.java │ │ ├── dao │ │ │ ├── BulletinInfoMapper.java │ │ │ ├── ClothesInfoMapper.java │ │ │ ├── CollectInfoMapper.java │ │ │ ├── FocusInfoMapper.java │ │ │ ├── HomeInfoMapper.java │ │ │ ├── MessageInfoMapper.java │ │ │ ├── PostInfoMapper.java │ │ │ ├── ReplyInfoMapper.java │ │ │ ├── SensitiveInfoMapper.java │ │ │ ├── StatementInfoMapper.java │ │ │ ├── TagInfoMapper.java │ │ │ └── UserInfoMapper.java │ │ ├── entity │ │ │ ├── BulletinInfo.java │ │ │ ├── ClothesInfo.java │ │ │ ├── CollectInfo.java │ │ │ ├── FocusInfo.java │ │ │ ├── HomeInfo.java │ │ │ ├── MessageInfo.java │ │ │ ├── PostInfo.java │ │ │ ├── ReplyInfo.java │ │ │ ├── SensitiveInfo.java │ │ │ ├── StatementInfo.java │ │ │ ├── TagInfo.java │ │ │ └── UserInfo.java │ │ └── service │ │ │ ├── IBulletinInfoService.java │ │ │ ├── IClothesInfoService.java │ │ │ ├── ICollectInfoService.java │ │ │ ├── IFocusInfoService.java │ │ │ ├── IHomeInfoService.java │ │ │ ├── IMessageInfoService.java │ │ │ ├── IPostInfoService.java │ │ │ ├── IReplyInfoService.java │ │ │ ├── ISensitiveInfoService.java │ │ │ ├── IStatementInfoService.java │ │ │ ├── ITagInfoService.java │ │ │ ├── IUserInfoService.java │ │ │ └── impl │ │ │ ├── BulletinInfoServiceImpl.java │ │ │ ├── ClothesInfoServiceImpl.java │ │ │ ├── CollectInfoServiceImpl.java │ │ │ ├── FocusInfoServiceImpl.java │ │ │ ├── HomeInfoServiceImpl.java │ │ │ ├── MessageInfoServiceImpl.java │ │ │ ├── PostInfoServiceImpl.java │ │ │ ├── ReplyInfoServiceImpl.java │ │ │ ├── SensitiveInfoServiceImpl.java │ │ │ ├── StatementInfoServiceImpl.java │ │ │ ├── TagInfoServiceImpl.java │ │ │ └── UserInfoServiceImpl.java │ │ ├── job │ │ ├── config │ │ │ └── ScheduleConfig.java │ │ ├── controller │ │ │ ├── JobController.java │ │ │ └── JobLogController.java │ │ ├── dao │ │ │ ├── JobLogMapper.java │ │ │ └── JobMapper.java │ │ ├── domain │ │ │ ├── Job.java │ │ │ └── JobLog.java │ │ ├── service │ │ │ ├── JobLogService.java │ │ │ ├── JobService.java │ │ │ └── impl │ │ │ │ ├── JobLogServiceImpl.java │ │ │ │ └── JobServiceImpl.java │ │ ├── task │ │ │ └── TestTask.java │ │ └── util │ │ │ ├── ScheduleJob.java │ │ │ ├── ScheduleRunnable.java │ │ │ └── ScheduleUtils.java │ │ ├── system │ │ ├── controller │ │ │ ├── DeptController.java │ │ │ ├── DictController.java │ │ │ ├── LogController.java │ │ │ ├── LoginController.java │ │ │ ├── MenuController.java │ │ │ ├── RedisController.java │ │ │ ├── RoleController.java │ │ │ ├── TestController.java │ │ │ └── UserController.java │ │ ├── dao │ │ │ ├── DeptMapper.java │ │ │ ├── DictMapper.java │ │ │ ├── LogMapper.java │ │ │ ├── LoginLogMapper.java │ │ │ ├── MenuMapper.java │ │ │ ├── RoleMapper.java │ │ │ ├── RoleMenuMapper.java │ │ │ ├── TestMapper.java │ │ │ ├── UserConfigMapper.java │ │ │ ├── UserMapper.java │ │ │ └── UserRoleMapper.java │ │ ├── domain │ │ │ ├── Dept.java │ │ │ ├── Dict.java │ │ │ ├── LoginLog.java │ │ │ ├── Menu.java │ │ │ ├── Role.java │ │ │ ├── RoleMenu.java │ │ │ ├── SysLog.java │ │ │ ├── Test.java │ │ │ ├── User.java │ │ │ ├── UserConfig.java │ │ │ └── UserRole.java │ │ ├── manager │ │ │ └── UserManager.java │ │ └── service │ │ │ ├── DeptService.java │ │ │ ├── DictService.java │ │ │ ├── LogService.java │ │ │ ├── LoginLogService.java │ │ │ ├── MenuService.java │ │ │ ├── RoleMenuServie.java │ │ │ ├── RoleService.java │ │ │ ├── TestService.java │ │ │ ├── UserConfigService.java │ │ │ ├── UserRoleService.java │ │ │ ├── UserService.java │ │ │ └── impl │ │ │ ├── DeptServiceImpl.java │ │ │ ├── DictServiceImpl.java │ │ │ ├── LogServiceImpl.java │ │ │ ├── LoginLogServiceImpl.java │ │ │ ├── MenuServiceImpl.java │ │ │ ├── RoleMenuServiceImpl.java │ │ │ ├── RoleServiceImpl.java │ │ │ ├── TestServiceImpl.java │ │ │ ├── UserConfigServiceImpl.java │ │ │ ├── UserRoleServiceImpl.java │ │ │ └── UserServiceImpl.java │ │ └── web │ │ └── controller │ │ ├── ArticleController.java │ │ ├── MovieController.java │ │ └── WeatherController.java │ └── resources │ ├── ValidationMessages.properties │ ├── application.yml │ ├── banner.txt │ ├── generator │ └── templates │ │ ├── controller.java.ftl │ │ ├── entity.java.ftl │ │ ├── mapper.java.ftl │ │ ├── mapper.xml.ftl │ │ ├── service.java.ftl │ │ └── serviceImpl.java.ftl │ ├── ip2region │ └── ip2region.db │ ├── logback-spring.xml │ ├── mapper │ ├── job │ │ └── JobMapper.xml │ └── system │ │ ├── LoginLogMapper.xml │ │ ├── MenuMapper.xml │ │ ├── RoleMapper.xml │ │ ├── UserMapper.xml │ │ └── UserRoleMapper.xml │ └── spy.properties ├── db ├── 123.jpg ├── 132.jpg ├── 147.jpg ├── SA1647827873595.jpg ├── SA1651295446607.jpg ├── SA1651296486541.JPG ├── SA1679115626205.jpg ├── SA1679115627867.jpg ├── SA1679123707041.jpg ├── SA1679123854527.jpg ├── SA1679123867346.jpg ├── SA1679123872402.jpg ├── SA1679123878280.jpg ├── SA1679123894233.jpg ├── SA1679140132052.jpg ├── SA1679140173849.jpg └── SA1679145075509.jpg └── frontend ├── .babelrc ├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .gitattributes ├── .idea ├── codeStyles │ └── codeStyleConfig.xml ├── frontend.iml ├── inspectionProfiles │ └── Project_Default.xml ├── modules.xml └── workspace.xml ├── .postcssrc.js ├── build ├── build.js ├── check-versions.js ├── logo.png ├── utils.js ├── vue-loader.conf.js ├── webpack.base.conf.js ├── webpack.dev.conf.js └── webpack.prod.conf.js ├── config ├── dev.env.js ├── index.js ├── prod.env.js └── test.env.js ├── index.html ├── package-lock.json ├── package.json ├── src ├── FEBS.vue ├── components │ ├── checkbox │ │ ├── ColorCheckbox.vue │ │ └── ImgCheckbox.vue │ ├── datetime │ │ └── RangeDate.vue │ ├── exception │ │ ├── ExceptionPage.vue │ │ └── typeConfig.js │ ├── menu │ │ ├── Contextmenu.vue │ │ ├── SiderMenu.vue │ │ └── menu.js │ ├── setting │ │ ├── Setting.vue │ │ ├── SettingItem.vue │ │ └── StyleItem.vue │ └── tool │ │ └── Drawer.vue ├── main.js ├── router │ └── index.js ├── store │ ├── index.js │ └── modules │ │ ├── account.js │ │ └── setting.js ├── utils │ ├── color.js │ ├── common.js │ ├── device.js │ ├── install.js │ ├── localstorage.js │ ├── permissionDirect.js │ ├── request.js │ └── utils.less └── views │ ├── HomePage.vue │ ├── admin │ ├── bulletin │ │ ├── Bulletin.vue │ │ ├── BulletinAdd.vue │ │ └── BulletinEdit.vue │ ├── clothes │ │ ├── Clothes.vue │ │ ├── ClothesAdd.vue │ │ ├── ClothesEdit.vue │ │ └── ClothesView.vue │ ├── home │ │ └── Home.vue │ ├── message │ │ └── Message.vue │ ├── post │ │ ├── Post.vue │ │ ├── PostAdd.vue │ │ └── PostEdit.vue │ ├── reply │ │ └── Reply.vue │ ├── sensitive │ │ ├── Sensitive.vue │ │ ├── SensitiveAdd.vue │ │ └── SensitiveEdit.vue │ ├── statement │ │ └── Statement.vue │ ├── tag │ │ ├── Tag.vue │ │ ├── TagAdd.vue │ │ └── TagEdit.vue │ └── user │ │ ├── User.vue │ │ └── UserView.vue │ ├── common │ ├── EmptyPageView.vue │ ├── GlobalFooter.vue │ ├── GlobalHeader.vue │ ├── GlobalLayout.vue │ ├── HeadInfo.vue │ ├── HeaderAvatar.vue │ ├── MenuView.vue │ ├── PageContent.vue │ ├── PageLayout.vue │ └── PageView.vue │ ├── error │ ├── 403.vue │ ├── 404.vue │ └── 500.vue │ ├── login │ ├── Common.vue │ ├── Login.vue │ └── Regist.vue │ ├── monitor │ ├── Httptrace.vue │ ├── JvmInfo.vue │ ├── Online.vue │ ├── RedisInfo.vue │ ├── RedisTerminal.vue │ ├── SystemInfo.vue │ ├── SystemLog.vue │ └── TomcatInfo.vue │ ├── others │ ├── Excel.vue │ └── ImportResult.vue │ ├── personal │ ├── Profile.vue │ ├── UpdateAvatar.vue │ ├── UpdatePassword.vue │ └── UpdateProfile.vue │ ├── quartz │ ├── job │ │ ├── Job.vue │ │ ├── JobAdd.vue │ │ └── JobEdit.vue │ └── log │ │ └── JobLog.vue │ ├── system │ ├── dept │ │ ├── Dept.vue │ │ ├── DeptAdd.vue │ │ ├── DeptEdit.vue │ │ └── DeptInputTree.vue │ ├── dict │ │ ├── Dict.vue │ │ ├── DictAdd.vue │ │ └── DictEdit.vue │ ├── menu │ │ ├── ButtonAdd.vue │ │ ├── ButtonEdit.vue │ │ ├── Icon.less │ │ ├── Icons.vue │ │ ├── Menu.vue │ │ ├── MenuAdd.vue │ │ └── MenuEdit.vue │ ├── role │ │ ├── Role.vue │ │ ├── RoleAdd.vue │ │ ├── RoleEdit.vue │ │ └── RoleInfo.vue │ └── user │ │ ├── User.vue │ │ ├── UserAdd.vue │ │ ├── UserEdit.vue │ │ ├── UserInfo.less │ │ └── UserInfo.vue │ ├── user │ ├── collect │ │ └── Collect.vue │ ├── focus │ │ └── Focus.vue │ ├── message │ │ └── Message.vue │ ├── personal │ │ └── Personal.vue │ ├── post │ │ ├── Post.vue │ │ ├── PostAdd.vue │ │ └── PostEdit.vue │ └── statement │ │ ├── Statement.vue │ │ └── StatementAdd.vue │ └── web │ ├── DailyArticle.vue │ ├── MovieComing.vue │ ├── MovieHot.vue │ └── Weather.vue ├── static ├── .gitkeep ├── avatar │ ├── 17e420c250804efe904a09a33796d5a10.jpg │ ├── 17e420c250804efe904a09a33796d5a16.jpg │ ├── 19034103295190235.jpg │ ├── 1d22f3e41d284f50b2c8fc32e0788698.jpeg │ ├── 20180414165754.jpg │ ├── 20180414165815.jpg │ ├── 20180414165821.jpg │ ├── 20180414165827.jpg │ ├── 20180414165834.jpg │ ├── 20180414165840.jpg │ ├── 20180414165846.jpg │ ├── 20180414165855.jpg │ ├── 20180414165909.jpg │ ├── 20180414165914.jpg │ ├── 20180414165920.jpg │ ├── 20180414165927.jpg │ ├── 20180414165936.jpg │ ├── 20180414165942.jpg │ ├── 20180414165947.jpg │ ├── 20180414165955.jpg │ ├── 20180414170003.jpg │ ├── 2dd7a2d09fa94bf8b5c52e5318868b4d9.jpg │ ├── 2dd7a2d09fa94bf8b5c52e5318868b4df.jpg │ ├── 496b3ace787342f7954b7045b8b06804.jpeg │ ├── 595ba7b05f2e485eb50565a50cb6cc3c.jpeg │ ├── 5997fedcc7bd4cffbd350b40d1b5b9824.jpg │ ├── 5997fedcc7bd4cffbd350b40d1b5b987.jpg │ ├── 87d8194bc9834e9f8f0228e9e530beb1.jpeg │ ├── 8f5b60ef00714a399ee544d331231820.jpeg │ ├── 964e40b005724165b8cf772355796c8c.jpeg │ ├── BiazfanxmamNRoxxVxka.png │ ├── WhxKECPNujWoWEFNdnJE.png │ ├── a3b10296862e40edb811418d64455d00.jpeg │ ├── a43456282d684e0b9319cf332f8ac468.jpeg │ ├── bba284ac05b041a8b8b0d1927868d5c9x.jpg │ ├── c7c4ee7be3eb4e73a19887dc713505145.jpg │ ├── cnrhVkzwxjPwAaCfPbdc.png │ ├── default.jpg │ ├── ff698bb2d25c4d218b3256b46c706ece.jpeg │ ├── gaOngJwsRYRaVAuXXcmB.png │ ├── jZUIxmJycoymBprLOUbT.png │ └── ubnKSIfAJTxIgXOKlciN.png ├── file │ └── city.json ├── img │ ├── favicon.ico │ ├── logo-blue.png │ ├── logo.png │ ├── logo1.png │ ├── side-bar-dark.svg │ ├── side-bar-left.svg │ ├── side-bar-light.svg │ └── side-bar-top.svg └── less │ ├── Color.less │ └── Common.less ├── yarn-error.log └── yarn.lock /backend/src/main/java/cc/mrbird/febs/FebsApplication.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs; 2 | 3 | import org.springframework.boot.autoconfigure.SpringBootApplication; 4 | import org.springframework.boot.builder.SpringApplicationBuilder; 5 | import org.springframework.scheduling.annotation.EnableAsync; 6 | import org.springframework.scheduling.annotation.EnableScheduling; 7 | import org.springframework.transaction.annotation.EnableTransactionManagement; 8 | 9 | @SpringBootApplication 10 | @EnableTransactionManagement 11 | @EnableScheduling 12 | @EnableAsync 13 | public class FebsApplication { 14 | 15 | public static void main(String[] args) { 16 | new SpringApplicationBuilder(FebsApplication.class) 17 | .run(args); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/annotation/IsCron.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.annotation; 2 | 3 | import cc.mrbird.febs.common.validator.CronValidator; 4 | 5 | import javax.validation.Constraint; 6 | import javax.validation.Payload; 7 | import java.lang.annotation.ElementType; 8 | import java.lang.annotation.Retention; 9 | import java.lang.annotation.RetentionPolicy; 10 | import java.lang.annotation.Target; 11 | 12 | @Target({ElementType.FIELD}) 13 | @Retention(RetentionPolicy.RUNTIME) 14 | @Constraint(validatedBy = CronValidator.class) 15 | public @interface IsCron { 16 | 17 | String message(); 18 | 19 | Class[] groups() default {}; 20 | 21 | Class[] payload() default {}; 22 | } 23 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/annotation/Limit.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.annotation; 2 | 3 | import cc.mrbird.febs.common.domain.LimitType; 4 | 5 | import java.lang.annotation.ElementType; 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.RetentionPolicy; 8 | import java.lang.annotation.Target; 9 | 10 | @Target(ElementType.METHOD) 11 | @Retention(RetentionPolicy.RUNTIME) 12 | public @interface Limit { 13 | 14 | // 资源名称,用于描述接口功能 15 | String name() default ""; 16 | 17 | // 资源 key 18 | String key() default ""; 19 | 20 | // key prefix 21 | String prefix() default ""; 22 | 23 | // 时间的,单位秒 24 | int period(); 25 | 26 | // 限制访问次数 27 | int count(); 28 | 29 | // 限制类型 30 | LimitType limitType() default LimitType.CUSTOMER; 31 | } 32 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/annotation/Log.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Target(ElementType.METHOD) 9 | @Retention(RetentionPolicy.RUNTIME) 10 | public @interface Log { 11 | String value() default ""; 12 | } 13 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/authentication/JWTToken.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.authentication; 2 | 3 | import lombok.Data; 4 | import org.apache.shiro.authc.AuthenticationToken; 5 | 6 | /** 7 | * JSON Web Token 8 | */ 9 | @Data 10 | public class JWTToken implements AuthenticationToken { 11 | 12 | private static final long serialVersionUID = 1282057025599826155L; 13 | 14 | private String token; 15 | 16 | private String exipreAt; 17 | 18 | public JWTToken(String token) { 19 | this.token = token; 20 | } 21 | 22 | public JWTToken(String token, String exipreAt) { 23 | this.token = token; 24 | this.exipreAt = exipreAt; 25 | } 26 | 27 | @Override 28 | public Object getPrincipal() { 29 | return token; 30 | } 31 | 32 | @Override 33 | public Object getCredentials() { 34 | return token; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/config/AsyncExecutorPoolConfig.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.scheduling.annotation.AsyncConfigurerSupport; 6 | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; 7 | 8 | import java.util.concurrent.Executor; 9 | import java.util.concurrent.ThreadPoolExecutor; 10 | 11 | @Configuration 12 | public class AsyncExecutorPoolConfig extends AsyncConfigurerSupport { 13 | @Bean 14 | public Executor taskExecutor() { 15 | ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); 16 | 17 | executor.setCorePoolSize(5); 18 | executor.setMaxPoolSize(20); 19 | executor.setQueueCapacity(100); 20 | executor.setKeepAliveSeconds(30); 21 | executor.setThreadNamePrefix("asyncTaskExecutor-"); 22 | 23 | executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); 24 | return executor; 25 | } 26 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/config/MyWebMvcConfigurerAdapter.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.config; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; 5 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 6 | 7 | @Configuration 8 | public class MyWebMvcConfigurerAdapter implements WebMvcConfigurer { 9 | 10 | @Override 11 | public void addResourceHandlers(ResourceHandlerRegistry registry) { 12 | registry.addResourceHandler("/imagesWeb/**").addResourceLocations("file:G:/Project/汉服论坛系统/db/"); 13 | WebMvcConfigurer.super.addResourceHandlers(registry); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/config/MybatisPlusConfig.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.config; 2 | 3 | import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; 4 | import org.mybatis.spring.annotation.MapperScan; 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.context.annotation.Configuration; 7 | 8 | @Configuration 9 | @MapperScan(value = {"cc.mrbird.febs.*.dao"}) 10 | public class MybatisPlusConfig { 11 | 12 | /** 13 | * 分页插件 14 | */ 15 | @Bean 16 | public PaginationInterceptor paginationInterceptor() { 17 | return new PaginationInterceptor(); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/config/P6spySqlFormatConfig.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.config; 2 | 3 | import cc.mrbird.febs.common.utils.DateUtil; 4 | import com.p6spy.engine.spy.appender.MessageFormattingStrategy; 5 | import org.apache.commons.lang3.StringUtils; 6 | 7 | import java.time.LocalDateTime; 8 | 9 | /** 10 | * 自定义 p6spy sql输出格式 11 | * 12 | * @author MrBird 13 | */ 14 | public class P6spySqlFormatConfig implements MessageFormattingStrategy { 15 | 16 | /** 17 | * 过滤掉定时任务的 SQL 18 | */ 19 | @Override 20 | public String formatMessage(int connectionId, String now, long elapsed, String category, String prepared, String sql, String url) { 21 | return StringUtils.isNotBlank(sql) ? DateUtil.formatFullTime(LocalDateTime.now(), DateUtil.FULL_TIME_SPLIT_PATTERN) 22 | + " | 耗时 " + elapsed + " ms | SQL 语句:" + StringUtils.LF + sql.replaceAll("[\\s]+", StringUtils.SPACE) + ";" : ""; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/controller/BaseController.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.controller; 2 | 3 | import com.baomidou.mybatisplus.core.metadata.IPage; 4 | 5 | import java.util.HashMap; 6 | import java.util.Map; 7 | 8 | public class BaseController { 9 | 10 | protected Map getDataTable(IPage pageInfo) { 11 | Map rspData = new HashMap<>(); 12 | rspData.put("rows", pageInfo.getRecords()); 13 | rspData.put("total", pageInfo.getTotal()); 14 | return rspData; 15 | } 16 | 17 | 18 | } 19 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/converter/TimeConverter.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.converter; 2 | 3 | import cc.mrbird.febs.common.utils.DateUtil; 4 | import com.wuwenze.poi.convert.WriteConverter; 5 | import com.wuwenze.poi.exception.ExcelKitWriteConverterException; 6 | import lombok.extern.slf4j.Slf4j; 7 | 8 | /** 9 | * Execl导出时间类型字段格式化 10 | */ 11 | @Slf4j 12 | public class TimeConverter implements WriteConverter { 13 | @Override 14 | public String convert(Object value) throws ExcelKitWriteConverterException { 15 | try { 16 | if (value == null) 17 | return ""; 18 | else { 19 | return DateUtil.formatCSTTime(value.toString(), DateUtil.FULL_TIME_SPLIT_PATTERN); 20 | } 21 | } catch (Exception e) { 22 | log.error("时间转换异常", e); 23 | return ""; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/domain/ActiveUser.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.domain; 2 | 3 | import cc.mrbird.febs.common.utils.DateUtil; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import lombok.Data; 6 | import org.apache.commons.lang3.RandomStringUtils; 7 | 8 | import java.io.Serializable; 9 | import java.time.LocalDateTime; 10 | 11 | /** 12 | * 在线用户 13 | */ 14 | @Data 15 | @JsonInclude(JsonInclude.Include.NON_NULL) 16 | public class ActiveUser implements Serializable { 17 | private static final long serialVersionUID = 2055229953429884344L; 18 | 19 | // 唯一编号 20 | private String id = RandomStringUtils.randomAlphanumeric(20); 21 | // 用户名 22 | private String username; 23 | // ip地址 24 | private String ip; 25 | // token(加密后) 26 | private String token; 27 | // 登录时间 28 | private String loginTime = DateUtil.formatFullTime(LocalDateTime.now(),DateUtil.FULL_TIME_SPLIT_PATTERN); 29 | // 登录地点 30 | private String loginAddress; 31 | } 32 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/domain/FebsConstant.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.domain; 2 | 3 | /** 4 | * FEBS常量 5 | */ 6 | public class FebsConstant { 7 | 8 | // user缓存前缀 9 | public static final String USER_CACHE_PREFIX = "febs.cache.user."; 10 | // user角色缓存前缀 11 | public static final String USER_ROLE_CACHE_PREFIX = "febs.cache.user.role."; 12 | // user权限缓存前缀 13 | public static final String USER_PERMISSION_CACHE_PREFIX = "febs.cache.user.permission."; 14 | // user个性化配置前缀 15 | public static final String USER_CONFIG_CACHE_PREFIX = "febs.cache.user.config."; 16 | // token缓存前缀 17 | public static final String TOKEN_CACHE_PREFIX = "febs.cache.token."; 18 | 19 | // 存储在线用户的 zset前缀 20 | public static final String ACTIVE_USERS_ZSET_PREFIX = "febs.user.active"; 21 | 22 | // 排序规则: descend 降序 23 | public static final String ORDER_DESC = "descend"; 24 | // 排序规则: ascend 升序 25 | public static final String ORDER_ASC = "ascend"; 26 | 27 | // 按钮 28 | public static final String TYPE_BUTTON = "1"; 29 | // 菜单 30 | public static final String TYPE_MENU = "0"; 31 | 32 | // 网络资源 Url 33 | public static final String MEIZU_WEATHER_URL = "http://aider.meizu.com/app/weather/listWeather"; 34 | public static final String MRYW_TODAY_URL = "https://interface.meiriyiwen.com/article/today"; 35 | public static final String MRYW_DAY_URL = "https://interface.meiriyiwen.com/article/day"; 36 | public static final String TIME_MOVIE_HOT_URL = "https://api-m.mtime.cn/Showtime/LocationMovies.api"; 37 | public static final String TIME_MOVIE_DETAIL_URL = "https://ticket-api-m.mtime.cn/movie/detail.api"; 38 | public static final String TIME_MOVIE_COMING_URL = "https://api-m.mtime.cn/Movie/MovieComingNew.api"; 39 | public static final String TIME_MOVIE_COMMENTS_URL = "https://ticket-api-m.mtime.cn/movie/hotComment.api"; 40 | 41 | } 42 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/domain/FebsResponse.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.domain; 2 | 3 | import java.util.HashMap; 4 | 5 | public class FebsResponse extends HashMap { 6 | 7 | private static final long serialVersionUID = -8713837118340960775L; 8 | 9 | public FebsResponse message(String message) { 10 | this.put("message", message); 11 | return this; 12 | } 13 | 14 | public FebsResponse data(Object data) { 15 | this.put("data", data); 16 | return this; 17 | } 18 | 19 | @Override 20 | public FebsResponse put(String key, Object value) { 21 | super.put(key, value); 22 | return this; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/domain/LimitType.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.domain; 2 | 3 | public enum LimitType { 4 | // 传统类型 5 | CUSTOMER, 6 | // 根据 IP 限制 7 | IP; 8 | } 9 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/domain/QueryRequest.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.domain; 2 | 3 | import lombok.Data; 4 | import lombok.ToString; 5 | 6 | import java.io.Serializable; 7 | 8 | @Data 9 | public class QueryRequest implements Serializable { 10 | 11 | private static final long serialVersionUID = -4869594085374385813L; 12 | 13 | private int pageSize = 10; 14 | private int pageNum = 1; 15 | 16 | private String sortField; 17 | private String sortOrder; 18 | } 19 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/domain/RegexpConstant.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.domain; 2 | 3 | /** 4 | * 正则常量 5 | */ 6 | public class RegexpConstant { 7 | 8 | // 简单手机号正则(这里只是简单校验是否为11位,实际规则很复杂) 9 | public static final String MOBILE_REG = "[1]\\d{10}"; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/domain/Tree.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.domain; 2 | 3 | import com.fasterxml.jackson.annotation.JsonInclude; 4 | import lombok.Data; 5 | import lombok.ToString; 6 | 7 | import java.util.ArrayList; 8 | import java.util.Date; 9 | import java.util.List; 10 | 11 | @Data 12 | @JsonInclude(JsonInclude.Include.NON_NULL) 13 | public class Tree { 14 | 15 | private String id; 16 | 17 | private String key; 18 | 19 | private String icon; 20 | 21 | private String title; 22 | 23 | private String value; 24 | 25 | private String text; 26 | 27 | private String permission; 28 | 29 | private String type; 30 | 31 | private Double order; 32 | 33 | private String path; 34 | 35 | private String component; 36 | 37 | private List> children; 38 | 39 | private String parentId; 40 | 41 | private boolean hasParent = false; 42 | 43 | private boolean hasChildren = false; 44 | 45 | private Date createTime; 46 | 47 | private Date modifyTime; 48 | 49 | public void initChildren(){ 50 | this.children = new ArrayList<>(); 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/domain/router/RouterMeta.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.domain.router; 2 | 3 | import com.fasterxml.jackson.annotation.JsonInclude; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Data; 6 | 7 | import java.io.Serializable; 8 | 9 | /** 10 | * Vue路由 Meta 11 | */ 12 | @Data 13 | @AllArgsConstructor 14 | @JsonInclude(JsonInclude.Include.NON_NULL) 15 | public class RouterMeta implements Serializable { 16 | 17 | private static final long serialVersionUID = 5499925008927195914L; 18 | 19 | private Boolean closeable; 20 | 21 | private Boolean isShow; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/domain/router/VueRouter.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.domain.router; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | import com.fasterxml.jackson.annotation.JsonInclude; 5 | import lombok.Data; 6 | import lombok.ToString; 7 | 8 | import java.io.Serializable; 9 | import java.util.ArrayList; 10 | import java.util.List; 11 | 12 | /** 13 | * 构建 Vue路由 14 | */ 15 | @Data 16 | @JsonInclude(JsonInclude.Include.NON_NULL) 17 | public class VueRouter implements Serializable { 18 | 19 | private static final long serialVersionUID = -3327478146308500708L; 20 | 21 | @JsonIgnore 22 | private String id; 23 | 24 | @JsonIgnore 25 | private String parentId; 26 | 27 | private String path; 28 | 29 | private String name; 30 | 31 | private String component; 32 | 33 | private String icon; 34 | 35 | private String redirect; 36 | 37 | private RouterMeta meta; 38 | 39 | private List> children; 40 | 41 | @JsonIgnore 42 | private boolean hasParent = false; 43 | 44 | @JsonIgnore 45 | private boolean hasChildren = false; 46 | 47 | public void initChildren(){ 48 | this.children = new ArrayList<>(); 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/exception/FebsException.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.exception; 2 | 3 | /** 4 | * FEBS 系统内部异常 5 | */ 6 | public class FebsException extends Exception { 7 | 8 | private static final long serialVersionUID = -994962710559017255L; 9 | 10 | public FebsException(String message) { 11 | super(message); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/exception/LimitAccessException.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.exception; 2 | 3 | /** 4 | * 限流异常 5 | */ 6 | public class LimitAccessException extends Exception { 7 | 8 | private static final long serialVersionUID = -3608667856397125671L; 9 | 10 | public LimitAccessException(String message) { 11 | super(message); 12 | } 13 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/exception/RedisConnectException.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.exception; 2 | 3 | /** 4 | * Redis 连接异常 5 | */ 6 | public class RedisConnectException extends Exception { 7 | 8 | private static final long serialVersionUID = 1639374111871115063L; 9 | 10 | public RedisConnectException(String message) { 11 | super(message); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/exception/TokenTimeoutException.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.exception; 2 | 3 | import org.apache.shiro.authc.AuthenticationException; 4 | 5 | /** 6 | * token过期抛出这个 7 | */ 8 | public class TokenTimeoutException extends AuthenticationException { 9 | 10 | private static final long serialVersionUID = -8313101744886192005L; 11 | 12 | public TokenTimeoutException(String message) { 13 | super(message); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/function/CacheSelector.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.function; 2 | 3 | @FunctionalInterface 4 | public interface CacheSelector { 5 | T select() throws Exception; 6 | } 7 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/function/JedisExecutor.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.function; 2 | 3 | import cc.mrbird.febs.common.exception.RedisConnectException; 4 | 5 | @FunctionalInterface 6 | public interface JedisExecutor { 7 | R excute(T t) throws RedisConnectException; 8 | } 9 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/properties/FebsProperties.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.properties; 2 | 3 | import lombok.Data; 4 | import org.springframework.boot.context.properties.ConfigurationProperties; 5 | import org.springframework.context.annotation.Configuration; 6 | 7 | @Data 8 | @Configuration 9 | @ConfigurationProperties(prefix = "febs") 10 | public class FebsProperties { 11 | 12 | private ShiroProperties shiro = new ShiroProperties(); 13 | 14 | private boolean openAopLog = true; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/properties/ShiroProperties.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.properties; 2 | 3 | public class ShiroProperties { 4 | 5 | private String anonUrl; 6 | 7 | /** 8 | * token默认有效时间 1天 9 | */ 10 | private Long jwtTimeOut = 86400L; 11 | 12 | public String getAnonUrl() { 13 | return anonUrl; 14 | } 15 | 16 | public void setAnonUrl(String anonUrl) { 17 | this.anonUrl = anonUrl; 18 | } 19 | 20 | public Long getJwtTimeOut() { 21 | return jwtTimeOut; 22 | } 23 | 24 | public void setJwtTimeOut(Long jwtTimeOut) { 25 | this.jwtTimeOut = jwtTimeOut; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/runner/CacheInitRunner.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.runner; 2 | 3 | import cc.mrbird.febs.common.exception.RedisConnectException; 4 | import cc.mrbird.febs.common.service.CacheService; 5 | import cc.mrbird.febs.system.domain.User; 6 | import cc.mrbird.febs.system.manager.UserManager; 7 | import cc.mrbird.febs.system.service.UserService; 8 | import lombok.extern.slf4j.Slf4j; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.boot.ApplicationArguments; 11 | import org.springframework.boot.ApplicationRunner; 12 | import org.springframework.context.ConfigurableApplicationContext; 13 | import org.springframework.stereotype.Component; 14 | 15 | import java.util.List; 16 | 17 | /** 18 | * 缓存初始化 19 | */ 20 | @Slf4j 21 | @Component 22 | public class CacheInitRunner implements ApplicationRunner { 23 | 24 | @Autowired 25 | private UserService userService; 26 | 27 | @Autowired 28 | private CacheService cacheService; 29 | @Autowired 30 | private UserManager userManager; 31 | 32 | @Autowired 33 | private ConfigurableApplicationContext context; 34 | 35 | @Override 36 | public void run(ApplicationArguments args) { 37 | try { 38 | log.info("Redis连接中 ······"); 39 | cacheService.testConnect(); 40 | 41 | log.info("缓存初始化 ······"); 42 | log.info("缓存用户数据 ······"); 43 | List list = this.userService.list(); 44 | for (User user : list) { 45 | userManager.loadUserRedisCache(user); 46 | } 47 | } catch (Exception e) { 48 | log.error("缓存初始化失败,{}", e.getMessage()); 49 | log.error(" ____ __ _ _ "); 50 | log.error("| |_ / /\\ | | | |"); 51 | log.error("|_| /_/--\\ |_| |_|__"); 52 | log.error(" "); 53 | log.error("FEBS启动失败 "); 54 | if (e instanceof RedisConnectException) 55 | log.error("Redis连接异常,请检查Redis连接配置并确保Redis服务已启动"); 56 | // 关闭 FEBS 57 | context.close(); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/runner/StartedUpRunner.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.runner; 2 | 3 | import lombok.extern.slf4j.Slf4j; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.boot.ApplicationArguments; 6 | import org.springframework.boot.ApplicationRunner; 7 | import org.springframework.context.ConfigurableApplicationContext; 8 | import org.springframework.core.annotation.Order; 9 | import org.springframework.stereotype.Component; 10 | 11 | import java.time.LocalDateTime; 12 | 13 | @Order 14 | @Slf4j 15 | @Component 16 | public class StartedUpRunner implements ApplicationRunner { 17 | 18 | @Autowired 19 | private ConfigurableApplicationContext context; 20 | 21 | @Override 22 | public void run(ApplicationArguments args) { 23 | if (context.isActive()) { 24 | log.info(" __ ___ _ ___ _ ____ _____ ____ "); 25 | log.info("/ /` / / \\ | |\\/| | |_) | | | |_ | | | |_ "); 26 | log.info("\\_\\_, \\_\\_/ |_| | |_| |_|__ |_|__ |_| |_|__ "); 27 | log.info(" "); 28 | log.info("FANK 启动完毕,时间:" + LocalDateTime.now()); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/task/CacheTask.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.task; 2 | 3 | import cc.mrbird.febs.common.domain.FebsConstant; 4 | import cc.mrbird.febs.common.service.RedisService; 5 | import cc.mrbird.febs.common.utils.DateUtil; 6 | import lombok.extern.slf4j.Slf4j; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.scheduling.annotation.Scheduled; 9 | import org.springframework.stereotype.Component; 10 | 11 | import java.time.LocalDateTime; 12 | 13 | /** 14 | * 主要用于定时删除 Redis中 key为 febs.user.active 中 15 | * 已经过期的 score 16 | */ 17 | @Slf4j 18 | @Component 19 | public class CacheTask { 20 | 21 | @Autowired 22 | private RedisService redisService; 23 | 24 | @Scheduled(fixedRate = 3600000) 25 | public void run() { 26 | try { 27 | String now = DateUtil.formatFullTime(LocalDateTime.now()); 28 | redisService.zremrangeByScore(FebsConstant.ACTIVE_USERS_ZSET_PREFIX, "-inf", now); 29 | log.info("delete expired user"); 30 | } catch (Exception ignore) { 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/utils/AddressUtil.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.utils; 2 | 3 | import lombok.extern.slf4j.Slf4j; 4 | import org.apache.commons.io.FileUtils; 5 | import org.lionsoul.ip2region.DataBlock; 6 | import org.lionsoul.ip2region.DbConfig; 7 | import org.lionsoul.ip2region.DbSearcher; 8 | import org.lionsoul.ip2region.Util; 9 | 10 | import java.io.File; 11 | import java.io.IOException; 12 | import java.lang.reflect.Method; 13 | import java.util.Objects; 14 | 15 | @Slf4j 16 | public class AddressUtil { 17 | 18 | public static String getCityInfo(String ip) { 19 | DbSearcher searcher = null; 20 | try { 21 | String dbPath = AddressUtil.class.getResource("/ip2region/ip2region.db").getPath(); 22 | File file = new File(dbPath); 23 | if (!file.exists()) { 24 | String tmpDir = System.getProperties().getProperty("java.io.tmpdir"); 25 | dbPath = tmpDir + "ip.db"; 26 | file = new File(dbPath); 27 | FileUtils.copyInputStreamToFile(Objects.requireNonNull(AddressUtil.class.getClassLoader().getResourceAsStream("classpath:ip2region/ip2region.db")), file); 28 | } 29 | int algorithm = DbSearcher.BTREE_ALGORITHM; 30 | DbConfig config = new DbConfig(); 31 | searcher = new DbSearcher(config, file.getPath()); 32 | Method method = null; 33 | method = searcher.getClass().getMethod("btreeSearch", String.class); 34 | DataBlock dataBlock = null; 35 | if (!Util.isIpAddress(ip)) { 36 | log.error("Error: Invalid ip address"); 37 | } 38 | dataBlock = (DataBlock) method.invoke(searcher, ip); 39 | return dataBlock.getRegion(); 40 | } catch (Exception e) { 41 | log.error("获取地址信息异常", e); 42 | } finally { 43 | if (searcher != null) { 44 | try { 45 | searcher.close(); 46 | } catch (IOException e) { 47 | e.printStackTrace(); 48 | } 49 | } 50 | } 51 | return ""; 52 | } 53 | 54 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/utils/DateUtil.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.utils; 2 | 3 | import java.text.ParseException; 4 | import java.text.SimpleDateFormat; 5 | import java.time.LocalDateTime; 6 | import java.time.format.DateTimeFormatter; 7 | import java.util.Date; 8 | import java.util.Locale; 9 | 10 | /** 11 | * 时间工具类 12 | */ 13 | public class DateUtil { 14 | 15 | public static final String FULL_TIME_PATTERN = "yyyyMMddHHmmss"; 16 | 17 | public static final String FULL_TIME_SPLIT_PATTERN = "yyyy-MM-dd HH:mm:ss"; 18 | 19 | public static String formatFullTime(LocalDateTime localDateTime) { 20 | return formatFullTime(localDateTime, FULL_TIME_PATTERN); 21 | } 22 | 23 | public static String formatFullTime(LocalDateTime localDateTime, String pattern) { 24 | DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(pattern); 25 | return localDateTime.format(dateTimeFormatter); 26 | } 27 | 28 | private static String getDateFormat(Date date, String dateFormatType) { 29 | SimpleDateFormat simformat = new SimpleDateFormat(dateFormatType); 30 | return simformat.format(date); 31 | } 32 | 33 | public static String formatCSTTime(String date, String format) throws ParseException { 34 | SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US); 35 | Date d = sdf.parse(date); 36 | return DateUtil.getDateFormat(d, format); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/utils/FileNameUtils.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.utils; 2 | 3 | import java.util.Date; 4 | 5 | public class FileNameUtils { 6 | 7 | /** 8 | * 获取文件后缀 9 | * @param fileName 10 | * @return 11 | */ 12 | public static String getSuffix(String fileName){ 13 | return fileName.substring(fileName.lastIndexOf(".")); 14 | } 15 | 16 | /** 17 | * 生成新的文件名 18 | * @param fileOriginName 源文件名 19 | * @return 20 | */ 21 | public static String getFileName(String fileOriginName){ 22 | return ("SA" + new Date().getTime()+ FileNameUtils.getSuffix(fileOriginName)); 23 | } 24 | 25 | /** 26 | * 生成新的文件名 27 | * @param fileOriginName 源文件名 28 | * @return 29 | */ 30 | public static String getFileNameByVideo(String fileOriginName){ 31 | return ("OA" + new Date().getTime()+ FileNameUtils.getSuffix(fileOriginName)); 32 | } 33 | 34 | /** 35 | * 生成新的文件名 36 | * @param fileOriginName 37 | * @return 38 | */ 39 | public static String getFileNameByZip(String fileOriginName) { 40 | return ("7Z" + new Date().getTime()+ FileNameUtils.getSuffix(fileOriginName)); 41 | } 42 | 43 | 44 | } 45 | 46 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/utils/HttpContextUtil.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.utils; 2 | 3 | import org.springframework.web.context.request.RequestContextHolder; 4 | import org.springframework.web.context.request.ServletRequestAttributes; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | import java.util.Objects; 8 | 9 | public class HttpContextUtil { 10 | 11 | private HttpContextUtil(){ 12 | 13 | } 14 | public static HttpServletRequest getHttpServletRequest() { 15 | return ((ServletRequestAttributes) Objects.requireNonNull(RequestContextHolder.getRequestAttributes())).getRequest(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/utils/IPUtil.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.utils; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | 5 | public class IPUtil { 6 | 7 | private static final String UNKNOWN = "unknown"; 8 | 9 | protected IPUtil(){ 10 | 11 | } 12 | 13 | /** 14 | * 获取 IP地址 15 | * 使用 Nginx等反向代理软件, 则不能通过 request.getRemoteAddr()获取 IP地址 16 | * 如果使用了多级反向代理的话,X-Forwarded-For的值并不止一个,而是一串IP地址, 17 | * X-Forwarded-For中第一个非 unknown的有效IP字符串,则为真实IP地址 18 | */ 19 | public static String getIpAddr(HttpServletRequest request) { 20 | String ip = request.getHeader("x-forwarded-for"); 21 | if (ip == null || ip.length() == 0 || UNKNOWN.equalsIgnoreCase(ip)) { 22 | ip = request.getHeader("Proxy-Client-IP"); 23 | } 24 | if (ip == null || ip.length() == 0 || UNKNOWN.equalsIgnoreCase(ip)) { 25 | ip = request.getHeader("WL-Proxy-Client-IP"); 26 | } 27 | if (ip == null || ip.length() == 0 || UNKNOWN.equalsIgnoreCase(ip)) { 28 | ip = request.getRemoteAddr(); 29 | } 30 | return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/utils/MD5Util.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.utils; 2 | 3 | import org.apache.shiro.crypto.hash.SimpleHash; 4 | import org.apache.shiro.util.ByteSource; 5 | 6 | public class MD5Util { 7 | 8 | protected MD5Util(){ 9 | 10 | } 11 | 12 | private static final String ALGORITH_NAME = "md5"; 13 | 14 | private static final int HASH_ITERATIONS = 2; 15 | 16 | public static String encrypt(String password) { 17 | return new SimpleHash(ALGORITH_NAME, password, ByteSource.Util.bytes(password), HASH_ITERATIONS).toHex(); 18 | } 19 | 20 | public static String encrypt(String username, String password) { 21 | return new SimpleHash(ALGORITH_NAME, password, ByteSource.Util.bytes(username.toLowerCase() + password), 22 | HASH_ITERATIONS).toHex(); 23 | } 24 | 25 | public static void main(String[] args) { 26 | System.out.println(encrypt("mrbird","1234qwer")); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/utils/R.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.utils; 2 | 3 | import org.apache.http.HttpStatus; 4 | 5 | import java.util.HashMap; 6 | import java.util.Map; 7 | 8 | /** 9 | * @ClassName: R 10 | * @Description: 返回数据 11 | * @author: Ming 12 | * @date: 2018年12月3日 上午10:28:39 13 | */ 14 | public class R extends HashMap { 15 | private static final long serialVersionUID = 1L; 16 | 17 | public R() { 18 | put("code", 0); 19 | put("msg", "success"); 20 | } 21 | 22 | public static R error() { 23 | return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, "未知异常,请联系管理员"); 24 | } 25 | 26 | public static R error(String msg) { 27 | return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, msg); 28 | } 29 | 30 | public static R error(int code, String msg) { 31 | R r = new R(); 32 | r.put("code", code); 33 | r.put("msg", msg); 34 | return r; 35 | } 36 | 37 | public static R ok(String msg) { 38 | R r = new R(); 39 | r.put("msg", msg); 40 | return r; 41 | } 42 | 43 | public static R ok(Map map) { 44 | R r = new R(); 45 | r.putAll(map); 46 | return r; 47 | } 48 | 49 | public static R ok() { 50 | return new R(); 51 | } 52 | 53 | public static R ok(Object data) { 54 | R r = new R(); 55 | r.put("data",data); 56 | return r; 57 | } 58 | 59 | public R put(String key, Object value) { 60 | super.put(key, value); 61 | return this; 62 | } 63 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/utils/SpringContextUtil.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.utils; 2 | 3 | import org.springframework.beans.BeansException; 4 | import org.springframework.context.ApplicationContext; 5 | import org.springframework.context.ApplicationContextAware; 6 | import org.springframework.stereotype.Component; 7 | 8 | /** 9 | * Spring Context 工具类 10 | * 11 | * @author MrBird 12 | * 13 | */ 14 | @Component 15 | public class SpringContextUtil implements ApplicationContextAware { 16 | private static ApplicationContext applicationContext; 17 | 18 | @Override 19 | public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { 20 | SpringContextUtil.applicationContext = applicationContext; 21 | } 22 | 23 | public static Object getBean(String name) { 24 | return applicationContext.getBean(name); 25 | } 26 | public static T getBean(Class clazz){ 27 | return applicationContext.getBean(clazz); 28 | } 29 | 30 | public static T getBean(String name, Class requiredType) { 31 | return applicationContext.getBean(name, requiredType); 32 | } 33 | 34 | public static boolean containsBean(String name) { 35 | return applicationContext.containsBean(name); 36 | } 37 | 38 | public static boolean isSingleton(String name) { 39 | return applicationContext.isSingleton(name); 40 | } 41 | 42 | public static Class getType(String name) { 43 | return applicationContext.getType(name); 44 | } 45 | 46 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/common/validator/CronValidator.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.validator; 2 | 3 | import cc.mrbird.febs.common.annotation.IsCron; 4 | import org.quartz.CronExpression; 5 | 6 | import javax.validation.ConstraintValidator; 7 | import javax.validation.ConstraintValidatorContext; 8 | 9 | /** 10 | * 校验是否为合法的 Cron表达式 11 | */ 12 | public class CronValidator implements ConstraintValidator { 13 | 14 | @Override 15 | public void initialize(IsCron isCron) { 16 | } 17 | 18 | @Override 19 | public boolean isValid(String value, ConstraintValidatorContext constraintValidatorContext) { 20 | try { 21 | return CronExpression.isValidExpression(value); 22 | } catch (Exception e) { 23 | return false; 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/controller/BulletinInfoController.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.controller; 2 | 3 | 4 | import cc.mrbird.febs.common.utils.R; 5 | import cc.mrbird.febs.cos.entity.BulletinInfo; 6 | import cc.mrbird.febs.cos.service.IBulletinInfoService; 7 | import cn.hutool.core.date.DateUtil; 8 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 9 | import lombok.RequiredArgsConstructor; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.web.bind.annotation.*; 12 | 13 | import java.util.Date; 14 | import java.util.List; 15 | 16 | /** 17 | * @author FanK 18 | */ 19 | @RestController 20 | @RequestMapping("/cos/bulletin-info") 21 | @RequiredArgsConstructor(onConstructor = @__(@Autowired)) 22 | public class BulletinInfoController { 23 | 24 | private final IBulletinInfoService bulletinInfoService; 25 | 26 | /** 27 | * 分页查询公告信息 28 | * @param page 29 | * @param bulletinInfo 30 | * @return 31 | */ 32 | @GetMapping("/page") 33 | public R page(Page page, BulletinInfo bulletinInfo) { 34 | return R.ok(bulletinInfoService.getBulletinByPage(page, bulletinInfo)); 35 | } 36 | 37 | @GetMapping("/list") 38 | public R list() { 39 | return R.ok(bulletinInfoService.list()); 40 | } 41 | 42 | /** 43 | * 新增公告信息 44 | * @param bulletinInfo 45 | * @return 46 | */ 47 | @PostMapping 48 | public R save(BulletinInfo bulletinInfo) { 49 | bulletinInfo.setDate(DateUtil.formatDateTime(new Date())); 50 | return R.ok(bulletinInfoService.save(bulletinInfo)); 51 | } 52 | 53 | /** 54 | * 修改公告信息 55 | * @param bulletinInfo 56 | * @return 57 | */ 58 | @PutMapping 59 | public R edit(BulletinInfo bulletinInfo) { 60 | return R.ok(bulletinInfoService.updateById(bulletinInfo)); 61 | } 62 | 63 | /** 64 | * 删除公告信息 65 | * @param ids 66 | * @return 67 | */ 68 | @DeleteMapping("/{ids}") 69 | public R deleteByIds(@PathVariable("ids") List ids) { 70 | return R.ok(bulletinInfoService.removeByIds(ids)); 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/controller/ClothesInfoController.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.controller; 2 | 3 | 4 | import cc.mrbird.febs.common.utils.R; 5 | import cc.mrbird.febs.cos.entity.ClothesInfo; 6 | import cc.mrbird.febs.cos.service.IClothesInfoService; 7 | import cn.hutool.core.date.DateUtil; 8 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 9 | import lombok.RequiredArgsConstructor; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.web.bind.annotation.*; 12 | 13 | import java.util.Date; 14 | import java.util.List; 15 | 16 | /** 17 | * @author FanK 18 | */ 19 | @RestController 20 | @RequestMapping("/cos/clothes-info") 21 | @RequiredArgsConstructor(onConstructor = @__(@Autowired)) 22 | public class ClothesInfoController { 23 | 24 | private final IClothesInfoService clothesInfoService; 25 | 26 | /** 27 | * 分页查询汉服百科信息 28 | * 29 | * @param page 30 | * @param clothesInfo 31 | * @return 32 | */ 33 | @GetMapping("/page") 34 | public R page(Page page, ClothesInfo clothesInfo) { 35 | return R.ok(clothesInfoService.selectClothesPage(page, clothesInfo)); 36 | } 37 | 38 | @GetMapping("/list") 39 | public R list() { 40 | return R.ok(clothesInfoService.list()); 41 | } 42 | 43 | /** 44 | * 新增汉服百科信息 45 | * 46 | * @param clothesInfo 47 | * @return 48 | */ 49 | @PostMapping 50 | public R save(ClothesInfo clothesInfo) { 51 | clothesInfo.setCreateDate(DateUtil.formatDateTime(new Date())); 52 | return R.ok(clothesInfoService.save(clothesInfo)); 53 | } 54 | 55 | /** 56 | * 修改汉服百科信息 57 | * 58 | * @param clothesInfo 59 | * @return 60 | */ 61 | @PutMapping 62 | public R edit(ClothesInfo clothesInfo) { 63 | return R.ok(clothesInfoService.updateById(clothesInfo)); 64 | } 65 | 66 | /** 67 | * 删除汉服百科信息 68 | * 69 | * @param ids 70 | * @return 71 | */ 72 | @DeleteMapping("/{ids}") 73 | public R deleteByIds(@PathVariable("ids") List ids) { 74 | return R.ok(clothesInfoService.removeByIds(ids)); 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/controller/FileController.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.controller; 2 | 3 | import cc.mrbird.febs.common.utils.FileUtil; 4 | import lombok.AllArgsConstructor; 5 | import org.springframework.stereotype.Controller; 6 | import org.springframework.web.bind.annotation.RequestMapping; 7 | import org.springframework.web.bind.annotation.RequestParam; 8 | import org.springframework.web.bind.annotation.ResponseBody; 9 | import org.springframework.web.multipart.MultipartFile; 10 | 11 | @Controller 12 | @RequestMapping("/file") 13 | @AllArgsConstructor 14 | public class FileController { 15 | 16 | /** 17 | * 文件上传 18 | * @param file 上传的文件 19 | * @return 20 | */ 21 | @ResponseBody 22 | @RequestMapping("/fileUpload") 23 | public String upload(@RequestParam("avatar") MultipartFile file){ 24 | // 1定义要上传文件 的存放路径 25 | String localPath="G:/Project/汉服论坛系统/db"; 26 | // 2获得文件名字 27 | String fileName=file.getOriginalFilename(); 28 | // 2上传失败提示 29 | String warning=""; 30 | String newFileName = FileUtil.upload(file, localPath, fileName); 31 | MultipartFile file1 = file; 32 | if(newFileName != null){ 33 | //上传成功 34 | warning=newFileName; 35 | 36 | }else{ 37 | warning="上传失败"; 38 | } 39 | System.out.println(warning); 40 | return warning; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/controller/MessageInfoController.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.controller; 2 | 3 | 4 | import cc.mrbird.febs.common.utils.R; 5 | import cc.mrbird.febs.cos.entity.MessageInfo; 6 | import cc.mrbird.febs.cos.service.IMessageInfoService; 7 | import cn.hutool.core.date.DateUtil; 8 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; 9 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 10 | import lombok.RequiredArgsConstructor; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.web.bind.annotation.*; 13 | 14 | import java.util.Date; 15 | import java.util.List; 16 | 17 | /** 18 | * @author FanK 19 | */ 20 | @RestController 21 | @RequestMapping("/cos/message-info") 22 | @RequiredArgsConstructor(onConstructor = @__(@Autowired)) 23 | public class MessageInfoController { 24 | 25 | private final IMessageInfoService messageInfoService; 26 | 27 | /** 28 | * 分页查询消息信息 29 | * @param page 30 | * @param messageInfo 31 | * @return 32 | */ 33 | @GetMapping("/page") 34 | public R page(Page page, MessageInfo messageInfo) { 35 | return R.ok(messageInfoService.messageInfoByPage(page, messageInfo)); 36 | } 37 | 38 | /** 39 | * 新增系统消息 40 | * @param messageInfo 41 | * @return 42 | */ 43 | @PostMapping 44 | public R save(MessageInfo messageInfo) { 45 | messageInfo.setReadStatus(0); 46 | messageInfo.setCreateDate(DateUtil.formatDateTime(new Date())); 47 | return R.ok(messageInfoService.save(messageInfo)); 48 | } 49 | 50 | /** 51 | * 设置系统消息已读 52 | * @param ids 53 | * @return 54 | */ 55 | @DeleteMapping("/{ids}") 56 | public R deleteByIds(@PathVariable("ids") List ids) { 57 | return R.ok(messageInfoService.update(Wrappers.lambdaUpdate().set(MessageInfo::getReadStatus, 1) 58 | .in(MessageInfo::getId, ids))); 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/controller/StatementInfoController.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.controller; 2 | 3 | 4 | import cc.mrbird.febs.common.utils.R; 5 | import cc.mrbird.febs.cos.entity.StatementInfo; 6 | import cc.mrbird.febs.cos.service.IStatementInfoService; 7 | import cn.hutool.core.date.DateUtil; 8 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 9 | import lombok.RequiredArgsConstructor; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.web.bind.annotation.*; 12 | 13 | import java.util.Date; 14 | import java.util.List; 15 | 16 | /** 17 | * @author FanK 18 | */ 19 | @RestController 20 | @RequestMapping("/cos/statement-info") 21 | @RequiredArgsConstructor(onConstructor = @__(@Autowired)) 22 | public class StatementInfoController { 23 | 24 | private final IStatementInfoService statementInfoService; 25 | 26 | /** 27 | * 分页查询留言板信息 28 | * 29 | * @param page 30 | * @param statementInfo 31 | * @return 32 | */ 33 | @GetMapping("/page") 34 | public R page(Page page, StatementInfo statementInfo) { 35 | return R.ok(statementInfoService.selectStatementPage(page, statementInfo)); 36 | } 37 | 38 | @GetMapping("/list") 39 | public R list() { 40 | return R.ok(statementInfoService.list()); 41 | } 42 | 43 | /** 44 | * 新增留言板信息 45 | * 46 | * @param statementInfo 47 | * @return 48 | */ 49 | @PostMapping 50 | public R save(StatementInfo statementInfo) { 51 | statementInfo.setCreateDate(DateUtil.formatDateTime(new Date())); 52 | return R.ok(statementInfoService.save(statementInfo)); 53 | } 54 | 55 | /** 56 | * 修改留言板信息 57 | * 58 | * @param statementInfo 59 | * @return 60 | */ 61 | @PutMapping 62 | public R edit(StatementInfo statementInfo) { 63 | return R.ok(statementInfoService.updateById(statementInfo)); 64 | } 65 | 66 | /** 67 | * 删除留言板信息 68 | * 69 | * @param ids 70 | * @return 71 | */ 72 | @DeleteMapping("/{ids}") 73 | public R deleteByIds(@PathVariable("ids") List ids) { 74 | return R.ok(statementInfoService.removeByIds(ids)); 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/controller/UserInfoController.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.controller; 2 | 3 | 4 | import cc.mrbird.febs.common.utils.R; 5 | import cc.mrbird.febs.cos.entity.UserInfo; 6 | import cc.mrbird.febs.cos.service.IUserInfoService; 7 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; 8 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 9 | import lombok.RequiredArgsConstructor; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.web.bind.annotation.*; 12 | 13 | import java.util.List; 14 | 15 | /** 16 | * @author FanK 17 | */ 18 | @RestController 19 | @RequestMapping("/cos/user-info") 20 | @RequiredArgsConstructor(onConstructor = @__(@Autowired)) 21 | public class UserInfoController { 22 | 23 | private final IUserInfoService userInfoService; 24 | 25 | @GetMapping("/detail/{userId}") 26 | public R userDetail(@PathVariable("userId") Integer userId) { 27 | return R.ok(userInfoService.getOne(Wrappers.lambdaQuery().eq(UserInfo::getUserId, userId))); 28 | } 29 | 30 | /** 31 | * 分页查询用户信息 32 | * 33 | * @param page 34 | * @param userInfo 35 | * @return 36 | */ 37 | @GetMapping("/page") 38 | public R page(Page page, UserInfo userInfo) { 39 | return R.ok(); 40 | } 41 | 42 | @GetMapping("/list") 43 | public R list() { 44 | return R.ok(userInfoService.list()); 45 | } 46 | 47 | /** 48 | * 新增用户信息 49 | * 50 | * @param userInfo 51 | * @return 52 | */ 53 | @PostMapping 54 | public R save(UserInfo userInfo) { 55 | return R.ok(userInfoService.save(userInfo)); 56 | } 57 | 58 | /** 59 | * 修改用户信息 60 | * 61 | * @param userInfo 62 | * @return 63 | */ 64 | @PutMapping 65 | public R edit(UserInfo userInfo) { 66 | return R.ok(userInfoService.updateById(userInfo)); 67 | } 68 | 69 | /** 70 | * 删除用户信息 71 | * 72 | * @param ids 73 | * @return 74 | */ 75 | @DeleteMapping("/{ids}") 76 | public R deleteByIds(@PathVariable("ids") List ids) { 77 | return R.ok(userInfoService.removeByIds(ids)); 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/dao/BulletinInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.dao; 2 | 3 | import cc.mrbird.febs.cos.entity.BulletinInfo; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import com.baomidou.mybatisplus.core.metadata.IPage; 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 7 | import org.apache.ibatis.annotations.Param; 8 | 9 | import java.util.LinkedHashMap; 10 | import java.util.List; 11 | 12 | /** 13 | * @author FanK 14 | */ 15 | public interface BulletinInfoMapper extends BaseMapper { 16 | 17 | // 分页获取公告信息 18 | IPage> getBulletinByPage(Page page, @Param("bulletinInfo") BulletinInfo bulletinInfo); 19 | } 20 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/dao/ClothesInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.dao; 2 | 3 | import cc.mrbird.febs.cos.entity.ClothesInfo; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import com.baomidou.mybatisplus.core.metadata.IPage; 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 7 | import io.lettuce.core.dynamic.annotation.Param; 8 | 9 | import java.util.LinkedHashMap; 10 | 11 | /** 12 | * @author FanK 13 | */ 14 | public interface ClothesInfoMapper extends BaseMapper { 15 | 16 | /** 17 | * 分页查询汉服百科信息 18 | * 19 | * @param page 20 | * @param clothesInfo 21 | * @return 22 | */ 23 | IPage> selectClothesPage(Page page, @Param("clothesInfo") ClothesInfo clothesInfo); 24 | } 25 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/dao/CollectInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.dao; 2 | 3 | import cc.mrbird.febs.cos.entity.CollectInfo; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import com.baomidou.mybatisplus.core.metadata.IPage; 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 7 | import org.apache.ibatis.annotations.Param; 8 | 9 | import java.util.LinkedHashMap; 10 | import java.util.List; 11 | 12 | /** 13 | * @author FanK 14 | */ 15 | public interface CollectInfoMapper extends BaseMapper { 16 | 17 | // 获取收藏贴子列表 18 | IPage> collectInfoByPage(Page page, @Param("collectInfo") CollectInfo collectInfo); 19 | 20 | // 获取收藏贴子列表 21 | List> collectInfoByUser(@Param("userId") Integer userId); 22 | } 23 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/dao/FocusInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.dao; 2 | 3 | import cc.mrbird.febs.cos.entity.FocusInfo; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import com.baomidou.mybatisplus.core.metadata.IPage; 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 7 | import org.apache.ibatis.annotations.Param; 8 | 9 | import java.util.LinkedHashMap; 10 | import java.util.List; 11 | 12 | /** 13 | * @author FanK 14 | */ 15 | public interface FocusInfoMapper extends BaseMapper { 16 | 17 | // 分页查询关注人信息 18 | IPage> focusInfoByPage(Page page, @Param("focusInfo") FocusInfo focusInfo); 19 | 20 | // 查询关注人信息 21 | List> focusInfoByUser(@Param("userId") Integer userId); 22 | } 23 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/dao/HomeInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.dao; 2 | 3 | import cc.mrbird.febs.cos.entity.HomeInfo; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | /** 7 | * @author FanK 8 | */ 9 | public interface HomeInfoMapper extends BaseMapper { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/dao/MessageInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.dao; 2 | 3 | import cc.mrbird.febs.cos.entity.MessageInfo; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import com.baomidou.mybatisplus.core.metadata.IPage; 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 7 | import org.apache.ibatis.annotations.Param; 8 | 9 | import java.util.LinkedHashMap; 10 | 11 | /** 12 | * @author FanK 13 | */ 14 | public interface MessageInfoMapper extends BaseMapper { 15 | 16 | // 分页查询消息信息 17 | IPage> messageInfoByPage(Page page, @Param("messageInfo") MessageInfo messageInfo); 18 | } 19 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/dao/PostInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.dao; 2 | 3 | import cc.mrbird.febs.cos.entity.PostInfo; 4 | import cc.mrbird.febs.system.domain.User; 5 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 6 | import com.baomidou.mybatisplus.core.metadata.IPage; 7 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 8 | import org.apache.ibatis.annotations.Param; 9 | 10 | import java.util.LinkedHashMap; 11 | import java.util.LinkedList; 12 | import java.util.List; 13 | 14 | /** 15 | * @author FanK 16 | */ 17 | public interface PostInfoMapper extends BaseMapper { 18 | 19 | /** 20 | * 分页获取系统用户信息 21 | * @param page 22 | * @param user 23 | * @return 24 | */ 25 | IPage> selectUserPage(Page page, @Param("user") User user); 26 | 27 | // 分页获取帖子信息 28 | IPage> postInfoByPage(Page page, @Param("postInfo") PostInfo postInfo); 29 | 30 | // 获取模块下的贴子 31 | List> getPostByTag(@Param("tagId") Integer tagId); 32 | 33 | // 获取贴子详细信息 34 | LinkedHashMap postDetail(@Param("postId") Integer postId); 35 | 36 | // 模糊查询帖子信息 37 | List> postByKey(@Param("key") String key); 38 | 39 | // 推荐贴子 40 | List> recommend(@Param("tagId") Integer tagId, @Param("collectUserIds") String collectUserIds); 41 | } 42 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/dao/ReplyInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.dao; 2 | 3 | import cc.mrbird.febs.cos.entity.ReplyInfo; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import com.baomidou.mybatisplus.core.metadata.IPage; 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 7 | import org.apache.ibatis.annotations.Param; 8 | 9 | import java.util.LinkedHashMap; 10 | import java.util.List; 11 | 12 | /** 13 | * @author FanK 14 | */ 15 | public interface ReplyInfoMapper extends BaseMapper { 16 | 17 | // 分页查询回复信息 18 | IPage> replyInfoByPage(Page page, @Param("replyInfo") ReplyInfo replyInfo); 19 | 20 | // 获取具体的帖子回复信息 21 | List> replyListByPostId(@Param("postId") Integer postId); 22 | } 23 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/dao/SensitiveInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.dao; 2 | 3 | import cc.mrbird.febs.cos.entity.SensitiveInfo; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import com.baomidou.mybatisplus.core.metadata.IPage; 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 7 | import org.apache.ibatis.annotations.Param; 8 | 9 | import java.util.LinkedHashMap; 10 | 11 | /** 12 | * @author FanK 13 | */ 14 | public interface SensitiveInfoMapper extends BaseMapper { 15 | 16 | // 分页查询敏感词列表 17 | IPage> sensitiveByPage(Page page, @Param("sensitiveInfo") SensitiveInfo sensitiveInfo); 18 | } 19 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/dao/StatementInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.dao; 2 | 3 | import cc.mrbird.febs.cos.entity.StatementInfo; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import com.baomidou.mybatisplus.core.metadata.IPage; 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 7 | import io.lettuce.core.dynamic.annotation.Param; 8 | 9 | import java.util.LinkedHashMap; 10 | 11 | /** 12 | * @author FanK 13 | */ 14 | public interface StatementInfoMapper extends BaseMapper { 15 | 16 | /** 17 | * 分页查询留言板信息 18 | * 19 | * @param page 20 | * @param statementInfo 21 | * @return 22 | */ 23 | IPage> selectStatementPage(Page page, @Param("statementInfo") StatementInfo statementInfo); 24 | } 25 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/dao/TagInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.dao; 2 | 3 | import cc.mrbird.febs.cos.entity.TagInfo; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import com.baomidou.mybatisplus.core.metadata.IPage; 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 7 | import org.apache.ibatis.annotations.Param; 8 | 9 | import java.util.LinkedHashMap; 10 | 11 | /** 12 | * @author FanK 13 | */ 14 | public interface TagInfoMapper extends BaseMapper { 15 | 16 | // 分页获取tag数据 17 | IPage> tagInfoByPage(Page page, @Param("tagInfo") TagInfo tagInfo); 18 | } 19 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/dao/UserInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.dao; 2 | 3 | import cc.mrbird.febs.cos.entity.UserInfo; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | /** 7 | * @author FanK 8 | */ 9 | public interface UserInfoMapper extends BaseMapper { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/entity/BulletinInfo.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.entity; 2 | 3 | import java.time.LocalDateTime; 4 | import java.io.Serializable; 5 | 6 | import com.baomidou.mybatisplus.annotation.IdType; 7 | import com.baomidou.mybatisplus.annotation.TableId; 8 | import lombok.Data; 9 | import lombok.EqualsAndHashCode; 10 | import lombok.experimental.Accessors; 11 | 12 | /** 13 | * 公告信息 14 | * 15 | * @author FanK 16 | */ 17 | @Data 18 | @EqualsAndHashCode(callSuper = false) 19 | @Accessors(chain = true) 20 | public class BulletinInfo implements Serializable { 21 | 22 | private static final long serialVersionUID = 1L; 23 | 24 | @TableId(value = "ID", type = IdType.AUTO) 25 | private Integer id; 26 | 27 | /** 28 | * 标题 29 | */ 30 | private String title; 31 | 32 | /** 33 | * 内容 34 | */ 35 | private String content; 36 | 37 | /** 38 | * 公告时间 39 | */ 40 | private String date; 41 | 42 | /** 43 | * 图册 44 | */ 45 | private String images; 46 | 47 | /** 48 | * 发布人 49 | */ 50 | private String uploader; 51 | 52 | 53 | } 54 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/entity/ClothesInfo.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.entity; 2 | 3 | import java.time.LocalDateTime; 4 | import java.io.Serializable; 5 | 6 | import com.baomidou.mybatisplus.annotation.IdType; 7 | import com.baomidou.mybatisplus.annotation.TableId; 8 | import lombok.Data; 9 | import lombok.EqualsAndHashCode; 10 | import lombok.experimental.Accessors; 11 | 12 | /** 13 | * 汉服百科 14 | * 15 | * @author FanK 16 | */ 17 | @Data 18 | @EqualsAndHashCode(callSuper = false) 19 | @Accessors(chain = true) 20 | public class ClothesInfo implements Serializable { 21 | 22 | private static final long serialVersionUID = 1L; 23 | 24 | @TableId(value = "id", type = IdType.AUTO) 25 | private Integer id; 26 | 27 | /** 28 | * 标题 29 | */ 30 | private String title; 31 | 32 | /** 33 | * 内容 34 | */ 35 | private String content; 36 | 37 | /** 38 | * 图片 39 | */ 40 | private String images; 41 | 42 | /** 43 | * 上传人 44 | */ 45 | private String uploader; 46 | 47 | /** 48 | * 创建时间 49 | */ 50 | private String createDate; 51 | 52 | 53 | } 54 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/entity/CollectInfo.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.entity; 2 | 3 | import java.time.LocalDateTime; 4 | import java.io.Serializable; 5 | 6 | import com.baomidou.mybatisplus.annotation.IdType; 7 | import com.baomidou.mybatisplus.annotation.TableField; 8 | import com.baomidou.mybatisplus.annotation.TableId; 9 | import lombok.Data; 10 | import lombok.EqualsAndHashCode; 11 | import lombok.experimental.Accessors; 12 | 13 | /** 14 | * 帖子收藏 15 | * 16 | * @author FanK 17 | */ 18 | @Data 19 | @EqualsAndHashCode(callSuper = false) 20 | @Accessors(chain = true) 21 | public class CollectInfo implements Serializable { 22 | 23 | private static final long serialVersionUID = 1L; 24 | 25 | @TableId(value = "ID", type = IdType.AUTO) 26 | private Integer id; 27 | 28 | /** 29 | * 所属用户 30 | */ 31 | private Long userId; 32 | 33 | /** 34 | * 所属帖子 35 | */ 36 | private Integer postId; 37 | 38 | /** 39 | * 创建时间 40 | */ 41 | private String createDate; 42 | 43 | /** 44 | * 删除标识 45 | */ 46 | private Integer deleteFlag; 47 | 48 | @TableField(exist = false) 49 | private String title; 50 | 51 | @TableField(exist = false) 52 | private String username; 53 | 54 | } 55 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/entity/FocusInfo.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.entity; 2 | 3 | import java.time.LocalDateTime; 4 | import java.io.Serializable; 5 | 6 | import com.baomidou.mybatisplus.annotation.IdType; 7 | import com.baomidou.mybatisplus.annotation.TableField; 8 | import com.baomidou.mybatisplus.annotation.TableId; 9 | import lombok.Data; 10 | import lombok.EqualsAndHashCode; 11 | import lombok.experimental.Accessors; 12 | 13 | /** 14 | * 关注用户 15 | * 16 | * @author FanK 17 | */ 18 | @Data 19 | @EqualsAndHashCode(callSuper = false) 20 | @Accessors(chain = true) 21 | public class FocusInfo implements Serializable { 22 | 23 | private static final long serialVersionUID = 1L; 24 | 25 | @TableId(value = "ID", type = IdType.AUTO) 26 | private Integer id; 27 | 28 | /** 29 | * 所属用户 30 | */ 31 | private Long userId; 32 | 33 | /** 34 | * 收藏用户 35 | */ 36 | private Long collectUserId; 37 | 38 | /** 39 | * 创建时间 40 | */ 41 | private String createDate; 42 | 43 | /** 44 | * 删除标识 45 | */ 46 | private Integer deleteFlag; 47 | 48 | @TableField(exist = false) 49 | private String username; 50 | 51 | @TableField(exist = false) 52 | private String collectUsername; 53 | } 54 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/entity/HomeInfo.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.entity; 2 | 3 | import java.io.Serializable; 4 | 5 | import com.baomidou.mybatisplus.annotation.IdType; 6 | import com.baomidou.mybatisplus.annotation.TableId; 7 | import lombok.Data; 8 | import lombok.EqualsAndHashCode; 9 | import lombok.experimental.Accessors; 10 | 11 | /** 12 | * 首页设置 13 | * 14 | * @author FanK 15 | */ 16 | @Data 17 | @EqualsAndHashCode(callSuper = false) 18 | @Accessors(chain = true) 19 | public class HomeInfo implements Serializable { 20 | 21 | private static final long serialVersionUID = 1L; 22 | 23 | @TableId(value = "id", type = IdType.AUTO) 24 | private Integer id; 25 | /** 26 | * 首页图片设置 27 | */ 28 | private String images; 29 | 30 | 31 | } 32 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/entity/MessageInfo.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.entity; 2 | 3 | import java.time.LocalDateTime; 4 | import java.io.Serializable; 5 | 6 | import com.baomidou.mybatisplus.annotation.IdType; 7 | import com.baomidou.mybatisplus.annotation.TableField; 8 | import com.baomidou.mybatisplus.annotation.TableId; 9 | import lombok.Data; 10 | import lombok.EqualsAndHashCode; 11 | import lombok.experimental.Accessors; 12 | 13 | /** 14 | * 系统消息 15 | * 16 | * @author FanK 17 | */ 18 | @Data 19 | @EqualsAndHashCode(callSuper = false) 20 | @Accessors(chain = true) 21 | public class MessageInfo implements Serializable { 22 | 23 | private static final long serialVersionUID = 1L; 24 | 25 | @TableId(value = "ID", type = IdType.AUTO) 26 | private Integer id; 27 | 28 | /** 29 | * 发送用户 30 | */ 31 | private Long sendUser; 32 | 33 | /** 34 | * 消息内容 35 | */ 36 | private String content; 37 | 38 | /** 39 | * 创建时间 40 | */ 41 | private String createDate; 42 | 43 | /** 44 | * 状态 0.未读 1.已读 45 | */ 46 | private Integer readStatus; 47 | 48 | @TableField(exist = false) 49 | private String username; 50 | 51 | public MessageInfo(Long sendUser, String content, String createDate, Integer readStatus) { 52 | this.sendUser = sendUser; 53 | this.content = content; 54 | this.createDate = createDate; 55 | this.readStatus = readStatus; 56 | } 57 | 58 | public MessageInfo() {} 59 | } 60 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/entity/PostInfo.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.entity; 2 | 3 | import java.time.LocalDateTime; 4 | import java.io.Serializable; 5 | 6 | import com.baomidou.mybatisplus.annotation.IdType; 7 | import com.baomidou.mybatisplus.annotation.TableField; 8 | import com.baomidou.mybatisplus.annotation.TableId; 9 | import lombok.Data; 10 | import lombok.EqualsAndHashCode; 11 | import lombok.experimental.Accessors; 12 | 13 | /** 14 | * 贴子消息 15 | * 16 | * @author FanK 17 | */ 18 | @Data 19 | @EqualsAndHashCode(callSuper = false) 20 | @Accessors(chain = true) 21 | public class PostInfo implements Serializable { 22 | 23 | private static final long serialVersionUID = 1L; 24 | 25 | @TableId(value = "ID", type = IdType.AUTO) 26 | private Integer id; 27 | 28 | /** 29 | * 贴子标题 30 | */ 31 | private String title; 32 | 33 | /** 34 | * 内容 35 | */ 36 | private String content; 37 | 38 | /** 39 | * 图片 40 | */ 41 | private String images; 42 | 43 | /** 44 | * 所属用户 45 | */ 46 | private Long userId; 47 | 48 | /** 49 | * 创建时间 50 | */ 51 | private String createDate; 52 | 53 | /** 54 | * 浏览量 55 | */ 56 | private Integer pageviews; 57 | 58 | private String tagIds; 59 | 60 | /** 61 | * 删除标识 62 | */ 63 | private Integer deleteFlag; 64 | 65 | @TableField(exist = false) 66 | private String username; 67 | 68 | @TableField(exist = false) 69 | private Integer tagId; 70 | 71 | } 72 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/entity/ReplyInfo.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.entity; 2 | 3 | import java.io.Serializable; 4 | 5 | import com.baomidou.mybatisplus.annotation.IdType; 6 | import com.baomidou.mybatisplus.annotation.TableField; 7 | import com.baomidou.mybatisplus.annotation.TableId; 8 | import lombok.Data; 9 | import lombok.EqualsAndHashCode; 10 | import lombok.experimental.Accessors; 11 | 12 | /** 13 | * 回复管理 14 | * 15 | * @author FanK 16 | */ 17 | @Data 18 | @EqualsAndHashCode(callSuper = false) 19 | @Accessors(chain = true) 20 | public class ReplyInfo implements Serializable { 21 | 22 | private static final long serialVersionUID = 1L; 23 | 24 | @TableId(value = "ID", type = IdType.AUTO) 25 | private Integer id; 26 | 27 | /** 28 | * 所属分类 29 | */ 30 | private Integer tagId; 31 | 32 | /** 33 | * 回复用户 34 | */ 35 | private Long userId; 36 | 37 | /** 38 | * 内容 39 | */ 40 | private String content; 41 | 42 | /** 43 | * 所属帖子 44 | */ 45 | private Integer postId; 46 | 47 | /** 48 | * 被回复用户 49 | */ 50 | private Long replyUserId; 51 | 52 | /** 53 | * 发送时间 54 | */ 55 | private String sendCreate; 56 | 57 | /** 58 | * 删除标识 59 | */ 60 | private Integer deleteFlag; 61 | 62 | @TableField(exist = false) 63 | private String title; 64 | 65 | @TableField(exist = false) 66 | private String username; 67 | 68 | } 69 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/entity/SensitiveInfo.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.entity; 2 | 3 | import java.io.Serializable; 4 | 5 | import com.baomidou.mybatisplus.annotation.IdType; 6 | import com.baomidou.mybatisplus.annotation.TableId; 7 | import lombok.Data; 8 | import lombok.EqualsAndHashCode; 9 | import lombok.experimental.Accessors; 10 | 11 | /** 12 | * 敏感词管理 13 | * 14 | * @author FanK 15 | */ 16 | @Data 17 | @EqualsAndHashCode(callSuper = false) 18 | @Accessors(chain = true) 19 | public class SensitiveInfo implements Serializable { 20 | 21 | private static final long serialVersionUID = 1L; 22 | 23 | @TableId(value = "ID", type = IdType.AUTO) 24 | private Integer id; 25 | 26 | /** 27 | * 敏感词 28 | */ 29 | private String keyName; 30 | 31 | /** 32 | * 删除标识 33 | */ 34 | private Integer deleteFlag; 35 | 36 | private String createDate; 37 | 38 | 39 | } 40 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/entity/StatementInfo.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.entity; 2 | 3 | import java.time.LocalDateTime; 4 | import java.io.Serializable; 5 | 6 | import com.baomidou.mybatisplus.annotation.IdType; 7 | import com.baomidou.mybatisplus.annotation.TableField; 8 | import com.baomidou.mybatisplus.annotation.TableId; 9 | import lombok.Data; 10 | import lombok.EqualsAndHashCode; 11 | import lombok.experimental.Accessors; 12 | 13 | /** 14 | * 留言板 15 | * 16 | * @author FanK 17 | */ 18 | @Data 19 | @EqualsAndHashCode(callSuper = false) 20 | @Accessors(chain = true) 21 | public class StatementInfo implements Serializable { 22 | 23 | private static final long serialVersionUID = 1L; 24 | 25 | @TableId(value = "id", type = IdType.AUTO) 26 | private Integer id; 27 | 28 | /** 29 | * 留言内容 30 | */ 31 | private String content; 32 | 33 | /** 34 | * 所属用户 35 | */ 36 | private Integer userId; 37 | 38 | /** 39 | * 创建时间 40 | */ 41 | private String createDate; 42 | 43 | @TableField(exist = false) 44 | private String username; 45 | 46 | } 47 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/entity/TagInfo.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.entity; 2 | 3 | import java.time.LocalDateTime; 4 | import java.io.Serializable; 5 | 6 | import com.baomidou.mybatisplus.annotation.IdType; 7 | import com.baomidou.mybatisplus.annotation.TableId; 8 | import lombok.Data; 9 | import lombok.EqualsAndHashCode; 10 | import lombok.experimental.Accessors; 11 | 12 | /** 13 | * 贴子模块 14 | * 15 | * @author FanK 16 | */ 17 | @Data 18 | @EqualsAndHashCode(callSuper = false) 19 | @Accessors(chain = true) 20 | public class TagInfo implements Serializable { 21 | 22 | private static final long serialVersionUID = 1L; 23 | 24 | @TableId(value = "ID", type = IdType.AUTO) 25 | private Integer id; 26 | 27 | /** 28 | * 模块名称 29 | */ 30 | private String name; 31 | 32 | /** 33 | * 创建时间 34 | */ 35 | private String createDate; 36 | 37 | /** 38 | * 删除标识 39 | */ 40 | private Integer deleteFlag; 41 | 42 | 43 | } 44 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/entity/UserInfo.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.entity; 2 | 3 | import java.time.LocalDateTime; 4 | import java.io.Serializable; 5 | 6 | import com.baomidou.mybatisplus.annotation.IdType; 7 | import com.baomidou.mybatisplus.annotation.TableId; 8 | import lombok.Data; 9 | import lombok.EqualsAndHashCode; 10 | import lombok.experimental.Accessors; 11 | 12 | /** 13 | * 用户信息 14 | * 15 | * @author FanK 16 | */ 17 | @Data 18 | @EqualsAndHashCode(callSuper = false) 19 | @Accessors(chain = true) 20 | public class UserInfo implements Serializable { 21 | 22 | private static final long serialVersionUID = 1L; 23 | 24 | @TableId(value = "id", type = IdType.AUTO) 25 | private Integer id; 26 | 27 | /** 28 | * 用户编号 29 | */ 30 | private String code; 31 | 32 | /** 33 | * 用户名称 34 | */ 35 | private String name; 36 | 37 | /** 38 | * 性别(0.男1.女) 39 | */ 40 | private Integer sex; 41 | 42 | /** 43 | * 头像 44 | */ 45 | private String images; 46 | 47 | /** 48 | * 个人简介 49 | */ 50 | private String content; 51 | 52 | /** 53 | * 所属用户 54 | */ 55 | private Integer userId; 56 | 57 | /** 58 | * 创建时间 59 | */ 60 | private String createDate; 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/IBulletinInfoService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service; 2 | 3 | import cc.mrbird.febs.cos.entity.BulletinInfo; 4 | import com.baomidou.mybatisplus.core.metadata.IPage; 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 6 | import com.baomidou.mybatisplus.extension.service.IService; 7 | 8 | import java.util.LinkedHashMap; 9 | 10 | /** 11 | * @author FanK 12 | */ 13 | public interface IBulletinInfoService extends IService { 14 | 15 | // 分页获取公告信息 16 | IPage> getBulletinByPage(Page page, BulletinInfo bulletinInfo); 17 | } 18 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/IClothesInfoService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service; 2 | 3 | import cc.mrbird.febs.cos.entity.ClothesInfo; 4 | import com.baomidou.mybatisplus.core.metadata.IPage; 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 6 | import com.baomidou.mybatisplus.extension.service.IService; 7 | import io.lettuce.core.dynamic.annotation.Param; 8 | 9 | import java.util.LinkedHashMap; 10 | 11 | /** 12 | * @author FanK 13 | */ 14 | public interface IClothesInfoService extends IService { 15 | 16 | /** 17 | * 分页查询汉服百科信息 18 | * 19 | * @param page 20 | * @param clothesInfo 21 | * @return 22 | */ 23 | IPage> selectClothesPage(Page page, ClothesInfo clothesInfo); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/ICollectInfoService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service; 2 | 3 | import cc.mrbird.febs.cos.entity.CollectInfo; 4 | import com.baomidou.mybatisplus.core.metadata.IPage; 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 6 | import com.baomidou.mybatisplus.extension.service.IService; 7 | import org.apache.ibatis.annotations.Param; 8 | 9 | import java.util.LinkedHashMap; 10 | import java.util.List; 11 | 12 | /** 13 | * @author FanK 14 | */ 15 | public interface ICollectInfoService extends IService { 16 | 17 | // 获取收藏贴子列表 18 | IPage> collectInfoByPage(Page page, CollectInfo collectInfo); 19 | 20 | // 获取收藏贴子列表 21 | List> collectInfoByUser(Integer userId); 22 | } 23 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/IFocusInfoService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service; 2 | 3 | import cc.mrbird.febs.cos.entity.FocusInfo; 4 | import com.baomidou.mybatisplus.core.metadata.IPage; 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 6 | import com.baomidou.mybatisplus.extension.service.IService; 7 | import org.apache.ibatis.annotations.Param; 8 | 9 | import java.util.LinkedHashMap; 10 | import java.util.List; 11 | 12 | /** 13 | * @author FanK 14 | */ 15 | public interface IFocusInfoService extends IService { 16 | 17 | // 分页查询关注人信息 18 | IPage> focusInfoByPage(Page page, FocusInfo focusInfo); 19 | 20 | // 查询关注人信息 21 | List> focusInfoByUser(Integer userId); 22 | } 23 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/IHomeInfoService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service; 2 | 3 | import cc.mrbird.febs.cos.entity.HomeInfo; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | * @author FanK 8 | */ 9 | public interface IHomeInfoService extends IService { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/IMessageInfoService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service; 2 | 3 | import cc.mrbird.febs.cos.entity.MessageInfo; 4 | import com.baomidou.mybatisplus.core.metadata.IPage; 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 6 | import com.baomidou.mybatisplus.extension.service.IService; 7 | import org.apache.ibatis.annotations.Param; 8 | 9 | import java.util.LinkedHashMap; 10 | 11 | /** 12 | * @author FanK 13 | */ 14 | public interface IMessageInfoService extends IService { 15 | 16 | // 分页查询消息信息 17 | IPage> messageInfoByPage(Page page, MessageInfo messageInfo); 18 | } 19 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/IPostInfoService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service; 2 | 3 | import cc.mrbird.febs.cos.entity.PostInfo; 4 | import cc.mrbird.febs.system.domain.User; 5 | import com.baomidou.mybatisplus.core.metadata.IPage; 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 7 | import com.baomidou.mybatisplus.extension.service.IService; 8 | import org.apache.ibatis.annotations.Param; 9 | 10 | import java.util.LinkedHashMap; 11 | import java.util.List; 12 | 13 | /** 14 | * @author FanK 15 | */ 16 | public interface IPostInfoService extends IService { 17 | 18 | /** 19 | * 分页获取系统用户信息 20 | * @param page 21 | * @param user 22 | * @return 23 | */ 24 | IPage> selectUserPage(Page page, User user); 25 | 26 | // 分页获取帖子信息 27 | IPage> postInfoByPage(Page page, PostInfo postInfo); 28 | 29 | // 获取模块下的贴子 30 | List> getPostByTag(Integer tagId); 31 | 32 | // 获取贴子详细信息 33 | LinkedHashMap postDetail(Integer postId); 34 | 35 | // 模糊查询帖子信息 36 | List> postByKey(String key); 37 | 38 | // 推荐贴子 39 | List> recommend(Integer tagId, List collectUserIds); 40 | } 41 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/IReplyInfoService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service; 2 | 3 | import cc.mrbird.febs.cos.entity.ReplyInfo; 4 | import com.baomidou.mybatisplus.core.metadata.IPage; 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 6 | import com.baomidou.mybatisplus.extension.service.IService; 7 | import org.apache.ibatis.annotations.Param; 8 | 9 | import java.util.LinkedHashMap; 10 | import java.util.List; 11 | 12 | /** 13 | * @author FanK 14 | */ 15 | public interface IReplyInfoService extends IService { 16 | 17 | // 分页查询回复信息 18 | IPage> replyInfoByPage(Page page, ReplyInfo replyInfo); 19 | 20 | // 获取具体的帖子回复信息 21 | List> replyListByPostId(Integer postId); 22 | } 23 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/ISensitiveInfoService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service; 2 | 3 | import cc.mrbird.febs.cos.entity.SensitiveInfo; 4 | import com.baomidou.mybatisplus.core.metadata.IPage; 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 6 | import com.baomidou.mybatisplus.extension.service.IService; 7 | import org.apache.ibatis.annotations.Param; 8 | 9 | import java.util.LinkedHashMap; 10 | 11 | /** 12 | * @author FanK 13 | */ 14 | public interface ISensitiveInfoService extends IService { 15 | 16 | // 分页查询敏感词列表 17 | IPage> sensitiveByPage(Page page, SensitiveInfo sensitiveInfo); 18 | } 19 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/IStatementInfoService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service; 2 | 3 | import cc.mrbird.febs.cos.entity.StatementInfo; 4 | import com.baomidou.mybatisplus.core.metadata.IPage; 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 6 | import com.baomidou.mybatisplus.extension.service.IService; 7 | import io.lettuce.core.dynamic.annotation.Param; 8 | 9 | import java.util.LinkedHashMap; 10 | 11 | /** 12 | * @author FanK 13 | */ 14 | public interface IStatementInfoService extends IService { 15 | 16 | /** 17 | * 分页查询留言板信息 18 | * 19 | * @param page 20 | * @param statementInfo 21 | * @return 22 | */ 23 | IPage> selectStatementPage(Page page, StatementInfo statementInfo); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/ITagInfoService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service; 2 | 3 | import cc.mrbird.febs.cos.entity.TagInfo; 4 | import com.baomidou.mybatisplus.core.metadata.IPage; 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 6 | import com.baomidou.mybatisplus.extension.service.IService; 7 | import org.apache.ibatis.annotations.Param; 8 | 9 | import java.util.LinkedHashMap; 10 | 11 | /** 12 | * @author FanK 13 | */ 14 | public interface ITagInfoService extends IService { 15 | 16 | // 分页获取tag数据 17 | IPage> tagInfoByPage(Page page, TagInfo tagInfo); 18 | } 19 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/IUserInfoService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service; 2 | 3 | import cc.mrbird.febs.cos.entity.UserInfo; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | * @author FanK 8 | */ 9 | public interface IUserInfoService extends IService { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/impl/BulletinInfoServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service.impl; 2 | 3 | import cc.mrbird.febs.cos.entity.BulletinInfo; 4 | import cc.mrbird.febs.cos.dao.BulletinInfoMapper; 5 | import cc.mrbird.febs.cos.service.IBulletinInfoService; 6 | import com.baomidou.mybatisplus.core.metadata.IPage; 7 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.LinkedHashMap; 12 | 13 | /** 14 | * @author FanK 15 | */ 16 | @Service 17 | public class BulletinInfoServiceImpl extends ServiceImpl implements IBulletinInfoService { 18 | 19 | @Override 20 | public IPage> getBulletinByPage(Page page, BulletinInfo bulletinInfo) { 21 | return baseMapper.getBulletinByPage(page, bulletinInfo); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/impl/ClothesInfoServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service.impl; 2 | 3 | import cc.mrbird.febs.cos.entity.ClothesInfo; 4 | import cc.mrbird.febs.cos.dao.ClothesInfoMapper; 5 | import cc.mrbird.febs.cos.service.IClothesInfoService; 6 | import com.baomidou.mybatisplus.core.metadata.IPage; 7 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.LinkedHashMap; 12 | 13 | /** 14 | * @author FanK 15 | */ 16 | @Service 17 | public class ClothesInfoServiceImpl extends ServiceImpl implements IClothesInfoService { 18 | 19 | /** 20 | * 分页查询汉服百科信息 21 | * 22 | * @param page 23 | * @param clothesInfo 24 | * @return 25 | */ 26 | @Override 27 | public IPage> selectClothesPage(Page page, ClothesInfo clothesInfo) { 28 | return baseMapper.selectClothesPage(page, clothesInfo); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/impl/CollectInfoServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service.impl; 2 | 3 | import cc.mrbird.febs.cos.entity.CollectInfo; 4 | import cc.mrbird.febs.cos.dao.CollectInfoMapper; 5 | import cc.mrbird.febs.cos.service.ICollectInfoService; 6 | import com.baomidou.mybatisplus.core.metadata.IPage; 7 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.LinkedHashMap; 12 | import java.util.List; 13 | 14 | /** 15 | * @author FanK 16 | */ 17 | @Service 18 | public class CollectInfoServiceImpl extends ServiceImpl implements ICollectInfoService { 19 | 20 | @Override 21 | public IPage> collectInfoByPage(Page page, CollectInfo collectInfo) { 22 | return baseMapper.collectInfoByPage(page, collectInfo); 23 | } 24 | 25 | @Override 26 | public List> collectInfoByUser(Integer userId) { 27 | return baseMapper.collectInfoByUser(userId); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/impl/FocusInfoServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service.impl; 2 | 3 | import cc.mrbird.febs.cos.entity.FocusInfo; 4 | import cc.mrbird.febs.cos.dao.FocusInfoMapper; 5 | import cc.mrbird.febs.cos.service.IFocusInfoService; 6 | import com.baomidou.mybatisplus.core.metadata.IPage; 7 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.LinkedHashMap; 12 | import java.util.List; 13 | 14 | /** 15 | * @author FanK 16 | */ 17 | @Service 18 | public class FocusInfoServiceImpl extends ServiceImpl implements IFocusInfoService { 19 | 20 | @Override 21 | public IPage> focusInfoByPage(Page page, FocusInfo focusInfo) { 22 | return baseMapper.focusInfoByPage(page, focusInfo); 23 | } 24 | 25 | @Override 26 | public List> focusInfoByUser(Integer userId) { 27 | return baseMapper.focusInfoByUser(userId); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/impl/HomeInfoServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service.impl; 2 | 3 | import cc.mrbird.febs.cos.entity.HomeInfo; 4 | import cc.mrbird.febs.cos.dao.HomeInfoMapper; 5 | import cc.mrbird.febs.cos.service.IHomeInfoService; 6 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | * @author FanK 11 | */ 12 | @Service 13 | public class HomeInfoServiceImpl extends ServiceImpl implements IHomeInfoService { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/impl/MessageInfoServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service.impl; 2 | 3 | import cc.mrbird.febs.cos.entity.MessageInfo; 4 | import cc.mrbird.febs.cos.dao.MessageInfoMapper; 5 | import cc.mrbird.febs.cos.service.IMessageInfoService; 6 | import com.baomidou.mybatisplus.core.metadata.IPage; 7 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.LinkedHashMap; 12 | 13 | /** 14 | * @author FanK 15 | */ 16 | @Service 17 | public class MessageInfoServiceImpl extends ServiceImpl implements IMessageInfoService { 18 | 19 | @Override 20 | public IPage> messageInfoByPage(Page page, MessageInfo messageInfo) { 21 | return baseMapper.messageInfoByPage(page, messageInfo); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/impl/PostInfoServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service.impl; 2 | 3 | import cc.mrbird.febs.cos.entity.PostInfo; 4 | import cc.mrbird.febs.cos.dao.PostInfoMapper; 5 | import cc.mrbird.febs.cos.service.IPostInfoService; 6 | import cc.mrbird.febs.system.domain.User; 7 | import com.baomidou.mybatisplus.core.metadata.IPage; 8 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 9 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 10 | import org.apache.commons.lang3.StringUtils; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.LinkedHashMap; 14 | import java.util.List; 15 | 16 | /** 17 | * @author FanK 18 | */ 19 | @Service 20 | public class PostInfoServiceImpl extends ServiceImpl implements IPostInfoService { 21 | 22 | /** 23 | * 分页获取系统用户信息 24 | * @param page 25 | * @param user 26 | * @return 27 | */ 28 | @Override 29 | public IPage> selectUserPage(Page page, User user) { 30 | return baseMapper.selectUserPage(page, user); 31 | } 32 | 33 | @Override 34 | public IPage> postInfoByPage(Page page, PostInfo postInfo) { 35 | return baseMapper.postInfoByPage(page, postInfo); 36 | } 37 | 38 | @Override 39 | public List> getPostByTag(Integer tagId) { 40 | return baseMapper.getPostByTag(tagId); 41 | } 42 | 43 | @Override 44 | public LinkedHashMap postDetail(Integer postId) { 45 | return baseMapper.postDetail(postId); 46 | } 47 | 48 | @Override 49 | public List> postByKey(String key) { 50 | return baseMapper.postByKey(key); 51 | } 52 | 53 | @Override 54 | public List> recommend(Integer tagId, List collectUserIds) { 55 | return baseMapper.recommend(tagId, StringUtils.join(collectUserIds.toArray(), ",")); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/impl/ReplyInfoServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service.impl; 2 | 3 | import cc.mrbird.febs.cos.entity.ReplyInfo; 4 | import cc.mrbird.febs.cos.dao.ReplyInfoMapper; 5 | import cc.mrbird.febs.cos.service.IReplyInfoService; 6 | import com.baomidou.mybatisplus.core.metadata.IPage; 7 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.LinkedHashMap; 12 | import java.util.List; 13 | 14 | /** 15 | * @author FanK 16 | */ 17 | @Service 18 | public class ReplyInfoServiceImpl extends ServiceImpl implements IReplyInfoService { 19 | 20 | @Override 21 | public IPage> replyInfoByPage(Page page, ReplyInfo replyInfo) { 22 | return baseMapper.replyInfoByPage(page, replyInfo); 23 | } 24 | 25 | @Override 26 | public List> replyListByPostId(Integer postId) { 27 | return baseMapper.replyListByPostId(postId); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/impl/SensitiveInfoServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service.impl; 2 | 3 | import cc.mrbird.febs.cos.entity.SensitiveInfo; 4 | import cc.mrbird.febs.cos.dao.SensitiveInfoMapper; 5 | import cc.mrbird.febs.cos.service.ISensitiveInfoService; 6 | import com.baomidou.mybatisplus.core.metadata.IPage; 7 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.LinkedHashMap; 12 | 13 | /** 14 | * @author FanK 15 | */ 16 | @Service 17 | public class SensitiveInfoServiceImpl extends ServiceImpl implements ISensitiveInfoService { 18 | 19 | @Override 20 | public IPage> sensitiveByPage(Page page, SensitiveInfo sensitiveInfo) { 21 | return baseMapper.sensitiveByPage(page, sensitiveInfo); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/impl/StatementInfoServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service.impl; 2 | 3 | import cc.mrbird.febs.cos.entity.StatementInfo; 4 | import cc.mrbird.febs.cos.dao.StatementInfoMapper; 5 | import cc.mrbird.febs.cos.service.IStatementInfoService; 6 | import com.baomidou.mybatisplus.core.metadata.IPage; 7 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.LinkedHashMap; 12 | 13 | /** 14 | * @author FanK 15 | */ 16 | @Service 17 | public class StatementInfoServiceImpl extends ServiceImpl implements IStatementInfoService { 18 | 19 | /** 20 | * 分页查询留言板信息 21 | * 22 | * @param page 23 | * @param statementInfo 24 | * @return 25 | */ 26 | @Override 27 | public IPage> selectStatementPage(Page page, StatementInfo statementInfo) { 28 | return baseMapper.selectStatementPage(page, statementInfo); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/impl/TagInfoServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service.impl; 2 | 3 | import cc.mrbird.febs.cos.entity.TagInfo; 4 | import cc.mrbird.febs.cos.dao.TagInfoMapper; 5 | import cc.mrbird.febs.cos.service.ITagInfoService; 6 | import com.baomidou.mybatisplus.core.metadata.IPage; 7 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.LinkedHashMap; 12 | 13 | /** 14 | * @author FanK 15 | */ 16 | @Service 17 | public class TagInfoServiceImpl extends ServiceImpl implements ITagInfoService { 18 | 19 | @Override 20 | public IPage> tagInfoByPage(Page page, TagInfo tagInfo) { 21 | return baseMapper.tagInfoByPage(page, tagInfo); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/impl/UserInfoServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service.impl; 2 | 3 | import cc.mrbird.febs.cos.entity.UserInfo; 4 | import cc.mrbird.febs.cos.dao.UserInfoMapper; 5 | import cc.mrbird.febs.cos.service.IUserInfoService; 6 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | * @author FanK 11 | */ 12 | @Service 13 | public class UserInfoServiceImpl extends ServiceImpl implements IUserInfoService { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/job/config/ScheduleConfig.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.job.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.scheduling.quartz.SchedulerFactoryBean; 6 | 7 | import javax.sql.DataSource; 8 | import java.util.Properties; 9 | 10 | /** 11 | * 定时任务配置 12 | * 13 | */ 14 | @Configuration 15 | public class ScheduleConfig { 16 | 17 | @Bean 18 | public SchedulerFactoryBean schedulerFactoryBean(DataSource dataSource) { 19 | SchedulerFactoryBean factory = new SchedulerFactoryBean(); 20 | factory.setDataSource(dataSource); 21 | 22 | // quartz参数 23 | Properties prop = new Properties(); 24 | prop.put("org.quartz.scheduler.instanceName", "MyScheduler"); 25 | prop.put("org.quartz.scheduler.instanceId", "AUTO"); 26 | // 线程池配置 27 | prop.put("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool"); 28 | prop.put("org.quartz.threadPool.threadCount", "20"); 29 | prop.put("org.quartz.threadPool.threadPriority", "5"); 30 | // JobStore配置 31 | prop.put("org.quartz.jobStore.class", "org.quartz.impl.jdbcjobstore.JobStoreTX"); 32 | // 集群配置 33 | prop.put("org.quartz.jobStore.isClustered", "true"); 34 | prop.put("org.quartz.jobStore.clusterCheckinInterval", "15000"); 35 | prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "1"); 36 | 37 | prop.put("org.quartz.jobStore.misfireThreshold", "12000"); 38 | prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_"); 39 | factory.setQuartzProperties(prop); 40 | 41 | factory.setSchedulerName("MyScheduler"); 42 | // 延时启动 43 | factory.setStartupDelay(1); 44 | factory.setApplicationContextSchedulerContextKey("applicationContextKey"); 45 | // 可选,QuartzScheduler 46 | // 启动时更新己存在的 Job 47 | factory.setOverwriteExistingJobs(true); 48 | // 设置自动启动,默认为 true 49 | factory.setAutoStartup(true); 50 | 51 | return factory; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/job/dao/JobLogMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.job.dao; 2 | 3 | 4 | import cc.mrbird.febs.job.domain.JobLog; 5 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 6 | 7 | public interface JobLogMapper extends BaseMapper { 8 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/job/dao/JobMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.job.dao; 2 | 3 | 4 | import cc.mrbird.febs.job.domain.Job; 5 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 6 | 7 | import java.util.List; 8 | 9 | public interface JobMapper extends BaseMapper { 10 | 11 | List queryList(); 12 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/job/domain/JobLog.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.job.domain; 2 | 3 | 4 | import cc.mrbird.febs.common.converter.TimeConverter; 5 | import com.baomidou.mybatisplus.annotation.IdType; 6 | import com.baomidou.mybatisplus.annotation.TableId; 7 | import com.baomidou.mybatisplus.annotation.TableName; 8 | import com.wuwenze.poi.annotation.Excel; 9 | import com.wuwenze.poi.annotation.ExcelField; 10 | import lombok.Data; 11 | import lombok.ToString; 12 | 13 | import java.io.Serializable; 14 | import java.util.Date; 15 | 16 | @Data 17 | @TableName("t_job_log") 18 | @Excel("调度日志信息表") 19 | public class JobLog implements Serializable { 20 | 21 | private static final long serialVersionUID = -7114915445674333148L; 22 | // 任务执行成功 23 | public static final String JOB_SUCCESS = "0"; 24 | // 任务执行失败 25 | public static final String JOB_FAIL = "1"; 26 | 27 | @TableId(value = "LOG_ID", type = IdType.AUTO) 28 | private Long logId; 29 | 30 | private Long jobId; 31 | 32 | @ExcelField(value = "Bean名称") 33 | private String beanName; 34 | 35 | @ExcelField(value = "方法名称") 36 | private String methodName; 37 | 38 | @ExcelField(value = "方法参数") 39 | private String params; 40 | 41 | @ExcelField(value = "状态", writeConverterExp = "0=成功,1=失败") 42 | private String status; 43 | 44 | @ExcelField(value = "异常信息") 45 | private String error; 46 | 47 | @ExcelField(value = "耗时(毫秒)") 48 | private Long times; 49 | 50 | @ExcelField(value = "执行时间", writeConverter = TimeConverter.class) 51 | private Date createTime; 52 | 53 | private transient String createTimeFrom; 54 | private transient String createTimeTo; 55 | 56 | } 57 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/job/service/JobLogService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.job.service; 2 | 3 | import cc.mrbird.febs.common.domain.QueryRequest; 4 | import cc.mrbird.febs.job.domain.JobLog; 5 | import com.baomidou.mybatisplus.core.metadata.IPage; 6 | import com.baomidou.mybatisplus.extension.service.IService; 7 | 8 | 9 | public interface JobLogService extends IService { 10 | 11 | IPage findJobLogs(QueryRequest request, JobLog jobLog); 12 | 13 | void saveJobLog(JobLog log); 14 | 15 | void deleteJobLogs(String[] jobLogIds); 16 | } 17 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/job/service/JobService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.job.service; 2 | 3 | import cc.mrbird.febs.common.domain.QueryRequest; 4 | import cc.mrbird.febs.job.domain.Job; 5 | import com.baomidou.mybatisplus.core.metadata.IPage; 6 | import com.baomidou.mybatisplus.extension.service.IService; 7 | 8 | 9 | public interface JobService extends IService { 10 | 11 | Job findJob(Long jobId); 12 | 13 | IPage findJobs(QueryRequest request, Job job); 14 | 15 | void createJob(Job job); 16 | 17 | void updateJob(Job job); 18 | 19 | void deleteJobs(String[] jobIds); 20 | 21 | int updateBatch(String jobIds, String status); 22 | 23 | void run(String jobIds); 24 | 25 | void pause(String jobIds); 26 | 27 | void resume(String jobIds); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/job/task/TestTask.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.job.task; 2 | 3 | import lombok.extern.slf4j.Slf4j; 4 | import org.springframework.stereotype.Component; 5 | 6 | @Slf4j 7 | @Component 8 | public class TestTask { 9 | 10 | public void test(String params) { 11 | log.info("我是带参数的test方法,正在被执行,参数为:{}" , params); 12 | } 13 | public void test1() { 14 | log.info("我是不带参数的test1方法,正在被执行"); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/job/util/ScheduleRunnable.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.job.util; 2 | 3 | import cc.mrbird.febs.common.utils.SpringContextUtil; 4 | import lombok.extern.slf4j.Slf4j; 5 | import org.apache.commons.lang3.StringUtils; 6 | import org.springframework.util.ReflectionUtils; 7 | 8 | import java.lang.reflect.Method; 9 | 10 | /** 11 | * 执行定时任务 12 | */ 13 | @Slf4j 14 | public class ScheduleRunnable implements Runnable { 15 | 16 | private Object target; 17 | private Method method; 18 | private String params; 19 | 20 | ScheduleRunnable(String beanName, String methodName, String params) throws NoSuchMethodException, SecurityException { 21 | this.target = SpringContextUtil.getBean(beanName); 22 | this.params = params; 23 | 24 | if (StringUtils.isNotBlank(params)) { 25 | this.method = target.getClass().getDeclaredMethod(methodName, String.class); 26 | } else { 27 | this.method = target.getClass().getDeclaredMethod(methodName); 28 | } 29 | } 30 | 31 | @Override 32 | public void run() { 33 | try { 34 | ReflectionUtils.makeAccessible(method); 35 | if (StringUtils.isNotBlank(params)) { 36 | method.invoke(target, params); 37 | } else { 38 | method.invoke(target); 39 | } 40 | } catch (Exception e) { 41 | log.error("执行定时任务失败", e); 42 | } 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/controller/RedisController.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.controller; 2 | 3 | import cc.mrbird.febs.common.domain.FebsResponse; 4 | import cc.mrbird.febs.common.domain.RedisInfo; 5 | import cc.mrbird.febs.common.service.RedisService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | import java.util.List; 12 | import java.util.Map; 13 | 14 | @RestController 15 | @RequestMapping("redis") 16 | public class RedisController { 17 | 18 | @Autowired 19 | private RedisService redisService; 20 | 21 | @GetMapping("info") 22 | public FebsResponse getRedisInfo() throws Exception { 23 | List infoList = this.redisService.getRedisInfo(); 24 | return new FebsResponse().data(infoList); 25 | } 26 | 27 | @GetMapping("keysSize") 28 | public Map getKeysSize() throws Exception { 29 | return redisService.getKeysSize(); 30 | } 31 | 32 | @GetMapping("memoryInfo") 33 | public Map getMemoryInfo() throws Exception { 34 | return redisService.getMemoryInfo(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/dao/DeptMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.dao; 2 | 3 | import cc.mrbird.febs.system.domain.Dept; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | public interface DeptMapper extends BaseMapper { 7 | 8 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/dao/DictMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.dao; 2 | 3 | import cc.mrbird.febs.system.domain.Dict; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | public interface DictMapper extends BaseMapper { 7 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/dao/LogMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.dao; 2 | 3 | import cc.mrbird.febs.system.domain.SysLog; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | public interface LogMapper extends BaseMapper { 7 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/dao/LoginLogMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.dao; 2 | 3 | 4 | import cc.mrbird.febs.system.domain.LoginLog; 5 | import cc.mrbird.febs.system.domain.User; 6 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 7 | 8 | import java.util.List; 9 | import java.util.Map; 10 | 11 | public interface LoginLogMapper extends BaseMapper { 12 | 13 | /** 14 | * 获取系统总访问次数 15 | * 16 | * @return Long 17 | */ 18 | Long findTotalVisitCount(); 19 | 20 | /** 21 | * 获取系统今日访问次数 22 | * 23 | * @return Long 24 | */ 25 | Long findTodayVisitCount(); 26 | 27 | /** 28 | * 获取系统今日访问 IP数 29 | * 30 | * @return Long 31 | */ 32 | Long findTodayIp(); 33 | 34 | /** 35 | * 获取系统近七天来的访问记录 36 | * 37 | * @param user 用户 38 | * @return 系统近七天来的访问记录 39 | */ 40 | List> findLastSevenDaysVisitCount(User user); 41 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/dao/MenuMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.dao; 2 | 3 | import cc.mrbird.febs.system.domain.Menu; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | import java.util.List; 7 | 8 | public interface MenuMapper extends BaseMapper { 9 | 10 | List findUserPermissions(String userName); 11 | 12 | List findUserMenus(String userName); 13 | 14 | /** 15 | * 查找当前菜单/按钮关联的用户 ID 16 | * 17 | * @param menuId menuId 18 | * @return 用户 ID集合 19 | */ 20 | List findUserIdsByMenuId(String menuId); 21 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/dao/RoleMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.dao; 2 | 3 | import cc.mrbird.febs.system.domain.Role; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | import java.util.List; 7 | 8 | public interface RoleMapper extends BaseMapper { 9 | 10 | List findUserRole(String userName); 11 | 12 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/dao/RoleMenuMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.dao; 2 | 3 | import cc.mrbird.febs.system.domain.RoleMenu; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | public interface RoleMenuMapper extends BaseMapper { 7 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/dao/TestMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.dao; 2 | 3 | import cc.mrbird.febs.system.domain.Test; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | public interface TestMapper extends BaseMapper { 7 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/dao/UserConfigMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.dao; 2 | 3 | import cc.mrbird.febs.system.domain.UserConfig; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | public interface UserConfigMapper extends BaseMapper { 7 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/dao/UserMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.dao; 2 | 3 | import cc.mrbird.febs.system.domain.User; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import com.baomidou.mybatisplus.core.metadata.IPage; 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 7 | import org.apache.ibatis.annotations.Param; 8 | 9 | public interface UserMapper extends BaseMapper { 10 | 11 | IPage findUserDetail(Page page, @Param("user") User user); 12 | 13 | /** 14 | * 获取单个用户详情 15 | * 16 | * @param username 用户名 17 | * @return 用户信息 18 | */ 19 | User findDetail(String username); 20 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/dao/UserRoleMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.dao; 2 | 3 | import cc.mrbird.febs.system.domain.UserRole; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | public interface UserRoleMapper extends BaseMapper { 8 | 9 | /** 10 | * 根据用户Id删除该用户的角色关系 11 | * 12 | * @param userId 用户ID 13 | * @return boolean 14 | * @author lzx 15 | * @date 2019年03月04日17:46:49 16 | */ 17 | Boolean deleteByUserId(@Param("userId") Long userId); 18 | 19 | /** 20 | * 根据角色Id删除该角色的用户关系 21 | * 22 | * @param roleId 角色ID 23 | * @return boolean 24 | * @author lzx 25 | * @date 2019年03月04日17:47:16 26 | */ 27 | Boolean deleteByRoleId(@Param("roleId") Long roleId); 28 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/domain/Dept.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.domain; 2 | 3 | import cc.mrbird.febs.common.converter.TimeConverter; 4 | import com.baomidou.mybatisplus.annotation.IdType; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import com.baomidou.mybatisplus.annotation.TableName; 7 | import com.wuwenze.poi.annotation.Excel; 8 | import com.wuwenze.poi.annotation.ExcelField; 9 | import lombok.Data; 10 | 11 | import javax.validation.constraints.NotBlank; 12 | import javax.validation.constraints.Size; 13 | import java.io.Serializable; 14 | import java.util.Date; 15 | 16 | @Data 17 | @TableName("t_dept") 18 | @Excel("部门信息表") 19 | public class Dept implements Serializable { 20 | 21 | private static final long serialVersionUID = -7790334862410409053L; 22 | 23 | @TableId(value = "DEPT_ID", type = IdType.AUTO) 24 | private Long deptId; 25 | 26 | private Long parentId; 27 | 28 | @NotBlank(message = "{required}") 29 | @Size(max = 20, message = "{noMoreThan}") 30 | @ExcelField(value = "部门名称") 31 | private String deptName; 32 | 33 | private Double orderNum; 34 | 35 | @ExcelField(value = "创建时间", writeConverter = TimeConverter.class) 36 | private Date createTime; 37 | 38 | @ExcelField(value = "修改时间", writeConverter = TimeConverter.class) 39 | private Date modifyTime; 40 | 41 | private transient String createTimeFrom; 42 | 43 | private transient String createTimeTo; 44 | 45 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/domain/Dict.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.domain; 2 | 3 | import com.baomidou.mybatisplus.annotation.IdType; 4 | import com.baomidou.mybatisplus.annotation.TableId; 5 | import com.baomidou.mybatisplus.annotation.TableName; 6 | import com.wuwenze.poi.annotation.Excel; 7 | import com.wuwenze.poi.annotation.ExcelField; 8 | import lombok.Data; 9 | import lombok.ToString; 10 | 11 | import javax.validation.constraints.NotBlank; 12 | import javax.validation.constraints.Size; 13 | import java.io.Serializable; 14 | 15 | @Data 16 | @TableName("t_dict") 17 | @Excel("字典信息表") 18 | public class Dict implements Serializable { 19 | 20 | private static final long serialVersionUID = 7780820231535870010L; 21 | 22 | @TableId(value = "DICT_ID", type = IdType.AUTO) 23 | private Long dictId; 24 | 25 | @NotBlank(message = "{required}") 26 | @Size(max = 10, message = "{noMoreThan}") 27 | @ExcelField(value = "键") 28 | private String keyy; 29 | 30 | @NotBlank(message = "{required}") 31 | @Size(max = 20, message = "{noMoreThan}") 32 | @ExcelField(value = "值") 33 | private String valuee; 34 | 35 | @NotBlank(message = "{required}") 36 | @Size(max = 20, message = "{noMoreThan}") 37 | @ExcelField(value = "表名") 38 | private String tableName; 39 | 40 | @NotBlank(message = "{required}") 41 | @Size(max = 20, message = "{noMoreThan}") 42 | @ExcelField(value = "字段名") 43 | private String fieldName; 44 | 45 | } 46 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/domain/LoginLog.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.domain; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import lombok.Data; 5 | import lombok.ToString; 6 | 7 | import java.util.Date; 8 | 9 | @TableName("t_login_log") 10 | @Data 11 | public class LoginLog { 12 | /** 13 | * 用户 ID 14 | */ 15 | private String username; 16 | 17 | /** 18 | * 登录时间 19 | */ 20 | private Date loginTime; 21 | 22 | /** 23 | * 登录地点 24 | */ 25 | private String location; 26 | 27 | private String ip; 28 | } 29 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/domain/Menu.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.domain; 2 | 3 | import cc.mrbird.febs.common.converter.TimeConverter; 4 | import com.baomidou.mybatisplus.annotation.IdType; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import com.baomidou.mybatisplus.annotation.TableName; 7 | import com.wuwenze.poi.annotation.Excel; 8 | import com.wuwenze.poi.annotation.ExcelField; 9 | import lombok.Data; 10 | 11 | import javax.validation.constraints.NotBlank; 12 | import javax.validation.constraints.Size; 13 | import java.io.Serializable; 14 | import java.util.Date; 15 | 16 | @Data 17 | @TableName("t_menu") 18 | @Excel("菜单信息表") 19 | public class Menu implements Serializable { 20 | 21 | private static final long serialVersionUID = 7187628714679791771L; 22 | 23 | public static final String TYPE_MENU = "0"; 24 | 25 | public static final String TYPE_BUTTON = "1"; 26 | 27 | @TableId(value = "MENU_ID", type = IdType.AUTO) 28 | private Long menuId; 29 | 30 | private Long parentId; 31 | 32 | @NotBlank(message = "{required}") 33 | @Size(max = 10, message = "{noMoreThan}") 34 | @ExcelField(value = "名称") 35 | private String menuName; 36 | 37 | @Size(max = 50, message = "{noMoreThan}") 38 | @ExcelField(value = "地址") 39 | private String path; 40 | 41 | @Size(max = 100, message = "{noMoreThan}") 42 | @ExcelField(value = "对应Vue组件") 43 | private String component; 44 | 45 | @Size(max = 50, message = "{noMoreThan}") 46 | @ExcelField(value = "权限") 47 | private String perms; 48 | 49 | @ExcelField(value = "图标") 50 | private String icon; 51 | 52 | @NotBlank(message = "{required}") 53 | @ExcelField(value = "类型", writeConverterExp = "0=按钮,1=菜单") 54 | private String type; 55 | 56 | private Double orderNum; 57 | 58 | @ExcelField(value = "创建时间", writeConverter = TimeConverter.class) 59 | private Date createTime; 60 | 61 | @ExcelField(value = "修改时间", writeConverter = TimeConverter.class) 62 | private Date modifyTime; 63 | 64 | private transient String createTimeFrom; 65 | private transient String createTimeTo; 66 | 67 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/domain/Role.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.domain; 2 | 3 | import cc.mrbird.febs.common.converter.TimeConverter; 4 | import com.baomidou.mybatisplus.annotation.IdType; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import com.baomidou.mybatisplus.annotation.TableName; 7 | import com.wuwenze.poi.annotation.Excel; 8 | import com.wuwenze.poi.annotation.ExcelField; 9 | import lombok.Data; 10 | 11 | import javax.validation.constraints.NotBlank; 12 | import javax.validation.constraints.Size; 13 | import java.io.Serializable; 14 | import java.util.Date; 15 | 16 | @Data 17 | @TableName("t_role") 18 | @Excel("角色信息表") 19 | public class Role implements Serializable { 20 | 21 | private static final long serialVersionUID = -1714476694755654924L; 22 | 23 | @TableId(value = "ROLE_ID", type = IdType.AUTO) 24 | private Long roleId; 25 | 26 | @NotBlank(message = "{required}") 27 | @Size(max = 10, message = "{noMoreThan}") 28 | @ExcelField(value = "角色名称") 29 | private String roleName; 30 | 31 | @Size(max = 50, message = "{noMoreThan}") 32 | @ExcelField(value = "角色描述") 33 | private String remark; 34 | 35 | @ExcelField(value = "创建时间", writeConverter = TimeConverter.class) 36 | private Date createTime; 37 | 38 | @ExcelField(value = "修改时间", writeConverter = TimeConverter.class) 39 | private Date modifyTime; 40 | 41 | private transient String createTimeFrom; 42 | private transient String createTimeTo; 43 | private transient String menuId; 44 | 45 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/domain/RoleMenu.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.domain; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import lombok.Data; 5 | 6 | import java.io.Serializable; 7 | 8 | @TableName("t_role_menu") 9 | @Data 10 | public class RoleMenu implements Serializable { 11 | 12 | private static final long serialVersionUID = -7573904024872252113L; 13 | 14 | private Long roleId; 15 | 16 | private Long menuId; 17 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/domain/SysLog.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.domain; 2 | 3 | import cc.mrbird.febs.common.converter.TimeConverter; 4 | import com.baomidou.mybatisplus.annotation.IdType; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import com.baomidou.mybatisplus.annotation.TableName; 7 | import com.wuwenze.poi.annotation.Excel; 8 | import com.wuwenze.poi.annotation.ExcelField; 9 | import lombok.Data; 10 | 11 | import java.io.Serializable; 12 | import java.util.Date; 13 | 14 | @Data 15 | @TableName("t_log") 16 | @Excel("系统日志表") 17 | public class SysLog implements Serializable { 18 | 19 | private static final long serialVersionUID = -8878596941954995444L; 20 | 21 | @TableId(value = "ID", type = IdType.AUTO) 22 | private Long id; 23 | 24 | @ExcelField(value = "操作人") 25 | private String username; 26 | 27 | @ExcelField(value = "操作描述") 28 | private String operation; 29 | 30 | @ExcelField(value = "耗时(毫秒)") 31 | private Long time; 32 | 33 | @ExcelField(value = "执行方法") 34 | private String method; 35 | 36 | @ExcelField(value = "方法参数") 37 | private String params; 38 | 39 | @ExcelField(value = "IP地址") 40 | private String ip; 41 | 42 | @ExcelField(value = "操作时间", writeConverter = TimeConverter.class) 43 | private Date createTime; 44 | 45 | private transient String createTimeFrom; 46 | private transient String createTimeTo; 47 | 48 | @ExcelField(value = "操作地点") 49 | private String location; 50 | 51 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/domain/Test.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.domain; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import com.wuwenze.poi.annotation.Excel; 5 | import com.wuwenze.poi.annotation.ExcelField; 6 | import com.wuwenze.poi.validator.EmailValidator; 7 | import lombok.Data; 8 | 9 | import java.util.Date; 10 | 11 | @Data 12 | @TableName("t_test") 13 | @Excel("测试导入导出数据") 14 | public class Test { 15 | 16 | @ExcelField(value = "字段1", required = true, maxLength = 20, 17 | comment = "提示:必填,长度不能超过20个字符") 18 | private String field1; 19 | 20 | @ExcelField(value = "字段2", required = true, maxLength = 11, regularExp = "[0-9]+", 21 | regularExpMessage = "必须是数字", comment = "提示: 必填,只能填写数字,并且长度不能超过11位") 22 | private Integer field2; 23 | 24 | @ExcelField(value = "字段3", required = true, maxLength = 50, 25 | comment = "提示:必填,只能填写邮箱,长度不能超过50个字符", validator = EmailValidator.class) 26 | private String field3; 27 | 28 | private Date createTime; 29 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/domain/UserConfig.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.domain; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableId; 4 | import com.baomidou.mybatisplus.annotation.TableName; 5 | import lombok.Data; 6 | 7 | 8 | @TableName("t_user_config") 9 | @Data 10 | public class UserConfig { 11 | 12 | public static final String DEFAULT_THEME = "light"; 13 | public static final String DEFAULT_LAYOUT = "head"; 14 | public static final String DEFAULT_MULTIPAGE = "0"; 15 | public static final String DEFAULT_FIX_SIDERBAR = "1"; 16 | public static final String DEFAULT_FIX_HEADER = "1"; 17 | public static final String DEFAULT_COLOR = "rgb(66, 185, 131)"; 18 | 19 | /** 20 | * 用户 ID 21 | */ 22 | @TableId(value = "USER_ID") 23 | private Long userId; 24 | 25 | /** 26 | * 系统主题 dark暗色风格,light明亮风格 27 | */ 28 | private String theme; 29 | 30 | /** 31 | * 系统布局 side侧边栏,head顶部栏 32 | */ 33 | private String layout; 34 | 35 | /** 36 | * 页面风格 1多标签页 0单页 37 | */ 38 | private String multiPage; 39 | 40 | /** 41 | * 页面滚动是否固定侧边栏 1固定 0不固定 42 | */ 43 | private String fixSiderbar; 44 | 45 | /** 46 | * 页面滚动是否固定顶栏 1固定 0不固定 47 | */ 48 | private String fixHeader; 49 | 50 | /** 51 | * 主题颜色 RGB值 52 | */ 53 | private String color; 54 | 55 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/domain/UserRole.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.domain; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import lombok.Data; 5 | 6 | import java.io.Serializable; 7 | 8 | @TableName("t_user_role") 9 | @Data 10 | public class UserRole implements Serializable{ 11 | 12 | private static final long serialVersionUID = -3166012934498268403L; 13 | 14 | private Long userId; 15 | 16 | private Long roleId; 17 | 18 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/service/DeptService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.service; 2 | 3 | 4 | import cc.mrbird.febs.common.domain.QueryRequest; 5 | import cc.mrbird.febs.system.domain.Dept; 6 | import com.baomidou.mybatisplus.extension.service.IService; 7 | 8 | import java.util.List; 9 | import java.util.Map; 10 | 11 | public interface DeptService extends IService { 12 | 13 | Map findDepts(QueryRequest request, Dept dept); 14 | 15 | List findDepts(Dept dept, QueryRequest request); 16 | 17 | void createDept(Dept dept); 18 | 19 | void updateDept(Dept dept); 20 | 21 | void deleteDepts(String[] deptIds); 22 | } 23 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/service/DictService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.service; 2 | 3 | import cc.mrbird.febs.common.domain.QueryRequest; 4 | import cc.mrbird.febs.system.domain.Dict; 5 | import com.baomidou.mybatisplus.core.metadata.IPage; 6 | import com.baomidou.mybatisplus.extension.service.IService; 7 | 8 | 9 | public interface DictService extends IService { 10 | 11 | IPage findDicts(QueryRequest request, Dict dict); 12 | 13 | void createDict(Dict dict); 14 | 15 | void updateDict(Dict dicdt); 16 | 17 | void deleteDicts(String[] dictIds); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/service/LogService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.service; 2 | 3 | import cc.mrbird.febs.common.domain.QueryRequest; 4 | import cc.mrbird.febs.system.domain.SysLog; 5 | import com.baomidou.mybatisplus.core.metadata.IPage; 6 | import com.baomidou.mybatisplus.extension.service.IService; 7 | import com.fasterxml.jackson.core.JsonProcessingException; 8 | import org.aspectj.lang.ProceedingJoinPoint; 9 | import org.springframework.scheduling.annotation.Async; 10 | 11 | 12 | public interface LogService extends IService { 13 | 14 | IPage findLogs(QueryRequest request, SysLog sysLog); 15 | 16 | void deleteLogs(String[] logIds); 17 | 18 | @Async 19 | void saveLog(ProceedingJoinPoint point, SysLog log) throws JsonProcessingException; 20 | } 21 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/service/LoginLogService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.service; 2 | 3 | import cc.mrbird.febs.system.domain.LoginLog; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | public interface LoginLogService extends IService { 7 | 8 | void saveLoginLog (LoginLog loginLog); 9 | } 10 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/service/MenuService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.service; 2 | 3 | import cc.mrbird.febs.system.domain.Menu; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | public interface MenuService extends IService { 10 | 11 | List findUserPermissions(String username); 12 | 13 | List findUserMenus(String username); 14 | 15 | Map findMenus(Menu menu); 16 | 17 | List findMenuList(Menu menu); 18 | 19 | void createMenu(Menu menu); 20 | 21 | void updateMenu(Menu menu) throws Exception; 22 | 23 | /** 24 | * 递归删除菜单/按钮 25 | * 26 | * @param menuIds menuIds 27 | */ 28 | void deleteMeuns(String[] menuIds) throws Exception; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/service/RoleMenuServie.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.service; 2 | 3 | import cc.mrbird.febs.system.domain.RoleMenu; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | import java.util.List; 7 | 8 | public interface RoleMenuServie extends IService { 9 | 10 | void deleteRoleMenusByRoleId(String[] roleIds); 11 | 12 | void deleteRoleMenusByMenuId(String[] menuIds); 13 | 14 | List getRoleMenusByRoleId(String roleId); 15 | } 16 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/service/RoleService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.service; 2 | 3 | import cc.mrbird.febs.common.domain.QueryRequest; 4 | import cc.mrbird.febs.system.domain.Role; 5 | import com.baomidou.mybatisplus.core.metadata.IPage; 6 | import com.baomidou.mybatisplus.extension.service.IService; 7 | 8 | import java.util.List; 9 | 10 | public interface RoleService extends IService { 11 | 12 | IPage findRoles(Role role, QueryRequest request); 13 | 14 | List findUserRole(String userName); 15 | 16 | Role findByName(String roleName); 17 | 18 | void createRole(Role role); 19 | 20 | void deleteRoles(String[] roleIds) throws Exception; 21 | 22 | void updateRole(Role role) throws Exception; 23 | } 24 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/service/TestService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.service; 2 | 3 | import cc.mrbird.febs.system.domain.Test; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | import java.util.List; 7 | 8 | public interface TestService extends IService { 9 | 10 | List findTests(); 11 | 12 | /** 13 | * 批量插入 14 | * @param list List 15 | */ 16 | void batchInsert(List list); 17 | } 18 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/service/UserConfigService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.service; 2 | 3 | import cc.mrbird.febs.system.domain.UserConfig; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | public interface UserConfigService extends IService { 7 | 8 | /** 9 | * 通过用户 ID 获取前端系统个性化配置 10 | * 11 | * @param userId 用户 ID 12 | * @return 前端系统个性化配置 13 | */ 14 | UserConfig findByUserId(String userId); 15 | 16 | /** 17 | * 生成用户默认个性化配置 18 | * 19 | * @param userId 用户 ID 20 | */ 21 | void initDefaultUserConfig(String userId); 22 | 23 | /** 24 | * 通过用户 ID 删除个性化配置 25 | * 26 | * @param userIds 用户 ID 数组 27 | */ 28 | void deleteByUserId(String... userIds); 29 | 30 | /** 31 | * 更新用户个性化配置 32 | * 33 | * @param userConfig 用户个性化配置 34 | */ 35 | void update(UserConfig userConfig) throws Exception; 36 | } 37 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/service/UserRoleService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.service; 2 | 3 | 4 | import cc.mrbird.febs.system.domain.UserRole; 5 | import com.baomidou.mybatisplus.extension.service.IService; 6 | 7 | import java.util.List; 8 | 9 | public interface UserRoleService extends IService { 10 | 11 | void deleteUserRolesByRoleId(String[] roleIds); 12 | 13 | void deleteUserRolesByUserId(String[] userIds); 14 | 15 | List findUserIdsByRoleId(String[] roleIds); 16 | } 17 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/service/impl/LoginLogServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.service.impl; 2 | 3 | import cc.mrbird.febs.common.utils.AddressUtil; 4 | import cc.mrbird.febs.common.utils.HttpContextUtil; 5 | import cc.mrbird.febs.common.utils.IPUtil; 6 | import cc.mrbird.febs.system.dao.LoginLogMapper; 7 | import cc.mrbird.febs.system.domain.LoginLog; 8 | import cc.mrbird.febs.system.service.LoginLogService; 9 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 10 | import org.springframework.stereotype.Service; 11 | import org.springframework.transaction.annotation.Propagation; 12 | import org.springframework.transaction.annotation.Transactional; 13 | 14 | import javax.servlet.http.HttpServletRequest; 15 | import java.util.Date; 16 | 17 | @Service("loginLogService") 18 | @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) 19 | public class LoginLogServiceImpl extends ServiceImpl implements LoginLogService { 20 | 21 | @Override 22 | @Transactional 23 | public void saveLoginLog(LoginLog loginLog) { 24 | loginLog.setLoginTime(new Date()); 25 | HttpServletRequest request = HttpContextUtil.getHttpServletRequest(); 26 | String ip = IPUtil.getIpAddr(request); 27 | loginLog.setIp(ip); 28 | loginLog.setLocation(AddressUtil.getCityInfo(ip)); 29 | this.save(loginLog); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/service/impl/RoleMenuServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.service.impl; 2 | 3 | import cc.mrbird.febs.system.dao.RoleMenuMapper; 4 | import cc.mrbird.febs.system.domain.RoleMenu; 5 | import cc.mrbird.febs.system.service.RoleMenuServie; 6 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 7 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 8 | import org.springframework.stereotype.Service; 9 | import org.springframework.transaction.annotation.Propagation; 10 | import org.springframework.transaction.annotation.Transactional; 11 | 12 | import java.util.Arrays; 13 | import java.util.List; 14 | 15 | @Service("roleMenuService") 16 | @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) 17 | public class RoleMenuServiceImpl extends ServiceImpl implements RoleMenuServie { 18 | 19 | @Override 20 | @Transactional 21 | public void deleteRoleMenusByRoleId(String[] roleIds) { 22 | List list = Arrays.asList(roleIds); 23 | baseMapper.delete(new LambdaQueryWrapper().in(RoleMenu::getRoleId, list)); 24 | } 25 | 26 | @Override 27 | @Transactional 28 | public void deleteRoleMenusByMenuId(String[] menuIds) { 29 | List list = Arrays.asList(menuIds); 30 | baseMapper.delete(new LambdaQueryWrapper().in(RoleMenu::getMenuId, list)); 31 | } 32 | 33 | @Override 34 | public List getRoleMenusByRoleId(String roleId) { 35 | return baseMapper.selectList(new LambdaQueryWrapper().eq(RoleMenu::getRoleId, roleId)); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/system/service/impl/UserRoleServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.service.impl; 2 | 3 | import cc.mrbird.febs.system.dao.UserRoleMapper; 4 | import cc.mrbird.febs.system.domain.UserRole; 5 | import cc.mrbird.febs.system.service.UserRoleService; 6 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 7 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 8 | import org.springframework.stereotype.Service; 9 | import org.springframework.transaction.annotation.Propagation; 10 | import org.springframework.transaction.annotation.Transactional; 11 | 12 | import java.util.Arrays; 13 | import java.util.List; 14 | import java.util.stream.Collectors; 15 | 16 | @Service("userRoleService") 17 | @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) 18 | public class UserRoleServiceImpl extends ServiceImpl implements UserRoleService { 19 | 20 | @Override 21 | @Transactional 22 | public void deleteUserRolesByRoleId(String[] roleIds) { 23 | Arrays.stream(roleIds).forEach(id -> baseMapper.deleteByRoleId(Long.valueOf(id))); 24 | } 25 | 26 | @Override 27 | @Transactional 28 | public void deleteUserRolesByUserId(String[] userIds) { 29 | Arrays.stream(userIds).forEach(id -> baseMapper.deleteByUserId(Long.valueOf(id))); 30 | } 31 | 32 | @Override 33 | public List findUserIdsByRoleId(String[] roleIds) { 34 | 35 | List list = baseMapper.selectList(new LambdaQueryWrapper().in(UserRole::getRoleId, String.join(",", roleIds))); 36 | return list.stream().map(userRole -> String.valueOf(userRole.getUserId())).collect(Collectors.toList()); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/web/controller/ArticleController.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.web.controller; 2 | 3 | import cc.mrbird.febs.common.domain.FebsConstant; 4 | import cc.mrbird.febs.common.domain.FebsResponse; 5 | import cc.mrbird.febs.common.exception.FebsException; 6 | import cc.mrbird.febs.common.utils.HttpUtil; 7 | import lombok.extern.slf4j.Slf4j; 8 | import org.apache.commons.lang3.StringUtils; 9 | import org.apache.shiro.authz.annotation.RequiresPermissions; 10 | import org.springframework.web.bind.annotation.GetMapping; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RestController; 13 | 14 | @Slf4j 15 | @RestController 16 | @RequestMapping("article") 17 | public class ArticleController { 18 | 19 | @GetMapping 20 | @RequiresPermissions("article:view") 21 | public FebsResponse queryArticle(String date) throws FebsException { 22 | String param; 23 | String data; 24 | try { 25 | if (StringUtils.isNotBlank(date)) { 26 | param = "dev=1&date=" + date; 27 | data = HttpUtil.sendSSLPost(FebsConstant.MRYW_DAY_URL, param); 28 | } else { 29 | param = "dev=1"; 30 | data = HttpUtil.sendSSLPost(FebsConstant.MRYW_TODAY_URL, param); 31 | } 32 | return new FebsResponse().data(data); 33 | } catch (Exception e) { 34 | String message = "获取文章失败"; 35 | log.error(message, e); 36 | throw new FebsException(message); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/web/controller/WeatherController.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.web.controller; 2 | 3 | import cc.mrbird.febs.common.domain.FebsConstant; 4 | import cc.mrbird.febs.common.domain.FebsResponse; 5 | import cc.mrbird.febs.common.exception.FebsException; 6 | import cc.mrbird.febs.common.utils.HttpUtil; 7 | import lombok.extern.slf4j.Slf4j; 8 | import org.apache.shiro.authz.annotation.RequiresPermissions; 9 | import org.springframework.validation.annotation.Validated; 10 | import org.springframework.web.bind.annotation.GetMapping; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RestController; 13 | 14 | import javax.validation.constraints.NotBlank; 15 | 16 | @Slf4j 17 | @Validated 18 | @RestController 19 | @RequestMapping("weather") 20 | public class WeatherController { 21 | 22 | @GetMapping 23 | @RequiresPermissions("weather:view") 24 | public FebsResponse queryWeather(@NotBlank(message = "{required}") String areaId) throws FebsException { 25 | try { 26 | String data = HttpUtil.sendPost(FebsConstant.MEIZU_WEATHER_URL, "cityIds=" + areaId); 27 | return new FebsResponse().data(data); 28 | } catch (Exception e) { 29 | String message = "天气查询失败"; 30 | log.error(message, e); 31 | throw new FebsException(message); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /backend/src/main/resources/ValidationMessages.properties: -------------------------------------------------------------------------------- 1 | required=\u4E0D\u80FD\u4E3A\u7A7A 2 | range=\u6709\u6548\u957f\u5ea6{min}\u5230{max}\u4e2a\u5b57\u7b26 3 | email=\u90ae\u7bb1\u683c\u5f0f\u4e0d\u5408\u6cd5 4 | mobile=\u624b\u673a\u53f7\u4e0d\u5408\u6cd5 5 | noMoreThan=\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc7{max}\u4e2a\u5b57\u7b26 6 | invalid=\u503c\u4e0d\u5408\u6cd5 -------------------------------------------------------------------------------- /backend/src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | 2 | ,--. ,--. 3 | ,---,. ,---, ,--.'| ,--/ /| ,---,. 4 | ,' .' | ' .' \ ,--,: : |,---,': / ' ,' .' | 5 | ,---.' | / ; '. ,`--.'`| ' :: : '/ / ,---.' | 6 | | | .': : \ | : : | || ' , | | .' 7 | : : : : | /\ \ : | \ | :' | / : : |-, 8 | : | |-,| : ' ;. : | : ' '; || ; ; : | ;/| 9 | | : ;/|| | ;/ \ \' ' ;. ;: ' \ | : .' 10 | | | .'' : | \ \ ,'| | | \ || | ' | | |-, 11 | ' : ' | | ' '--' ' : | ; .'' : |. \' : ;/| 12 | | | | | : : | | '`--' | | '_\.'| | \ 13 | | : \ | | ,' ' : | ' : | | : .' 14 | | | ,' `--'' ; |.' ; |,' | | ,' 15 | `----' '---' '---' `----' 16 | -------------------------------------------------------------------------------- /backend/src/main/resources/generator/templates/controller.java.ftl: -------------------------------------------------------------------------------- 1 | package ${package.Controller}; 2 | 3 | 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | <#if restControllerStyle> 7 | import org.springframework.web.bind.annotation.RestController; 8 | <#else> 9 | import org.springframework.stereotype.Controller; 10 | 11 | <#if superControllerClassPackage??> 12 | import ${superControllerClassPackage}; 13 | 14 | 15 | /** 16 | * @author ${author} 17 | */ 18 | <#if restControllerStyle> 19 | @RestController 20 | <#else> 21 | @Controller 22 | 23 | @RequestMapping("<#if package.ModuleName??>/${package.ModuleName}/<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.entityPath}") 24 | <#if kotlin> 25 | class ${table.controllerName}<#if superControllerClass??> : ${superControllerClass}() 26 | <#else> 27 | <#if superControllerClass??> 28 | public class ${table.controllerName} extends ${superControllerClass} { 29 | <#else> 30 | public class ${table.controllerName} { 31 | 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /backend/src/main/resources/generator/templates/mapper.java.ftl: -------------------------------------------------------------------------------- 1 | package ${package.Mapper}; 2 | 3 | import ${package.Entity}.${entity}; 4 | import ${superMapperClassPackage}; 5 | 6 | /** 7 | * @author ${author} 8 | */ 9 | <#if kotlin> 10 | interface ${table.mapperName} : ${superMapperClass}<${entity}> 11 | <#else> 12 | public interface ${table.mapperName} extends ${superMapperClass}<${entity}> { 13 | 14 | } 15 | 16 | -------------------------------------------------------------------------------- /backend/src/main/resources/generator/templates/mapper.xml.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <#if enableCache> 6 | 7 | 8 | 9 | 10 | <#if baseResultMap> 11 | 12 | 13 | <#list table.fields as field> 14 | <#if field.keyFlag><#--生成主键排在第一位--> 15 | 16 | 17 | 18 | <#list table.commonFields as field><#--生成公共字段 --> 19 | 20 | 21 | <#list table.fields as field> 22 | <#if !field.keyFlag><#--生成普通字段 --> 23 | 24 | 25 | 26 | 27 | 28 | 29 | <#if baseColumnList> 30 | 31 | 32 | <#list table.commonFields as field> 33 | ${field.name}, 34 | 35 | ${table.fieldNames} 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /backend/src/main/resources/generator/templates/service.java.ftl: -------------------------------------------------------------------------------- 1 | package ${package.Service}; 2 | 3 | import ${package.Entity}.${entity}; 4 | import ${superServiceClassPackage}; 5 | 6 | /** 7 | * @author ${author} 8 | */ 9 | <#if kotlin> 10 | interface ${table.serviceName} : ${superServiceClass}<${entity}> 11 | <#else> 12 | public interface ${table.serviceName} extends ${superServiceClass}<${entity}> { 13 | 14 | } 15 | 16 | -------------------------------------------------------------------------------- /backend/src/main/resources/generator/templates/serviceImpl.java.ftl: -------------------------------------------------------------------------------- 1 | package ${package.ServiceImpl}; 2 | 3 | import ${package.Entity}.${entity}; 4 | import ${package.Mapper}.${table.mapperName}; 5 | import ${package.Service}.${table.serviceName}; 6 | import ${superServiceImplClassPackage}; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | * @author ${author} 11 | */ 12 | @Service 13 | <#if kotlin> 14 | open class ${table.serviceImplName} : ${superServiceImplClass}<${table.mapperName}, ${entity}>(), ${table.serviceName} { 15 | 16 | } 17 | <#else> 18 | public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}> implements ${table.serviceName} { 19 | 20 | } 21 | 22 | -------------------------------------------------------------------------------- /backend/src/main/resources/ip2region/ip2region.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/backend/src/main/resources/ip2region/ip2region.db -------------------------------------------------------------------------------- /backend/src/main/resources/mapper/job/JobMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 30 | -------------------------------------------------------------------------------- /backend/src/main/resources/mapper/system/LoginLogMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 11 | 12 | 15 | 16 | 35 | -------------------------------------------------------------------------------- /backend/src/main/resources/mapper/system/RoleMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 22 | 23 | -------------------------------------------------------------------------------- /backend/src/main/resources/mapper/system/UserRoleMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | DELETE FROM t_user_role WHERE user_id = #{userId} 14 | 15 | 16 | 17 | 18 | DELETE FROM t_user_role WHERE role_id = #{roleId} 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /backend/src/main/resources/spy.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/backend/src/main/resources/spy.properties -------------------------------------------------------------------------------- /db/123.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/db/123.jpg -------------------------------------------------------------------------------- /db/132.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/db/132.jpg -------------------------------------------------------------------------------- /db/147.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/db/147.jpg -------------------------------------------------------------------------------- /db/SA1647827873595.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/db/SA1647827873595.jpg -------------------------------------------------------------------------------- /db/SA1651295446607.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/db/SA1651295446607.jpg -------------------------------------------------------------------------------- /db/SA1651296486541.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/db/SA1651296486541.JPG -------------------------------------------------------------------------------- /db/SA1679115626205.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/db/SA1679115626205.jpg -------------------------------------------------------------------------------- /db/SA1679115627867.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/db/SA1679115627867.jpg -------------------------------------------------------------------------------- /db/SA1679123707041.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/db/SA1679123707041.jpg -------------------------------------------------------------------------------- /db/SA1679123854527.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/db/SA1679123854527.jpg -------------------------------------------------------------------------------- /db/SA1679123867346.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/db/SA1679123867346.jpg -------------------------------------------------------------------------------- /db/SA1679123872402.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/db/SA1679123872402.jpg -------------------------------------------------------------------------------- /db/SA1679123878280.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/db/SA1679123878280.jpg -------------------------------------------------------------------------------- /db/SA1679123894233.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/db/SA1679123894233.jpg -------------------------------------------------------------------------------- /db/SA1679140132052.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/db/SA1679140132052.jpg -------------------------------------------------------------------------------- /db/SA1679140173849.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/db/SA1679140173849.jpg -------------------------------------------------------------------------------- /db/SA1679145075509.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/db/SA1679145075509.jpg -------------------------------------------------------------------------------- /frontend/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"], 12 | "env": { 13 | "test": { 14 | "presets": ["env", "stage-2"], 15 | "plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /frontend/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /frontend/.eslintignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /config/ 3 | /dist/ 4 | /*.js 5 | /test/unit/coverage/ 6 | -------------------------------------------------------------------------------- /frontend/.eslintrc.js: -------------------------------------------------------------------------------- 1 | // https://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | parserOptions: { 6 | parser: 'babel-eslint' 7 | }, 8 | env: { 9 | browser: true, 10 | }, 11 | extends: [ 12 | // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention 13 | // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. 14 | 'plugin:vue/essential', 15 | // https://github.com/standard/standard/blob/master/docs/RULES-en.md 16 | 'standard' 17 | ], 18 | // required to lint *.vue files 19 | plugins: [ 20 | 'vue' 21 | ], 22 | // add your custom rules here 23 | rules: { 24 | // allow async-await 25 | 'generator-star-spacing': 'off', 26 | // allow debugger during development 27 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /frontend/.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=vue 2 | 3 | *.css linguist-language=vue 4 | 5 | *.html linguist-language=vue 6 | -------------------------------------------------------------------------------- /frontend/.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /frontend/.idea/frontend.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /frontend/.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /frontend/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /frontend/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /frontend/build/build.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | require('./check-versions')() 3 | 4 | process.env.NODE_ENV = 'production' 5 | 6 | const ora = require('ora') 7 | const rm = require('rimraf') 8 | const path = require('path') 9 | const chalk = require('chalk') 10 | const webpack = require('webpack') 11 | const config = require('../config') 12 | const webpackConfig = require('./webpack.prod.conf') 13 | 14 | const spinner = ora('building for production...') 15 | spinner.start() 16 | 17 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { 18 | if (err) throw err 19 | webpack(webpackConfig, (err, stats) => { 20 | spinner.stop() 21 | if (err) throw err 22 | process.stdout.write(stats.toString({ 23 | colors: true, 24 | modules: false, 25 | children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build. 26 | chunks: false, 27 | chunkModules: false 28 | }) + '\n\n') 29 | 30 | if (stats.hasErrors()) { 31 | console.log(chalk.red(' Build failed with errors.\n')) 32 | process.exit(1) 33 | } 34 | 35 | console.log(chalk.cyan(' Build complete.\n')) 36 | console.log(chalk.yellow( 37 | ' Tip: built files are meant to be served over an HTTP server.\n' + 38 | ' Opening index.html over file:// won\'t work.\n' 39 | )) 40 | }) 41 | }) 42 | -------------------------------------------------------------------------------- /frontend/build/check-versions.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const chalk = require('chalk') 3 | const semver = require('semver') 4 | const packageConfig = require('../package.json') 5 | const shell = require('shelljs') 6 | 7 | function exec (cmd) { 8 | return require('child_process').execSync(cmd).toString().trim() 9 | } 10 | 11 | const versionRequirements = [ 12 | { 13 | name: 'node', 14 | currentVersion: semver.clean(process.version), 15 | versionRequirement: packageConfig.engines.node 16 | } 17 | ] 18 | 19 | if (shell.which('npm')) { 20 | versionRequirements.push({ 21 | name: 'npm', 22 | currentVersion: exec('npm --version'), 23 | versionRequirement: packageConfig.engines.npm 24 | }) 25 | } 26 | 27 | module.exports = function () { 28 | const warnings = [] 29 | 30 | for (let i = 0; i < versionRequirements.length; i++) { 31 | const mod = versionRequirements[i] 32 | 33 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { 34 | warnings.push(mod.name + ': ' + 35 | chalk.red(mod.currentVersion) + ' should be ' + 36 | chalk.green(mod.versionRequirement) 37 | ) 38 | } 39 | } 40 | 41 | if (warnings.length) { 42 | console.log('') 43 | console.log(chalk.yellow('To use this template, you must update following to modules:')) 44 | console.log() 45 | 46 | for (let i = 0; i < warnings.length; i++) { 47 | const warning = warnings[i] 48 | console.log(' ' + warning) 49 | } 50 | 51 | console.log() 52 | process.exit(1) 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /frontend/build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/build/logo.png -------------------------------------------------------------------------------- /frontend/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /frontend/config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /frontend/config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /frontend/config/test.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const devEnv = require('./dev.env') 4 | 5 | module.exports = merge(devEnv, { 6 | NODE_ENV: '"testing"' 7 | }) 8 | -------------------------------------------------------------------------------- /frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 尚卿汉服网 8 | 9 | 10 | 11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /frontend/src/components/datetime/RangeDate.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 26 | -------------------------------------------------------------------------------- /frontend/src/components/exception/ExceptionPage.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 35 | 36 | 72 | -------------------------------------------------------------------------------- /frontend/src/components/exception/typeConfig.js: -------------------------------------------------------------------------------- 1 | const config = { 2 | 403: { 3 | img: 'https://gw.alipayobjects.com/zos/rmsportal/wZcnGqRDyhPOEYFcZDnb.svg', 4 | title: '403', 5 | desc: '抱歉,你无权访问该页面' 6 | }, 7 | 404: { 8 | img: 'https://gw.alipayobjects.com/zos/rmsportal/KpnpchXsobRgLElEozzI.svg', 9 | title: '404', 10 | desc: '抱歉,你访问的页面不存在或仍在开发中' 11 | }, 12 | 500: { 13 | img: 'https://gw.alipayobjects.com/zos/rmsportal/RVRUAYdCGeYNBWoKiIwB.svg', 14 | title: '500', 15 | desc: '抱歉,服务器出错了' 16 | } 17 | } 18 | 19 | export default config 20 | -------------------------------------------------------------------------------- /frontend/src/components/menu/Contextmenu.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 63 | 64 | 73 | -------------------------------------------------------------------------------- /frontend/src/components/setting/SettingItem.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 14 | 15 | 26 | -------------------------------------------------------------------------------- /frontend/src/components/setting/StyleItem.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 16 | 17 | 37 | -------------------------------------------------------------------------------- /frontend/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Febs from './FEBS' 3 | import router from './router' 4 | import Antd from 'ant-design-vue' 5 | import store from './store' 6 | import request from 'utils/request' 7 | import db from 'utils/localstorage' 8 | import VueApexCharts from 'vue-apexcharts' 9 | 10 | import 'ant-design-vue/dist/antd.css' 11 | 12 | import 'utils/install' 13 | 14 | Vue.config.productionTip = false 15 | Vue.use(Antd) 16 | Vue.use(db) 17 | Vue.use(VueApexCharts) 18 | 19 | Vue.component('apexchart', VueApexCharts) 20 | 21 | Vue.use({ 22 | install (Vue) { 23 | Vue.prototype.$db = db 24 | } 25 | }) 26 | 27 | Vue.prototype.$post = request.post 28 | Vue.prototype.$get = request.get 29 | Vue.prototype.$put = request.put 30 | Vue.prototype.$delete = request.delete 31 | Vue.prototype.$export = request.export 32 | Vue.prototype.$download = request.download 33 | Vue.prototype.$upload = request.upload 34 | 35 | /* eslint-disable no-new */ 36 | new Vue({ 37 | router, 38 | store, 39 | render: h => h(Febs) 40 | }).$mount('#febs') 41 | -------------------------------------------------------------------------------- /frontend/src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | import account from './modules/account' 4 | import setting from './modules/setting' 5 | 6 | Vue.use(Vuex) 7 | 8 | export default new Vuex.Store({ 9 | modules: { 10 | account, 11 | setting 12 | } 13 | }) 14 | -------------------------------------------------------------------------------- /frontend/src/store/modules/account.js: -------------------------------------------------------------------------------- 1 | import db from 'utils/localstorage' 2 | 3 | export default { 4 | namespaced: true, 5 | state: { 6 | token: db.get('USER_TOKEN'), 7 | expireTime: db.get('EXPIRE_TIME'), 8 | user: db.get('USER'), 9 | permissions: db.get('PERMISSIONS'), 10 | roles: db.get('ROLES') 11 | }, 12 | mutations: { 13 | setToken (state, val) { 14 | db.save('USER_TOKEN', val) 15 | state.token = val 16 | }, 17 | setExpireTime (state, val) { 18 | db.save('EXPIRE_TIME', val) 19 | state.expireTime = val 20 | }, 21 | setUser (state, val) { 22 | db.save('USER', val) 23 | state.user = val 24 | }, 25 | setPermissions (state, val) { 26 | db.save('PERMISSIONS', val) 27 | state.permissions = val 28 | }, 29 | setRoles (state, val) { 30 | db.save('ROLES', val) 31 | state.roles = val 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /frontend/src/store/modules/setting.js: -------------------------------------------------------------------------------- 1 | import db from 'utils/localstorage' 2 | 3 | export default { 4 | namespaced: true, 5 | state: { 6 | sidebar: { 7 | opened: true 8 | }, 9 | settingBar: { 10 | opened: false 11 | }, 12 | isMobile: false, 13 | theme: db.get('THEME', 'light'), 14 | layout: db.get('LAYOUT', 'side'), 15 | systemName: '尚卿汉服', 16 | copyright: `${new Date().getFullYear()} FanK`, 17 | multipage: getBooleanValue(db.get('MULTIPAGE'), true), 18 | fixSiderbar: getBooleanValue(db.get('FIX_SIDERBAR'), true), 19 | fixHeader: getBooleanValue(db.get('FIX_HEADER'), true), 20 | colorList: [ 21 | 'rgb(245, 34, 45)', 22 | 'rgb(250, 84, 28)', 23 | 'rgb(250, 173, 20)', 24 | 'rgb(66, 185, 131)', 25 | 'rgb(82, 196, 26)', 26 | 'rgb(24, 144, 255)', 27 | 'rgb(47, 84, 235)', 28 | 'rgb(114, 46, 209)' 29 | ], 30 | color: db.get('COLOR', 'rgb(24, 144, 255)') 31 | }, 32 | mutations: { 33 | setDevice (state, isMobile) { 34 | state.isMobile = isMobile 35 | }, 36 | setTheme (state, theme) { 37 | db.save('THEME', theme) 38 | state.theme = theme 39 | }, 40 | setLayout (state, layout) { 41 | db.save('LAYOUT', layout) 42 | state.layout = layout 43 | }, 44 | setMultipage (state, multipage) { 45 | db.save('MULTIPAGE', multipage) 46 | state.multipage = multipage 47 | }, 48 | setSidebar (state, type) { 49 | state.sidebar.opened = type 50 | }, 51 | fixSiderbar (state, flag) { 52 | db.save('FIX_SIDERBAR', flag) 53 | state.fixSiderbar = flag 54 | }, 55 | fixHeader (state, flag) { 56 | db.save('FIX_HEADER', flag) 57 | state.fixHeader = flag 58 | }, 59 | setSettingBar (state, flag) { 60 | state.settingBar.opened = flag 61 | }, 62 | setColor (state, color) { 63 | db.save('COLOR', color) 64 | state.color = color 65 | } 66 | } 67 | } 68 | 69 | function getBooleanValue (value, defaultValue) { 70 | if (Object.is(value, null)) { 71 | return defaultValue 72 | } 73 | if (JSON.stringify(value) !== '{}') { 74 | return value 75 | } else { 76 | return false 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /frontend/src/utils/color.js: -------------------------------------------------------------------------------- 1 | import { message } from 'ant-design-vue/es' 2 | 3 | let lessNodesAppended 4 | 5 | const updateTheme = primaryColor => { 6 | if (!primaryColor) { 7 | return 8 | } 9 | const hideMessage = message.loading('加载主题...', 0) 10 | function buildIt () { 11 | if (!window.less) { 12 | return 13 | } 14 | setTimeout(() => { 15 | window.less 16 | .modifyVars({ 17 | '@primary-color': primaryColor 18 | }) 19 | .then(() => { 20 | hideMessage() 21 | }) 22 | .catch((e) => { 23 | console.log(e) 24 | message.error('Failed to update theme') 25 | hideMessage() 26 | }) 27 | }, 200) 28 | } 29 | if (!lessNodesAppended) { 30 | // insert less.js and color.less 31 | const lessStyleNode = document.createElement('link') 32 | const lessConfigNode = document.createElement('script') 33 | const lessScriptNode = document.createElement('script') 34 | lessStyleNode.setAttribute('rel', 'stylesheet/less') 35 | lessStyleNode.setAttribute('href', '/static/less/Color.less') 36 | lessConfigNode.innerHTML = ` 37 | window.less = { 38 | async: true, 39 | env: 'production', 40 | javascriptEnabled: true 41 | } 42 | ` 43 | lessScriptNode.src = 'https://cdn.bootcss.com/less.js/3.9.0/less.min.js' 44 | lessScriptNode.async = true 45 | lessScriptNode.onload = () => { 46 | buildIt() 47 | lessScriptNode.onload = null 48 | } 49 | document.body.appendChild(lessStyleNode) 50 | document.body.appendChild(lessConfigNode) 51 | document.body.appendChild(lessScriptNode) 52 | lessNodesAppended = true 53 | } else { 54 | buildIt() 55 | } 56 | } 57 | export { updateTheme } 58 | -------------------------------------------------------------------------------- /frontend/src/utils/common.js: -------------------------------------------------------------------------------- 1 | export function triggerWindowResizeEvent () { 2 | let event = document.createEvent('HTMLEvents') 3 | event.initEvent('resize', true, true) 4 | event.eventType = 'message' 5 | window.dispatchEvent(event) 6 | } 7 | -------------------------------------------------------------------------------- /frontend/src/utils/device.js: -------------------------------------------------------------------------------- 1 | import enquireJs from 'enquire.js' 2 | 3 | const enquireScreen = function (call) { 4 | const hanlder = { 5 | match: function () { 6 | call && call(true) 7 | }, 8 | unmatch: function () { 9 | call && call(false) 10 | } 11 | } 12 | enquireJs.register('only screen and (max-width: 767.99px)', hanlder) 13 | } 14 | 15 | export default enquireScreen 16 | -------------------------------------------------------------------------------- /frontend/src/utils/install.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | import {hasPermission, hasNoPermission, hasAnyPermission, hasRole, hasAnyRole} from 'utils/permissionDirect' 4 | 5 | const Plugins = [ 6 | hasPermission, 7 | hasNoPermission, 8 | hasAnyPermission, 9 | hasRole, 10 | hasAnyRole 11 | ] 12 | 13 | Plugins.map((plugin) => { 14 | Vue.use(plugin) 15 | }) 16 | 17 | export default Vue 18 | -------------------------------------------------------------------------------- /frontend/src/utils/localstorage.js: -------------------------------------------------------------------------------- 1 | let db = { 2 | save (key, value) { 3 | localStorage.setItem(key, JSON.stringify(value)) 4 | }, 5 | get (key, defaultValue = {}) { 6 | return JSON.parse(localStorage.getItem(key)) || defaultValue 7 | }, 8 | remove (key) { 9 | localStorage.removeItem(key) 10 | }, 11 | clear () { 12 | localStorage.clear() 13 | } 14 | } 15 | 16 | export default db 17 | -------------------------------------------------------------------------------- /frontend/src/utils/utils.less: -------------------------------------------------------------------------------- 1 | .textOverflow() { 2 | overflow: hidden; 3 | text-overflow: ellipsis; 4 | word-break: break-all; 5 | white-space: nowrap; 6 | } 7 | 8 | .textOverflowMulti(@line: 3, @bg: #fff) { 9 | overflow: hidden; 10 | position: relative; 11 | line-height: 1.5em; 12 | max-height: @line * 1.5em; 13 | text-align: justify; 14 | margin-right: -1em; 15 | padding-right: 1em; 16 | &:before { 17 | background: @bg; 18 | content: '...'; 19 | padding: 0 1px; 20 | position: absolute; 21 | right: 14px; 22 | bottom: 0; 23 | } 24 | &:after { 25 | background: white; 26 | content: ''; 27 | margin-top: 0.2em; 28 | position: absolute; 29 | right: 14px; 30 | width: 1em; 31 | height: 1em; 32 | } 33 | } 34 | 35 | .clearfix() { 36 | zoom: 1; 37 | &:before, 38 | &:after { 39 | content: ' '; 40 | display: table; 41 | } 42 | &:after { 43 | clear: both; 44 | visibility: hidden; 45 | font-size: 0; 46 | height: 0; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /frontend/src/views/admin/user/UserView.vue: -------------------------------------------------------------------------------- 1 | 35 | 36 | 79 | 80 | 83 | -------------------------------------------------------------------------------- /frontend/src/views/common/EmptyPageView.vue: -------------------------------------------------------------------------------- 1 | 4 | 9 | -------------------------------------------------------------------------------- /frontend/src/views/common/GlobalFooter.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 18 | 37 | -------------------------------------------------------------------------------- /frontend/src/views/common/HeadInfo.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 27 | 28 | 57 | -------------------------------------------------------------------------------- /frontend/src/views/common/PageLayout.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 38 | 39 | 62 | -------------------------------------------------------------------------------- /frontend/src/views/common/PageView.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 38 | 39 | 49 | -------------------------------------------------------------------------------- /frontend/src/views/error/403.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 11 | 12 | 15 | -------------------------------------------------------------------------------- /frontend/src/views/error/404.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 11 | 12 | 15 | -------------------------------------------------------------------------------- /frontend/src/views/error/500.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 11 | 12 | 15 | -------------------------------------------------------------------------------- /frontend/src/views/monitor/RedisTerminal.vue: -------------------------------------------------------------------------------- 1 | 6 | 11 | 14 | -------------------------------------------------------------------------------- /frontend/src/views/system/dept/DeptInputTree.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 36 | -------------------------------------------------------------------------------- /frontend/src/views/system/menu/Icon.less: -------------------------------------------------------------------------------- 1 | @active-color: #4a4a48; 2 | ul { 3 | max-height: 700px; 4 | overflow-y: auto; 5 | padding-left: .5rem; 6 | i { 7 | font-size: 1.5rem; 8 | border: 1px solid #f1f1f1; 9 | padding: .2rem; 10 | margin: .3rem; 11 | cursor: pointer; 12 | &.active, &:hover { 13 | border-radius: 2px; 14 | border-color: @active-color; 15 | background-color: @active-color; 16 | color: #fff; 17 | transition: all .3s; 18 | } 19 | } 20 | li { 21 | list-style: none; 22 | float: left; 23 | width: 5%; 24 | text-align: center; 25 | cursor: pointer; 26 | color: #555; 27 | transition: color .3s ease-in-out,background-color .3s ease-in-out; 28 | position: relative; 29 | margin: 3px 0; 30 | border-radius: 4px; 31 | background-color: #fff; 32 | overflow: hidden; 33 | padding: 10px 0 0; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /frontend/src/views/system/role/RoleInfo.vue: -------------------------------------------------------------------------------- 1 | 27 | 69 | -------------------------------------------------------------------------------- /frontend/src/views/system/user/UserInfo.less: -------------------------------------------------------------------------------- 1 | .user-info { 2 | background: #fff; 3 | padding: 0 10px 10px 10px; 4 | } 5 | .user-info-side { 6 | background: #fff; 7 | } 8 | .user-info-side { 9 | max-width: 10rem !important; 10 | min-width: 10rem !important; 11 | width: 10rem !important; 12 | } 13 | .user-content-one{ 14 | margin-right: 1.2rem; 15 | } 16 | p { 17 | margin-bottom: 1rem; 18 | max-width: 15.5rem; 19 | } 20 | i { 21 | margin-right: .8rem; 22 | } 23 | -------------------------------------------------------------------------------- /frontend/src/views/user/focus/Focus.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 61 | 62 | 65 | -------------------------------------------------------------------------------- /frontend/static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/.gitkeep -------------------------------------------------------------------------------- /frontend/static/avatar/17e420c250804efe904a09a33796d5a10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/17e420c250804efe904a09a33796d5a10.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/17e420c250804efe904a09a33796d5a16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/17e420c250804efe904a09a33796d5a16.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/19034103295190235.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/19034103295190235.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/1d22f3e41d284f50b2c8fc32e0788698.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/1d22f3e41d284f50b2c8fc32e0788698.jpeg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165754.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/20180414165754.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165815.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/20180414165815.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165821.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/20180414165821.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165827.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/20180414165827.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165834.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/20180414165834.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165840.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/20180414165840.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165846.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/20180414165846.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165855.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/20180414165855.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165909.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/20180414165909.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165914.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/20180414165914.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165920.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/20180414165920.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165927.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/20180414165927.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165936.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/20180414165936.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165942.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/20180414165942.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165947.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/20180414165947.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165955.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/20180414165955.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414170003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/20180414170003.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/2dd7a2d09fa94bf8b5c52e5318868b4d9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/2dd7a2d09fa94bf8b5c52e5318868b4d9.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/2dd7a2d09fa94bf8b5c52e5318868b4df.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/2dd7a2d09fa94bf8b5c52e5318868b4df.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/496b3ace787342f7954b7045b8b06804.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/496b3ace787342f7954b7045b8b06804.jpeg -------------------------------------------------------------------------------- /frontend/static/avatar/595ba7b05f2e485eb50565a50cb6cc3c.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/595ba7b05f2e485eb50565a50cb6cc3c.jpeg -------------------------------------------------------------------------------- /frontend/static/avatar/5997fedcc7bd4cffbd350b40d1b5b9824.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/5997fedcc7bd4cffbd350b40d1b5b9824.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/5997fedcc7bd4cffbd350b40d1b5b987.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/5997fedcc7bd4cffbd350b40d1b5b987.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/87d8194bc9834e9f8f0228e9e530beb1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/87d8194bc9834e9f8f0228e9e530beb1.jpeg -------------------------------------------------------------------------------- /frontend/static/avatar/8f5b60ef00714a399ee544d331231820.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/8f5b60ef00714a399ee544d331231820.jpeg -------------------------------------------------------------------------------- /frontend/static/avatar/964e40b005724165b8cf772355796c8c.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/964e40b005724165b8cf772355796c8c.jpeg -------------------------------------------------------------------------------- /frontend/static/avatar/BiazfanxmamNRoxxVxka.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/BiazfanxmamNRoxxVxka.png -------------------------------------------------------------------------------- /frontend/static/avatar/WhxKECPNujWoWEFNdnJE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/WhxKECPNujWoWEFNdnJE.png -------------------------------------------------------------------------------- /frontend/static/avatar/a3b10296862e40edb811418d64455d00.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/a3b10296862e40edb811418d64455d00.jpeg -------------------------------------------------------------------------------- /frontend/static/avatar/a43456282d684e0b9319cf332f8ac468.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/a43456282d684e0b9319cf332f8ac468.jpeg -------------------------------------------------------------------------------- /frontend/static/avatar/bba284ac05b041a8b8b0d1927868d5c9x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/bba284ac05b041a8b8b0d1927868d5c9x.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/c7c4ee7be3eb4e73a19887dc713505145.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/c7c4ee7be3eb4e73a19887dc713505145.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/cnrhVkzwxjPwAaCfPbdc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/cnrhVkzwxjPwAaCfPbdc.png -------------------------------------------------------------------------------- /frontend/static/avatar/default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/default.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/ff698bb2d25c4d218b3256b46c706ece.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/ff698bb2d25c4d218b3256b46c706ece.jpeg -------------------------------------------------------------------------------- /frontend/static/avatar/gaOngJwsRYRaVAuXXcmB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/gaOngJwsRYRaVAuXXcmB.png -------------------------------------------------------------------------------- /frontend/static/avatar/jZUIxmJycoymBprLOUbT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/jZUIxmJycoymBprLOUbT.png -------------------------------------------------------------------------------- /frontend/static/avatar/ubnKSIfAJTxIgXOKlciN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/avatar/ubnKSIfAJTxIgXOKlciN.png -------------------------------------------------------------------------------- /frontend/static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/img/favicon.ico -------------------------------------------------------------------------------- /frontend/static/img/logo-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/img/logo-blue.png -------------------------------------------------------------------------------- /frontend/static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/img/logo.png -------------------------------------------------------------------------------- /frontend/static/img/logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/clothes_forum_cos/6cbfacffce56907c8f92f397063e982d6942bc74/frontend/static/img/logo1.png -------------------------------------------------------------------------------- /frontend/static/less/Common.less: -------------------------------------------------------------------------------- 1 | .search{ 2 | margin-bottom: 54px; 3 | } 4 | .fold{ 5 | width: calc(100% - 216px); 6 | display: inline-block 7 | } 8 | .operator{ 9 | margin-bottom: 18px; 10 | } 11 | @media screen and (max-width: 900px) { 12 | .fold { 13 | width: 100%; 14 | } 15 | } 16 | .operator button { 17 | margin-right: 5px; 18 | } 19 | i { 20 | cursor: pointer; 21 | } 22 | --------------------------------------------------------------------------------