├── README.md ├── backend ├── .gitignore ├── pom.xml └── src │ └── main │ ├── java │ └── cc │ │ └── mrbird │ │ └── febs │ │ ├── FebsApplication.java │ │ ├── common │ │ ├── annotation │ │ │ ├── Excel.java │ │ │ ├── IsCron.java │ │ │ ├── Limit.java │ │ │ └── Log.java │ │ ├── aspect │ │ │ ├── LimitAspect.java │ │ │ └── LogAspect.java │ │ ├── authentication │ │ │ ├── JWTFilter.java │ │ │ ├── JWTToken.java │ │ │ ├── JWTUtil.java │ │ │ ├── ShiroConfig.java │ │ │ └── ShiroRealm.java │ │ ├── config │ │ │ ├── AlipayConfig.java │ │ │ ├── AsyncExecutorPoolConfig.java │ │ │ ├── MyWebMvcConfigurerAdapter.java │ │ │ ├── MybatisPlusConfig.java │ │ │ ├── P6spySqlFormatConfig.java │ │ │ ├── RedisConfig.java │ │ │ └── WebSocketConfig.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 │ │ │ ├── Alipay.java │ │ │ ├── CloneUtils.java │ │ │ ├── DateUtil.java │ │ │ ├── EncryptUtil.java │ │ │ ├── FebsUtil.java │ │ │ ├── FileDownloadUtils.java │ │ │ ├── FileNameUtils.java │ │ │ ├── FileUtil.java │ │ │ ├── HttpContextUtil.java │ │ │ ├── HttpUtil.java │ │ │ ├── IPUtil.java │ │ │ ├── LocationUtils.java │ │ │ ├── MD5Util.java │ │ │ ├── MapUtils.java │ │ │ ├── R.java │ │ │ ├── SortUtil.java │ │ │ ├── SpringContextUtil.java │ │ │ └── TreeUtil.java │ │ └── validator │ │ │ └── CronValidator.java │ │ ├── cos │ │ ├── controller │ │ │ ├── AddressInfoController.java │ │ │ ├── BulletinInfoController.java │ │ │ ├── DiscountInfoController.java │ │ │ ├── EvaluateInfoController.java │ │ │ ├── ExchangeInfoController.java │ │ │ ├── FileController.java │ │ │ ├── MaterialInfoController.java │ │ │ ├── OrderInfoController.java │ │ │ ├── PayController.java │ │ │ ├── StaffIncomeController.java │ │ │ ├── StaffInfoController.java │ │ │ ├── UserInfoController.java │ │ │ └── WithdrawInfoController.java │ │ ├── dao │ │ │ ├── AddressInfoMapper.java │ │ │ ├── BulletinInfoMapper.java │ │ │ ├── DiscountInfoMapper.java │ │ │ ├── EvaluateInfoMapper.java │ │ │ ├── ExchangeInfoMapper.java │ │ │ ├── MaterialInfoMapper.java │ │ │ ├── OrderInfoMapper.java │ │ │ ├── StaffIncomeMapper.java │ │ │ ├── StaffInfoMapper.java │ │ │ ├── UserInfoMapper.java │ │ │ └── WithdrawInfoMapper.java │ │ ├── entity │ │ │ ├── AddressInfo.java │ │ │ ├── AlipayBean.java │ │ │ ├── BulletinInfo.java │ │ │ ├── DiscountInfo.java │ │ │ ├── EvaluateInfo.java │ │ │ ├── ExchangeInfo.java │ │ │ ├── MaterialInfo.java │ │ │ ├── OrderInfo.java │ │ │ ├── StaffIncome.java │ │ │ ├── StaffInfo.java │ │ │ ├── UserInfo.java │ │ │ └── WithdrawInfo.java │ │ └── service │ │ │ ├── IAddressInfoService.java │ │ │ ├── IBulletinInfoService.java │ │ │ ├── IDiscountInfoService.java │ │ │ ├── IEvaluateInfoService.java │ │ │ ├── IExchangeInfoService.java │ │ │ ├── IMailService.java │ │ │ ├── IMaterialInfoService.java │ │ │ ├── IOrderInfoService.java │ │ │ ├── IStaffIncomeService.java │ │ │ ├── IStaffInfoService.java │ │ │ ├── IUserInfoService.java │ │ │ ├── IWithdrawInfoService.java │ │ │ ├── PayService.java │ │ │ └── impl │ │ │ ├── AddressInfoServiceImpl.java │ │ │ ├── BulletinInfoServiceImpl.java │ │ │ ├── DiscountInfoServiceImpl.java │ │ │ ├── EvaluateInfoServiceImpl.java │ │ │ ├── ExchangeInfoServiceImpl.java │ │ │ ├── IMailServiceImpl.java │ │ │ ├── MaterialInfoServiceImpl.java │ │ │ ├── OrderInfoServiceImpl.java │ │ │ ├── PayServiceImpl.java │ │ │ ├── StaffIncomeServiceImpl.java │ │ │ ├── StaffInfoServiceImpl.java │ │ │ ├── UserInfoServiceImpl.java │ │ │ └── WithdrawInfoServiceImpl.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 │ └── resources │ ├── ValidationMessages.properties │ ├── application.yml │ ├── banner.txt │ ├── config │ └── alipay.properties │ ├── 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 │ ├── cos │ │ ├── AddressInfoMapper.xml │ │ ├── BulletinInfoMapper.xml │ │ ├── DiscountInfoMapper.xml │ │ ├── EvaluateInfoMapper.xml │ │ ├── ExchangeInfoMapper.xml │ │ ├── MaterialInfoMapper.xml │ │ ├── OrderInfoMapper.xml │ │ ├── StaffIncomeMapper.xml │ │ ├── StaffInfoMapper.xml │ │ ├── UserInfoMapper.xml │ │ └── WithdrawInfoMapper.xml │ └── system │ │ ├── LoginLogMapper.xml │ │ ├── MenuMapper.xml │ │ ├── RoleMapper.xml │ │ ├── UserMapper.xml │ │ └── UserRoleMapper.xml │ ├── spy.properties │ └── templates │ ├── email.html │ └── registerEmail.html └── frontend ├── .babelrc ├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .gitattributes ├── .idea ├── codeStyles │ └── codeStyleConfig.xml ├── frontend.iml ├── git_toolbox_prj.xml ├── modules.xml ├── vcs.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 │ ├── map │ │ ├── baiduMap.js │ │ ├── gisMap.js │ │ └── searchmap │ │ │ ├── drawerMap.vue │ │ │ └── index.vue │ ├── permissionDirect.js │ ├── request.js │ ├── urlKey.js │ └── utils.less └── views │ ├── HomePage.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 │ ├── manage │ ├── address │ │ ├── Address.vue │ │ ├── AddressAdd.vue │ │ ├── AddressEdit.vue │ │ └── AddressView.vue │ ├── bulletin │ │ ├── Bulletin.vue │ │ ├── BulletinAdd.vue │ │ └── BulletinEdit.vue │ ├── component │ │ ├── home │ │ │ └── Home.vue │ │ ├── user │ │ │ ├── Map.vue │ │ │ ├── VehicleView.vue │ │ │ └── Work.vue │ │ └── work │ │ │ └── Work.vue │ ├── discount │ │ ├── Discount.vue │ │ ├── DiscountAdd.vue │ │ ├── DiscountEdit.vue │ │ └── DiscountView.vue │ ├── evaluate │ │ ├── Evaluate.vue │ │ ├── EvaluateView.vue │ │ └── OrderView.vue │ ├── exchange │ │ ├── Exchange.vue │ │ └── ExchangeView.vue │ ├── income │ │ ├── Income.vue │ │ └── OrderView.vue │ ├── map │ │ └── Map.vue │ ├── material │ │ ├── Material.vue │ │ ├── MaterialAdd.vue │ │ └── MaterialEdit.vue │ ├── member │ │ └── Member.vue │ ├── merchant │ │ ├── Merchant.vue │ │ ├── MerchantAdd.vue │ │ ├── MerchantEdit.vue │ │ └── MerchantView.vue │ ├── merchantMember │ │ ├── MerchantMember.vue │ │ └── MerchantMemberView.vue │ ├── order │ │ ├── Order.vue │ │ ├── OrderAdd.vue │ │ ├── OrderAudit.vue │ │ ├── OrderStatus.vue │ │ └── OrderView.vue │ ├── staff │ │ ├── Staff.vue │ │ ├── StaffAdd.vue │ │ └── StaffEdit.vue │ ├── user │ │ └── User.vue │ └── withdraw │ │ ├── Withdraw.vue │ │ ├── WithdrawAdd.vue │ │ ├── WithdrawAudit.vue │ │ ├── WithdrawEdit.vue │ │ └── WithdrawView.vue │ ├── merchant │ ├── dishes │ │ ├── Dishes.vue │ │ ├── DishesAdd.vue │ │ ├── DishesEdit.vue │ │ └── DishesView.vue │ ├── evaluate │ │ ├── Evaluate.vue │ │ ├── EvaluateView.vue │ │ └── OrderView.vue │ ├── member │ │ ├── Member.vue │ │ ├── MemberAdd.vue │ │ └── MemberEdit.vue │ ├── merchantMember │ │ ├── MerchantMember.vue │ │ └── MerchantMemberView.vue │ ├── order │ │ ├── Order.vue │ │ ├── OrderAdd.vue │ │ ├── OrderAudit.vue │ │ ├── OrderStatus.vue │ │ └── OrderView.vue │ ├── personal │ │ └── Personal.vue │ └── staff │ │ ├── Staff.vue │ │ ├── StaffAdd.vue │ │ └── StaffEdit.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 │ ├── statistics │ └── sale │ │ └── Sale.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 │ ├── address │ │ ├── Address.vue │ │ ├── AddressAdd.vue │ │ ├── AddressEdit.vue │ │ └── AddressView.vue │ ├── discount │ │ ├── Discount.vue │ │ ├── DiscountAdd.vue │ │ ├── DiscountEdit.vue │ │ └── DiscountView.vue │ ├── evaluate │ │ ├── Evaluate.vue │ │ ├── EvaluateView.vue │ │ └── OrderView.vue │ ├── exchange │ │ ├── Exchange.vue │ │ └── ExchangeView.vue │ ├── material │ │ ├── Material.vue │ │ ├── MaterialAdd.vue │ │ └── MaterialEdit.vue │ ├── order │ │ ├── Order.vue │ │ ├── OrderAdd.vue │ │ ├── OrderAudit.vue │ │ ├── OrderEvaluate.vue │ │ ├── OrderStatus.vue │ │ └── OrderView.vue │ ├── pay │ │ └── Pay.vue │ └── personal │ │ └── Personal.vue │ └── work │ ├── center │ └── Center.vue │ ├── evaluate │ ├── Evaluate.vue │ ├── EvaluateView.vue │ └── OrderView.vue │ ├── income │ ├── Income.vue │ └── OrderView.vue │ ├── order │ ├── Order.vue │ ├── OrderAdd.vue │ ├── OrderAudit.vue │ ├── OrderStatus.vue │ └── OrderView.vue │ ├── personal │ └── Personal.vue │ └── withdraw │ ├── Withdraw.vue │ ├── WithdrawAdd.vue │ ├── WithdrawEdit.vue │ └── WithdrawView.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 │ ├── house.jpg │ ├── logo-blue.png │ ├── logo.png │ ├── side-bar-dark.svg │ ├── side-bar-left.svg │ ├── side-bar-light.svg │ └── side-bar-top.svg └── less │ ├── Color.less │ └── Common.less └── yarn.lock /backend/.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### Example user template template 3 | ### Example user template 4 | 5 | # IntelliJ project files 6 | .idea 7 | *.iml 8 | out 9 | gen 10 | /target/ 11 | /log/ 12 | /frontend/node_modules/ -------------------------------------------------------------------------------- /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/AlipayConfig.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.config; 2 | 3 | import lombok.Data; 4 | import org.springframework.boot.context.properties.ConfigurationProperties; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.context.annotation.PropertySource; 7 | import org.springframework.stereotype.Component; 8 | 9 | /** 10 | * 配置文件读取 11 | * 12 | * @author 小道仙 13 | * @date 2020年2月18日 14 | */ 15 | @Configuration 16 | @ConfigurationProperties 17 | @PropertySource("classpath:config/alipay.properties") 18 | @Data 19 | @Component 20 | public class AlipayConfig { 21 | 22 | /** 23 | * 应用ID,您的APPID,收款账号既是您的APPID对应支付宝账号 24 | */ 25 | private String appId; 26 | 27 | /** 28 | * 商户私钥,您的PKCS8格式RSA2私钥 29 | */ 30 | private String privateKey; 31 | 32 | /** 33 | * 支付宝公钥, 34 | */ 35 | private String publicKey; 36 | 37 | /** 38 | * 服务器异步通知页面路径需http://格式的完整路径,不能加?id=123这类自定义参数 39 | */ 40 | private String notifyUrl; 41 | 42 | /** 43 | * 页面跳转同步通知页面路径 需http://格式的完整路径,不能加?id=123这类自定义参数 44 | */ 45 | private String returnUrl; 46 | 47 | /** 48 | * 签名方式 49 | */ 50 | private String signType; 51 | 52 | /** 53 | * 字符编码格式 54 | */ 55 | private String charset; 56 | 57 | /** 58 | * 支付宝网关 59 | */ 60 | private String gatewayUrl; 61 | 62 | /** 63 | * 支付宝网关 64 | */ 65 | private String logPath; 66 | } -------------------------------------------------------------------------------- /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/config/WebSocketConfig.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.web.socket.server.standard.ServerEndpointExporter; 6 | 7 | @Configuration 8 | public class WebSocketConfig { 9 | @Bean 10 | public ServerEndpointExporter serverEndpointExporter() { 11 | return new ServerEndpointExporter(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /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 | } 15 | -------------------------------------------------------------------------------- /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/Alipay.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.utils; 2 | 3 | import cc.mrbird.febs.common.config.AlipayConfig; 4 | import cc.mrbird.febs.cos.entity.AlipayBean; 5 | import com.alibaba.fastjson.JSON; 6 | import com.alipay.api.AlipayApiException; 7 | import com.alipay.api.AlipayClient; 8 | import com.alipay.api.DefaultAlipayClient; 9 | import com.alipay.api.request.AlipayTradePagePayRequest; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Component; 12 | 13 | @Component 14 | public class Alipay { 15 | 16 | @Autowired 17 | private AlipayConfig alipayConfig; 18 | 19 | /** 20 | * 支付接口 21 | * @param alipayBean 22 | * @return 23 | * @throws AlipayApiException 24 | */ 25 | public String pay(AlipayBean alipayBean) throws AlipayApiException { 26 | // 1、获得初始化的AlipayClient 27 | String serverUrl = alipayConfig.getGatewayUrl(); 28 | String appId = alipayConfig.getAppId(); 29 | String privateKey = alipayConfig.getPrivateKey(); 30 | String format = "json"; 31 | String charset = alipayConfig.getCharset(); 32 | String alipayPublicKey = alipayConfig.getPublicKey(); 33 | String signType = alipayConfig.getSignType(); 34 | String returnUrl = alipayConfig.getReturnUrl(); 35 | String notifyUrl = alipayConfig.getNotifyUrl(); 36 | AlipayClient alipayClient = new DefaultAlipayClient(serverUrl, appId, privateKey, format, charset, alipayPublicKey, signType); 37 | // 2、设置请求参数 38 | AlipayTradePagePayRequest alipayRequest = new AlipayTradePagePayRequest(); 39 | // 页面跳转同步通知页面路径 40 | alipayRequest.setReturnUrl(returnUrl); 41 | // 服务器异步通知页面路径 42 | alipayRequest.setNotifyUrl(notifyUrl); 43 | // 封装参数 44 | alipayRequest.setBizContent(JSON.toJSONString(alipayBean)); 45 | // 3、请求支付宝进行付款,并获取支付结果 46 | String result = alipayClient.pageExecute(alipayRequest).getBody(); 47 | System.out.println("------------"); 48 | System.out.println(result); 49 | // 返回付款信息 50 | return result; 51 | } 52 | } -------------------------------------------------------------------------------- /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.Calendar; 8 | import java.util.Date; 9 | import java.util.Locale; 10 | 11 | /** 12 | * 时间工具类 13 | */ 14 | public class DateUtil { 15 | 16 | public static final String FULL_TIME_PATTERN = "yyyyMMddHHmmss"; 17 | 18 | public static final String FULL_TIME_SPLIT_PATTERN = "yyyy-MM-dd HH:mm:ss"; 19 | 20 | public static String formatFullTime(LocalDateTime localDateTime) { 21 | return formatFullTime(localDateTime, FULL_TIME_PATTERN); 22 | } 23 | 24 | public static String formatFullTime(LocalDateTime localDateTime, String pattern) { 25 | DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(pattern); 26 | return localDateTime.format(dateTimeFormatter); 27 | } 28 | 29 | private static String getDateFormat(Date date, String dateFormatType) { 30 | SimpleDateFormat simformat = new SimpleDateFormat(dateFormatType); 31 | return simformat.format(date); 32 | } 33 | 34 | public static String formatCSTTime(String date, String format) throws ParseException { 35 | SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US); 36 | Date d = sdf.parse(date); 37 | return DateUtil.getDateFormat(d, format); 38 | } 39 | 40 | /** 41 | * 获取时间戳戳是星期几 42 | * 43 | * @param date 44 | * @return 当前日期是星期几 45 | */ 46 | public static String getWeekOfDate(Date date) { 47 | String[] weekDays = {"周日", "周一", "周二", "周三", "周四", "周五", "周六"}; 48 | Calendar cal = Calendar.getInstance(); 49 | cal.setTime(date); 50 | int w = cal.get(Calendar.DAY_OF_WEEK) - 1; 51 | if (w < 0) { 52 | w = 0; 53 | } 54 | return weekDays[w]; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /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/LocationUtils.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.utils; 2 | 3 | public class LocationUtils { 4 | 5 | private static double EARTH_RADIUS = 6378.137; 6 | 7 | private static double rad(double d) { 8 | return d * Math.PI / 180.0; 9 | } 10 | 11 | /** 12 | * 通过经纬度获取距离(单位:米) 13 | * 14 | * @param lng1 原经度 15 | * @param lat1 原纬度 16 | * @param lat2 目的纬度 17 | * @param lng2 目的经度 18 | * @return 19 | */ 20 | public static double getDistance(double lng1, double lat1, double lng2, 21 | double lat2) { 22 | double radLat1 = rad(lat1); 23 | double radLat2 = rad(lat2); 24 | double a = radLat1 - radLat2; 25 | double b = rad(lng1) - rad(lng2); 26 | double s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) 27 | + Math.cos(radLat1) * Math.cos(radLat2) 28 | * Math.pow(Math.sin(b / 2), 2))); 29 | s = s * EARTH_RADIUS; 30 | s = Math.round(s * 10000d) / 10000d; 31 | s = s * 1000; 32 | return s; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /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/MapUtils.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.common.utils; 2 | 3 | public class MapUtils { 4 | 5 | private static double EARTH_RADIUS = 6371.393; 6 | private static double rad(double d) 7 | { 8 | return d * Math.PI / 180.0; 9 | } 10 | 11 | /** 12 | * 计算两个经纬度之间的距离 13 | * @param lat1 14 | * @param lng1 15 | * @param lat2 16 | * @param lng2 17 | * @return 18 | */ 19 | public static double GetDistance(double lat1, double lng1, double lat2, double lng2) 20 | { 21 | double radLat1 = rad(lat1); 22 | double radLat2 = rad(lat2); 23 | double a = radLat1 - radLat2; 24 | double b = rad(lng1) - rad(lng2); 25 | double s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a/2),2) + 26 | Math.cos(radLat1)*Math.cos(radLat2)*Math.pow(Math.sin(b/2),2))); 27 | s = s * EARTH_RADIUS; 28 | return s; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /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/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 | * 19 | * @param file 上传的文件 20 | * @return 文件名称 21 | */ 22 | @ResponseBody 23 | @RequestMapping("/fileUpload") 24 | public String upload(@RequestParam("avatar") MultipartFile file) { 25 | // 1定义要上传文件 的存放路径 26 | String localPath = "G:/Project/同城物流配送网站/db"; 27 | // 2获得文件名字 28 | String fileName = file.getOriginalFilename(); 29 | // 2上传失败提示 30 | String warning = ""; 31 | String newFileName = FileUtil.upload(file, localPath, fileName); 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/dao/AddressInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.dao; 2 | 3 | import cc.mrbird.febs.cos.entity.AddressInfo; 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 AddressInfoMapper extends BaseMapper { 15 | 16 | /** 17 | * 分页获取收货地址信息 18 | * 19 | * @param page 分页对象 20 | * @param addressInfo 收货地址信息 21 | * @return 结果 22 | */ 23 | IPage> selectAddressPage(Page page, @Param("addressInfo") AddressInfo addressInfo); 24 | } 25 | -------------------------------------------------------------------------------- /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 | 11 | /** 12 | * @author FanK 13 | */ 14 | public interface BulletinInfoMapper extends BaseMapper { 15 | 16 | /** 17 | * 分页获取公告信息 18 | * @param page 分页对象 19 | * @param bulletinInfo 公告信息 20 | * @return 结果 21 | */ 22 | IPage> getBulletinByPage(Page page, @Param("bulletinInfo") BulletinInfo bulletinInfo); 23 | } 24 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/dao/DiscountInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.dao; 2 | 3 | import cc.mrbird.febs.cos.entity.DiscountInfo; 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 DiscountInfoMapper extends BaseMapper { 15 | 16 | /** 17 | * 分页获取优惠券信息 18 | * 19 | * @param page 分页对象 20 | * @param discountInfo 优惠券信息 21 | * @return 结果 22 | */ 23 | IPage> selectDiscountPage(Page page, @Param("discountInfo") DiscountInfo discountInfo); 24 | } 25 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/dao/EvaluateInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.dao; 2 | 3 | import cc.mrbird.febs.cos.entity.EvaluateInfo; 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 EvaluateInfoMapper extends BaseMapper { 15 | 16 | /** 17 | * 分页获取订单评价信息 18 | * 19 | * @param page 分页对象 20 | * @param evaluateInfo 订单评价信息 21 | * @return 结果 22 | */ 23 | IPage> selectEvaluatePage(Page page, @Param("evaluateInfo") EvaluateInfo evaluateInfo); 24 | } 25 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/dao/ExchangeInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.dao; 2 | 3 | import cc.mrbird.febs.cos.entity.ExchangeInfo; 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 ExchangeInfoMapper extends BaseMapper { 15 | 16 | /** 17 | * 分页获取积分兑换信息 18 | * 19 | * @param page 分页对象 20 | * @param exchangeInfo 积分兑换信息 21 | * @return 结果 22 | */ 23 | IPage> selectExChangePage(Page page, @Param("exchangeInfo") ExchangeInfo exchangeInfo); 24 | } 25 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/dao/MaterialInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.dao; 2 | 3 | import cc.mrbird.febs.cos.entity.MaterialInfo; 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 MaterialInfoMapper extends BaseMapper { 15 | 16 | /** 17 | * 分页获取物品积分信息 18 | * 19 | * @param page 分页对象 20 | * @param materialInfo 物品积分信息 21 | * @return 结果 22 | */ 23 | IPage> selectMaterialPage(Page page, @Param("materialInfo") MaterialInfo materialInfo); 24 | } 25 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/dao/OrderInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.dao; 2 | 3 | import cc.mrbird.febs.cos.entity.OrderInfo; 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 OrderInfoMapper extends BaseMapper { 16 | 17 | /** 18 | * 分页获取订单信息 19 | * 20 | * @param page 分页对象 21 | * @param orderInfo 订单信息 22 | * @return 结果 23 | */ 24 | IPage> selectOrderPage(Page page, @Param("orderInfo") OrderInfo orderInfo); 25 | 26 | /** 27 | * 本月订单信息 28 | * 29 | * @param staffId 员工ID 30 | * @return 结果 31 | */ 32 | List selectOrderByMonth(@Param("staffId") Integer staffId); 33 | 34 | /** 35 | * 本年订单信息 36 | * 37 | * @param staffId 员工ID 38 | * @return 结果 39 | */ 40 | List selectOrderByYear(@Param("staffId") Integer staffId); 41 | 42 | /** 43 | * 十天内订单数量统计 44 | * 45 | * @param staffId 员工ID 46 | * @return 结果 47 | */ 48 | List> selectOrderNumWithinDays(@Param("staffId") Integer staffId); 49 | 50 | /** 51 | * 十天内订单收益统计 52 | * 53 | * @param staffId 员工ID 54 | * @return 结果 55 | */ 56 | List> selectOrderPriceWithinDays(@Param("staffId") Integer staffId); 57 | } 58 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/dao/StaffIncomeMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.dao; 2 | 3 | import cc.mrbird.febs.cos.entity.StaffIncome; 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 StaffIncomeMapper extends BaseMapper { 15 | 16 | /** 17 | * 分页获取收益信息 18 | * 19 | * @param page 分页对象 20 | * @param staffIncome 公告信息 21 | * @return 结果 22 | */ 23 | IPage> selectStaffIncomePage(Page page, @Param("staffIncome") StaffIncome staffIncome); 24 | } 25 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/dao/StaffInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.dao; 2 | 3 | import cc.mrbird.febs.cos.entity.StaffInfo; 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 StaffInfoMapper extends BaseMapper { 15 | 16 | /** 17 | * 分页获取员工信息 18 | * 19 | * @param page 分页对象 20 | * @param staffInfo 员工信息 21 | * @return 结果 22 | */ 23 | IPage> selectStaffPage(Page page, @Param("staffInfo") StaffInfo staffInfo); 24 | } 25 | -------------------------------------------------------------------------------- /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 | 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 UserInfoMapper extends BaseMapper { 15 | 16 | /** 17 | * 分页获取用户信息 18 | * 19 | * @param page 分页对象 20 | * @param userInfo 用户信息 21 | * @return 结果 22 | */ 23 | IPage> selectUserPage(Page page, @Param("userInfo") UserInfo userInfo); 24 | } 25 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/dao/WithdrawInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.dao; 2 | 3 | import cc.mrbird.febs.cos.entity.WithdrawInfo; 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 WithdrawInfoMapper extends BaseMapper { 15 | 16 | /** 17 | * 分页获取提现记录信息 18 | * 19 | * @param page 分页对象 20 | * @param withdrawInfo 提现记录信息 21 | * @return 结果 22 | */ 23 | IPage> selectWithdrawPage(Page page, @Param("withdrawInfo") WithdrawInfo withdrawInfo); 24 | } 25 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/entity/AddressInfo.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.entity; 2 | 3 | import java.math.BigDecimal; 4 | import java.time.LocalDateTime; 5 | import java.io.Serializable; 6 | 7 | import com.baomidou.mybatisplus.annotation.IdType; 8 | import com.baomidou.mybatisplus.annotation.TableField; 9 | import com.baomidou.mybatisplus.annotation.TableId; 10 | import lombok.Data; 11 | import lombok.EqualsAndHashCode; 12 | import lombok.experimental.Accessors; 13 | 14 | /** 15 | * 收获地址管理 16 | * 17 | * @author FanK 18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @Accessors(chain = true) 22 | public class AddressInfo implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | /** 27 | * 主键ID 28 | */ 29 | @TableId(type = IdType.AUTO) 30 | private Integer id; 31 | 32 | /** 33 | * 编号 34 | */ 35 | private String code; 36 | 37 | /** 38 | * 省份 39 | */ 40 | private String province; 41 | 42 | /** 43 | * 市区 44 | */ 45 | private String city; 46 | 47 | /** 48 | * 区 49 | */ 50 | private String area; 51 | 52 | /** 53 | * 详细地址 54 | */ 55 | private String address; 56 | 57 | /** 58 | * 创建时间 59 | */ 60 | private String createDate; 61 | 62 | /** 63 | * 联系人 64 | */ 65 | private String contactPerson; 66 | 67 | /** 68 | * 联系方式 69 | */ 70 | private String contactMethod; 71 | 72 | /** 73 | * 所属用户 74 | */ 75 | private Integer userId; 76 | 77 | /** 78 | * 经度 79 | */ 80 | private BigDecimal longitude; 81 | 82 | /** 83 | * 纬度 84 | */ 85 | private BigDecimal latitude; 86 | 87 | /** 88 | * 门牌号 89 | */ 90 | private String houseNumber; 91 | 92 | @TableField(exist = false) 93 | private String name; 94 | 95 | @TableField(exist = false) 96 | private String userCode; 97 | } 98 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/entity/AlipayBean.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.entity; 2 | 3 | public class AlipayBean { 4 | 5 | /** 6 | * 商户订单号,必填 7 | * 8 | */ 9 | private String out_trade_no; 10 | /** 11 | * 订单名称,必填 12 | */ 13 | private String subject; 14 | /** 15 | * 付款金额,必填 16 | * 根据支付宝接口协议,必须使用下划线 17 | */ 18 | private String total_amount; 19 | /** 20 | * 商品描述,可空 21 | */ 22 | private String body; 23 | /** 24 | * 超时时间参数 25 | */ 26 | private String timeout_express= "10m"; 27 | /** 28 | * 产品编号 29 | */ 30 | private String product_code= "FAST_INSTANT_TRADE_PAY"; 31 | 32 | public String getOut_trade_no() { 33 | return out_trade_no; 34 | } 35 | public void setOut_trade_no(String out_trade_no) { 36 | this.out_trade_no = out_trade_no; 37 | } 38 | public String getSubject() { 39 | return subject; 40 | } 41 | public void setSubject(String subject) { 42 | this.subject = subject; 43 | } 44 | public String getTotal_amount() { 45 | return total_amount; 46 | } 47 | public void setTotal_amount(String total_amount) { 48 | this.total_amount = total_amount; 49 | } 50 | public String getBody() { 51 | return body; 52 | } 53 | public void setBody(String body) { 54 | this.body = body; 55 | } 56 | public String getTimeout_express() { 57 | return timeout_express; 58 | } 59 | public void setTimeout_express(String timeout_express) { 60 | this.timeout_express = timeout_express; 61 | } 62 | public String getProduct_code() { 63 | return product_code; 64 | } 65 | public void setProduct_code(String product_code) { 66 | this.product_code = product_code; 67 | } 68 | 69 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/entity/BulletinInfo.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.IdType; 4 | import com.baomidou.mybatisplus.annotation.TableId; 5 | import lombok.Data; 6 | import lombok.EqualsAndHashCode; 7 | import lombok.experimental.Accessors; 8 | 9 | import java.io.Serializable; 10 | 11 | /** 12 | * 公告信息 13 | * 14 | * @author FanK 15 | */ 16 | @Data 17 | @EqualsAndHashCode(callSuper = false) 18 | @Accessors(chain = true) 19 | public class BulletinInfo implements Serializable { 20 | 21 | /** 22 | * 主键ID 23 | */ 24 | @TableId(type = IdType.AUTO) 25 | private Integer id; 26 | 27 | private static final long serialVersionUID = 1L; 28 | 29 | /** 30 | * 标题 31 | */ 32 | private String title; 33 | 34 | /** 35 | * 内容 36 | */ 37 | private String content; 38 | 39 | /** 40 | * 公告时间 41 | */ 42 | private String date; 43 | 44 | /** 45 | * 图册 46 | */ 47 | private String images; 48 | 49 | /** 50 | * 发布人 51 | */ 52 | private String publisher; 53 | 54 | /** 55 | * 上下架(0.下架 1.发布) 56 | */ 57 | private Integer rackUp; 58 | 59 | /** 60 | * 消息类型(1.画报 2.导购 3.新盘发布) 61 | */ 62 | private Integer type; 63 | } 64 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/entity/DiscountInfo.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.entity; 2 | 3 | import java.math.BigDecimal; 4 | import java.time.LocalDateTime; 5 | import java.io.Serializable; 6 | 7 | import com.baomidou.mybatisplus.annotation.IdType; 8 | import com.baomidou.mybatisplus.annotation.TableField; 9 | import com.baomidou.mybatisplus.annotation.TableId; 10 | import lombok.Data; 11 | import lombok.EqualsAndHashCode; 12 | import lombok.experimental.Accessors; 13 | 14 | /** 15 | * 优惠券管理 16 | * 17 | * @author FanK 18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @Accessors(chain = true) 22 | public class DiscountInfo implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | /** 27 | * 主键ID 28 | */ 29 | @TableId(type = IdType.AUTO) 30 | private Integer id; 31 | 32 | /** 33 | * 编号 34 | */ 35 | private String code; 36 | 37 | /** 38 | * 满减金额 39 | */ 40 | private BigDecimal discountPrice; 41 | 42 | /** 43 | * 门槛金额 44 | */ 45 | private BigDecimal threshold; 46 | 47 | /** 48 | * 所属用户 49 | */ 50 | private Integer userId; 51 | 52 | /** 53 | * 优惠券名称 54 | */ 55 | private String couponName; 56 | 57 | /** 58 | * 折扣 59 | */ 60 | private BigDecimal rebate; 61 | 62 | /** 63 | * 类型(1.满减 2.折扣) 64 | */ 65 | private String type; 66 | 67 | /** 68 | * 备注 69 | */ 70 | private String content; 71 | 72 | /** 73 | * 发放时间 74 | */ 75 | private String createDate; 76 | 77 | /** 78 | * 状态(0.未使用 1.已使用) 79 | */ 80 | private String status; 81 | 82 | /** 83 | * 用户名称 84 | */ 85 | @TableField(exist = false) 86 | private String userName; 87 | 88 | } 89 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/entity/EvaluateInfo.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.entity; 2 | 3 | import java.math.BigDecimal; 4 | import java.time.LocalDateTime; 5 | import java.io.Serializable; 6 | 7 | import com.baomidou.mybatisplus.annotation.IdType; 8 | import com.baomidou.mybatisplus.annotation.TableField; 9 | import com.baomidou.mybatisplus.annotation.TableId; 10 | import lombok.Data; 11 | import lombok.EqualsAndHashCode; 12 | import lombok.experimental.Accessors; 13 | 14 | /** 15 | * 订单评价 16 | * 17 | * @author FanK 18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @Accessors(chain = true) 22 | public class EvaluateInfo implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | /** 27 | * 主键ID 28 | */ 29 | @TableId(type = IdType.AUTO) 30 | private Integer id; 31 | 32 | /** 33 | * 所属订单 34 | */ 35 | private Integer orderId; 36 | 37 | /** 38 | * 评价用户 39 | */ 40 | private Integer userId; 41 | 42 | /** 43 | * 评价内容 44 | */ 45 | private String content; 46 | 47 | /** 48 | * 评价分数 49 | */ 50 | private BigDecimal score; 51 | 52 | /** 53 | * 评价时间 54 | */ 55 | private String createDate; 56 | 57 | /** 58 | * 评价图片 59 | */ 60 | private String images; 61 | 62 | @TableField(exist = false) 63 | private String userName; 64 | 65 | @TableField(exist = false) 66 | private String orderCode; 67 | 68 | @TableField(exist = false) 69 | private String merchantName; 70 | 71 | @TableField(exist = false) 72 | private Integer staffId; 73 | } 74 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/entity/ExchangeInfo.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.entity; 2 | 3 | import java.math.BigDecimal; 4 | import java.time.LocalDateTime; 5 | import java.io.Serializable; 6 | 7 | import com.baomidou.mybatisplus.annotation.IdType; 8 | import com.baomidou.mybatisplus.annotation.TableField; 9 | import com.baomidou.mybatisplus.annotation.TableId; 10 | import lombok.Data; 11 | import lombok.EqualsAndHashCode; 12 | import lombok.experimental.Accessors; 13 | 14 | /** 15 | * 积分兑换 16 | * 17 | * @author FanK 18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @Accessors(chain = true) 22 | public class ExchangeInfo implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | /** 27 | * 主键ID 28 | */ 29 | @TableId(type = IdType.AUTO) 30 | private Integer id; 31 | 32 | /** 33 | * 物品ID 34 | */ 35 | private Integer materialId; 36 | 37 | /** 38 | * 所属用户 39 | */ 40 | private Integer userId; 41 | 42 | /** 43 | * 消耗积分 44 | */ 45 | private BigDecimal integral; 46 | 47 | /** 48 | * 创建时间 49 | */ 50 | private String createDate; 51 | 52 | @TableField(exist = false) 53 | private String code; 54 | 55 | @TableField(exist = false) 56 | private String userName; 57 | 58 | @TableField(exist = false) 59 | private String materialName; 60 | } 61 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/entity/MaterialInfo.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.entity; 2 | 3 | import java.math.BigDecimal; 4 | import java.time.LocalDateTime; 5 | import java.io.Serializable; 6 | 7 | import com.baomidou.mybatisplus.annotation.IdType; 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 MaterialInfo implements Serializable { 22 | 23 | private static final long serialVersionUID = 1L; 24 | 25 | /** 26 | * 主键ID 27 | */ 28 | @TableId(type = IdType.AUTO) 29 | private Integer id; 30 | 31 | /** 32 | * 物品名称 33 | */ 34 | private String name; 35 | 36 | private String code; 37 | 38 | /** 39 | * 物品介绍 40 | */ 41 | private String content; 42 | 43 | /** 44 | * 图片 45 | */ 46 | private String images; 47 | 48 | /** 49 | * 所需积分 50 | */ 51 | private BigDecimal integral; 52 | 53 | /** 54 | * 创建时间 55 | */ 56 | private String createDate; 57 | 58 | /** 59 | * 销量 60 | */ 61 | private Integer saleNum; 62 | 63 | 64 | } 65 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/entity/StaffIncome.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.entity; 2 | 3 | import java.math.BigDecimal; 4 | import java.time.LocalDateTime; 5 | import java.io.Serializable; 6 | 7 | import com.baomidou.mybatisplus.annotation.IdType; 8 | import com.baomidou.mybatisplus.annotation.TableField; 9 | import com.baomidou.mybatisplus.annotation.TableId; 10 | import lombok.Data; 11 | import lombok.EqualsAndHashCode; 12 | import lombok.experimental.Accessors; 13 | 14 | /** 15 | * 员工收益 16 | * 17 | * @author FanK 18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @Accessors(chain = true) 22 | public class StaffIncome implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | /** 27 | * 主键ID 28 | */ 29 | @TableId(type = IdType.AUTO) 30 | private Integer id; 31 | 32 | /** 33 | * 员工ID 34 | */ 35 | private Integer staffId; 36 | 37 | /** 38 | * 所属订单 39 | */ 40 | private Integer orderId; 41 | 42 | /** 43 | * 订单收益 44 | */ 45 | private BigDecimal income; 46 | 47 | /** 48 | * 配送费用 49 | */ 50 | private BigDecimal deliveryPrice; 51 | 52 | /** 53 | * 总收益 54 | */ 55 | private BigDecimal totalPrice; 56 | 57 | /** 58 | * 创建时间 59 | */ 60 | private String createDate; 61 | 62 | @TableField(exist = false) 63 | private String code; 64 | @TableField(exist = false) 65 | private String staffName; 66 | @TableField(exist = false) 67 | private String orderName; 68 | 69 | } 70 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/entity/StaffInfo.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.entity; 2 | 3 | import java.math.BigDecimal; 4 | import java.time.LocalDateTime; 5 | import java.io.Serializable; 6 | 7 | import com.baomidou.mybatisplus.annotation.IdType; 8 | import com.baomidou.mybatisplus.annotation.TableField; 9 | import com.baomidou.mybatisplus.annotation.TableId; 10 | import lombok.Data; 11 | import lombok.EqualsAndHashCode; 12 | import lombok.experimental.Accessors; 13 | 14 | /** 15 | * 员工管理 16 | * 17 | * @author FanK 18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @Accessors(chain = true) 22 | public class StaffInfo implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | /** 27 | * 主键ID 28 | */ 29 | @TableId(type = IdType.AUTO) 30 | private Integer id; 31 | 32 | /** 33 | * 员工编号 34 | */ 35 | private String code; 36 | 37 | /** 38 | * 员工姓名 39 | */ 40 | private String name; 41 | 42 | /** 43 | * 性别(1.男 2.女) 44 | */ 45 | private Integer sex; 46 | 47 | /** 48 | * 状态(1.在职 2.离职) 49 | */ 50 | private Integer status; 51 | 52 | /** 53 | * 联系方式 54 | */ 55 | private String phone; 56 | 57 | /** 58 | * 照片 59 | */ 60 | private String images; 61 | 62 | /** 63 | * 创建时间 64 | */ 65 | private String createDate; 66 | 67 | /** 68 | * 所属账户 69 | */ 70 | private Long userId; 71 | 72 | /** 73 | * 余额 74 | */ 75 | private BigDecimal price; 76 | 77 | @TableField(exist = false) 78 | private Integer merchantId; 79 | 80 | } 81 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/entity/UserInfo.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.entity; 2 | 3 | import java.math.BigDecimal; 4 | import java.time.LocalDateTime; 5 | import java.io.Serializable; 6 | 7 | import com.baomidou.mybatisplus.annotation.IdType; 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 UserInfo implements Serializable { 22 | 23 | private static final long serialVersionUID = 1L; 24 | 25 | /** 26 | * 主键ID 27 | */ 28 | @TableId(type = IdType.AUTO) 29 | private Integer id; 30 | 31 | /** 32 | * 会员编号 33 | */ 34 | private String code; 35 | 36 | /** 37 | * 用户姓名 38 | */ 39 | private String name; 40 | 41 | /** 42 | * 邮箱地址 43 | */ 44 | private String mail; 45 | 46 | /** 47 | * 联系电话 48 | */ 49 | private String phone; 50 | 51 | /** 52 | * 省份 53 | */ 54 | private String province; 55 | 56 | /** 57 | * 市区 58 | */ 59 | private String city; 60 | 61 | /** 62 | * 区 63 | */ 64 | private String area; 65 | 66 | /** 67 | * 详细地址 68 | */ 69 | private String address; 70 | 71 | /** 72 | * 所属账户 73 | */ 74 | private Long userId; 75 | 76 | /** 77 | * 创建时间 78 | */ 79 | private String createDate; 80 | 81 | /** 82 | * 用户头像 83 | */ 84 | private String images; 85 | 86 | /** 87 | * 积分余额 88 | */ 89 | private BigDecimal integral; 90 | } 91 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/entity/WithdrawInfo.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.entity; 2 | 3 | import java.math.BigDecimal; 4 | import java.time.LocalDateTime; 5 | import java.io.Serializable; 6 | 7 | import com.baomidou.mybatisplus.annotation.IdType; 8 | import com.baomidou.mybatisplus.annotation.TableField; 9 | import com.baomidou.mybatisplus.annotation.TableId; 10 | import lombok.Data; 11 | import lombok.EqualsAndHashCode; 12 | import lombok.experimental.Accessors; 13 | 14 | /** 15 | * 提现记录 16 | * 17 | * @author FanK 18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = false) 21 | @Accessors(chain = true) 22 | public class WithdrawInfo implements Serializable { 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | /** 27 | * 主键ID 28 | */ 29 | @TableId(type = IdType.AUTO) 30 | private Integer id; 31 | 32 | /** 33 | * 员工ID 34 | */ 35 | private Integer staffId; 36 | 37 | /** 38 | * 提现金额 39 | */ 40 | private BigDecimal withdrawPrice; 41 | 42 | /** 43 | * 账户余额 44 | */ 45 | private BigDecimal accountPrice; 46 | 47 | /** 48 | * 创建时间 49 | */ 50 | private String createDate; 51 | 52 | /** 53 | * 审核状态(0.待审核 1.通过 2.驳回) 54 | */ 55 | private String status; 56 | 57 | /** 58 | * 员工姓名 59 | */ 60 | @TableField(exist = false) 61 | private String staffName; 62 | 63 | /** 64 | * 员工编号 65 | */ 66 | @TableField(exist = false) 67 | private String code; 68 | } 69 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/IAddressInfoService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service; 2 | 3 | import cc.mrbird.febs.cos.entity.AddressInfo; 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 IAddressInfoService extends IService { 15 | 16 | /** 17 | * 分页获取收货地址信息 18 | * 19 | * @param page 分页对象 20 | * @param addressInfo 收货地址信息 21 | * @return 结果 22 | */ 23 | IPage> selectAddressPage(Page page, AddressInfo addressInfo); 24 | } 25 | -------------------------------------------------------------------------------- /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 | * 分页获取公告信息 17 | * @param page 分页对象 18 | * @param bulletinInfo 公告信息 19 | * @return 结果 20 | */ 21 | IPage> getBulletinByPage(Page page, BulletinInfo bulletinInfo); 22 | } 23 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/IDiscountInfoService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service; 2 | 3 | import cc.mrbird.febs.cos.entity.DiscountInfo; 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 IDiscountInfoService extends IService { 15 | 16 | /** 17 | * 分页获取优惠券信息 18 | * 19 | * @param page 分页对象 20 | * @param discountInfo 优惠券信息 21 | * @return 结果 22 | */ 23 | IPage> selectDiscountPage(Page page, DiscountInfo discountInfo); 24 | } 25 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/IEvaluateInfoService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service; 2 | 3 | import cc.mrbird.febs.cos.entity.EvaluateInfo; 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 IEvaluateInfoService extends IService { 15 | 16 | /** 17 | * 分页获取订单评价信息 18 | * 19 | * @param page 分页对象 20 | * @param evaluateInfo 订单评价信息 21 | * @return 结果 22 | */ 23 | IPage> selectEvaluatePage(Page page, EvaluateInfo evaluateInfo); 24 | } 25 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/IExchangeInfoService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service; 2 | 3 | import cc.mrbird.febs.common.exception.FebsException; 4 | import cc.mrbird.febs.cos.entity.ExchangeInfo; 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 | 12 | /** 13 | * @author FanK 14 | */ 15 | public interface IExchangeInfoService extends IService { 16 | 17 | /** 18 | * 分页获取积分兑换信息 19 | * 20 | * @param page 分页对象 21 | * @param exchangeInfo 积分兑换信息 22 | * @return 结果 23 | */ 24 | IPage> selectExChangePage(Page page, ExchangeInfo exchangeInfo); 25 | 26 | /** 27 | * 新增积分兑换信息 28 | * 29 | * @param exchangeInfo 积分兑换信息 30 | * @return 结果 31 | */ 32 | boolean addExchange(ExchangeInfo exchangeInfo) throws FebsException; 33 | 34 | /** 35 | * 获取ID获取积分兑换详情 36 | * 37 | * @param id 主键 38 | * @return 结果 39 | */ 40 | LinkedHashMap exchangeDetail(Integer id); 41 | } 42 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/IMailService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service; 2 | 3 | public interface IMailService { 4 | 5 | /** 6 | * 发送文本邮件 7 | * @param to 收件人 8 | * @param subject 主题 9 | * @param content 内容 10 | */ 11 | void sendSimpleMail(String to, String subject, String content); 12 | 13 | /** 14 | * 发送HTML邮件 15 | * @param to 收件人 16 | * @param subject 主题 17 | * @param content 内容 18 | */ 19 | void sendHtmlMail(String to, String subject, String content); 20 | 21 | 22 | 23 | /** 24 | * 发送带附件的邮件 25 | * @param to 收件人 26 | * @param subject 主题 27 | * @param content 内容 28 | * @param filePath 附件 29 | */ 30 | void sendAttachmentsMail(String to, String subject, String content, String filePath); 31 | } 32 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/IMaterialInfoService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service; 2 | 3 | import cc.mrbird.febs.cos.entity.MaterialInfo; 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 IMaterialInfoService extends IService { 15 | 16 | /** 17 | * 分页获取物品积分信息 18 | * 19 | * @param page 分页对象 20 | * @param materialInfo 物品积分信息 21 | * @return 结果 22 | */ 23 | IPage> selectMaterialPage(Page page, MaterialInfo materialInfo); 24 | } 25 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/IStaffIncomeService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service; 2 | 3 | import cc.mrbird.febs.cos.entity.StaffIncome; 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 IStaffIncomeService extends IService { 15 | 16 | /** 17 | * 分页获取公告信息 18 | * 19 | * @param page 分页对象 20 | * @param staffIncome 公告信息 21 | * @return 结果 22 | */ 23 | IPage> selectStaffIncomePage(Page page, StaffIncome staffIncome); 24 | } 25 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/IStaffInfoService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service; 2 | 3 | import cc.mrbird.febs.cos.entity.StaffInfo; 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 IStaffInfoService extends IService { 15 | 16 | /** 17 | * 分页获取员工信息 18 | * 19 | * @param page 分页对象 20 | * @param staffInfo 员工信息 21 | * @return 结果 22 | */ 23 | IPage> selectStaffPage(Page page, StaffInfo staffInfo); 24 | } 25 | -------------------------------------------------------------------------------- /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.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 IUserInfoService extends IService { 15 | 16 | /** 17 | * 分页获取用户信息 18 | * 19 | * @param page 分页对象 20 | * @param userInfo 用户信息 21 | * @return 结果 22 | */ 23 | IPage> selectUserPage(Page page, UserInfo userInfo); 24 | 25 | /** 26 | * 根据用户ID用户信息及订单 27 | * 28 | * @param userId 用户ID 29 | * @return 结果 30 | */ 31 | LinkedHashMap selectUserByUserId(Integer userId); 32 | } 33 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/IWithdrawInfoService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service; 2 | 3 | import cc.mrbird.febs.cos.entity.WithdrawInfo; 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 IWithdrawInfoService extends IService { 15 | 16 | /** 17 | * 分页获取提现记录信息 18 | * 19 | * @param page 分页对象 20 | * @param withdrawInfo 提现记录信息 21 | * @return 结果 22 | */ 23 | IPage> selectWithdrawPage(Page page, WithdrawInfo withdrawInfo); 24 | } 25 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/PayService.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service; 2 | 3 | import cc.mrbird.febs.cos.entity.AlipayBean; 4 | import com.alipay.api.AlipayApiException; 5 | 6 | public interface PayService { 7 | 8 | /** 9 | * 支付宝支付接口 10 | * @param alipayBean 11 | * @return 12 | * @throws AlipayApiException 13 | */ 14 | String aliPay(AlipayBean alipayBean) throws AlipayApiException; 15 | } 16 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/impl/AddressInfoServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service.impl; 2 | 3 | import cc.mrbird.febs.cos.entity.AddressInfo; 4 | import cc.mrbird.febs.cos.dao.AddressInfoMapper; 5 | import cc.mrbird.febs.cos.service.IAddressInfoService; 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 AddressInfoServiceImpl extends ServiceImpl implements IAddressInfoService { 18 | 19 | /** 20 | * 分页获取收货地址信息 21 | * 22 | * @param page 分页对象 23 | * @param addressInfo 收货地址信息 24 | * @return 结果 25 | */ 26 | @Override 27 | public IPage> selectAddressPage(Page page, AddressInfo addressInfo) { 28 | return baseMapper.selectAddressPage(page, addressInfo); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /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.dao.BulletinInfoMapper; 4 | import cc.mrbird.febs.cos.entity.BulletinInfo; 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 | /** 20 | * 分页获取公告信息 21 | * @param page 分页对象 22 | * @param bulletinInfo 公告信息 23 | * @return 结果 24 | */ 25 | @Override 26 | public IPage> getBulletinByPage(Page page, BulletinInfo bulletinInfo) { 27 | return baseMapper.getBulletinByPage(page, bulletinInfo); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/impl/DiscountInfoServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service.impl; 2 | 3 | import cc.mrbird.febs.cos.entity.DiscountInfo; 4 | import cc.mrbird.febs.cos.dao.DiscountInfoMapper; 5 | import cc.mrbird.febs.cos.service.IDiscountInfoService; 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 DiscountInfoServiceImpl extends ServiceImpl implements IDiscountInfoService { 18 | 19 | /** 20 | * 分页获取优惠券信息 21 | * 22 | * @param page 分页对象 23 | * @param discountInfo 优惠券信息 24 | * @return 结果 25 | */ 26 | @Override 27 | public IPage> selectDiscountPage(Page page, DiscountInfo discountInfo) { 28 | return baseMapper.selectDiscountPage(page, discountInfo); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/impl/EvaluateInfoServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service.impl; 2 | 3 | import cc.mrbird.febs.cos.entity.EvaluateInfo; 4 | import cc.mrbird.febs.cos.dao.EvaluateInfoMapper; 5 | import cc.mrbird.febs.cos.service.IEvaluateInfoService; 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 EvaluateInfoServiceImpl extends ServiceImpl implements IEvaluateInfoService { 18 | 19 | /** 20 | * 分页获取订单评价信息 21 | * 22 | * @param page 分页对象 23 | * @param evaluateInfo 订单评价信息 24 | * @return 结果 25 | */ 26 | @Override 27 | public IPage> selectEvaluatePage(Page page, EvaluateInfo evaluateInfo) { 28 | return baseMapper.selectEvaluatePage(page, evaluateInfo); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/impl/MaterialInfoServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service.impl; 2 | 3 | import cc.mrbird.febs.cos.entity.MaterialInfo; 4 | import cc.mrbird.febs.cos.dao.MaterialInfoMapper; 5 | import cc.mrbird.febs.cos.service.IMaterialInfoService; 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 MaterialInfoServiceImpl extends ServiceImpl implements IMaterialInfoService { 18 | 19 | /** 20 | * 分页获取物品积分信息 21 | * 22 | * @param page 分页对象 23 | * @param materialInfo 物品积分信息 24 | * @return 结果 25 | */ 26 | @Override 27 | public IPage> selectMaterialPage(Page page, MaterialInfo materialInfo) { 28 | return baseMapper.selectMaterialPage(page, materialInfo); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/impl/PayServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service.impl; 2 | 3 | import cc.mrbird.febs.common.utils.Alipay; 4 | import cc.mrbird.febs.cos.entity.AlipayBean; 5 | import cc.mrbird.febs.cos.service.PayService; 6 | import com.alipay.api.AlipayApiException; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | 10 | @Service 11 | public class PayServiceImpl implements PayService { 12 | 13 | @Autowired 14 | private Alipay alipay; 15 | 16 | @Override 17 | public String aliPay(AlipayBean alipayBean) throws AlipayApiException { 18 | return alipay.pay(alipayBean); 19 | } 20 | } -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/impl/StaffIncomeServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service.impl; 2 | 3 | import cc.mrbird.febs.cos.entity.StaffIncome; 4 | import cc.mrbird.febs.cos.dao.StaffIncomeMapper; 5 | import cc.mrbird.febs.cos.service.IStaffIncomeService; 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 StaffIncomeServiceImpl extends ServiceImpl implements IStaffIncomeService { 18 | 19 | /** 20 | * 分页获取公告信息 21 | * 22 | * @param page 分页对象 23 | * @param staffIncome 公告信息 24 | * @return 结果 25 | */ 26 | @Override 27 | public IPage> selectStaffIncomePage(Page page, StaffIncome staffIncome) { 28 | return baseMapper.selectStaffIncomePage(page, staffIncome); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/impl/StaffInfoServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service.impl; 2 | 3 | import cc.mrbird.febs.cos.entity.StaffInfo; 4 | import cc.mrbird.febs.cos.dao.StaffInfoMapper; 5 | import cc.mrbird.febs.cos.service.IStaffInfoService; 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 StaffInfoServiceImpl extends ServiceImpl implements IStaffInfoService { 18 | 19 | /** 20 | * 分页获取员工信息 21 | * 22 | * @param page 分页对象 23 | * @param staffInfo 员工信息 24 | * @return 结果 25 | */ 26 | @Override 27 | public IPage> selectStaffPage(Page page, StaffInfo staffInfo) { 28 | return baseMapper.selectStaffPage(page, staffInfo); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /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.dao.OrderInfoMapper; 4 | import cc.mrbird.febs.cos.entity.OrderInfo; 5 | import cc.mrbird.febs.cos.entity.UserInfo; 6 | import cc.mrbird.febs.cos.dao.UserInfoMapper; 7 | import cc.mrbird.febs.cos.service.IOrderInfoService; 8 | import cc.mrbird.febs.cos.service.IUserInfoService; 9 | import com.baomidou.mybatisplus.core.metadata.IPage; 10 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; 11 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 12 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 13 | import lombok.RequiredArgsConstructor; 14 | import org.springframework.beans.factory.annotation.Autowired; 15 | import org.springframework.stereotype.Service; 16 | 17 | import java.util.LinkedHashMap; 18 | import java.util.List; 19 | 20 | /** 21 | * @author FanK 22 | */ 23 | @Service 24 | @RequiredArgsConstructor(onConstructor = @__(@Autowired)) 25 | public class UserInfoServiceImpl extends ServiceImpl implements IUserInfoService { 26 | 27 | private final OrderInfoMapper orderInfoMapper; 28 | 29 | /** 30 | * 分页获取用户信息 31 | * 32 | * @param page 分页对象 33 | * @param userInfo 用户信息 34 | * @return 结果 35 | */ 36 | @Override 37 | public IPage> selectUserPage(Page page, UserInfo userInfo) { 38 | return baseMapper.selectUserPage(page, userInfo); 39 | } 40 | 41 | /** 42 | * 根据用户ID用户信息及订单 43 | * 44 | * @param userId 用户ID 45 | * @return 结果 46 | */ 47 | @Override 48 | public LinkedHashMap selectUserByUserId(Integer userId) { 49 | // 返回数据 50 | LinkedHashMap result = new LinkedHashMap() { 51 | { 52 | put("user", null); 53 | put("order", null); 54 | } 55 | }; 56 | UserInfo user = this.getOne(Wrappers.lambdaQuery().eq(UserInfo::getUserId, userId)); 57 | result.put("user", user); 58 | 59 | // 订单 60 | List orderList = orderInfoMapper.selectList(Wrappers.lambdaQuery().eq(OrderInfo::getUserId, user.getId())); 61 | result.put("order", orderList); 62 | return result; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /backend/src/main/java/cc/mrbird/febs/cos/service/impl/WithdrawInfoServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.cos.service.impl; 2 | 3 | import cc.mrbird.febs.cos.entity.WithdrawInfo; 4 | import cc.mrbird.febs.cos.dao.WithdrawInfoMapper; 5 | import cc.mrbird.febs.cos.service.IWithdrawInfoService; 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 WithdrawInfoServiceImpl extends ServiceImpl implements IWithdrawInfoService { 18 | 19 | /** 20 | * 分页获取提现记录信息 21 | * 22 | * @param page 分页对象 23 | * @param withdrawInfo 提现记录信息 24 | * @return 结果 25 | */ 26 | @Override 27 | public IPage> selectWithdrawPage(Page page, WithdrawInfo withdrawInfo) { 28 | return baseMapper.selectWithdrawPage(page, withdrawInfo); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /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 | * 生成商家默认个性化配置 25 | * 26 | * @param userId 用户 ID 27 | */ 28 | void initMerchantDefaultUserConfig(String userId); 29 | 30 | /** 31 | * 通过用户 ID 删除个性化配置 32 | * 33 | * @param userIds 用户 ID 数组 34 | */ 35 | void deleteByUserId(String... userIds); 36 | 37 | /** 38 | * 更新用户个性化配置 39 | * 40 | * @param userConfig 用户个性化配置 41 | */ 42 | void update(UserConfig userConfig) throws Exception; 43 | } 44 | -------------------------------------------------------------------------------- /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/TestServiceImpl.java: -------------------------------------------------------------------------------- 1 | package cc.mrbird.febs.system.service.impl; 2 | 3 | import cc.mrbird.febs.system.dao.TestMapper; 4 | import cc.mrbird.febs.system.domain.Test; 5 | import cc.mrbird.febs.system.service.TestService; 6 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 7 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 8 | import lombok.extern.slf4j.Slf4j; 9 | import org.springframework.beans.factory.annotation.Value; 10 | import org.springframework.stereotype.Service; 11 | import org.springframework.transaction.annotation.Propagation; 12 | import org.springframework.transaction.annotation.Transactional; 13 | 14 | import java.util.ArrayList; 15 | import java.util.List; 16 | 17 | @Slf4j 18 | @Service("testService") 19 | @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) 20 | public class TestServiceImpl extends ServiceImpl implements TestService { 21 | 22 | @Value("${febs.max.batch.insert.num}") 23 | private int batchInsertMaxNum; 24 | 25 | @Override 26 | public List findTests() { 27 | try { 28 | return baseMapper.selectList(new QueryWrapper().orderByDesc("create_time")); 29 | } catch (Exception e) { 30 | log.error("获取信息失败", e); 31 | return new ArrayList<>(); 32 | } 33 | } 34 | 35 | @Override 36 | @Transactional 37 | public void batchInsert(List list) { 38 | int total = list.size(); 39 | int max = batchInsertMaxNum; 40 | int count = total / max; 41 | int left = total % max; 42 | int length; 43 | if (left == 0) length = count; 44 | else length = count + 1; 45 | for (int i = 0; i < length; i++) { 46 | int start = max * i; 47 | int end = max * (i + 1); 48 | if (i != count) { 49 | log.info("正在插入第" + (start + 1) + " ~ " + end + "条记录 ······"); 50 | saveBatch(list, end); 51 | } else { 52 | end = total; 53 | log.info("正在插入第" + (start + 1) + " ~ " + end + "条记录 ······"); 54 | saveBatch(list, end); 55 | } 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /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/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/config/alipay.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/backend/src/main/resources/config/alipay.properties -------------------------------------------------------------------------------- /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/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/backend/src/main/resources/ip2region/ip2region.db -------------------------------------------------------------------------------- /backend/src/main/resources/logback-spring.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | febs 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | ${log.colorPattern} 13 | 14 | 15 | 16 | 17 | 18 | 19 | ${log.path}/info/info.%d{yyyy-MM-dd}.log 20 | ${log.maxHistory} 21 | 22 | 23 | ${log.pattern} 24 | 25 | 26 | INFO 27 | ACCEPT 28 | DENY 29 | 30 | 31 | 32 | 33 | 34 | ${log.path}/error/error.%d{yyyy-MM-dd}.log 35 | 36 | 37 | ${log.pattern} 38 | 39 | 40 | ERROR 41 | ACCEPT 42 | DENY 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /backend/src/main/resources/mapper/cos/AddressInfoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 42 | 43 | -------------------------------------------------------------------------------- /backend/src/main/resources/mapper/cos/BulletinInfoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 30 | 31 | -------------------------------------------------------------------------------- /backend/src/main/resources/mapper/cos/DiscountInfoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 45 | 46 | -------------------------------------------------------------------------------- /backend/src/main/resources/mapper/cos/EvaluateInfoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 46 | 47 | -------------------------------------------------------------------------------- /backend/src/main/resources/mapper/cos/ExchangeInfoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 47 | 48 | -------------------------------------------------------------------------------- /backend/src/main/resources/mapper/cos/MaterialInfoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 28 | 29 | -------------------------------------------------------------------------------- /backend/src/main/resources/mapper/cos/StaffIncomeMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 40 | 41 | -------------------------------------------------------------------------------- /backend/src/main/resources/mapper/cos/StaffInfoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 34 | 35 | -------------------------------------------------------------------------------- /backend/src/main/resources/mapper/cos/UserInfoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 36 | 37 | -------------------------------------------------------------------------------- /backend/src/main/resources/mapper/cos/WithdrawInfoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 38 | 39 | -------------------------------------------------------------------------------- /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/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/backend/src/main/resources/spy.properties -------------------------------------------------------------------------------- /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/git_toolbox_prj.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /frontend/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /frontend/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /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/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/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/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 | 62 | 63 | 72 | -------------------------------------------------------------------------------- /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/urlKey.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | const getUrlKey = (name) => { 3 | return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ""])[1].replace(/\+/g, '%20')) || null 4 | 5 | } 6 | 7 | export { getUrlKey } 8 | -------------------------------------------------------------------------------- /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/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/manage/component/work/Work.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 73 | 74 | 77 | -------------------------------------------------------------------------------- /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/pay/Pay.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 31 | 32 | 35 | -------------------------------------------------------------------------------- /frontend/static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/.gitkeep -------------------------------------------------------------------------------- /frontend/static/avatar/17e420c250804efe904a09a33796d5a10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/17e420c250804efe904a09a33796d5a10.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/17e420c250804efe904a09a33796d5a16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/17e420c250804efe904a09a33796d5a16.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/19034103295190235.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/19034103295190235.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/1d22f3e41d284f50b2c8fc32e0788698.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/1d22f3e41d284f50b2c8fc32e0788698.jpeg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165754.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/20180414165754.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165815.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/20180414165815.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165821.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/20180414165821.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165827.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/20180414165827.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165834.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/20180414165834.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165840.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/20180414165840.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165846.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/20180414165846.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165855.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/20180414165855.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165909.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/20180414165909.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165914.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/20180414165914.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165920.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/20180414165920.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165927.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/20180414165927.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165936.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/20180414165936.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165942.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/20180414165942.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165947.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/20180414165947.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414165955.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/20180414165955.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/20180414170003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/20180414170003.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/2dd7a2d09fa94bf8b5c52e5318868b4d9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/2dd7a2d09fa94bf8b5c52e5318868b4d9.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/2dd7a2d09fa94bf8b5c52e5318868b4df.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/2dd7a2d09fa94bf8b5c52e5318868b4df.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/496b3ace787342f7954b7045b8b06804.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/496b3ace787342f7954b7045b8b06804.jpeg -------------------------------------------------------------------------------- /frontend/static/avatar/595ba7b05f2e485eb50565a50cb6cc3c.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/595ba7b05f2e485eb50565a50cb6cc3c.jpeg -------------------------------------------------------------------------------- /frontend/static/avatar/5997fedcc7bd4cffbd350b40d1b5b9824.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/5997fedcc7bd4cffbd350b40d1b5b9824.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/5997fedcc7bd4cffbd350b40d1b5b987.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/5997fedcc7bd4cffbd350b40d1b5b987.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/87d8194bc9834e9f8f0228e9e530beb1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/87d8194bc9834e9f8f0228e9e530beb1.jpeg -------------------------------------------------------------------------------- /frontend/static/avatar/8f5b60ef00714a399ee544d331231820.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/8f5b60ef00714a399ee544d331231820.jpeg -------------------------------------------------------------------------------- /frontend/static/avatar/964e40b005724165b8cf772355796c8c.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/964e40b005724165b8cf772355796c8c.jpeg -------------------------------------------------------------------------------- /frontend/static/avatar/BiazfanxmamNRoxxVxka.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/BiazfanxmamNRoxxVxka.png -------------------------------------------------------------------------------- /frontend/static/avatar/WhxKECPNujWoWEFNdnJE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/WhxKECPNujWoWEFNdnJE.png -------------------------------------------------------------------------------- /frontend/static/avatar/a3b10296862e40edb811418d64455d00.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/a3b10296862e40edb811418d64455d00.jpeg -------------------------------------------------------------------------------- /frontend/static/avatar/a43456282d684e0b9319cf332f8ac468.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/a43456282d684e0b9319cf332f8ac468.jpeg -------------------------------------------------------------------------------- /frontend/static/avatar/bba284ac05b041a8b8b0d1927868d5c9x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/bba284ac05b041a8b8b0d1927868d5c9x.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/c7c4ee7be3eb4e73a19887dc713505145.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/c7c4ee7be3eb4e73a19887dc713505145.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/cnrhVkzwxjPwAaCfPbdc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/cnrhVkzwxjPwAaCfPbdc.png -------------------------------------------------------------------------------- /frontend/static/avatar/default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/default.jpg -------------------------------------------------------------------------------- /frontend/static/avatar/ff698bb2d25c4d218b3256b46c706ece.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/ff698bb2d25c4d218b3256b46c706ece.jpeg -------------------------------------------------------------------------------- /frontend/static/avatar/gaOngJwsRYRaVAuXXcmB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/gaOngJwsRYRaVAuXXcmB.png -------------------------------------------------------------------------------- /frontend/static/avatar/jZUIxmJycoymBprLOUbT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/jZUIxmJycoymBprLOUbT.png -------------------------------------------------------------------------------- /frontend/static/avatar/ubnKSIfAJTxIgXOKlciN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/avatar/ubnKSIfAJTxIgXOKlciN.png -------------------------------------------------------------------------------- /frontend/static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/img/favicon.ico -------------------------------------------------------------------------------- /frontend/static/img/house.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/img/house.jpg -------------------------------------------------------------------------------- /frontend/static/img/logo-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/img/logo-blue.png -------------------------------------------------------------------------------- /frontend/static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fankekeke/logistics_cos/fcf4d37d1649c1977137bd21b002d560ecc5b17c/frontend/static/img/logo.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 | --------------------------------------------------------------------------------