@ -0,0 +1,33 @@
|
||||
HELP.md
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
@ -0,0 +1,526 @@
|
||||
2024-12-25 17:30:54.042 INFO 82932 --- [main] c.e.pharmacy.mapper.CartMapperTest : Starting CartMapperTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 82932 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-25 17:30:54.063 INFO 82932 --- [main] c.e.pharmacy.mapper.CartMapperTest : The following 1 profile is active: "dev"
|
||||
2024-12-25 17:30:54.880 ERROR 82932 --- [main] o.m.spring.mapper.MapperFactoryBean : Error while adding the mapper 'interface com.example.pharmacy.mapper.CartMapper' to configuration.
|
||||
|
||||
org.apache.ibatis.builder.BuilderException: Parsing error was found in mapping #{userId, drugId}. Check syntax #{property|(expression), var1=value1, var2=value2, ...}
|
||||
at org.apache.ibatis.builder.SqlSourceBuilder$ParameterMappingTokenHandler.parseParameterMapping(SqlSourceBuilder.java:152) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.SqlSourceBuilder$ParameterMappingTokenHandler.buildParameterMapping(SqlSourceBuilder.java:92) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.SqlSourceBuilder$ParameterMappingTokenHandler.handleToken(SqlSourceBuilder.java:87) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.parsing.GenericTokenParser.parse(GenericTokenParser.java:77) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.SqlSourceBuilder.parse(SqlSourceBuilder.java:50) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.scripting.defaults.RawSqlSource.<init>(RawSqlSource.java:46) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.scripting.xmltags.XMLLanguageDriver.createSqlSource(XMLLanguageDriver.java:60) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.buildSqlSourceFromStrings(MapperAnnotationBuilder.java:635) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.buildSqlSource(MapperAnnotationBuilder.java:624) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.lambda$parseStatement$2(MapperAnnotationBuilder.java:301) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at java.util.Optional.ifPresent(Optional.java:159) ~[na:1.8.0_192]
|
||||
at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.parseStatement(MapperAnnotationBuilder.java:300) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.parse(MapperAnnotationBuilder.java:132) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.binding.MapperRegistry.addMapper(MapperRegistry.java:72) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.session.Configuration.addMapper(Configuration.java:872) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.mybatis.spring.mapper.MapperFactoryBean.checkDaoConfig(MapperFactoryBean.java:80) ~[mybatis-spring-2.1.0.jar:2.1.0]
|
||||
at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:44) [spring-tx-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) [spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) [spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) [spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) [spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) [spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) [spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) [spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:657) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431) [spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) [spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) [spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) [spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) [spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) [spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:657) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431) [spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) [spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) [spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) [spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) [spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) [spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.24.jar:5.3.24]
|
||||
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.24.jar:5.3.24]
|
||||
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731) ~[spring-boot-2.7.6.jar:2.7.6]
|
||||
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.6.jar:2.7.6]
|
||||
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) ~[spring-boot-2.7.6.jar:2.7.6]
|
||||
at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:136) ~[spring-boot-test-2.7.6.jar:2.7.6]
|
||||
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:141) ~[spring-test-5.3.24.jar:5.3.24]
|
||||
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:90) ~[spring-test-5.3.24.jar:5.3.24]
|
||||
at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:124) ~[spring-test-5.3.24.jar:5.3.24]
|
||||
at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:190) ~[spring-test-5.3.24.jar:5.3.24]
|
||||
at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:132) ~[spring-test-5.3.24.jar:5.3.24]
|
||||
at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:248) ~[spring-test-5.3.24.jar:5.3.24]
|
||||
at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:138) ~[spring-test-5.3.24.jar:5.3.24]
|
||||
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$8(ClassBasedTestDescriptor.java:363) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable(ClassBasedTestDescriptor.java:368) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$9(ClassBasedTestDescriptor.java:363) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_192]
|
||||
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[na:1.8.0_192]
|
||||
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[na:1.8.0_192]
|
||||
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[na:1.8.0_192]
|
||||
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_192]
|
||||
at java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312) ~[na:1.8.0_192]
|
||||
at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:743) ~[na:1.8.0_192]
|
||||
at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:742) ~[na:1.8.0_192]
|
||||
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) ~[na:1.8.0_192]
|
||||
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors(ClassBasedTestDescriptor.java:362) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6(ClassBasedTestDescriptor.java:283) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:282) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:272) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at java.util.Optional.orElseGet(Optional.java:267) ~[na:1.8.0_192]
|
||||
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:271) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:102) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:101) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:66) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at java.util.ArrayList.forEach(ArrayList.java:1257) ~[na:1.8.0_192]
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at java.util.ArrayList.forEach(ArrayList.java:1257) ~[na:1.8.0_192]
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57) ~[junit5-rt.jar:na]
|
||||
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38) ~[junit-rt.jar:na]
|
||||
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11) ~[idea_rt.jar:na]
|
||||
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35) ~[junit-rt.jar:na]
|
||||
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232) ~[junit-rt.jar:na]
|
||||
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55) ~[junit-rt.jar:na]
|
||||
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 15
|
||||
at java.lang.String.charAt(String.java:658) ~[na:1.8.0_192]
|
||||
at org.apache.ibatis.builder.ParameterExpression.trimmedStr(ParameterExpression.java:131) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.ParameterExpression.option(ParameterExpression.java:124) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.ParameterExpression.jdbcTypeOpt(ParameterExpression.java:99) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.ParameterExpression.property(ParameterExpression.java:70) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.ParameterExpression.parse(ParameterExpression.java:47) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.ParameterExpression.<init>(ParameterExpression.java:39) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.SqlSourceBuilder$ParameterMappingTokenHandler.parseParameterMapping(SqlSourceBuilder.java:148) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
... 132 common frames omitted
|
||||
|
||||
2024-12-25 17:30:54.891 WARN 82932 --- [main] o.s.w.c.s.GenericWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cartController': Unsatisfied dependency expressed through field 'cartService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cartService': Unsatisfied dependency expressed through field 'cartMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cartMapper' defined in file [D:\document\project\pharmacy\target\classes\com\example\pharmacy\mapper\CartMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: org.apache.ibatis.builder.BuilderException: Parsing error was found in mapping #{userId, drugId}. Check syntax #{property|(expression), var1=value1, var2=value2, ...}
|
||||
2024-12-25 17:30:54.896 INFO 82932 --- [main] ConditionEvaluationReportLoggingListener :
|
||||
|
||||
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
|
||||
2024-12-25 17:30:54.914 ERROR 82932 --- [main] o.s.boot.SpringApplication : Application run failed
|
||||
|
||||
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cartController': Unsatisfied dependency expressed through field 'cartService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cartService': Unsatisfied dependency expressed through field 'cartMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cartMapper' defined in file [D:\document\project\pharmacy\target\classes\com\example\pharmacy\mapper\CartMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: org.apache.ibatis.builder.BuilderException: Parsing error was found in mapping #{userId, drugId}. Check syntax #{property|(expression), var1=value1, var2=value2, ...}
|
||||
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.24.jar:5.3.24]
|
||||
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.24.jar:5.3.24]
|
||||
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731) ~[spring-boot-2.7.6.jar:2.7.6]
|
||||
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.6.jar:2.7.6]
|
||||
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) ~[spring-boot-2.7.6.jar:2.7.6]
|
||||
at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:136) [spring-boot-test-2.7.6.jar:2.7.6]
|
||||
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:141) [spring-test-5.3.24.jar:5.3.24]
|
||||
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:90) [spring-test-5.3.24.jar:5.3.24]
|
||||
at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:124) [spring-test-5.3.24.jar:5.3.24]
|
||||
at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:190) [spring-test-5.3.24.jar:5.3.24]
|
||||
at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:132) [spring-test-5.3.24.jar:5.3.24]
|
||||
at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:248) [spring-test-5.3.24.jar:5.3.24]
|
||||
at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:138) [spring-test-5.3.24.jar:5.3.24]
|
||||
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$8(ClassBasedTestDescriptor.java:363) [junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable(ClassBasedTestDescriptor.java:368) [junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$9(ClassBasedTestDescriptor.java:363) [junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_192]
|
||||
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[na:1.8.0_192]
|
||||
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[na:1.8.0_192]
|
||||
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[na:1.8.0_192]
|
||||
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_192]
|
||||
at java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312) ~[na:1.8.0_192]
|
||||
at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:743) ~[na:1.8.0_192]
|
||||
at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:742) ~[na:1.8.0_192]
|
||||
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) ~[na:1.8.0_192]
|
||||
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors(ClassBasedTestDescriptor.java:362) [junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6(ClassBasedTestDescriptor.java:283) [junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:282) [junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:272) [junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at java.util.Optional.orElseGet(Optional.java:267) ~[na:1.8.0_192]
|
||||
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:271) [junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:102) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:101) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:66) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at java.util.ArrayList.forEach(ArrayList.java:1257) ~[na:1.8.0_192]
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at java.util.ArrayList.forEach(ArrayList.java:1257) ~[na:1.8.0_192]
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57) ~[junit5-rt.jar:na]
|
||||
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38) ~[junit-rt.jar:na]
|
||||
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11) ~[idea_rt.jar:na]
|
||||
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35) ~[junit-rt.jar:na]
|
||||
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232) ~[junit-rt.jar:na]
|
||||
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55) ~[junit-rt.jar:na]
|
||||
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cartService': Unsatisfied dependency expressed through field 'cartMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cartMapper' defined in file [D:\document\project\pharmacy\target\classes\com\example\pharmacy\mapper\CartMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: org.apache.ibatis.builder.BuilderException: Parsing error was found in mapping #{userId, drugId}. Check syntax #{property|(expression), var1=value1, var2=value2, ...}
|
||||
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:657) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
... 90 common frames omitted
|
||||
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cartMapper' defined in file [D:\document\project\pharmacy\target\classes\com\example\pharmacy\mapper\CartMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: org.apache.ibatis.builder.BuilderException: Parsing error was found in mapping #{userId, drugId}. Check syntax #{property|(expression), var1=value1, var2=value2, ...}
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1804) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:657) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
... 104 common frames omitted
|
||||
Caused by: java.lang.IllegalArgumentException: org.apache.ibatis.builder.BuilderException: Parsing error was found in mapping #{userId, drugId}. Check syntax #{property|(expression), var1=value1, var2=value2, ...}
|
||||
at org.mybatis.spring.mapper.MapperFactoryBean.checkDaoConfig(MapperFactoryBean.java:83) ~[mybatis-spring-2.1.0.jar:2.1.0]
|
||||
at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:44) ~[spring-tx-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
... 114 common frames omitted
|
||||
Caused by: org.apache.ibatis.builder.BuilderException: Parsing error was found in mapping #{userId, drugId}. Check syntax #{property|(expression), var1=value1, var2=value2, ...}
|
||||
at org.apache.ibatis.builder.SqlSourceBuilder$ParameterMappingTokenHandler.parseParameterMapping(SqlSourceBuilder.java:152) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.SqlSourceBuilder$ParameterMappingTokenHandler.buildParameterMapping(SqlSourceBuilder.java:92) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.SqlSourceBuilder$ParameterMappingTokenHandler.handleToken(SqlSourceBuilder.java:87) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.parsing.GenericTokenParser.parse(GenericTokenParser.java:77) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.SqlSourceBuilder.parse(SqlSourceBuilder.java:50) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.scripting.defaults.RawSqlSource.<init>(RawSqlSource.java:46) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.scripting.xmltags.XMLLanguageDriver.createSqlSource(XMLLanguageDriver.java:60) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.buildSqlSourceFromStrings(MapperAnnotationBuilder.java:635) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.buildSqlSource(MapperAnnotationBuilder.java:624) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.lambda$parseStatement$2(MapperAnnotationBuilder.java:301) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at java.util.Optional.ifPresent(Optional.java:159) ~[na:1.8.0_192]
|
||||
at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.parseStatement(MapperAnnotationBuilder.java:300) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.parse(MapperAnnotationBuilder.java:132) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.binding.MapperRegistry.addMapper(MapperRegistry.java:72) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.session.Configuration.addMapper(Configuration.java:872) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.mybatis.spring.mapper.MapperFactoryBean.checkDaoConfig(MapperFactoryBean.java:80) ~[mybatis-spring-2.1.0.jar:2.1.0]
|
||||
... 117 common frames omitted
|
||||
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 15
|
||||
at java.lang.String.charAt(String.java:658) ~[na:1.8.0_192]
|
||||
at org.apache.ibatis.builder.ParameterExpression.trimmedStr(ParameterExpression.java:131) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.ParameterExpression.option(ParameterExpression.java:124) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.ParameterExpression.jdbcTypeOpt(ParameterExpression.java:99) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.ParameterExpression.property(ParameterExpression.java:70) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.ParameterExpression.parse(ParameterExpression.java:47) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.ParameterExpression.<init>(ParameterExpression.java:39) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.SqlSourceBuilder$ParameterMappingTokenHandler.parseParameterMapping(SqlSourceBuilder.java:148) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
... 132 common frames omitted
|
||||
|
||||
2024-12-25 17:30:54.918 ERROR 82932 --- [main] o.s.test.context.TestContextManager : Caught exception while allowing TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener@15bb5034] to prepare test instance [com.example.pharmacy.mapper.CartMapperTest@39ad12b6]
|
||||
|
||||
java.lang.IllegalStateException: Failed to load ApplicationContext
|
||||
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:98) ~[spring-test-5.3.24.jar:5.3.24]
|
||||
at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:124) ~[spring-test-5.3.24.jar:5.3.24]
|
||||
at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:190) ~[spring-test-5.3.24.jar:5.3.24]
|
||||
at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:132) ~[spring-test-5.3.24.jar:5.3.24]
|
||||
at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:248) ~[spring-test-5.3.24.jar:5.3.24]
|
||||
at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:138) [spring-test-5.3.24.jar:5.3.24]
|
||||
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$8(ClassBasedTestDescriptor.java:363) [junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable(ClassBasedTestDescriptor.java:368) [junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$9(ClassBasedTestDescriptor.java:363) [junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_192]
|
||||
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[na:1.8.0_192]
|
||||
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[na:1.8.0_192]
|
||||
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[na:1.8.0_192]
|
||||
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_192]
|
||||
at java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312) ~[na:1.8.0_192]
|
||||
at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:743) ~[na:1.8.0_192]
|
||||
at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:742) ~[na:1.8.0_192]
|
||||
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) ~[na:1.8.0_192]
|
||||
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors(ClassBasedTestDescriptor.java:362) [junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6(ClassBasedTestDescriptor.java:283) [junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:282) [junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:272) [junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at java.util.Optional.orElseGet(Optional.java:267) ~[na:1.8.0_192]
|
||||
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:271) [junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:102) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:101) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:66) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at java.util.ArrayList.forEach(ArrayList.java:1257) ~[na:1.8.0_192]
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at java.util.ArrayList.forEach(ArrayList.java:1257) ~[na:1.8.0_192]
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) ~[junit-platform-engine-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
|
||||
at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57) ~[junit5-rt.jar:na]
|
||||
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38) ~[junit-rt.jar:na]
|
||||
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11) ~[idea_rt.jar:na]
|
||||
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35) ~[junit-rt.jar:na]
|
||||
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232) ~[junit-rt.jar:na]
|
||||
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55) ~[junit-rt.jar:na]
|
||||
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cartController': Unsatisfied dependency expressed through field 'cartService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cartService': Unsatisfied dependency expressed through field 'cartMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cartMapper' defined in file [D:\document\project\pharmacy\target\classes\com\example\pharmacy\mapper\CartMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: org.apache.ibatis.builder.BuilderException: Parsing error was found in mapping #{userId, drugId}. Check syntax #{property|(expression), var1=value1, var2=value2, ...}
|
||||
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.24.jar:5.3.24]
|
||||
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.24.jar:5.3.24]
|
||||
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731) ~[spring-boot-2.7.6.jar:2.7.6]
|
||||
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.6.jar:2.7.6]
|
||||
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) ~[spring-boot-2.7.6.jar:2.7.6]
|
||||
at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:136) ~[spring-boot-test-2.7.6.jar:2.7.6]
|
||||
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:141) ~[spring-test-5.3.24.jar:5.3.24]
|
||||
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:90) ~[spring-test-5.3.24.jar:5.3.24]
|
||||
... 71 common frames omitted
|
||||
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cartService': Unsatisfied dependency expressed through field 'cartMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cartMapper' defined in file [D:\document\project\pharmacy\target\classes\com\example\pharmacy\mapper\CartMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: org.apache.ibatis.builder.BuilderException: Parsing error was found in mapping #{userId, drugId}. Check syntax #{property|(expression), var1=value1, var2=value2, ...}
|
||||
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:657) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
... 90 common frames omitted
|
||||
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cartMapper' defined in file [D:\document\project\pharmacy\target\classes\com\example\pharmacy\mapper\CartMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: org.apache.ibatis.builder.BuilderException: Parsing error was found in mapping #{userId, drugId}. Check syntax #{property|(expression), var1=value1, var2=value2, ...}
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1804) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:657) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
... 104 common frames omitted
|
||||
Caused by: java.lang.IllegalArgumentException: org.apache.ibatis.builder.BuilderException: Parsing error was found in mapping #{userId, drugId}. Check syntax #{property|(expression), var1=value1, var2=value2, ...}
|
||||
at org.mybatis.spring.mapper.MapperFactoryBean.checkDaoConfig(MapperFactoryBean.java:83) ~[mybatis-spring-2.1.0.jar:2.1.0]
|
||||
at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:44) ~[spring-tx-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) ~[spring-beans-5.3.24.jar:5.3.24]
|
||||
... 114 common frames omitted
|
||||
Caused by: org.apache.ibatis.builder.BuilderException: Parsing error was found in mapping #{userId, drugId}. Check syntax #{property|(expression), var1=value1, var2=value2, ...}
|
||||
at org.apache.ibatis.builder.SqlSourceBuilder$ParameterMappingTokenHandler.parseParameterMapping(SqlSourceBuilder.java:152) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.SqlSourceBuilder$ParameterMappingTokenHandler.buildParameterMapping(SqlSourceBuilder.java:92) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.SqlSourceBuilder$ParameterMappingTokenHandler.handleToken(SqlSourceBuilder.java:87) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.parsing.GenericTokenParser.parse(GenericTokenParser.java:77) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.SqlSourceBuilder.parse(SqlSourceBuilder.java:50) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.scripting.defaults.RawSqlSource.<init>(RawSqlSource.java:46) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.scripting.xmltags.XMLLanguageDriver.createSqlSource(XMLLanguageDriver.java:60) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.buildSqlSourceFromStrings(MapperAnnotationBuilder.java:635) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.buildSqlSource(MapperAnnotationBuilder.java:624) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.lambda$parseStatement$2(MapperAnnotationBuilder.java:301) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at java.util.Optional.ifPresent(Optional.java:159) ~[na:1.8.0_192]
|
||||
at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.parseStatement(MapperAnnotationBuilder.java:300) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.parse(MapperAnnotationBuilder.java:132) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.binding.MapperRegistry.addMapper(MapperRegistry.java:72) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.session.Configuration.addMapper(Configuration.java:872) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.mybatis.spring.mapper.MapperFactoryBean.checkDaoConfig(MapperFactoryBean.java:80) ~[mybatis-spring-2.1.0.jar:2.1.0]
|
||||
... 117 common frames omitted
|
||||
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 15
|
||||
at java.lang.String.charAt(String.java:658) ~[na:1.8.0_192]
|
||||
at org.apache.ibatis.builder.ParameterExpression.trimmedStr(ParameterExpression.java:131) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.ParameterExpression.option(ParameterExpression.java:124) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.ParameterExpression.jdbcTypeOpt(ParameterExpression.java:99) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.ParameterExpression.property(ParameterExpression.java:70) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.ParameterExpression.parse(ParameterExpression.java:47) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.ParameterExpression.<init>(ParameterExpression.java:39) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
at org.apache.ibatis.builder.SqlSourceBuilder$ParameterMappingTokenHandler.parseParameterMapping(SqlSourceBuilder.java:148) ~[mybatis-3.5.11.jar:3.5.11]
|
||||
... 132 common frames omitted
|
||||
|
||||
2024-12-25 17:31:53.047 INFO 88260 --- [main] c.e.pharmacy.mapper.CartMapperTest : Starting CartMapperTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 88260 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-25 17:31:53.047 INFO 88260 --- [main] c.e.pharmacy.mapper.CartMapperTest : The following 1 profile is active: "dev"
|
||||
2024-12-25 17:31:54.355 INFO 88260 --- [main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
|
||||
2024-12-25 17:31:54.633 INFO 88260 --- [main] c.e.pharmacy.mapper.CartMapperTest : Started CartMapperTest in 1.806 seconds (JVM running for 2.414)
|
||||
2024-12-25 17:31:54.820 INFO 88260 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2024-12-25 17:31:54.972 INFO 88260 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2024-12-25 17:31:55.032 INFO 88260 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2024-12-25 17:31:55.046 INFO 88260 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
||||
2024-12-25 17:49:17.522 INFO 37324 --- [main] c.e.pharmacy.mapper.CartMapperTest : Starting CartMapperTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 37324 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-25 17:49:17.523 INFO 37324 --- [main] c.e.pharmacy.mapper.CartMapperTest : The following 1 profile is active: "dev"
|
||||
2024-12-25 17:49:18.710 INFO 37324 --- [main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
|
||||
2024-12-25 17:49:19.125 INFO 37324 --- [main] c.e.pharmacy.mapper.CartMapperTest : Started CartMapperTest in 1.834 seconds (JVM running for 2.434)
|
||||
2024-12-25 17:49:19.411 INFO 37324 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2024-12-25 17:49:19.631 INFO 37324 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2024-12-25 17:49:19.687 INFO 37324 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2024-12-25 17:49:19.695 INFO 37324 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
||||
2024-12-25 18:33:14.039 INFO 57760 --- [main] c.e.pharmacy.mapper.CartMapperTest : Starting CartMapperTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 57760 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-25 18:33:14.064 INFO 57760 --- [main] c.e.pharmacy.mapper.CartMapperTest : The following 1 profile is active: "dev"
|
||||
2024-12-25 18:33:15.415 INFO 57760 --- [main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
|
||||
2024-12-25 18:33:15.694 INFO 57760 --- [main] c.e.pharmacy.mapper.CartMapperTest : Started CartMapperTest in 1.939 seconds (JVM running for 2.663)
|
||||
2024-12-25 18:33:15.894 INFO 57760 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2024-12-25 18:33:16.076 INFO 57760 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2024-12-25 18:33:16.156 INFO 57760 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2024-12-25 18:33:16.164 INFO 57760 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
||||
2024-12-25 20:53:31.745 INFO 79508 --- [main] c.e.pharmacy.mapper.CartMapperTest : Starting CartMapperTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 79508 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-25 20:53:31.745 INFO 79508 --- [main] c.e.pharmacy.mapper.CartMapperTest : The following 1 profile is active: "dev"
|
||||
2024-12-25 20:53:33.077 INFO 79508 --- [main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
|
||||
2024-12-25 20:53:33.424 INFO 79508 --- [main] c.e.pharmacy.mapper.CartMapperTest : Started CartMapperTest in 1.908 seconds (JVM running for 2.677)
|
||||
2024-12-25 20:53:33.688 INFO 79508 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2024-12-25 20:53:33.890 INFO 79508 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2024-12-25 20:53:34.009 INFO 79508 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2024-12-25 20:53:34.017 INFO 79508 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
||||
2024-12-25 22:13:22.782 INFO 85584 --- [main] c.e.pharmacy.service.CartServiceTest : Starting CartServiceTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 85584 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-25 22:13:22.791 INFO 85584 --- [main] c.e.pharmacy.service.CartServiceTest : The following 1 profile is active: "dev"
|
||||
2024-12-25 22:13:23.990 INFO 85584 --- [main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
|
||||
2024-12-25 22:13:24.292 INFO 85584 --- [main] c.e.pharmacy.service.CartServiceTest : Started CartServiceTest in 1.772 seconds (JVM running for 2.417)
|
||||
2024-12-25 22:13:24.488 INFO 85584 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2024-12-25 22:13:24.637 INFO 85584 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2024-12-25 22:13:24.770 INFO 85584 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2024-12-25 22:13:24.776 INFO 85584 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
||||
2024-12-25 22:26:00.754 INFO 45512 --- [main] c.e.pharmacy.service.CartServiceTest : Starting CartServiceTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 45512 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-25 22:26:00.756 INFO 45512 --- [main] c.e.pharmacy.service.CartServiceTest : The following 1 profile is active: "dev"
|
||||
2024-12-25 22:26:02.028 INFO 45512 --- [main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
|
||||
2024-12-25 22:26:02.335 INFO 45512 --- [main] c.e.pharmacy.service.CartServiceTest : Started CartServiceTest in 1.791 seconds (JVM running for 2.419)
|
||||
2024-12-25 22:26:02.547 INFO 45512 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2024-12-25 22:26:02.704 INFO 45512 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2024-12-25 22:26:02.841 INFO 45512 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2024-12-25 22:26:02.847 INFO 45512 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
||||
2024-12-25 22:26:53.406 INFO 89184 --- [main] c.e.pharmacy.service.CartServiceTest : Starting CartServiceTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 89184 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-25 22:26:53.407 INFO 89184 --- [main] c.e.pharmacy.service.CartServiceTest : The following 1 profile is active: "dev"
|
||||
2024-12-25 22:26:54.625 INFO 89184 --- [main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
|
||||
2024-12-25 22:26:54.916 INFO 89184 --- [main] c.e.pharmacy.service.CartServiceTest : Started CartServiceTest in 1.732 seconds (JVM running for 2.367)
|
@ -0,0 +1,130 @@
|
||||
2024-12-22 21:57:56.848 INFO 83584 --- [main] c.e.pharmacy.mapper.OrderItemMapperTest : Starting OrderItemMapperTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 83584 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-22 21:57:56.848 INFO 83584 --- [main] c.e.pharmacy.mapper.OrderItemMapperTest : The following 1 profile is active: "dev"
|
||||
2024-12-22 21:57:58.507 INFO 83584 --- [main] c.e.pharmacy.mapper.OrderItemMapperTest : Started OrderItemMapperTest in 1.963 seconds (JVM running for 2.696)
|
||||
2024-12-22 21:58:45.005 INFO 78904 --- [main] c.e.pharmacy.mapper.OrderItemMapperTest : Starting OrderItemMapperTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 78904 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-22 21:58:45.043 INFO 78904 --- [main] c.e.pharmacy.mapper.OrderItemMapperTest : The following 1 profile is active: "dev"
|
||||
2024-12-22 21:58:46.462 INFO 78904 --- [main] c.e.pharmacy.mapper.OrderItemMapperTest : Started OrderItemMapperTest in 1.696 seconds (JVM running for 2.338)
|
||||
2024-12-22 21:58:46.669 INFO 78904 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2024-12-22 21:58:46.819 INFO 78904 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2024-12-22 21:58:46.913 INFO 78904 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2024-12-22 21:58:46.919 INFO 78904 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
||||
2024-12-22 21:59:17.981 INFO 14064 --- [main] c.e.pharmacy.mapper.OrderItemMapperTest : Starting OrderItemMapperTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 14064 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-22 21:59:17.982 INFO 14064 --- [main] c.e.pharmacy.mapper.OrderItemMapperTest : The following 1 profile is active: "dev"
|
||||
2024-12-22 21:59:19.420 INFO 14064 --- [main] c.e.pharmacy.mapper.OrderItemMapperTest : Started OrderItemMapperTest in 1.656 seconds (JVM running for 2.267)
|
||||
2024-12-22 21:59:19.626 INFO 14064 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2024-12-22 21:59:19.772 INFO 14064 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2024-12-22 21:59:19.885 INFO 14064 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2024-12-22 21:59:19.890 INFO 14064 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
||||
2024-12-22 22:01:04.169 INFO 85072 --- [main] c.e.pharmacy.mapper.OrderItemMapperTest : Starting OrderItemMapperTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 85072 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-22 22:01:04.170 INFO 85072 --- [main] c.e.pharmacy.mapper.OrderItemMapperTest : The following 1 profile is active: "dev"
|
||||
2024-12-22 22:01:05.963 INFO 85072 --- [main] c.e.pharmacy.mapper.OrderItemMapperTest : Started OrderItemMapperTest in 2.093 seconds (JVM running for 3.07)
|
||||
2024-12-22 22:01:11.674 INFO 85072 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2024-12-22 22:01:11.801 INFO 85072 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2024-12-22 22:01:11.892 INFO 85072 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2024-12-22 22:01:11.897 INFO 85072 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
||||
2024-12-22 22:01:25.879 INFO 84304 --- [main] c.e.pharmacy.mapper.OrderItemMapperTest : Starting OrderItemMapperTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 84304 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-22 22:01:25.913 INFO 84304 --- [main] c.e.pharmacy.mapper.OrderItemMapperTest : The following 1 profile is active: "dev"
|
||||
2024-12-22 22:01:27.480 INFO 84304 --- [main] c.e.pharmacy.mapper.OrderItemMapperTest : Started OrderItemMapperTest in 1.827 seconds (JVM running for 2.449)
|
||||
2024-12-22 22:01:27.721 INFO 84304 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2024-12-22 22:01:27.875 INFO 84304 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2024-12-22 22:01:27.932 INFO 84304 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2024-12-22 22:01:27.938 INFO 84304 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
||||
2024-12-22 22:06:37.857 INFO 79280 --- [main] c.e.p.service.OrderItemServiceTest : Starting OrderItemServiceTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 79280 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-22 22:06:37.858 INFO 79280 --- [main] c.e.p.service.OrderItemServiceTest : The following 1 profile is active: "dev"
|
||||
2024-12-22 22:06:39.401 INFO 79280 --- [main] c.e.p.service.OrderItemServiceTest : Started OrderItemServiceTest in 1.756 seconds (JVM running for 2.345)
|
||||
2024-12-22 22:06:39.580 INFO 79280 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2024-12-22 22:06:39.717 INFO 79280 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2024-12-22 22:06:39.813 INFO 79280 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2024-12-22 22:06:39.819 INFO 79280 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
||||
2024-12-22 22:09:41.152 INFO 21860 --- [main] c.e.pharmacy.mapper.OrderItemMapperTest : Starting OrderItemMapperTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 21860 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-22 22:09:41.153 INFO 21860 --- [main] c.e.pharmacy.mapper.OrderItemMapperTest : The following 1 profile is active: "dev"
|
||||
2024-12-22 22:09:42.718 INFO 21860 --- [main] c.e.pharmacy.mapper.OrderItemMapperTest : Started OrderItemMapperTest in 1.799 seconds (JVM running for 2.405)
|
||||
2024-12-22 22:09:42.921 INFO 21860 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2024-12-22 22:09:43.101 INFO 21860 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2024-12-22 22:09:43.149 INFO 21860 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2024-12-22 22:09:43.153 INFO 21860 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
||||
2024-12-22 22:10:01.683 INFO 49564 --- [main] c.e.p.service.OrderItemServiceTest : Starting OrderItemServiceTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 49564 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-22 22:10:01.683 INFO 49564 --- [main] c.e.p.service.OrderItemServiceTest : The following 1 profile is active: "dev"
|
||||
2024-12-22 22:10:03.147 INFO 49564 --- [main] c.e.p.service.OrderItemServiceTest : Started OrderItemServiceTest in 1.683 seconds (JVM running for 2.34)
|
||||
2024-12-22 22:10:03.357 INFO 49564 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2024-12-22 22:10:03.501 INFO 49564 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2024-12-22 22:10:03.597 INFO 49564 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2024-12-22 22:10:03.603 INFO 49564 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
||||
2024-12-22 22:11:05.641 INFO 66388 --- [main] c.e.p.service.OrderItemServiceTest : Starting OrderItemServiceTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 66388 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-22 22:11:05.667 INFO 66388 --- [main] c.e.p.service.OrderItemServiceTest : The following 1 profile is active: "dev"
|
||||
2024-12-22 22:11:07.129 INFO 66388 --- [main] c.e.p.service.OrderItemServiceTest : Started OrderItemServiceTest in 1.704 seconds (JVM running for 2.321)
|
||||
2024-12-22 22:11:07.314 INFO 66388 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2024-12-22 22:11:07.473 INFO 66388 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2024-12-22 22:11:07.597 INFO 66388 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2024-12-22 22:11:07.604 INFO 66388 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
||||
2024-12-22 22:11:50.281 INFO 71832 --- [main] c.e.p.service.OrderItemServiceTest : Starting OrderItemServiceTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 71832 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-22 22:11:50.304 INFO 71832 --- [main] c.e.p.service.OrderItemServiceTest : The following 1 profile is active: "dev"
|
||||
2024-12-22 22:11:52.035 INFO 71832 --- [main] c.e.p.service.OrderItemServiceTest : Started OrderItemServiceTest in 2.025 seconds (JVM running for 2.741)
|
||||
2024-12-22 22:12:05.314 INFO 71832 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2024-12-22 22:12:05.701 INFO 71832 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2024-12-22 22:12:40.575 INFO 71832 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2024-12-22 22:12:40.583 INFO 71832 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
||||
2024-12-22 22:12:49.644 INFO 41784 --- [main] c.e.p.service.OrderItemServiceTest : Starting OrderItemServiceTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 41784 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-22 22:12:49.645 INFO 41784 --- [main] c.e.p.service.OrderItemServiceTest : The following 1 profile is active: "dev"
|
||||
2024-12-22 22:12:51.115 INFO 41784 --- [main] c.e.p.service.OrderItemServiceTest : Started OrderItemServiceTest in 1.698 seconds (JVM running for 2.283)
|
||||
2024-12-22 22:12:51.276 INFO 41784 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2024-12-22 22:12:51.425 INFO 41784 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2024-12-22 22:12:51.592 INFO 41784 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2024-12-22 22:12:51.597 INFO 41784 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
||||
2024-12-22 22:13:22.381 INFO 74444 --- [main] c.e.p.service.OrderItemServiceTest : Starting OrderItemServiceTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 74444 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-22 22:13:22.382 INFO 74444 --- [main] c.e.p.service.OrderItemServiceTest : The following 1 profile is active: "dev"
|
||||
2024-12-22 22:13:23.809 INFO 74444 --- [main] c.e.p.service.OrderItemServiceTest : Started OrderItemServiceTest in 1.64 seconds (JVM running for 2.228)
|
||||
2024-12-22 22:13:23.966 INFO 74444 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2024-12-22 22:13:24.134 INFO 74444 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2024-12-22 22:13:24.241 INFO 74444 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2024-12-22 22:13:24.247 INFO 74444 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
||||
2024-12-22 22:19:41.582 INFO 50472 --- [main] c.e.p.service.OrderItemServiceTest : Starting OrderItemServiceTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 50472 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-22 22:19:41.616 INFO 50472 --- [main] c.e.p.service.OrderItemServiceTest : The following 1 profile is active: "dev"
|
||||
2024-12-22 22:19:43.366 INFO 50472 --- [main] c.e.p.service.OrderItemServiceTest : Started OrderItemServiceTest in 2.033 seconds (JVM running for 2.745)
|
||||
2024-12-22 22:20:04.419 INFO 50472 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2024-12-22 22:20:04.800 INFO 50472 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2024-12-22 22:28:27.307 WARN 50472 --- [HikariPool-1 housekeeper] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Thread starvation or clock leap detected (housekeeper delta=7m51s213ms434µs300ns).
|
||||
2024-12-22 22:28:27.312 INFO 50472 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2024-12-22 22:28:27.326 INFO 50472 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
||||
2024-12-22 22:33:53.820 INFO 85588 --- [main] c.e.p.service.OrderItemServiceTest : Starting OrderItemServiceTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 85588 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-22 22:33:53.820 INFO 85588 --- [main] c.e.p.service.OrderItemServiceTest : The following 1 profile is active: "dev"
|
||||
2024-12-22 22:33:55.332 INFO 85588 --- [main] c.e.p.service.OrderItemServiceTest : Started OrderItemServiceTest in 1.741 seconds (JVM running for 2.375)
|
||||
2024-12-22 22:33:55.549 INFO 85588 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2024-12-22 22:33:55.716 INFO 85588 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2024-12-22 22:33:55.797 INFO 85588 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2024-12-22 22:33:55.802 INFO 85588 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
||||
2024-12-22 22:38:18.614 INFO 70240 --- [main] c.e.p.service.OrderItemServiceTest : Starting OrderItemServiceTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 70240 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-22 22:38:18.615 INFO 70240 --- [main] c.e.p.service.OrderItemServiceTest : The following 1 profile is active: "dev"
|
||||
2024-12-22 22:38:20.036 INFO 70240 --- [main] c.e.p.service.OrderItemServiceTest : Started OrderItemServiceTest in 1.646 seconds (JVM running for 2.251)
|
||||
2024-12-22 22:38:20.265 INFO 70240 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2024-12-22 22:38:20.447 INFO 70240 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2024-12-22 22:38:20.547 INFO 70240 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2024-12-22 22:38:20.553 INFO 70240 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
||||
2024-12-22 22:43:15.696 INFO 74512 --- [main] c.e.p.service.OrderItemServiceTest : Starting OrderItemServiceTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 74512 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-22 22:43:15.713 INFO 74512 --- [main] c.e.p.service.OrderItemServiceTest : The following 1 profile is active: "dev"
|
||||
2024-12-22 22:43:17.209 INFO 74512 --- [main] c.e.p.service.OrderItemServiceTest : Started OrderItemServiceTest in 1.736 seconds (JVM running for 2.341)
|
||||
2024-12-22 22:43:17.398 INFO 74512 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2024-12-22 22:43:17.534 INFO 74512 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2024-12-22 22:43:17.634 INFO 74512 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2024-12-22 22:43:17.643 INFO 74512 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
||||
2024-12-22 22:45:59.605 INFO 81352 --- [main] c.e.p.service.OrderItemServiceTest : Starting OrderItemServiceTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 81352 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-22 22:45:59.623 INFO 81352 --- [main] c.e.p.service.OrderItemServiceTest : The following 1 profile is active: "dev"
|
||||
2024-12-22 22:46:01.049 INFO 81352 --- [main] c.e.p.service.OrderItemServiceTest : Started OrderItemServiceTest in 1.666 seconds (JVM running for 2.273)
|
||||
2024-12-22 22:46:01.248 INFO 81352 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2024-12-22 22:46:01.402 INFO 81352 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2024-12-22 22:46:01.497 INFO 81352 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2024-12-22 22:46:01.502 INFO 81352 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
||||
2024-12-22 23:17:39.919 INFO 58380 --- [main] c.e.p.service.OrderItemServiceTest : Starting OrderItemServiceTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 58380 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-22 23:17:39.920 INFO 58380 --- [main] c.e.p.service.OrderItemServiceTest : The following 1 profile is active: "dev"
|
||||
2024-12-22 23:17:41.738 INFO 58380 --- [main] c.e.p.service.OrderItemServiceTest : Started OrderItemServiceTest in 2.117 seconds (JVM running for 2.974)
|
||||
2024-12-22 23:17:41.951 INFO 58380 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2024-12-22 23:17:42.120 INFO 58380 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2024-12-22 23:17:42.228 INFO 58380 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2024-12-22 23:17:42.237 INFO 58380 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
||||
2024-12-22 23:18:19.865 INFO 70336 --- [main] c.e.p.service.OrderItemServiceTest : Starting OrderItemServiceTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 70336 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-22 23:18:19.866 INFO 70336 --- [main] c.e.p.service.OrderItemServiceTest : The following 1 profile is active: "dev"
|
||||
2024-12-22 23:18:21.814 INFO 70336 --- [main] c.e.p.service.OrderItemServiceTest : Started OrderItemServiceTest in 2.232 seconds (JVM running for 3.175)
|
||||
2024-12-22 23:18:22.025 INFO 70336 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2024-12-22 23:18:22.253 INFO 70336 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2024-12-22 23:18:22.397 INFO 70336 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2024-12-22 23:18:22.407 INFO 70336 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
@ -0,0 +1,8 @@
|
||||
2024-12-23 09:59:13.437 INFO 73424 --- [main] c.e.p.service.OrderItemServiceTest : Starting OrderItemServiceTest using Java 1.8.0_192 on LAPTOP-QDU166J6 with PID 73424 (started by asus in D:\document\project\pharmacy)
|
||||
2024-12-23 09:59:13.441 INFO 73424 --- [main] c.e.p.service.OrderItemServiceTest : The following 1 profile is active: "dev"
|
||||
2024-12-23 09:59:15.164 INFO 73424 --- [main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
|
||||
2024-12-23 09:59:15.537 INFO 73424 --- [main] c.e.p.service.OrderItemServiceTest : Started OrderItemServiceTest in 2.369 seconds (JVM running for 3.206)
|
||||
2024-12-23 09:59:15.773 INFO 73424 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
|
||||
2024-12-23 09:59:15.967 INFO 73424 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
|
||||
2024-12-23 09:59:16.130 INFO 73424 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
|
||||
2024-12-23 09:59:16.140 INFO 73424 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
|
@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.example</groupId>
|
||||
<artifactId>pharmacy</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>pharmacy</name>
|
||||
<description>pharmacy</description>
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<spring-boot.version>2.7.6</spring-boot.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>2.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
<configuration>
|
||||
<mainClass>com.example.pharmacy.PharmacyApplication</mainClass>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>repackage</id>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -0,0 +1,13 @@
|
||||
package com.example.pharmacy;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class PharmacyApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(PharmacyApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.example.pharmacy.commen;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 15:34
|
||||
*/
|
||||
public class Constant {
|
||||
public static final String SESSION_USER_KEY = "session_user_key";
|
||||
public static final int RESULT_CODE_SUCCESS = 200;
|
||||
public static final int RESULT_CODE_FAIL = -1;
|
||||
public static final int RESULT_CODE_UNLOGIN = -2;
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.example.pharmacy.config;
|
||||
|
||||
import com.example.pharmacy.model.Result;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 15:51
|
||||
*/
|
||||
@ControllerAdvice
|
||||
@ResponseBody
|
||||
@Slf4j
|
||||
public class ExceptionAdvice {
|
||||
@ExceptionHandler
|
||||
public Result exceptionAdvice(Exception e) {
|
||||
log.error("内部出错,e: {}", e.getMessage());
|
||||
return Result.fail("内部出错");
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package com.example.pharmacy.config;
|
||||
|
||||
import com.example.pharmacy.model.Result;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.SneakyThrows;
|
||||
import org.springframework.core.MethodParameter;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.server.ServerHttpRequest;
|
||||
import org.springframework.http.server.ServerHttpResponse;
|
||||
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 15:41
|
||||
*/
|
||||
@ControllerAdvice
|
||||
public class ResponseAdvice implements ResponseBodyAdvice {
|
||||
@Override
|
||||
public boolean supports(MethodParameter returnType, Class converterType) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
@Override
|
||||
public Object beforeBodyWrite(Object body, MethodParameter returnType, MediaType selectedContentType, Class selectedConverterType, ServerHttpRequest request, ServerHttpResponse response) {
|
||||
if (body instanceof Result) {
|
||||
return body;
|
||||
}
|
||||
if (body instanceof String) {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
return objectMapper.writeValueAsString(Result.success(body));
|
||||
}
|
||||
return Result.success(body);
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.example.pharmacy.config;
|
||||
|
||||
import com.example.pharmacy.interceptor.LoginInterceptor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-25
|
||||
* Time: 20:45
|
||||
*/
|
||||
@Configuration
|
||||
public class WebConfig implements WebMvcConfigurer {
|
||||
@Autowired
|
||||
private LoginInterceptor loginInterceptor;
|
||||
private static final List<String> excludePath = Arrays.asList("/user/**",
|
||||
"/css/**", "/js/**", "/pic/**", "/**/*.html");
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
registry.addInterceptor(loginInterceptor)
|
||||
.addPathPatterns("/**")// /**表示给所有方法添加拦截器
|
||||
.excludePathPatterns(excludePath);
|
||||
}
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
package com.example.pharmacy.controller;
|
||||
|
||||
import com.example.pharmacy.commen.Constant;
|
||||
import com.example.pharmacy.model.Cart;
|
||||
import com.example.pharmacy.model.CartResult;
|
||||
import com.example.pharmacy.model.Result;
|
||||
import com.example.pharmacy.model.UserInfo;
|
||||
import com.example.pharmacy.service.CartService;
|
||||
import com.example.pharmacy.service.UserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-25
|
||||
* Time: 17:20
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cart")
|
||||
public class CartController {
|
||||
@Autowired
|
||||
private CartService cartService;
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
@RequestMapping("/addDrug")
|
||||
public Result addDrug(Integer drugId, HttpSession session) {
|
||||
String name = (String) session.getAttribute(Constant.SESSION_USER_KEY);
|
||||
UserInfo userInfo = userService.selectUserByName(name);
|
||||
Cart cart = new Cart();
|
||||
cart.setUserId(userInfo.getUserId());
|
||||
cart.setDrugId(drugId);
|
||||
Integer ret = cartService.addDrug(cart);
|
||||
if (ret != 1) {
|
||||
return Result.fail("加入购物车失败");
|
||||
}
|
||||
return Result.success("");
|
||||
}
|
||||
@RequestMapping("/getDrugList")
|
||||
public Result getDrugList(HttpSession session) {
|
||||
String name = (String) session.getAttribute(Constant.SESSION_USER_KEY);
|
||||
UserInfo userInfo = userService.selectUserByName(name);
|
||||
List<CartResult> cartResults = cartService.getDrugList(userInfo.getUserId());
|
||||
if (cartResults == null) {
|
||||
return Result.fail("获取购物车失败");
|
||||
}
|
||||
return Result.success(cartResults);
|
||||
}
|
||||
@RequestMapping("/updateCart")
|
||||
public Result updateCart(Cart cart) {
|
||||
if (cart == null) {
|
||||
Result.fail("购物车商品信息有误");
|
||||
}
|
||||
Integer ret = cartService.updateCart(cart);
|
||||
if (ret != 1) {
|
||||
Result.fail("更新失败");
|
||||
}
|
||||
return Result.success("");
|
||||
}
|
||||
@RequestMapping("/bulkOrder")
|
||||
public Result bulkOrder(@RequestParam List<Integer> cartIds, HttpSession session) {
|
||||
if (cartIds == null || cartIds.size() == 0) {
|
||||
return Result.fail("请选择商品再下单!");
|
||||
}
|
||||
String name = (String) session.getAttribute(Constant.SESSION_USER_KEY);
|
||||
UserInfo userInfo = userService.selectUserByName(name);
|
||||
Integer ret = cartService.addOrder(cartIds, userInfo.getUserId());
|
||||
if (ret <= 0) {
|
||||
return Result.fail("下单失败");
|
||||
}
|
||||
return Result.success("");
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.example.pharmacy.controller;
|
||||
|
||||
import com.example.pharmacy.model.Category;
|
||||
import com.example.pharmacy.model.CategoryResult;
|
||||
import com.example.pharmacy.model.Result;
|
||||
import com.example.pharmacy.service.CategoryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 19:46
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/category")
|
||||
public class CategoryController {
|
||||
@Autowired
|
||||
private CategoryService categoryService;
|
||||
@RequestMapping("/selectAllCategory")
|
||||
public Result selectAllCategory() {
|
||||
List<Category> categories = categoryService.selectAllCategory();
|
||||
if (categories == null) {
|
||||
return Result.fail("查询种类失败");
|
||||
}
|
||||
return Result.success(categories);
|
||||
}
|
||||
@RequestMapping("/addCategory")
|
||||
public Result addCategory(Category category) {
|
||||
if (category == null || !StringUtils.hasLength(category.getClassName())) {
|
||||
return Result.fail("添加种类参数有误");
|
||||
}
|
||||
Integer ret = categoryService.insertCategory(category);
|
||||
if (ret == 0) {
|
||||
Result.fail("添加种类失败");
|
||||
}
|
||||
return Result.success("");
|
||||
}
|
||||
@RequestMapping("/updateCategory")
|
||||
public Result updateCategory(Category category) {
|
||||
if (category == null || !StringUtils.hasLength(category.getClassName())) {
|
||||
return Result.fail("更新种类参数有误");
|
||||
}
|
||||
Integer ret = categoryService.updateCategory(category);
|
||||
if (ret == 0) {
|
||||
Result.fail("更新种类失败");
|
||||
}
|
||||
return Result.success("");
|
||||
}
|
||||
}
|
@ -0,0 +1,112 @@
|
||||
package com.example.pharmacy.controller;
|
||||
|
||||
import com.example.pharmacy.model.*;
|
||||
import com.example.pharmacy.service.DrugService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 17:24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/drug")
|
||||
public class DrugController {
|
||||
@Autowired
|
||||
private DrugService drugService;
|
||||
|
||||
/**
|
||||
* 分页查询药品
|
||||
* @param pageRequest
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/getDrugsByPage")
|
||||
public Result getDrugsByPage(PageRequest pageRequest) {
|
||||
if (pageRequest.getCurrentPage() < 1 || pageRequest.getPageSize() < 0) {
|
||||
return Result.fail("翻页参数校验失败");
|
||||
}
|
||||
PageResult<DrugInfo> pageResult = drugService.getDrugsByPage(pageRequest);
|
||||
return Result.success(pageResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询药品细节
|
||||
* @param drugId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/getDrugDetail")
|
||||
public DrugInfo getDrugDetail(Integer drugId) {
|
||||
if (drugId == null || drugId <= 0) {
|
||||
return null;
|
||||
}
|
||||
return drugService.getDrugDetail(drugId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类查找药品
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/getDrugByCategory")
|
||||
public Result getDrugsByCategory() {
|
||||
|
||||
List<CategoryResult> categoryResults = drugService.getDrugsByCategory();
|
||||
return Result.success(categoryResults);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加药品
|
||||
* @param drugInfo
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/addDrug")
|
||||
public Result addDrug(DrugInfo drugInfo) {
|
||||
if (drugInfo == null
|
||||
|| drugInfo.getDrugName() == null
|
||||
|| drugInfo.getEfficacy() == null
|
||||
|| drugInfo.getInventory() == null
|
||||
|| drugInfo.getClassId() == null
|
||||
|| drugInfo.getPrice() == null
|
||||
|| drugInfo.getValidity() == null) {
|
||||
return Result.fail("药品信息有空值");
|
||||
}
|
||||
Integer result = drugService.addDrug(drugInfo);
|
||||
if (result > 0) {
|
||||
return Result.success(true);
|
||||
}
|
||||
return Result.fail("添加失败");
|
||||
}
|
||||
/**
|
||||
* 更新药品
|
||||
* @param drugInfo
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/updateDrug")
|
||||
public Result updateDrug(DrugInfo drugInfo) {
|
||||
Integer ret = drugService.updateDrug(drugInfo);
|
||||
if (ret == 0) {
|
||||
return Result.fail("更新失败");
|
||||
}
|
||||
return Result.success("");
|
||||
}
|
||||
@RequestMapping("/selectDrugByName")
|
||||
public Result selectDrugByName(String drugName) {
|
||||
if (drugName == null) {
|
||||
return Result.fail("请输入药品名");
|
||||
}
|
||||
List<DrugInfo> drugInfo = drugService.selectDrugByName(drugName);
|
||||
if (drugInfo == null) {
|
||||
return Result.fail("暂无该药品");
|
||||
}
|
||||
return Result.success(drugInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,52 @@
|
||||
package com.example.pharmacy.controller;
|
||||
|
||||
import com.example.pharmacy.commen.Constant;
|
||||
import com.example.pharmacy.model.OrderInfo;
|
||||
import com.example.pharmacy.model.OrderResult;
|
||||
import com.example.pharmacy.model.Result;
|
||||
import com.example.pharmacy.service.OrderService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 20:07
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/order")
|
||||
public class OrderController {
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
@RequestMapping("/getOrders")
|
||||
public Result getOrders(HttpSession session) {
|
||||
String name = (String) session.getAttribute(Constant.SESSION_USER_KEY);
|
||||
List<OrderResult> orderResults = orderService.getOrdersByname(name);
|
||||
if (orderResults == null) {
|
||||
return Result.fail("查找历史订单失败");
|
||||
}
|
||||
return Result.success(orderResults);
|
||||
}
|
||||
|
||||
@RequestMapping("/updateOrder")
|
||||
public Result updateOrder(OrderInfo orderInfo) {
|
||||
if (orderInfo == null) {
|
||||
return Result.fail("订单信息为空!");
|
||||
}
|
||||
if (orderInfo.getOrderId() == null || orderInfo.getOrderId() <= 0) {
|
||||
return Result.fail("订单信息有误!");
|
||||
}
|
||||
Integer ret = orderService.updateOrder(orderInfo);
|
||||
if (ret == 0) {
|
||||
return Result.fail("订单修改失败");
|
||||
}
|
||||
return Result.success("");
|
||||
}
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.example.pharmacy.controller;
|
||||
|
||||
import com.example.pharmacy.model.OrderItem;
|
||||
import com.example.pharmacy.model.Result;
|
||||
import com.example.pharmacy.service.OrderItemService;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-22
|
||||
* Time: 19:17
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/orderitem")
|
||||
public class OrderItemController {
|
||||
@Autowired
|
||||
private OrderItemService orderItemService;
|
||||
|
||||
/**
|
||||
* 只能修改药品数量, 不能修改药品id和订单id
|
||||
* @param orderItem
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/updateOrderItem")
|
||||
public Result updateOrderItem(OrderItem orderItem) {
|
||||
if (orderItem == null || orderItem.getOrderItemId() == null) {
|
||||
return Result.fail("订单项信息有误");
|
||||
}
|
||||
Integer ret = orderItemService.updateOrderItem(orderItem);
|
||||
if (ret == null) {
|
||||
return Result.fail("更新订单项失败");
|
||||
}
|
||||
if (ret == 0) {
|
||||
return Result.fail("该药品库存不足");
|
||||
}
|
||||
return Result.success("");
|
||||
}
|
||||
@RequestMapping("/addOrderItems")
|
||||
public Result addOrderItems(List<OrderItem>orderItems) {
|
||||
if (orderItems == null || orderItems.size() == 0) {
|
||||
return Result.fail("添加的订单项信息有误");
|
||||
}
|
||||
Integer ret = orderItemService.addOrderItems(orderItems);
|
||||
if (ret == null) {
|
||||
return Result.fail("增加订单项失败");
|
||||
}
|
||||
if (ret == 0) {
|
||||
return Result.fail("该药品库存不足");
|
||||
}
|
||||
return Result.success("");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
package com.example.pharmacy.controller;
|
||||
|
||||
import com.example.pharmacy.commen.Constant;
|
||||
import com.example.pharmacy.model.Result;
|
||||
import com.example.pharmacy.model.UserInfo;
|
||||
import com.example.pharmacy.service.UserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 16:03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/user")
|
||||
public class UserController {
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
@RequestMapping("/login")
|
||||
public Result login(String userName, String password, HttpSession session) {
|
||||
if (userName == null || password == null) {
|
||||
return Result.fail("用户名或密码为空");
|
||||
}
|
||||
UserInfo userInfo = userService.selectUserByName(userName);
|
||||
if (userInfo == null) {
|
||||
return Result.fail("用户名不存在");
|
||||
}
|
||||
if (!password.equals(userInfo.getPassword())) {
|
||||
return Result.fail("密码错误");
|
||||
}
|
||||
session.setAttribute(Constant.SESSION_USER_KEY, userName);
|
||||
return Result.success(true);
|
||||
}
|
||||
@RequestMapping(value = "/register", produces = "application/json")
|
||||
public Result register(String userName, String password, String pswConfirm) {
|
||||
if (userName == null || password == null || pswConfirm == null) {
|
||||
return Result.fail("");
|
||||
}
|
||||
if (!pswConfirm.equals(password)) {
|
||||
return Result.fail("两次输入的密码不一致");
|
||||
}
|
||||
UserInfo userInfo = new UserInfo();
|
||||
userInfo.setUserName(userName);
|
||||
userInfo.setPassword(password);
|
||||
Integer result = userService.insertUserInfo(userInfo);
|
||||
if (result <= 0) {
|
||||
return Result.fail("用户名重复, 请重新注册");
|
||||
}
|
||||
return Result.success("");
|
||||
}
|
||||
@RequestMapping("/exit")
|
||||
public Result exit(HttpServletRequest request) {
|
||||
HttpSession session = request.getSession();
|
||||
session.removeAttribute(Constant.SESSION_USER_KEY);
|
||||
return Result.success("");
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.example.pharmacy.enums;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 15:22
|
||||
*/
|
||||
public enum UserIdentity {
|
||||
USER(1),
|
||||
ADMIN(0);
|
||||
private int code;
|
||||
|
||||
|
||||
UserIdentity(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.example.pharmacy.interceptor;
|
||||
|
||||
import com.example.pharmacy.commen.Constant;
|
||||
import com.example.pharmacy.model.UserInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-25
|
||||
* Time: 20:43
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
public class LoginInterceptor implements HandlerInterceptor {
|
||||
@Override
|
||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
||||
log.info("登录拦截器");
|
||||
HttpSession session = request.getSession();
|
||||
String name = (String) session.getAttribute(Constant.SESSION_USER_KEY);
|
||||
if (name != null) {
|
||||
return true;
|
||||
}
|
||||
response.setStatus(401);
|
||||
return false;
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.example.pharmacy.mapper;
|
||||
|
||||
import com.example.pharmacy.model.Cart;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-25
|
||||
* Time: 17:21
|
||||
*/
|
||||
@Mapper
|
||||
public interface CartMapper {
|
||||
@Insert("insert into cart (user_id, drug_id) values (#{userId}, #{drugId})")
|
||||
Integer addDrug(Cart cart);
|
||||
@Select("select * from cart where user_id=#{userId} and is_deleted = 0")
|
||||
List<Cart> selectCartByUserId(Integer userId);
|
||||
Integer updateCart(Cart cart);
|
||||
@Select("select * from cart where cart_id = #{id} and is_deleted = 0")
|
||||
Cart selectCartByCartId(Integer id);
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.example.pharmacy.mapper;
|
||||
|
||||
import com.example.pharmacy.model.Category;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 19:47
|
||||
*/
|
||||
@Mapper
|
||||
public interface CategoryInfoMapper {
|
||||
@Select("select * from drug_classification where is_deleted = 0")
|
||||
List<Category> selectAllCategory();
|
||||
@Insert("insert into drug_classification (class_name) values(#{className})")
|
||||
Integer insertCategory(Category category);
|
||||
Integer updateCategory(Category category);
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.example.pharmacy.mapper;
|
||||
|
||||
import com.example.pharmacy.model.DrugInfo;
|
||||
import com.example.pharmacy.model.UserInfo;
|
||||
import org.apache.ibatis.annotations.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 17:25
|
||||
*/
|
||||
@Mapper
|
||||
public interface DrugInfoMapper {
|
||||
@Select("select * from drugs where is_deleted = 0 order by drug_id desc limit #{offset}, #{pageSize}")
|
||||
List<DrugInfo> selectDrugInfoByPage(@Param("offset") Integer offset, @Param("pageSize") Integer pageSize);
|
||||
@Select("select count(*) from drugs where is_deleted = 0")
|
||||
Integer countAll();
|
||||
@Select("select * from drugs where is_deleted = 0 && drug_id = #{drugId}")
|
||||
DrugInfo selectDrugById(Integer drugId);
|
||||
@Select("select * from drugs where is_deleted = 0 and class_id = #{classId} order by drug_id desc")
|
||||
List<DrugInfo> selectDrugInfoByCategory(@Param("classId")Integer classId);
|
||||
@Select("select count(*) from drugs where is_deleted = 0 and class_id = #{classId}")
|
||||
Integer countByCategory(Integer classId);
|
||||
Integer addDrug(DrugInfo drugInfo);
|
||||
Integer updateDrug(DrugInfo drugInfo);
|
||||
@Select("select * from drugs where drug_name like concat('%',#{drugName},'%')")
|
||||
List<DrugInfo> selectDrugByName(String drugName);
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.example.pharmacy.mapper;
|
||||
|
||||
import com.example.pharmacy.model.OrderInfo;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 20:17
|
||||
*/
|
||||
@Mapper
|
||||
public interface OrderInfoMapper {
|
||||
@Select("select * from orders where is_deleted = 0 and user_id = #{userId} order by order_id desc")
|
||||
List<OrderInfo> getOrderInfos(Integer userId);
|
||||
|
||||
Integer addOrder(OrderInfo orderInfo);
|
||||
Integer updateOrder(OrderInfo orderInfo);
|
||||
@Select("select * from orders where is_deleted = 0 and order_id = #{order}")
|
||||
OrderInfo getOrderInfoByOrderId(Integer orderId);
|
||||
@Select("select count(*) from orders")
|
||||
Integer selectCount();
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.example.pharmacy.mapper;
|
||||
|
||||
import com.example.pharmacy.model.OrderItem;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-22
|
||||
* Time: 19:21
|
||||
*/
|
||||
@Mapper
|
||||
public interface OrderItemMapper {
|
||||
Integer updateOrderItem(OrderItem orderItem);
|
||||
@Select("select * from order_items where order_item_id=#{itemId} and is_deleted = 0")
|
||||
OrderItem selectOrderItemById(Integer itemId);
|
||||
|
||||
Integer addOrderItems(@Param("orderItems") List<OrderItem> orderItems);
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.example.pharmacy.mapper;
|
||||
|
||||
import com.example.pharmacy.model.UserHistoryOrder;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 22:07
|
||||
*/
|
||||
@Mapper
|
||||
public interface UserHistoryOrderMapper {
|
||||
@Select("select * from user_order_history_view where order_id = #{orderId}")
|
||||
List<UserHistoryOrder> selectByOrderId(Integer orderId);
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.example.pharmacy.mapper;
|
||||
|
||||
import com.example.pharmacy.model.UserInfo;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 15:54
|
||||
*/
|
||||
@Mapper
|
||||
public interface UserInfoMapper {
|
||||
@Select("select * from users where user_name = #{name} and is_deleted = 0")
|
||||
UserInfo selectUserByName(String name);
|
||||
@Insert("insert into users (user_name, password) values (#{userName}, #{password})")
|
||||
Integer insertUserInfo(UserInfo userInfo);
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.example.pharmacy.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-25
|
||||
* Time: 17:16
|
||||
*/
|
||||
@Data
|
||||
public class Cart {
|
||||
private Integer cartId;
|
||||
private Integer userId;
|
||||
private Integer drugId;
|
||||
private Integer num;
|
||||
private Integer isDeleted;
|
||||
private Date createTime;
|
||||
private Date updateTime;
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.example.pharmacy.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-25
|
||||
* Time: 18:11
|
||||
*/
|
||||
@Data
|
||||
public class CartResult {
|
||||
private Integer cartId;
|
||||
private String picture;
|
||||
private String drugName;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal price;
|
||||
private Integer num;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal sumPrice;
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.example.pharmacy.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 15:28
|
||||
*/
|
||||
@Data
|
||||
public class Category {
|
||||
private Integer classId;
|
||||
private String className;
|
||||
private Integer isDeleted;
|
||||
private Date createTime;
|
||||
private Date updateTime;
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.example.pharmacy.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-26
|
||||
* Time: 16:30
|
||||
*/
|
||||
@Data
|
||||
public class CategoryResult {
|
||||
private Integer classId;
|
||||
private String className;
|
||||
private List<DrugInfo> drugInfos;
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.example.pharmacy.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 15:15
|
||||
*/
|
||||
@Data
|
||||
public class DrugInfo {
|
||||
private Integer drugId;
|
||||
private Integer classId;
|
||||
private String drugName;
|
||||
private String efficacy;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal price;
|
||||
private Integer validity;//有效期
|
||||
private Integer inventory;//库存
|
||||
private Integer isDeleted;
|
||||
private Date createTime;
|
||||
private Date updateTime;
|
||||
private String picture;
|
||||
private String className;
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.example.pharmacy.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 15:19
|
||||
*/
|
||||
@Data
|
||||
public class OrderInfo {
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Integer orderId;
|
||||
private Integer userId;
|
||||
private String consignee;//收件人
|
||||
private String tele;
|
||||
private String address;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal totalAmount;
|
||||
private String orderStatus;
|
||||
private Integer isDeleted;
|
||||
private Date createTime;
|
||||
private Date updateTime;
|
||||
public String getCreateTime() {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
return sdf.format(createTime);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.example.pharmacy.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 15:32
|
||||
*/
|
||||
@Data
|
||||
public class OrderItem {
|
||||
private Integer orderItemId;
|
||||
private Integer orderId;
|
||||
private Integer drugId;
|
||||
private Integer quantity;
|
||||
private Integer isDeleted;
|
||||
private Date createTime;
|
||||
private Date updateTime;
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.example.pharmacy.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 20:46
|
||||
*/
|
||||
@Data
|
||||
public class OrderResult {
|
||||
private Integer orderId;
|
||||
private String createTime;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal allAmount;
|
||||
private List<UserHistoryOrder> orderList;
|
||||
public void setCreateTime(String date) {
|
||||
createTime = date;
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.example.pharmacy.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 17:34
|
||||
*/
|
||||
@Data
|
||||
public class PageRequest {
|
||||
private Integer currentPage = 1;
|
||||
private Integer pageSize = 9;
|
||||
private Integer offset;
|
||||
public Integer getOffset() {
|
||||
return (currentPage - 1) * pageSize;
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.example.pharmacy.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 17:39
|
||||
*/
|
||||
@Data
|
||||
public class PageResult<T> {
|
||||
private PageRequest pageRequest;
|
||||
private List<T> drugInfos;
|
||||
private Integer total;
|
||||
|
||||
public PageResult(List<T> results, Integer count, PageRequest pageRequest) {
|
||||
drugInfos = results;
|
||||
total = count;
|
||||
this.pageRequest = pageRequest;
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.example.pharmacy.model;
|
||||
|
||||
import com.example.pharmacy.commen.Constant;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 15:36
|
||||
*/
|
||||
@Data
|
||||
public class Result {
|
||||
private int code;
|
||||
private String msg;
|
||||
private Object data;
|
||||
public static Result success(Object data) {
|
||||
Result result = new Result();
|
||||
result.setCode(Constant.RESULT_CODE_SUCCESS);
|
||||
result.setMsg("");
|
||||
result.setData(data);
|
||||
return result;
|
||||
}
|
||||
public static Result fail(String msg) {
|
||||
Result result = new Result();
|
||||
result.setCode(Constant.RESULT_CODE_FAIL);
|
||||
result.setMsg(msg);
|
||||
result.setData(null);
|
||||
return result;
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.example.pharmacy.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 22:03
|
||||
*/
|
||||
@Data
|
||||
public class UserHistoryOrder {
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal price;
|
||||
private Integer orderId;
|
||||
private String picture;
|
||||
private Integer orderItemId;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal totalAmount;
|
||||
private String drugName;
|
||||
private Integer quantity;
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.example.pharmacy.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 15:13
|
||||
*/
|
||||
@Data
|
||||
public class UserInfo {
|
||||
private Integer userId;
|
||||
private String userName;
|
||||
private String password;
|
||||
private Integer identity;
|
||||
private Integer isDeleted;
|
||||
private Date createTime;
|
||||
private Date updateTime;
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
package com.example.pharmacy.service;
|
||||
|
||||
import com.example.pharmacy.mapper.*;
|
||||
import com.example.pharmacy.model.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-25
|
||||
* Time: 17:20
|
||||
*/
|
||||
@Service
|
||||
public class CartService {
|
||||
@Autowired
|
||||
private CartMapper cartMapper;
|
||||
@Autowired
|
||||
private UserInfoMapper userInfoMapper;
|
||||
@Autowired
|
||||
private DrugInfoMapper drugInfoMapper;
|
||||
@Autowired
|
||||
private OrderInfoMapper orderInfoMapper;
|
||||
@Autowired
|
||||
private OrderItemService orderItemService;
|
||||
public Integer addDrug(Cart cart) {
|
||||
|
||||
return cartMapper.addDrug(cart);
|
||||
}
|
||||
public List<CartResult> getDrugList(Integer userId) {
|
||||
List<Cart> carts = cartMapper.selectCartByUserId(userId);
|
||||
List<CartResult> cartResults = new ArrayList<>();
|
||||
for (Cart cart : carts) {
|
||||
CartResult cartResult = new CartResult();
|
||||
DrugInfo drugInfo = drugInfoMapper.selectDrugById(cart.getDrugId());
|
||||
cartResult.setPicture(drugInfo.getPicture());
|
||||
cartResult.setCartId(cart.getCartId());
|
||||
cartResult.setDrugName(drugInfo.getDrugName());
|
||||
BigDecimal price = drugInfo.getPrice();
|
||||
cartResult.setPrice(price);
|
||||
BigDecimal num = new BigDecimal(cart.getNum());
|
||||
cartResult.setNum(cart.getNum());
|
||||
BigDecimal sum = price.multiply(num);
|
||||
cartResult.setSumPrice(sum);
|
||||
|
||||
cartResults.add(cartResult);
|
||||
}
|
||||
return cartResults;
|
||||
}
|
||||
public Integer updateCart(Cart cart) {
|
||||
return cartMapper.updateCart(cart);
|
||||
}
|
||||
public Integer addOrder(List<Integer> cartIds, Integer userId) {
|
||||
OrderInfo orderInfo = new OrderInfo();
|
||||
orderInfo.setUserId(userId);
|
||||
orderInfoMapper.addOrder(orderInfo);
|
||||
int orderId = orderInfoMapper.selectCount();
|
||||
List<OrderItem> orderItems = new ArrayList<>();
|
||||
for (Integer id :
|
||||
cartIds) {
|
||||
Cart c = cartMapper.selectCartByCartId(id);
|
||||
|
||||
OrderItem orderItem = new OrderItem();
|
||||
orderItem.setOrderId(orderId);
|
||||
orderItem.setDrugId(c.getDrugId());
|
||||
orderItem.setQuantity(c.getNum());
|
||||
orderItems.add(orderItem);
|
||||
}
|
||||
|
||||
return orderItemService.addOrderItems(orderItems);
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.example.pharmacy.service;
|
||||
|
||||
import com.example.pharmacy.mapper.CategoryInfoMapper;
|
||||
import com.example.pharmacy.mapper.DrugInfoMapper;
|
||||
import com.example.pharmacy.model.Category;
|
||||
import com.example.pharmacy.model.CategoryResult;
|
||||
import com.example.pharmacy.model.DrugInfo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 19:46
|
||||
*/
|
||||
@Service
|
||||
public class CategoryService {
|
||||
@Autowired
|
||||
private CategoryInfoMapper categoryInfoMapper;
|
||||
@Autowired
|
||||
private DrugInfoMapper drugInfoMapper;
|
||||
public List<Category> selectAllCategory() {
|
||||
return categoryInfoMapper.selectAllCategory();
|
||||
}
|
||||
public Integer insertCategory(Category category) {
|
||||
return categoryInfoMapper.insertCategory(category);
|
||||
}
|
||||
public Integer updateCategory(Category category) {
|
||||
return categoryInfoMapper.updateCategory(category);
|
||||
}
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
package com.example.pharmacy.service;
|
||||
|
||||
import com.example.pharmacy.mapper.CategoryInfoMapper;
|
||||
import com.example.pharmacy.mapper.DrugInfoMapper;
|
||||
import com.example.pharmacy.model.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 17:24
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class DrugService {
|
||||
@Autowired
|
||||
private DrugInfoMapper drugInfoMapper;
|
||||
@Autowired
|
||||
private CategoryInfoMapper categoryInfoMapper;
|
||||
public PageResult<DrugInfo> getDrugsByPage(PageRequest pageRequest) {
|
||||
List<DrugInfo> results = drugInfoMapper.selectDrugInfoByPage(pageRequest.getOffset(), pageRequest.getPageSize());;
|
||||
return new PageResult<>(results, drugInfoMapper.countAll(), pageRequest);
|
||||
}
|
||||
public DrugInfo getDrugDetail(Integer drugId) {
|
||||
return drugInfoMapper.selectDrugById(drugId);
|
||||
}
|
||||
public List<CategoryResult> getDrugsByCategory() {
|
||||
List<CategoryResult> categoryResults = new ArrayList<>();
|
||||
List<Category> categories = categoryInfoMapper.selectAllCategory();
|
||||
for (Category category :
|
||||
categories) {
|
||||
CategoryResult categoryResult = new CategoryResult();
|
||||
categoryResult.setClassId(category.getClassId());
|
||||
categoryResult.setClassName(category.getClassName());
|
||||
List<DrugInfo> drugInfos = drugInfoMapper.selectDrugInfoByCategory(category.getClassId());
|
||||
categoryResult.setDrugInfos(drugInfos);
|
||||
categoryResults.add(categoryResult);
|
||||
}
|
||||
return categoryResults;
|
||||
}
|
||||
public Integer addDrug(DrugInfo drugInfo) {
|
||||
return drugInfoMapper.addDrug(drugInfo);
|
||||
}
|
||||
public Integer updateDrug(DrugInfo drugInfo) {
|
||||
return drugInfoMapper.updateDrug(drugInfo);
|
||||
}
|
||||
public List<DrugInfo> selectDrugByName(String drugName) {
|
||||
return drugInfoMapper.selectDrugByName(drugName);
|
||||
}
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.example.pharmacy.service;
|
||||
|
||||
import com.example.pharmacy.mapper.DrugInfoMapper;
|
||||
import com.example.pharmacy.mapper.OrderInfoMapper;
|
||||
import com.example.pharmacy.mapper.OrderItemMapper;
|
||||
import com.example.pharmacy.model.DrugInfo;
|
||||
import com.example.pharmacy.model.OrderInfo;
|
||||
import com.example.pharmacy.model.OrderItem;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-22
|
||||
* Time: 19:21
|
||||
*/
|
||||
@Service
|
||||
public class OrderItemService {
|
||||
@Autowired
|
||||
private OrderItemMapper orderItemMapper;
|
||||
@Autowired
|
||||
private DrugInfoMapper drugInfoMapper;
|
||||
@Autowired
|
||||
private OrderInfoMapper orderInfoMapper;
|
||||
|
||||
public Integer updateOrderItem(OrderItem orderItem) {
|
||||
if (orderItem.getQuantity() != null) {
|
||||
//更新药品库存
|
||||
Integer newQuantity = orderItem.getQuantity();
|
||||
OrderItem oldOrderItem = orderItemMapper.selectOrderItemById(orderItem.getOrderItemId());
|
||||
Integer oldQuantity = oldOrderItem.getQuantity();
|
||||
int diff = newQuantity - oldQuantity;
|
||||
DrugInfo drugInfo = drugInfoMapper.selectDrugById(oldOrderItem.getDrugId());
|
||||
int newInventory = drugInfo.getInventory() - diff;
|
||||
if (newInventory < 0) {
|
||||
return 0;
|
||||
}
|
||||
drugInfo.setDrugId(orderItem.getDrugId());
|
||||
drugInfo.setInventory(newInventory);
|
||||
drugInfoMapper.updateDrug(drugInfo);
|
||||
//更新订单金额
|
||||
OrderInfo orderInfo = orderInfoMapper.getOrderInfoByOrderId(oldOrderItem.getOrderId());
|
||||
BigDecimal oldAmount = orderInfo.getTotalAmount();
|
||||
BigDecimal newAmount = oldAmount.add(drugInfo.getPrice().multiply(new BigDecimal(diff)));
|
||||
orderInfo.setTotalAmount(newAmount);
|
||||
orderInfoMapper.updateOrder(orderInfo);
|
||||
}
|
||||
return orderItemMapper.updateOrderItem(orderItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加新订单的订单项
|
||||
* @param orderItems
|
||||
* @return 0: 该药品没有库存
|
||||
*/
|
||||
public Integer addOrderItems(List<OrderItem> orderItems) {
|
||||
BigDecimal amount = new BigDecimal(0);
|
||||
Integer orderId = 0;
|
||||
for (OrderItem orderItem : orderItems) {
|
||||
orderId = orderItem.getOrderId();
|
||||
Integer drugId = orderItem.getDrugId();
|
||||
Integer num = orderItem.getQuantity();
|
||||
DrugInfo drugInfo = drugInfoMapper.selectDrugById(drugId);
|
||||
DrugInfo oldDrugInfo = drugInfoMapper.selectDrugById(drugId);
|
||||
Integer oldNum = oldDrugInfo.getInventory();
|
||||
int newNum = oldNum - num;
|
||||
if (newNum < 0) {
|
||||
return 0;
|
||||
}
|
||||
drugInfo.setInventory(newNum);
|
||||
drugInfoMapper.updateDrug(drugInfo);
|
||||
amount = amount.add(drugInfo.getPrice().multiply(new BigDecimal(orderItem.getQuantity())));
|
||||
}
|
||||
|
||||
//填充订单总金额
|
||||
OrderInfo orderInfo = orderInfoMapper.getOrderInfoByOrderId(orderId);
|
||||
BigDecimal oldAmount = orderInfo.getTotalAmount();
|
||||
if (oldAmount == null) {
|
||||
orderInfo.setTotalAmount(amount);
|
||||
} else {
|
||||
orderInfo.setTotalAmount(amount.add(oldAmount));
|
||||
}
|
||||
|
||||
orderInfoMapper.updateOrder(orderInfo);
|
||||
|
||||
return orderItemMapper.addOrderItems(orderItems);
|
||||
}
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package com.example.pharmacy.service;
|
||||
|
||||
import com.example.pharmacy.mapper.OrderInfoMapper;
|
||||
import com.example.pharmacy.model.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 20:17
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class OrderService {
|
||||
@Autowired
|
||||
private OrderInfoMapper orderInfoMapper;
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
@Autowired
|
||||
private UserHistoryOrderService userHistoryOrderService;
|
||||
public List<OrderResult> getOrdersByname(String userName) {
|
||||
List<OrderResult> orderResults = new ArrayList<>();
|
||||
try {
|
||||
UserInfo userInfo = userService.selectUserByName(userName);
|
||||
List<OrderInfo> orderInfos = orderInfoMapper.getOrderInfos(userInfo.getUserId());
|
||||
for (OrderInfo orderInfo :
|
||||
orderInfos) {
|
||||
Integer orderId = orderInfo.getOrderId();
|
||||
List<UserHistoryOrder> userHistoryOrder = userHistoryOrderService.selectByOrderId(orderId);
|
||||
|
||||
OrderResult orderResult = new OrderResult();
|
||||
orderResult.setOrderId(orderId);
|
||||
orderResult.setAllAmount(orderInfo.getTotalAmount());
|
||||
orderResult.setCreateTime(orderInfo.getCreateTime());
|
||||
orderResult.setOrderList(userHistoryOrder);
|
||||
|
||||
orderResults.add(orderResult);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("查找历史订单出错, e:{}", e.getMessage());
|
||||
}
|
||||
return orderResults;
|
||||
}
|
||||
public Integer updateOrder(OrderInfo orderInfo) {
|
||||
return orderInfoMapper.updateOrder(orderInfo);
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.example.pharmacy.service;
|
||||
|
||||
import com.example.pharmacy.mapper.UserHistoryOrderMapper;
|
||||
import com.example.pharmacy.model.UserHistoryOrder;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 22:06
|
||||
*/
|
||||
@Service
|
||||
public class UserHistoryOrderService {
|
||||
@Autowired
|
||||
private UserHistoryOrderMapper userHistoryOrderMapper;
|
||||
public List<UserHistoryOrder> selectByOrderId(Integer orderId) {
|
||||
return userHistoryOrderMapper.selectByOrderId(orderId);
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.example.pharmacy.service;
|
||||
|
||||
import com.example.pharmacy.mapper.UserInfoMapper;
|
||||
import com.example.pharmacy.model.UserInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* Description:
|
||||
* User: asus
|
||||
* Date: 2024-12-21
|
||||
* Time: 16:05
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class UserService {
|
||||
@Autowired
|
||||
private UserInfoMapper userInfoMapper;
|
||||
public UserInfo selectUserByName(String name) {
|
||||
UserInfo userInfo = null;
|
||||
try {
|
||||
userInfo = userInfoMapper.selectUserByName(name);
|
||||
} catch (Exception e) {
|
||||
log.error("查询用户错误, e:{}", e.getMessage());
|
||||
}
|
||||
return userInfo;
|
||||
}
|
||||
public Integer insertUserInfo(UserInfo userInfo) {
|
||||
Integer result = 0;
|
||||
try {
|
||||
if (userInfoMapper.selectUserByName(userInfo.getUserName()) != null) {
|
||||
return result;
|
||||
}
|
||||
result = userInfoMapper.insertUserInfo(userInfo);
|
||||
} catch (Exception e) {
|
||||
log.error("插入用户失败, e:{}", e.getMessage());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
server.port: 8080
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:mysql://127.0.0.1:3306/pharmacy?characterEncoding=utf8&useSSL=false
|
||||
username: root
|
||||
password: 111111
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
mvc:
|
||||
favicon:
|
||||
enable: false
|
||||
profiles: #多平台配置
|
||||
active: dev
|
||||
# 设置 Mybatis 的 xml 保存路径
|
||||
mybatis:
|
||||
mapper-locations: classpath:mapper/*Mapper.xml
|
||||
configuration: # 配置打印 MyBatis 执行的 SQL
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
map-underscore-to-camel-case: true #自动驼峰转换
|
||||
# 配置打印 MyBatis 执行的 SQL
|
||||
logging:
|
||||
file:
|
||||
name: logs/springboot.log
|
||||
logback:
|
||||
rollingpolicy:
|
||||
max-file-size: 1MB
|
||||
file-name-pattern: ${LOG_FILE}.%d{yyyy-MM-dd}.%i
|
||||
level:
|
||||
com:
|
||||
example:
|
||||
demo: debug
|
||||
|
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.example.pharmacy.mapper.CartMapper">
|
||||
<update id="updateCart">
|
||||
update cart
|
||||
<set>
|
||||
<if test="userId!=null">
|
||||
user_id = #{userId},
|
||||
</if>
|
||||
<if test="drugId!=null">
|
||||
drugId = #{drugId},
|
||||
</if>
|
||||
<if test="num!=null">
|
||||
num = #{num},
|
||||
</if>
|
||||
<if test="isDeleted!=null">
|
||||
is_deleted = #{isDeleted}
|
||||
</if>
|
||||
</set>
|
||||
where cart_id = #{cartId}
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.example.pharmacy.mapper.CategoryInfoMapper">
|
||||
<update id="updateCategory">
|
||||
update drug_classification
|
||||
<set>
|
||||
<if test="className!=null">
|
||||
class_name = #{className},
|
||||
</if>
|
||||
<if test="isDeleted!=null">
|
||||
is_deleted = #{isDeleted}
|
||||
</if>
|
||||
</set>
|
||||
where class_id = #{classId}
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.example.pharmacy.mapper.DrugInfoMapper">
|
||||
<insert id="addDrug">
|
||||
insert into drugs
|
||||
<trim suffixOverrides="," prefix="(" suffix=")">
|
||||
<if test="drugName!=null">
|
||||
drug_name,
|
||||
</if>
|
||||
<if test="classId!=null">
|
||||
class_id,
|
||||
</if>
|
||||
<if test="efficacy!=null">
|
||||
efficacy,
|
||||
</if>
|
||||
<if test="price!=null">
|
||||
price,
|
||||
</if>
|
||||
<if test="validity!=null">
|
||||
validity,
|
||||
</if>
|
||||
<if test="inventory!=null">
|
||||
inventory,
|
||||
</if>
|
||||
<if test="className!=null">
|
||||
class_name
|
||||
</if>
|
||||
</trim>
|
||||
values
|
||||
<trim suffixOverrides="," prefix="(" suffix=")">
|
||||
<if test="drugName!=null">
|
||||
#{drugName},
|
||||
</if>
|
||||
<if test="classId!=null">
|
||||
#{classId},
|
||||
</if>
|
||||
<if test="efficacy!=null">
|
||||
#{efficacy},
|
||||
</if>
|
||||
<if test="price!=null">
|
||||
#{price},
|
||||
</if>
|
||||
<if test="validity!=null">
|
||||
#{validity},
|
||||
</if>
|
||||
<if test="inventory!=null">
|
||||
#{inventory},
|
||||
</if>
|
||||
<if test="className!=null">
|
||||
#{class_name}
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateDrug">
|
||||
update drugs
|
||||
<set>
|
||||
<if test="drugName!=null">
|
||||
drug_name = #{drugName},
|
||||
</if>
|
||||
<if test="classId!=null">
|
||||
class_id = #{classId},
|
||||
</if>
|
||||
<if test="efficacy!=null">
|
||||
efficacy = #{efficacy},
|
||||
</if>
|
||||
<if test="price!=null">
|
||||
price = #{price},
|
||||
</if>
|
||||
<if test="validity!=null">
|
||||
validity = #{validity},
|
||||
</if>
|
||||
<if test="inventory!=null">
|
||||
inventory = #{inventory},
|
||||
</if>
|
||||
<if test="isDeleted!=null">
|
||||
is_deleted = #{isDeleted},
|
||||
</if>
|
||||
<if test="className!=null">
|
||||
class_name = #{className}
|
||||
</if>
|
||||
</set>
|
||||
where drug_id = #{drugId}
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.example.pharmacy.mapper.OrderInfoMapper">
|
||||
<insert id="addOrder">
|
||||
insert into orders
|
||||
(user_id, consignee, tele, address, total_amount)
|
||||
values
|
||||
(#{userId}, #{consignee}, #{tele}, #{address}, #{totalAmount})
|
||||
</insert>
|
||||
<update id="updateOrder">
|
||||
update orders
|
||||
<set>
|
||||
<if test="userId!=null">
|
||||
user_id = #{userId},
|
||||
</if>
|
||||
<if test="consignee!=null">
|
||||
consignee = #{consignee},
|
||||
</if>
|
||||
<if test="tele!=null">
|
||||
tele = #{tele},
|
||||
</if>
|
||||
<if test="address!=null">
|
||||
address = #{address},
|
||||
</if>
|
||||
<if test="totalAmount!=null">
|
||||
total_amount = #{totalAmount},
|
||||
</if>
|
||||
<if test="orderStatus!=null">
|
||||
order_status = #{orderStatus},
|
||||
</if>
|
||||
<if test="isDeleted!=null">
|
||||
is_deleted = #{isDeleted}
|
||||
</if>
|
||||
</set>
|
||||
where order_id = #{orderId};
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.example.pharmacy.mapper.OrderItemMapper">
|
||||
<update id="updateOrderItem">
|
||||
update order_items
|
||||
<set>
|
||||
<if test="drugId!=null">
|
||||
drug_id = #{drugId},
|
||||
</if>
|
||||
<if test="quantity!=null">
|
||||
quantity = #{quantity},
|
||||
</if>
|
||||
<if test="isDeleted!=null">
|
||||
is_deleted = #{isDeleted}
|
||||
</if>
|
||||
</set>
|
||||
where order_item_id = #{orderItemId}
|
||||
</update>
|
||||
<insert id="addOrderItems">
|
||||
insert into order_items
|
||||
(order_id, drug_id, quantity)
|
||||
values
|
||||
<foreach collection="orderItems" item="orderItem" separator=",">
|
||||
(#{orderItem.orderId}, #{orderItem.drugId}, #{orderItem.quantity})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -0,0 +1,170 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<!-- 定义适配移动端屏幕比例代码 -->
|
||||
<meta name="viewport"
|
||||
content="width=device-width,user-scalable=no,inital-scale=1.0,maximum-scale=1.0,minimum-scale=1.0">
|
||||
<title></title>
|
||||
<!-- 需要引用的css样式文件 -->
|
||||
<link rel="stylesheet" type="text/css" href="css/css.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/car.css" />
|
||||
<script type="text/javascript" src="js/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 网站商品详情页头部模块开始 -->
|
||||
<div class="header">
|
||||
<div class="container">
|
||||
<img src="images/logo.png" >
|
||||
<a onclick="exit()" class="user userNav">
|
||||
<span>退出登录</span>
|
||||
<img src="images/ge.jpg" >
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 网站商品详情页头部模块结束 -->
|
||||
|
||||
<!-- 网站商品详情页当前位置导航模块开始 -->
|
||||
<div class="titleNav">
|
||||
<div class="container">
|
||||
<a href="index.html">首页</a> > <a href="#">购物车</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 网站商品详情页当前位置导航模块结束 -->
|
||||
|
||||
<!-- 网站商品详情页身体内容模块开始 -->
|
||||
<section class="body">
|
||||
<div class="bnav">
|
||||
<h3 class="lone">选择</h3>
|
||||
<h3 class="two" style="font-size:16px;">商品描述</h3>
|
||||
<h3 class="three">单价</h3>
|
||||
<h3 class="four">数量</h3>
|
||||
<!-- <div class="five">全额</div>-->
|
||||
<h3 class="ser">操作</h3>
|
||||
</div>
|
||||
<ul class="list">
|
||||
|
||||
</ul>
|
||||
<button style="height: 40px;color: #fff;background-color: #1F5BDF;width: 100%;border:none;margin-top: 10px;" onclick="bulkOrder()">立即结算</button>
|
||||
</section>
|
||||
<!-- 网站商品详情页身体内容模块结束 -->
|
||||
|
||||
<!-- 网站商品详情页页脚模块开始 -->
|
||||
<div class="footer">
|
||||
<div class="container">
|
||||
<img src="images/flogo.png" alt="">
|
||||
<div class="nr">
|
||||
<p>
|
||||
© 我不是药神网版权所有
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 网站商品详情页页脚模块结束 -->
|
||||
<!-- 网站侧边导航 -->
|
||||
<div class="xf">
|
||||
<div class="t"><a href="index.html">主页面</a></div>
|
||||
<div class="t"><a href="classification.html">分类药品</a></div>
|
||||
<div class="t"><a href="car.html">购物车</a></div>
|
||||
<div class="t"><a href="order.html">历史订单</a></div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
getCartDrugs();
|
||||
function getCartDrugs() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "cart/getDrugList",
|
||||
success: function (resultAll) {
|
||||
var result = resultAll.data;
|
||||
var finalHtml = "";
|
||||
for (var drug of result) {
|
||||
finalHtml += '<li class="item">';
|
||||
finalHtml += '<div style=\"display: none\" name=\"cartId\">' + drug.cartId +'</div>';
|
||||
finalHtml += '<div class="lone"><input type="checkbox" name="select" value="' + drug.cartId +'""></div>';
|
||||
finalHtml += '<div class="two jimg">';
|
||||
finalHtml += '<img src="' + drug.picture + '">';
|
||||
finalHtml += '<p>' + drug.drugName + '</p>';
|
||||
finalHtml += '</div>';
|
||||
finalHtml += '<div class="three">¥<span>' + drug.price + '</span></div>';
|
||||
finalHtml += '<div class="four"><input type="number" min="0" name="num" id="'+drug.cartId+'" onclick="updateCount('+drug.cartId+')" value="'+drug.num+'"></div>';
|
||||
finalHtml += '<div class="ser"><a href="javascript:void(0)" onclick="deleteCart(' + drug.cartId + ')"><img src="images/del.png" alt=""></a></div>';
|
||||
finalHtml += '</li>';
|
||||
}
|
||||
$("ul").html(finalHtml);
|
||||
},
|
||||
error: function (error) {
|
||||
if (error.status === 401) {
|
||||
location.href = "login.html";
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function updateCount(id) {
|
||||
// console.log($("#"+id).val());
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: 'cart/updateCart',
|
||||
data: {
|
||||
cartId: id,
|
||||
num: $("#"+id).val()
|
||||
},
|
||||
success: function (result) {
|
||||
if (result.code === -1) {
|
||||
alert(result.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function deleteCart (id) {
|
||||
var isDelete = confirm("确认删除?");
|
||||
if (isDelete) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "cart/updateCart",
|
||||
data: {
|
||||
cartId: id,
|
||||
isDeleted: 1
|
||||
},
|
||||
success: function (resultAll) {
|
||||
if (resultAll.code === -1) {
|
||||
alert(resultAll.msg);
|
||||
} else {
|
||||
location.href = "car.html";
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function bulkOrder() {
|
||||
var ids = [];
|
||||
$("input:checkbox[name='select']:checked").each(function () {
|
||||
ids.push($(this).val());
|
||||
});
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "cart/bulkOrder?cartIds="+ids,
|
||||
success: function (result) {
|
||||
if (result.code===200) {
|
||||
location.href = "order.html";
|
||||
} else {
|
||||
alert(result.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function exit() {
|
||||
var isExit = confirm("确认退出?");
|
||||
if (isExit) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "user/exit",
|
||||
success: function (result) {
|
||||
location.href = "login.html";
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,106 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<!-- 定义适配移动端屏幕比例代码 -->
|
||||
<meta name="viewport"
|
||||
content="width=device-width,user-scalable=no,inital-scale=1.0,maximum-scale=1.0,minimum-scale=1.0">
|
||||
<title></title>
|
||||
<link rel="stylesheet" type="text/css" href="css/css.css" />
|
||||
<script type="text/javascript" src="js/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 网站首页头部模块开始 -->
|
||||
<div class="header">
|
||||
<div class="container">
|
||||
<img src="images/logo.png" >
|
||||
<a onclick="exit()" class="user userNav">
|
||||
<span>退出登录</span>
|
||||
<img src="images/ge.jpg" >
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 网站首页头部模块结束 -->
|
||||
|
||||
|
||||
<!-- 网站首页身体内容模块开始 -->
|
||||
<div class="bodyer">
|
||||
<div class="container">
|
||||
<div class="bodyList" style="width:100%;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 网站首页页脚模块开始 -->
|
||||
<div class="footer">
|
||||
<div class="container">
|
||||
<img src="images/flogo.png" alt="">
|
||||
<div class="nr">
|
||||
<p>
|
||||
© 我不是药神网版权所有
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 网站首页页脚模块结束 -->
|
||||
|
||||
<!-- 网站侧边导航 -->
|
||||
<div class="xf">
|
||||
<div class="t"><a href="index.html">主页面</a></div>
|
||||
<div class="t"><a href="classification.html">分类药品</a></div>
|
||||
<div class="t"><a href="car.html">购物车</a></div>
|
||||
<div class="t"><a href="order.html">历史订单</a></div>
|
||||
</div>
|
||||
<script>
|
||||
getCategoryDrugs();
|
||||
function getCategoryDrugs() {
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: 'drug/getDrugByCategory',
|
||||
success: function (results) {
|
||||
var finalhtml = "";
|
||||
categoryResults = results.data;
|
||||
console.log(categoryResults);
|
||||
$.each(categoryResults, function (index, categoryResult) {
|
||||
console.log(categoryResult);
|
||||
finalhtml += '<div style="display: none" name="classId">'+categoryResult.classId+'</div>';
|
||||
finalhtml += '<div class="title">';
|
||||
finalhtml += '<h3 style="font-weight:bold;">'+categoryResult.className+'</h3>';
|
||||
finalhtml += '</div><ul>';
|
||||
$.each(categoryResult.drugInfos, function (index, drug) {
|
||||
console.log(drug);
|
||||
finalhtml += '<li><a href="item.html?drugId='+drug.drugId+'"><img src="'+drug.picture+'" ></a>';
|
||||
finalhtml += '<div class="nr">';
|
||||
finalhtml += '<h3>'+drug.drugName+'</h3>';
|
||||
finalhtml += '<p>我不是药神网特供 </p>';
|
||||
finalhtml += '<div class="biaoQian">';
|
||||
finalhtml += '<div class="l">¥'+drug.price+'</div>';
|
||||
finalhtml += '<div class="r">'+categoryResult.className+'</div>';
|
||||
finalhtml += '</div></div></li>';
|
||||
})
|
||||
finalhtml += '</ul>';
|
||||
})
|
||||
$(".bodyList").html(finalhtml);
|
||||
},
|
||||
error: function (error) {
|
||||
if (error.status === 401) {
|
||||
location.href = "login.html";
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function exit() {
|
||||
var isExit = confirm("确认退出?");
|
||||
if (isExit) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "user/exit",
|
||||
success: function (result) {
|
||||
location.href = "login.html";
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -0,0 +1,181 @@
|
||||
.body {
|
||||
width: 1200px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.btitle {
|
||||
height: 80px;
|
||||
border-bottom: 2px solid #1F5BDF;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.btitle>.one {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
.btitle>.one>div {
|
||||
margin-right: 50px;
|
||||
}
|
||||
|
||||
.btitle>.one>div>span {
|
||||
color: #1F5BDF;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.btitle>.two {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.btitle>.two>span {
|
||||
color: #1F5BDF;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.bnav {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
|
||||
.bnav>div {}
|
||||
|
||||
.lone {
|
||||
width: 10%;
|
||||
color: #1F5BDF;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.two {
|
||||
width: 45%;
|
||||
color: #1F5BDF;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.three {
|
||||
width: 10%;
|
||||
color: #1F5BDF;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.four {
|
||||
width: 15%;
|
||||
color: #1F5BDF;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.five {
|
||||
width: 10%;
|
||||
}
|
||||
.orderId {
|
||||
width: 20%;
|
||||
border-bottom: 1px solid #1F5BDF;
|
||||
padding: 7px 0;
|
||||
}
|
||||
.orderTime {
|
||||
width: 50%;
|
||||
border-bottom: 1px solid #1F5BDF;
|
||||
padding: 7px 0;
|
||||
}
|
||||
.pay {
|
||||
width: 15%;
|
||||
color:red;
|
||||
border-bottom: 1px solid #1F5BDF;
|
||||
padding: 7px 0;
|
||||
}
|
||||
.ser {
|
||||
width: 10%;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
ul,
|
||||
li {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.two {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
padding-right: 20px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.two>img {
|
||||
max-width: 70px;
|
||||
max-height: 70px;
|
||||
margin-right: 10px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.two>p{
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.quane {
|
||||
color: #1F5BDF;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.quane>span {
|
||||
color: #1F5BDF;
|
||||
}
|
||||
.four{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.four>input {
|
||||
width: 40px;
|
||||
text-align: center;
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border: 1px solid #1F5BDF;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.four>button {
|
||||
height: 30px;
|
||||
border: 1px solid #1F5BDF;
|
||||
box-sizing: border-box;
|
||||
background-color: #1F5BDF;
|
||||
color: #fff;
|
||||
width: 30px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.list>li {
|
||||
padding: 30px 20px;
|
||||
background-color: #eee;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.jimg {
|
||||
/* overflow:hidden; */
|
||||
}
|
||||
|
||||
.jimg>img:hover {
|
||||
transition: all .4s;
|
||||
transform: scale(1.2);
|
||||
}
|
@ -0,0 +1,673 @@
|
||||
/* 样式代码 */
|
||||
* {
|
||||
color: #4d4d4d;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
|
||||
input,
|
||||
textarea,
|
||||
select {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
ul,
|
||||
ol,
|
||||
dl,
|
||||
li {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.header>.container>img {
|
||||
display: block;
|
||||
height: 70%;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 1200px;
|
||||
height: 100%;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.header {
|
||||
height: 95px;
|
||||
background-color: #fff;
|
||||
border-bottom: 5px #1F5BDF solid;
|
||||
}
|
||||
|
||||
.header .container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.header .SearchBox {
|
||||
width: 320px;
|
||||
height: 40px;
|
||||
box-sizing: border-box;
|
||||
border: 2px solid #1F5BDF;
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.header .SearchBox>input {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
padding-left: 20px;
|
||||
width: 270px;
|
||||
border: none;
|
||||
background: none;
|
||||
}
|
||||
|
||||
.header .SearchBox>img {
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.nav {
|
||||
height: 50px;
|
||||
background-color: #1F5BDF;
|
||||
}
|
||||
|
||||
.nav>.container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.nav>.container>ul {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.nav>.container>ul>li,
|
||||
.nav>.container>ul>li a {
|
||||
height: 100%;
|
||||
display: block;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
box-sizing: border-box;
|
||||
line-height: 50px;
|
||||
}
|
||||
|
||||
.nav>.container>.l>li {
|
||||
margin-right: 22px;
|
||||
}
|
||||
|
||||
.nav>.container>.r {}
|
||||
|
||||
.nav>.container>.r>li {
|
||||
margin-left: 22px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.nav>.container>.r>li>a {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.box {
|
||||
height: 300px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.box-img img {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
opacity: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.box-img {
|
||||
transition: all 1.3s;
|
||||
}
|
||||
|
||||
.box-img img:nth-child(1) {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.box-left {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 90px;
|
||||
width: 35px;
|
||||
font-size: 16px;
|
||||
border-radius: 0 5px 5px 0;
|
||||
line-height: 70px;
|
||||
font-size: 27px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.box-right {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 90px;
|
||||
width: 35px;
|
||||
font-size: 16px;
|
||||
border-radius: 0 5px 5px 0;
|
||||
line-height: 70px;
|
||||
font-size: 27px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.box-right:hover {
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.box-left:hover {
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.box-button ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.box-button li {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
border-radius: 100%;
|
||||
background-color: #ccc;
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.box-button li:hover {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.box-button li:first-child {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.box-button {
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
right: 100px;
|
||||
}
|
||||
|
||||
.lunBox {
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.lunBox>.container {
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.guanggao {
|
||||
width: 24%;
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.guanggao>img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 145px;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.guanggao>img:last-child {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.lunBox .box {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.ceList {
|
||||
width: 24%;
|
||||
}
|
||||
|
||||
.title {
|
||||
border-bottom: 1px solid #1F5BDF;
|
||||
padding: 7px 0;
|
||||
}
|
||||
|
||||
.title>h3 {
|
||||
color: #1F5BDF;
|
||||
}
|
||||
|
||||
.ceList>ul>li {
|
||||
height: 37px;
|
||||
padding-left: 5px;
|
||||
border-bottom: 1px solid #e6e6e6;
|
||||
}
|
||||
|
||||
.ceList>ul>li:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.ceList>ul>li>a {
|
||||
font-weight: 700;
|
||||
display: block;
|
||||
height: 100%;
|
||||
line-height: 37px;
|
||||
font-size: 14px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.ceList>ul>.checked>a {
|
||||
color: #1F5BDF;
|
||||
}
|
||||
|
||||
.bodyer {
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.bodyer>.container {
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.bodyList {
|
||||
width: 74%;
|
||||
}
|
||||
|
||||
.bodyList>ul {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.bodyList>ul>li {
|
||||
width: 33.333%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #d8d8d8;
|
||||
padding: 25px 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.bodyList>ul>li>a {
|
||||
display: block;
|
||||
width: 30%;
|
||||
height: 120px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.bodyList>ul>li>a>img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
transition: .5s;
|
||||
}
|
||||
|
||||
.bodyList>ul>li:hover>a>img {
|
||||
transform: scale(1.5);
|
||||
}
|
||||
|
||||
.bodyList>ul>li>.nr {
|
||||
width: 56%;
|
||||
margin-left: 4%;
|
||||
}
|
||||
|
||||
.bodyList>ul>li>.nr>h3 {
|
||||
color: #1a1a1a;
|
||||
margin-bottom: 5px;
|
||||
font-size: 16px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.bodyList>ul>li>.nr>p {
|
||||
color: #666;
|
||||
font-size: 13px;
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.bodyList>ul>li>.nr>.biaoQian {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 12px;
|
||||
align-items: center;
|
||||
color: #a6a6a6;
|
||||
}
|
||||
|
||||
.bodyList>ul>li>.nr>.biaoQian>.l {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #1F5BDF;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.bodyList>ul>li>.nr>.biaoQian>.l>img {
|
||||
display: block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.bodyList>ul>li>.nr>.biaoQian>.r {
|
||||
border: 1px solid #1F5BDF;
|
||||
padding: 0 2px;
|
||||
color: #1F5BDF;
|
||||
}
|
||||
|
||||
.heng {
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.heng img {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.paiHang {
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.paiHang .container {
|
||||
padding: 25px;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.gtitle {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.gtitle>span {
|
||||
font-size: 12px;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.paiHang .item {
|
||||
width: 23%;
|
||||
}
|
||||
|
||||
.paiHang .item>ul>li>a {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.paiHang .item>ul>li {
|
||||
border-bottom: 1px solid #d8d8d8;
|
||||
}
|
||||
|
||||
.paiHang .item>ul>li:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.paiHang .item>ul>li>a>.h {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.paiHang .item>ul>li>a>.h>span {
|
||||
margin-right: 5px;
|
||||
font: 700 14px/16px Arial;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
text-align: center;
|
||||
letter-spacing: -1px;
|
||||
color: #666;
|
||||
background: #ededed;
|
||||
}
|
||||
|
||||
.paiHang .item>ul>li>a>.n {
|
||||
font-size: 12px;
|
||||
color: #a6a6a6;
|
||||
}
|
||||
|
||||
|
||||
.paiHang .item>ul>li:first-child {
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.paiHang .item>ul>li:first-child>a {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.paiHang .item>ul>li:first-child>a>img {
|
||||
display: block;
|
||||
width: 90px;
|
||||
height: 95px;
|
||||
}
|
||||
|
||||
.paiHang .item>ul>li:first-child>a>.nr>.number {
|
||||
font: 700 14px/18px Arial;
|
||||
width: 36px;
|
||||
height: 18px;
|
||||
margin: 0 0 6px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
background: #1F5BDF;
|
||||
}
|
||||
|
||||
.paiHang .item>ul>li:first-child>a>.nr>h3 {
|
||||
color: #262626;
|
||||
outline: 0;
|
||||
font-size: 14px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.paiHang .item>ul>li:first-child>a>.nr>p {
|
||||
font-size: 12px;
|
||||
overflow: hidden;
|
||||
height: 14px;
|
||||
color: #a6a6a6;
|
||||
}
|
||||
|
||||
.paiHang .item>ul>li:nth-child(2)>a>.h>span {
|
||||
color: #fff;
|
||||
background: #d4e625;
|
||||
}
|
||||
|
||||
.paiHang .item>ul>li:nth-child(3)>a>.h>span {
|
||||
color: #fff;
|
||||
background: #f7c595;
|
||||
}
|
||||
|
||||
.titleNav {
|
||||
height: 40px;
|
||||
font-size: 14px;
|
||||
color: #ccc;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.titleNav .container {
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.header .user {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.header .user>span {
|
||||
color: #1F5BDF !important;
|
||||
font-size: 16px;
|
||||
margin-right: 8px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.header .user>img {
|
||||
display: block;
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
.swiper {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.wrap {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.warp ul {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.wrap ul li {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.wrap ul li img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.wrap ol {
|
||||
position: absolute;
|
||||
right: 5%;
|
||||
bottom: 20px;
|
||||
}
|
||||
|
||||
.wrap ol li {
|
||||
list-style: none;
|
||||
height: 10px;
|
||||
width: 10px;
|
||||
border: 1px solid #FFF;
|
||||
border-radius: 50%;
|
||||
margin-left: 12px;
|
||||
color: #959490;
|
||||
float: left;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
font-size: 0px;
|
||||
}
|
||||
|
||||
.wrap ol .on {
|
||||
background: #1F5BDF;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: #1F5BDF;
|
||||
height: 180px;
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
.footer>.container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.footer>.container>img {
|
||||
height: 70%;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.footer * {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.footer .nr>p {
|
||||
text-align: center;
|
||||
line-height: 2.1;
|
||||
}
|
||||
|
||||
.footer .nr>p:first-child {
|
||||
letter-spacing: 10px;
|
||||
}
|
||||
|
||||
.footer .nr>p:last-child {
|
||||
letter-spacing: 3px;
|
||||
}
|
||||
|
||||
#pic {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.xf {
|
||||
position: fixed;
|
||||
left: 20px;
|
||||
top: 45%;
|
||||
}
|
||||
|
||||
.xf a {
|
||||
height: 40px;
|
||||
width: 100px;
|
||||
display: flex;
|
||||
display: block;
|
||||
border-radius: 2px;
|
||||
background: #1F5BDF;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 40px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.pagination{
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
@ -0,0 +1,88 @@
|
||||
/* 样式代码 */
|
||||
.body{
|
||||
margin: 60px 0;
|
||||
}
|
||||
.body .one {
|
||||
padding: 80px;
|
||||
box-sizing: border-box;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.body .one>.img {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.body .one>.img>img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.body .one>.text {
|
||||
width: 77%;
|
||||
}
|
||||
|
||||
.body .one>.text>.tit {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.body .one>.text>.tit>span {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.body .one>.text>.tit>h1 {
|
||||
font-size: 32px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.body .one>.text>.biaoList {
|
||||
display: flex;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
.body .one>.text>.biaoList>li {
|
||||
padding: 2px 3px;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #1F5BDF;
|
||||
font-size: 12px;
|
||||
color: #1F5BDF;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.body .one>.text>.shuJu {
|
||||
margin: 20px 0;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.body .one>.text>.shuJu>span {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.body .one>.text>.textNr {
|
||||
font-size: 14px;
|
||||
line-height: 2.2;
|
||||
}
|
||||
|
||||
.body .one>.text>.btn>button {
|
||||
font: 14px/34px PingFangSC-Regular, '-apple-system', Simsun;
|
||||
display: inline-block;
|
||||
width: 120px;
|
||||
height: 34px;
|
||||
margin-right: 20px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
color: #1F5BDF !important;
|
||||
border-radius: 100px !important;
|
||||
background: #fff !important;
|
||||
border-color:#1F5BDF;
|
||||
}
|
||||
.body .one>.text>.btn>.checked{
|
||||
color: #fff !important;
|
||||
border-radius: 100px !important;
|
||||
background: #1F5BDF !important;
|
||||
}
|
@ -0,0 +1 @@
|
||||
.row-space{margin-top:15px !important}.pagination_custom{margin:0}.small-input{width:50px !important}@media(min-width:768px){.row-space{margin-top:15px !important}}@media(min-width:992px){.row-space{margin-top:0 !important}}@media(min-width:1200px){.row-space{margin-top:0 !important}}
|
@ -0,0 +1,287 @@
|
||||
/* 样式代码 */
|
||||
* {
|
||||
color: #4d4d4d;
|
||||
}
|
||||
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
input,
|
||||
textarea,
|
||||
select {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
ul,
|
||||
ol,
|
||||
dl,
|
||||
li {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 80%;
|
||||
height: 100%;
|
||||
margin: auto;
|
||||
max-width: 1400px;
|
||||
min-width: 1200px;
|
||||
}
|
||||
|
||||
.nav>ul>li {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.nav>ul>li>ul {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
left: 0;
|
||||
z-index: 999;
|
||||
width: 100%;
|
||||
background-color: #1F5BDF;
|
||||
border-radius: 0 0 5px 5px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.nav>ul>li>ul>li {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
height: 50px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.nav>ul>li {
|
||||
position: relative;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.nav>ul>li:hover>ul {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.nav>ul>li>ul {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
left: 0;
|
||||
z-index: 999;
|
||||
width: 100%;
|
||||
background-color: #1F5BDF;
|
||||
border-radius: 0 0 5px 5px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.nav>ul>li>ul>li {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
height: 50px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
|
||||
.header {
|
||||
height: 80px;
|
||||
background-color: #F5F5F5;
|
||||
min-width: 1000px;
|
||||
}
|
||||
|
||||
|
||||
.container {
|
||||
width: 992px;
|
||||
height: 100%;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.header-logo {
|
||||
height: 43px;
|
||||
line-height: 40px;
|
||||
padding-right: 15px;
|
||||
border-right: solid 1px #e2e2e2;
|
||||
}
|
||||
|
||||
.header-yi {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.header-logo>a,
|
||||
.header-logo img {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.header-text {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
font-size: 24px;
|
||||
color: #333;
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
.body {
|
||||
width: 100%;
|
||||
height: 480px;
|
||||
background-position: center center;
|
||||
background-color: #1F5BDF;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.body-form {
|
||||
width: 344px;
|
||||
height: 368px;
|
||||
background: #fff;
|
||||
padding: 0 24px;
|
||||
position: absolute;
|
||||
top: 56px;
|
||||
left: 50%;
|
||||
margin-left: 152px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.body-form-t {
|
||||
line-height: 72px;
|
||||
height: 72px;
|
||||
border-bottom: solid 1px #e5e5e5;
|
||||
font-size: 20px;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.body-input {
|
||||
display: flex;
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
|
||||
.body .iconfont {
|
||||
font-size: 17px !important;
|
||||
}
|
||||
|
||||
.body-input>span {
|
||||
display: block;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
color: #9A9A9A;
|
||||
background-color: #F1F1F1;
|
||||
border: solid 1px #ddd;
|
||||
}
|
||||
|
||||
.body-input>input {
|
||||
width: 256px;
|
||||
height: 40px;
|
||||
border: solid 1px #ddd;
|
||||
padding: 0;
|
||||
padding: 0 15px;
|
||||
border-left: none;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.body-wj {
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
margin: -3px 0 23px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.body-wj>a {
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.body-btn>button {
|
||||
width: 100%;
|
||||
font-size: 18px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
background: #1F5BDF;
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.body-zc {
|
||||
margin-top: 22px;
|
||||
}
|
||||
|
||||
.body-zc .icon-you {
|
||||
font-size: 20px;
|
||||
margin-right: 5px;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.body-zc>a {
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
font-size: 14px;
|
||||
color: #1F5BDF;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.foot {
|
||||
font-size: 12px;
|
||||
line-height: 24px;
|
||||
text-align: center;
|
||||
padding: 32px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.foot>span {
|
||||
margin: 0 6px;
|
||||
}
|
||||
|
||||
.yanzheng {
|
||||
background-color: #1F5BDF;
|
||||
color: #fff;
|
||||
height: 42px;
|
||||
border: 0;
|
||||
display: block;
|
||||
white-space: nowrap;
|
||||
width: 35%;
|
||||
margin-left:50px;
|
||||
}
|
@ -0,0 +1,204 @@
|
||||
/* 样式代码 */
|
||||
* {
|
||||
color: #4d4d4d;
|
||||
}
|
||||
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
input,
|
||||
textarea {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
ul,
|
||||
ol,
|
||||
dl,
|
||||
li {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
/* background-color: #F5F5F5; */
|
||||
}
|
||||
|
||||
.header {
|
||||
height: 80px;
|
||||
background-color: #1F5BDF;
|
||||
min-width: 1000px;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 1200px;
|
||||
height: 100%;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.header-logo {
|
||||
height: 43px;
|
||||
line-height: 40px;
|
||||
padding-right: 15px;
|
||||
border-right: solid 1px #e2e2e2;
|
||||
}
|
||||
|
||||
.header-yi {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.header-logo>a,
|
||||
.header-logo img {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.header-text {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
font-size: 24px;
|
||||
color: #fff;
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
.foot {
|
||||
font-size: 12px;
|
||||
line-height: 24px;
|
||||
text-align: center;
|
||||
padding: 32px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.foot>span {
|
||||
margin: 0 6px;
|
||||
}
|
||||
|
||||
.header-er {
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.header-er>a {
|
||||
color: #fff;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.body {
|
||||
width: 992px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.body>.container {
|
||||
height: 351px;
|
||||
margin: 40px auto;
|
||||
padding: 45px 0 0 75px;
|
||||
width: 800px;
|
||||
background: #fff;
|
||||
box-shadow: 0px 0px 5px 0px rgb(0 0 0 / 10%);
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.body-input {
|
||||
display: flex;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.body-input>span {
|
||||
line-height: 32px;
|
||||
width: 180px;
|
||||
height: 30px;
|
||||
overflow: hidden;
|
||||
text-align: right;
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
.body-input>input {
|
||||
width: 288px;
|
||||
height: 32px;
|
||||
line-height: 20px;
|
||||
font-size: 14px;
|
||||
padding: 0px 8px;
|
||||
border: solid 1px #ddd;
|
||||
}
|
||||
|
||||
.body-input-bg>input {
|
||||
/* background: url(../images/keyboard.png) no-repeat 282px center; */
|
||||
padding-right: 30px;
|
||||
width: 265px;
|
||||
}
|
||||
|
||||
.body-input-yz>input {
|
||||
width: 123px;
|
||||
}
|
||||
|
||||
.body-input-yz>img {
|
||||
border: none;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.body-input-yz-huan {
|
||||
display: initial !important;
|
||||
width: auto !important;
|
||||
}
|
||||
|
||||
.body-input-yz-huan>a {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.body-btn {
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
.body-btn>button {
|
||||
width: 80px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
text-align: center;
|
||||
background: #1F5BDF;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
display: block;
|
||||
margin-left: 189px;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.foot {
|
||||
border-top: solid 1px #ddd;
|
||||
font-size: 16px;
|
||||
}
|
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 110 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 683 KiB |
After Width: | Height: | Size: 236 KiB |
After Width: | Height: | Size: 297 KiB |
After Width: | Height: | Size: 110 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 377 B |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 103 KiB |
After Width: | Height: | Size: 8.7 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 422 B |
@ -0,0 +1,187 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!-- 字符编码 -->
|
||||
<meta charset="utf-8">
|
||||
<title></title>
|
||||
<link rel="stylesheet" type="text/css" href="css/css.css" />
|
||||
<!-- 引用了js文件夹下的js.js脚本文件 -->
|
||||
<script type="text/javascript" src="js/js.js"></script>
|
||||
<script type="text/javascript" src="js/jquery.min.js"></script>
|
||||
<script src="js/jq-paginator.js"></script>
|
||||
<link rel="stylesheet" href="css/bootstrap.min.css">
|
||||
<script type="text/javascript" src="js/bootstrap.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 网站首页头部模块开始 -->
|
||||
<div class="header">
|
||||
<div class="container">
|
||||
<img src="images/logo.png" >
|
||||
<!-- <div class="SearchBox userNav">-->
|
||||
<!-- <input type="text" id="search" name="search" placeholder="阿莫西林">-->
|
||||
<!-- <img src="images/search.png" onclick="search()">-->
|
||||
<!-- </div>-->
|
||||
<a onclick="exit()" class="user userNav">
|
||||
<span>退出登录</span>
|
||||
<img src="images/ge.jpg" >
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 网站首页头部模块结束 -->
|
||||
|
||||
<!-- 网站首页轮播图模块开始 -->
|
||||
<div class="lunBox">
|
||||
<div class="container">
|
||||
<div class="guanggao">
|
||||
<img src="images/a1.jpg" alt="">
|
||||
<img src="images/a2.jpg" alt="">
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="swiper">
|
||||
<!-- 轮播图 -->
|
||||
<div id="wrap" class="wrap">
|
||||
<ul id="pic">
|
||||
<li><img src="images/banner1.jpg" alt="" /></li>
|
||||
<li><img src="images/banner2.jpg" alt="" /></li>
|
||||
<li><img src="images/banner3.jpg" alt="" /></li>
|
||||
</ul>
|
||||
<ol id="list">
|
||||
<li class="on">1</li>
|
||||
<li>2</li>
|
||||
<li>3</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ceList">
|
||||
<div class="title" id="1">
|
||||
<h3>公告</h3>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="checked">
|
||||
<a href="#">[公告]全国数字购药用户调研</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">[活动]药品全场8折</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">[公告]网站留言建议板块正在维护</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">[公告]网站信息正在补充中</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">[公告]至用户们的一封信</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">[公告]2024最受欢迎品牌</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">[公告]全体员工欢迎您!</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 网站首页轮播图模块结束 -->
|
||||
|
||||
<!-- 网站首页身体内容模块开始 -->
|
||||
<div class="bodyer">
|
||||
<div class="container">
|
||||
<div class="bodyList" style="width: 100%;">
|
||||
<div class="title" id="2">
|
||||
<h3 style="font-weight:bold;">全部药品</h3>
|
||||
</div>
|
||||
<ul class="list">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="demo">
|
||||
<ul id="pageContainer" class="pagination justify-content-center"></ul>
|
||||
</div>
|
||||
<!-- 网站首页身体内容模块结束 -->
|
||||
|
||||
<!-- 网站首页页脚模块开始 -->
|
||||
<div class="footer">
|
||||
<div class="container">
|
||||
<img src="images/flogo.png" alt="">
|
||||
<div class="nr">
|
||||
<p>
|
||||
© 我不是药神网版权所有
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 网站首页页脚模块结束 -->
|
||||
|
||||
<!-- 网站侧边导航 -->
|
||||
<div class="xf">
|
||||
<div class="t"><a href="index.html">主页面</a></div>
|
||||
<div class="t"><a href="classification.html">分类药品</a></div>
|
||||
<div class="t"><a href="car.html">购物车</a></div>
|
||||
<div class="t"><a href="order.html">历史订单</a></div>
|
||||
</div>
|
||||
<script>
|
||||
getDrugList();
|
||||
function getDrugList() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "drug/getDrugsByPage" + location.search,
|
||||
success: function (resultAll) {
|
||||
var result = resultAll.data;
|
||||
var finalHtml = "";
|
||||
for (var drug of result.drugInfos) {
|
||||
finalHtml += '<li>';
|
||||
finalHtml += '<a href="item.html?drugId='+drug.drugId+'"><img src="'+drug.picture+'"></a>';
|
||||
finalHtml += '<div class="nr">';
|
||||
finalHtml += '<h3>'+drug.drugName+'</h3>';
|
||||
finalHtml += '<p>我不是药神网特供 </p>';
|
||||
finalHtml += '<div class="biaoQian">';
|
||||
finalHtml += '<div class="l">¥'+drug.price+'</div>';
|
||||
finalHtml += '<div class="r">'+drug.efficacy+'</div>'
|
||||
finalHtml += '</div></div></li>';
|
||||
}
|
||||
$(".list").html(finalHtml);
|
||||
$("#pageContainer").jqPaginator({
|
||||
totalCounts: result.total, //总记录数
|
||||
pageSize: 9, //每页的个数
|
||||
visiblePages: 5, //可视页数
|
||||
currentPage: result.pageRequest.currentPage, //当前页码
|
||||
first: '<li class="page-item"><a class="page-link">首页</a></li>',
|
||||
prev: '<li class="page-item"><a class="page-link" href="javascript:void(0);">上一页<\/a><\/li>',
|
||||
next: '<li class="page-item"><a class="page-link" href="javascript:void(0);">下一页<\/a><\/li>',
|
||||
last: '<li class="page-item"><a class="page-link" href="javascript:void(0);">最后一页<\/a><\/li>',
|
||||
page: '<li class="page-item"><a class="page-link" href="javascript:void(0);">{{page}}<\/a><\/li>',
|
||||
//页面初始化和页码点击时都会执行
|
||||
onPageChange: function (page, type) {
|
||||
console.log("第" + page + "页, 类型:" + type);
|
||||
if (type === "change") {
|
||||
location.href = "index.html?currentPage="+page;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
error: function (error) {
|
||||
if (error.status === 401) {
|
||||
location.href = "login.html";
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
function exit() {
|
||||
var isExit = confirm("确认退出?");
|
||||
if (isExit) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "user/exit",
|
||||
success: function (result) {
|
||||
location.href = "login.html";
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,126 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<!-- 定义适配移动端屏幕比例代码 -->
|
||||
<meta name="viewport"
|
||||
content="width=device-width,user-scalable=no,inital-scale=1.0,maximum-scale=1.0,minimum-scale=1.0">
|
||||
<title></title>
|
||||
<!-- 需要引用的css样式文件 -->
|
||||
<link rel="stylesheet" type="text/css" href="css/css.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/item.css" />
|
||||
<script type="text/javascript" src="js/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 网站商品详情页头部模块开始 -->
|
||||
<div class="header">
|
||||
<div class="container">
|
||||
<img src="images/logo.png" >
|
||||
<!-- <div class="SearchBox userNav">-->
|
||||
<!-- <input type="text" placeholder="阿莫西林">-->
|
||||
<!-- <img src="images/search.png" onclick="location.href='searchList.html'">-->
|
||||
<!-- </div>-->
|
||||
<a onclick="exit()" class="user userNav">
|
||||
<span>退出登录</span>
|
||||
<img src="images/ge.jpg" >
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="titleNav">
|
||||
<div class="container">
|
||||
<a href="index.html">首页</a> > <a href="#">商品详情</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 网站商品详情页当前位置导航模块结束 -->
|
||||
|
||||
<!-- 网站商品详情页身体内容模块开始 -->
|
||||
<div class="body">
|
||||
<div class="container">
|
||||
<div class="one">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 网站商品详情页身体内容模块结束 -->
|
||||
|
||||
<!-- 网站商品详情页页脚模块开始 -->
|
||||
<div class="footer">
|
||||
<div class="container">
|
||||
<img src="images/flogo.png" alt="">
|
||||
<div class="nr">
|
||||
<p>
|
||||
© 我不是药神网版权所有
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 网站商品详情页页脚模块结束 -->
|
||||
<!-- 网站侧边导航 -->
|
||||
<div class="xf">
|
||||
<div class="t"><a href="index.html">主页面</a></div>
|
||||
<div class="t"><a href="classification.html">分类药品</a></div>
|
||||
<div class="t"><a href="car.html">购物车</a></div>
|
||||
<div class="t"><a href="order.html">历史订单</a></div>
|
||||
</div>
|
||||
<div style="display: none" id="drugId" name="drugId">17</div>
|
||||
<script>
|
||||
getDetail();
|
||||
function getDetail() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "drug/getDrugDetail"+location.search,
|
||||
success: function (resultALL) {
|
||||
var result = resultALL.data;
|
||||
if (result != null) {
|
||||
var finalHtml = "";
|
||||
finalHtml += '<div style="display: none" id="drugId" name="drugId">'+result.drugId+'</div>';
|
||||
finalHtml += '<div class="img"><img src="'+result.picture+'"></div>';
|
||||
finalHtml += '<div class="text"><div class="tit">';
|
||||
finalHtml += '<h1>'+result.drugName+'</h1></div>';
|
||||
finalHtml += '<ul class="biaoList">'
|
||||
finalHtml += '<li>'+result.className+'</li><li>包邮</li><li>直营发货</li></ul>';
|
||||
finalHtml += '<div class="shuJu">'+'库存<span>'+result.inventory+'</span>|有效期<span>'+result.validity+'</span>个月</div>';
|
||||
finalHtml += '<div class="textNr" style="margin-bottom: 0;">'+result.efficacy+'</div>';
|
||||
finalHtml += '<div class="jia" style="margin: 20px 0;color:red;font-size: 25px;">¥'+result.price+'元</div>';
|
||||
finalHtml += '<div class="btn">';
|
||||
finalHtml += '<button class="checked" onclick="addDrug()">加入购物车</button>';
|
||||
$(".one").html(finalHtml);
|
||||
}
|
||||
},
|
||||
error: function (error) {
|
||||
if (error.status === 401) {
|
||||
location.href = "login.html";
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function addDrug(){
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "cart/addDrug",
|
||||
data: {
|
||||
"drugId": $("#drugId").text()
|
||||
},
|
||||
success: function (result) {
|
||||
if (result.code === 200) {
|
||||
alert("添加成功!");
|
||||
} else {
|
||||
console.log(result);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function exit() {
|
||||
var isExit = confirm("确认退出?");
|
||||
if (isExit) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "user/exit",
|
||||
success: function (result) {
|
||||
location.href = "login.html";
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,289 @@
|
||||
/* eslint-env jquery */
|
||||
/* eslint-disable new-cap */
|
||||
|
||||
'use strict'
|
||||
|
||||
var $ = jQuery
|
||||
|
||||
$.jqPaginator = function (el, options) {
|
||||
if (!(this instanceof $.jqPaginator)) {
|
||||
return new $.jqPaginator(el, options)
|
||||
}
|
||||
|
||||
var self = this
|
||||
|
||||
self.$container = $(el)
|
||||
|
||||
self.$container.data('jqPaginator', self)
|
||||
|
||||
self.init = function () {
|
||||
if (options.first || options.prev || options.next || options.last || options.page) {
|
||||
options = $.extend(
|
||||
{},
|
||||
{
|
||||
first: '',
|
||||
prev: '',
|
||||
next: '',
|
||||
last: '',
|
||||
page: ''
|
||||
},
|
||||
options
|
||||
)
|
||||
}
|
||||
|
||||
self.options = $.extend({}, $.jqPaginator.defaultOptions, options)
|
||||
|
||||
self.verify()
|
||||
|
||||
self.extendJquery()
|
||||
|
||||
self.render()
|
||||
|
||||
self.fireEvent(this.options.currentPage, 'init')
|
||||
}
|
||||
|
||||
self.verify = function () {
|
||||
var opts = self.options
|
||||
|
||||
if (!self.isNumber(opts.totalPages)) {
|
||||
throw new Error('[jqPaginator] type error: totalPages')
|
||||
}
|
||||
|
||||
if (!self.isNumber(opts.totalCounts)) {
|
||||
throw new Error('[jqPaginator] type error: totalCounts')
|
||||
}
|
||||
|
||||
if (!self.isNumber(opts.pageSize)) {
|
||||
throw new Error('[jqPaginator] type error: pageSize')
|
||||
}
|
||||
|
||||
if (!self.isNumber(opts.currentPage)) {
|
||||
throw new Error('[jqPaginator] type error: currentPage')
|
||||
}
|
||||
|
||||
if (!self.isNumber(opts.visiblePages)) {
|
||||
throw new Error('[jqPaginator] type error: visiblePages')
|
||||
}
|
||||
|
||||
if (!opts.totalPages && !opts.totalCounts) {
|
||||
throw new Error('[jqPaginator] totalCounts or totalPages is required')
|
||||
}
|
||||
|
||||
if (!opts.totalPages && opts.totalCounts && !opts.pageSize) {
|
||||
throw new Error('[jqPaginator] pageSize is required')
|
||||
}
|
||||
|
||||
if (opts.totalCounts && opts.pageSize) {
|
||||
opts.totalPages = Math.ceil(opts.totalCounts / opts.pageSize)
|
||||
}
|
||||
|
||||
if (opts.currentPage < 1 || opts.currentPage > opts.totalPages) {
|
||||
throw new Error('[jqPaginator] currentPage is incorrect')
|
||||
}
|
||||
|
||||
if (opts.totalPages < 1) {
|
||||
throw new Error('[jqPaginator] totalPages cannot be less currentPage')
|
||||
}
|
||||
}
|
||||
|
||||
self.extendJquery = function () {
|
||||
$.fn.jqPaginatorHTML = function (s) {
|
||||
return s
|
||||
? this.before(s).remove()
|
||||
: $('<p>')
|
||||
.append(this.eq(0).clone())
|
||||
.html()
|
||||
}
|
||||
}
|
||||
|
||||
self.render = function () {
|
||||
self.renderHtml()
|
||||
self.setStatus()
|
||||
self.bindEvents()
|
||||
}
|
||||
|
||||
self.renderHtml = function () {
|
||||
var html = []
|
||||
|
||||
var pages = self.getPages()
|
||||
for (var i = 0, j = pages.length; i < j; i++) {
|
||||
html.push(self.buildItem('page', pages[i]))
|
||||
}
|
||||
|
||||
self.isEnable('prev') && html.unshift(self.buildItem('prev', self.options.currentPage - 1))
|
||||
self.isEnable('first') && html.unshift(self.buildItem('first', 1))
|
||||
self.isEnable('statistics') && html.unshift(self.buildItem('statistics'))
|
||||
self.isEnable('next') && html.push(self.buildItem('next', self.options.currentPage + 1))
|
||||
self.isEnable('last') && html.push(self.buildItem('last', self.options.totalPages))
|
||||
|
||||
if (self.options.wrapper) {
|
||||
self.$container.html(
|
||||
$(self.options.wrapper)
|
||||
.html(html.join(''))
|
||||
.jqPaginatorHTML()
|
||||
)
|
||||
} else {
|
||||
self.$container.html(html.join(''))
|
||||
}
|
||||
}
|
||||
|
||||
self.buildItem = function (type, pageData) {
|
||||
var html = self.options[type]
|
||||
.replace(/{{page}}/g, pageData)
|
||||
.replace(/{{totalPages}}/g, self.options.totalPages)
|
||||
.replace(/{{totalCounts}}/g, self.options.totalCounts)
|
||||
|
||||
return $(html)
|
||||
.attr({
|
||||
'jp-role': type,
|
||||
'jp-data': pageData
|
||||
})
|
||||
.jqPaginatorHTML()
|
||||
}
|
||||
|
||||
self.setStatus = function () {
|
||||
var options = self.options
|
||||
|
||||
if (!self.isEnable('first') || options.currentPage === 1) {
|
||||
$('[jp-role=first]', self.$container).addClass(options.disableClass)
|
||||
}
|
||||
if (!self.isEnable('prev') || options.currentPage === 1) {
|
||||
$('[jp-role=prev]', self.$container).addClass(options.disableClass)
|
||||
}
|
||||
if (!self.isEnable('next') || options.currentPage >= options.totalPages) {
|
||||
$('[jp-role=next]', self.$container).addClass(options.disableClass)
|
||||
}
|
||||
if (!self.isEnable('last') || options.currentPage >= options.totalPages) {
|
||||
$('[jp-role=last]', self.$container).addClass(options.disableClass)
|
||||
}
|
||||
|
||||
$('[jp-role=page]', self.$container).removeClass(options.activeClass)
|
||||
$('[jp-role=page][jp-data=' + options.currentPage + ']', self.$container).addClass(options.activeClass)
|
||||
}
|
||||
|
||||
self.getPages = function () {
|
||||
var pages = []
|
||||
|
||||
var visiblePages = self.options.visiblePages
|
||||
|
||||
var currentPage = self.options.currentPage
|
||||
|
||||
var totalPages = self.options.totalPages
|
||||
|
||||
if (visiblePages > totalPages) {
|
||||
visiblePages = totalPages
|
||||
}
|
||||
|
||||
var half = Math.floor(visiblePages / 2)
|
||||
var start = currentPage - half + 1 - (visiblePages % 2)
|
||||
var end = currentPage + half
|
||||
|
||||
if (start < 1) {
|
||||
start = 1
|
||||
end = visiblePages
|
||||
}
|
||||
if (end > totalPages) {
|
||||
end = totalPages
|
||||
start = 1 + totalPages - visiblePages
|
||||
}
|
||||
|
||||
var itPage = start
|
||||
while (itPage <= end) {
|
||||
pages.push(itPage)
|
||||
itPage++
|
||||
}
|
||||
|
||||
return pages
|
||||
}
|
||||
|
||||
self.isNumber = function (value) {
|
||||
var type = typeof value
|
||||
return type === 'number' || type === 'undefined'
|
||||
}
|
||||
|
||||
self.isEnable = function (type) {
|
||||
return self.options[type] && typeof self.options[type] === 'string'
|
||||
}
|
||||
|
||||
self.switchPage = function (pageIndex) {
|
||||
self.options.currentPage = pageIndex
|
||||
self.render()
|
||||
}
|
||||
|
||||
self.fireEvent = function (pageIndex, type) {
|
||||
return typeof self.options.onPageChange !== 'function' || self.options.onPageChange(pageIndex, type) !== false
|
||||
}
|
||||
|
||||
self.callMethod = function (method, options) {
|
||||
switch (method) {
|
||||
case 'option':
|
||||
self.options = $.extend({}, self.options, options)
|
||||
self.verify()
|
||||
self.render()
|
||||
break
|
||||
case 'destroy':
|
||||
self.$container.empty()
|
||||
self.$container.removeData('jqPaginator')
|
||||
break
|
||||
default:
|
||||
throw new Error('[jqPaginator] method "' + method + '" does not exist')
|
||||
}
|
||||
|
||||
return self.$container
|
||||
}
|
||||
|
||||
self.bindEvents = function () {
|
||||
var opts = self.options
|
||||
|
||||
self.$container.off()
|
||||
self.$container.on('click', '[jp-role]', function () {
|
||||
var $el = $(this)
|
||||
if ($el.hasClass(opts.disableClass) || $el.hasClass(opts.activeClass)) {
|
||||
return
|
||||
}
|
||||
|
||||
var pageIndex = +$el.attr('jp-data')
|
||||
if (self.fireEvent(pageIndex, 'change')) {
|
||||
self.switchPage(pageIndex)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
self.init()
|
||||
|
||||
return self.$container
|
||||
}
|
||||
|
||||
$.jqPaginator.defaultOptions = {
|
||||
wrapper: '',
|
||||
first: '<li class="first"><a href="javascript:;">First</a></li>',
|
||||
prev: '<li class="prev"><a href="javascript:;">Previous</a></li>',
|
||||
next: '<li class="next"><a href="javascript:;">Next</a></li>',
|
||||
last: '<li class="last"><a href="javascript:;">Last</a></li>',
|
||||
page: '<li class="page"><a href="javascript:;">{{page}}</a></li>',
|
||||
totalPages: 0,
|
||||
totalCounts: 0,
|
||||
pageSize: 0,
|
||||
currentPage: 1,
|
||||
visiblePages: 7,
|
||||
disableClass: 'disabled',
|
||||
activeClass: 'active',
|
||||
onPageChange: null
|
||||
}
|
||||
|
||||
$.fn.jqPaginator = function () {
|
||||
var self = this
|
||||
|
||||
var args = Array.prototype.slice.call(arguments)
|
||||
|
||||
if (typeof args[0] === 'string') {
|
||||
var $instance = $(self).data('jqPaginator')
|
||||
if (!$instance) {
|
||||
throw new Error('[jqPaginator] the element is not instantiated')
|
||||
} else {
|
||||
return $instance.callMethod(args[0], args[1])
|
||||
}
|
||||
} else {
|
||||
return new $.jqPaginator(this, args[0])
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; };
|
||||
if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } }
|
||||
{
|
||||
let window = _____WB$wombat$assign$function_____("window");
|
||||
let self = _____WB$wombat$assign$function_____("self");
|
||||
let document = _____WB$wombat$assign$function_____("document");
|
||||
let location = _____WB$wombat$assign$function_____("location");
|
||||
let top = _____WB$wombat$assign$function_____("top");
|
||||
let parent = _____WB$wombat$assign$function_____("parent");
|
||||
let frames = _____WB$wombat$assign$function_____("frames");
|
||||
let opener = _____WB$wombat$assign$function_____("opener");
|
||||
|
||||
/*! jqPaginator-1.0.0
|
||||
* http://jqPaginator.keenwon.com
|
||||
*/
|
||||
!function(a){"use strict";a.jqPaginator=function(b,c){var d=this;return d.$container=a(b),d.$container.data("jqPaginator",d),d.init=function(){var b=d.options=a.extend({},a.jqPaginator.defaultOptions,c);if(!b.totalPages&&!b.totalCounts)throw new Error("[jqPaginator] totalCounts or totalPages is required");if(!b.totalPages&&b.totalCounts&&!b.pageSize)throw new Error("[jqPaginator] pageSize is required");if(!b.totalPages&&b.totalCounts&&b.pageSize&&(b.totalPages=Math.ceil(b.totalCounts/b.pageSize)),b.currentPage<1||b.currentPage>b.totalPages)throw new Error("[jqPaginator] currentPage is incorrect");if(b.totalPages<1)throw new Error("[jqPaginator] totalPages cannot be less currentPage");d.extendJquery(),d.render(),d.fireEvent(this.options.currentPage)},d.extendJquery=function(){a.fn.jqPaginatorHTML=function(b){return b?this.before(b).remove():a("<p>").append(this.eq(0).clone()).html()}},d.render=function(){d.renderHtml(),d.setStatus(),d.bindEvents()},d.renderHtml=function(){for(var b=[],c=d.getPages(),e=0,f=c.length;f>e;e++)b.push(d.buildItem("page",c[e]));d.isEnable("prev")&&b.unshift(d.buildItem("prev",d.options.currentPage-1)),d.isEnable("first")&&b.unshift(d.buildItem("first",1)),d.isEnable("statistics")&&b.unshift(d.buildItem("statistics")),d.isEnable("next")&&b.push(d.buildItem("next",d.options.currentPage+1)),d.isEnable("last")&&b.push(d.buildItem("last",d.options.totalPages)),d.$container.html(d.options.wrapper?a(d.options.wrapper).html(b.join("")).jqPaginatorHTML():b.join(""))},d.buildItem=function(b,c){var e=d.options[b].replace(/{{page}}/g,c).replace(/{{totalPages}}/g,d.options.totalPages).replace(/{{totalCounts}}/g,d.options.totalCounts);return a(e).attr({"jp-role":b,"jp-data":c}).jqPaginatorHTML()},d.setStatus=function(){var b=d.options;d.isEnable("first")&&1!==b.currentPage||a("[jp-role=first]",d.$container).addClass(b.disableClass),d.isEnable("prev")&&1!==b.currentPage||a("[jp-role=prev]",d.$container).addClass(b.disableClass),(!d.isEnable("next")||b.currentPage>=b.totalPages)&&a("[jp-role=next]",d.$container).addClass(b.disableClass),(!d.isEnable("last")||b.currentPage>=b.totalPages)&&a("[jp-role=last]",d.$container).addClass(b.disableClass),a("[jp-role=page]",d.$container).removeClass(b.activeClass),a("[jp-role=page][jp-data="+b.currentPage+"]",d.$container).addClass(b.activeClass)},d.getPages=function(){var a=[],b=d.options.visiblePages,c=d.options.currentPage,e=d.options.totalPages;b>e&&(b=e);var f=Math.floor(b/2),g=c-f+1-b%2,h=c+f;1>g&&(g=1,h=b),h>e&&(h=e,g=1+e-b);for(var i=g;h>=i;)a.push(i),i++;return a},d.isEnable=function(a){return d.options[a]&&"string"==typeof d.options[a]},d.switchPage=function(a){d.options.currentPage=a,d.render()},d.fireEvent=function(a){return"function"!=typeof d.options.onPageChange||d.options.onPageChange(a)!==!1},d.callMethod=function(b,c){switch(b){case"option":d.options=a.extend({},d.options,c),d.render();break;case"destroy":d.$container.empty(),d.$container.removeData("jqPaginator");break;default:throw new Error('[jqPaginator] method "'+b+'" does not exist')}return d.$container},d.bindEvents=function(){var b=d.options;d.$container.off(),d.$container.on("click","[jp-role]",function(){var c=a(this);if(!c.hasClass(b.disableClass)&&!c.hasClass(b.activeClass)){var e=+c.attr("jp-data");d.fireEvent(e)&&d.switchPage(e)}})},d.init(),d.$container},a.jqPaginator.defaultOptions={wrapper:"",first:"",prev:"",next:"",last:"",page:"",totalPages:0,totalCounts:0,pageSize:0,currentPage:1,visiblePages:7,disableClass:"disabled",activeClass:"active",onPageChange:null},a.fn.jqPaginator=function(){var b=this,c=Array.prototype.slice.call(arguments);if("string"==typeof c[0]){var d=a(b).data("jqPaginator");if(d)return d.callMethod(c[0],c[1]);throw new Error("[jqPaginator] the element is not instantiated")}return new a.jqPaginator(this,c[0])}}(jQuery);
|
||||
|
||||
}
|
||||
/*
|
||||
FILE ARCHIVED ON 09:29:29 Nov 12, 2018 AND RETRIEVED FROM THE
|
||||
INTERNET ARCHIVE ON 07:46:21 Sep 12, 2021.
|
||||
JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
|
||||
|
||||
ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
|
||||
SECTION 108(a)(3)).
|
||||
*/
|
||||
/*
|
||||
playback timings (ms):
|
||||
captures_list: 139.751
|
||||
exclusion.robots: 0.171
|
||||
exclusion.robots.policy: 0.163
|
||||
RedisCDXSource: 2.008
|
||||
esindex: 0.007
|
||||
LoadShardBlock: 118.997 (3)
|
||||
PetaboxLoader3.datanode: 118.718 (5)
|
||||
CDXLines.iter: 16.323 (3)
|
||||
load_resource: 185.883 (2)
|
||||
PetaboxLoader3.resolve: 57.048 (2)
|
||||
*/
|
@ -0,0 +1,36 @@
|
||||
window.onload = function() {
|
||||
var Awarp = document.getElementById('wrap'),
|
||||
Apic = document.getElementById('pic').getElementsByTagName('li'),
|
||||
Alist = document.getElementById('list').getElementsByTagName('li'),
|
||||
index = 0,
|
||||
timer = null;
|
||||
|
||||
timer = setInterval(autoPlay, 3000);
|
||||
Awarp.onmouseover = function() {
|
||||
clearInterval(timer);
|
||||
}
|
||||
Awarp.onmouseout = function() {
|
||||
timer = setInterval(autoPlay, 3000);
|
||||
}
|
||||
for (var i = 0; i < Alist.length; i++) {
|
||||
Alist[i].onmouseover = function() {
|
||||
clearInterval(timer);
|
||||
index = this.innerText - 1;
|
||||
changePic(index);
|
||||
};
|
||||
};
|
||||
|
||||
function autoPlay() {
|
||||
if (++index >= Apic.length) index = 0;
|
||||
changePic(index)
|
||||
}
|
||||
|
||||
function changePic(curIndex) {
|
||||
for (var i = 0; i < Apic.length; i++) {
|
||||
Apic[i].style.display = 'none';
|
||||
Alist[i].className = '';
|
||||
}
|
||||
Apic[curIndex].style.display = 'block';
|
||||
Alist[curIndex].className = 'on';
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
window.onload = function() {
|
||||
let ok = document.querySelector('.OK');
|
||||
ok.onclick = function() {
|
||||
let zhang = document.querySelector('.zhang').value;
|
||||
let mima = document.querySelector('.mima').value;
|
||||
if (zhang == '' || mima == '') {
|
||||
alert('文本框不能为空');
|
||||
return;
|
||||
}
|
||||
if (zhang != 'user' || mima != '1234') {
|
||||
alert('账号密码输入错误!');
|
||||
return
|
||||
}
|
||||
alert('登入成功!');
|
||||
location.href = 'index.html';
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width,user-scalable=no,inital-scale=1.0,maximum-scale=1.0,minimum-scale=1.0">
|
||||
<title></title>
|
||||
|
||||
<script type="text/javascript" src="js/jquery.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="css/login.css"/>
|
||||
<!-- 引入登录js文件 -->
|
||||
<!-- <script type="text/javascript" src="js/logo.js"></script>-->
|
||||
</head>
|
||||
<body>
|
||||
<!-- 网站登录页头部模块开始 -->
|
||||
<div class="header">
|
||||
<div class="container">
|
||||
<div class="header-yi">
|
||||
<div class="header-logo"><a href="index.html"><img src="images/logo.png" ></a></div>
|
||||
<p class="header-text">欢迎登录</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 网站登录页头部模块结束 -->
|
||||
|
||||
<!-- 网站登录页身体表单模块开始 -->
|
||||
<div class="body">
|
||||
<div class="body-form">
|
||||
<h1 class="body-form-t">账户登录</h1>
|
||||
<div class="body-input">
|
||||
<span class="iconfont icon-yonghu"></span>
|
||||
<input type="text" name="userName" id="userName" placeholder="请输入账号" class="zhang">
|
||||
</div>
|
||||
<div class="body-input">
|
||||
<span class="iconfont icon-lock-fill"></span>
|
||||
<input type="password" name="password" id="password" placeholder="请输入密码" class="mima">
|
||||
</div>
|
||||
<div class="body-btn">
|
||||
<button class="OK" onclick="login()">登录</button>
|
||||
</div>
|
||||
<div class="body-zc">
|
||||
<a href="register.html"><span class="iconfont icon-you"></span><span>立即注册</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 网站登录页身体表单模块结束 -->
|
||||
|
||||
<!-- 网站登录页页脚模块开始 -->
|
||||
<div class="foot">
|
||||
©我不是药神网版权所有
|
||||
</div>
|
||||
<!-- 网站登录页页脚模块结束 -->
|
||||
<script src="js/jquery.min.js"></script>
|
||||
<script>
|
||||
function login() {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "user/login",
|
||||
data: {
|
||||
"userName": $("#userName").val(),
|
||||
"password": $("#password").val()
|
||||
},
|
||||
success: function (result) {
|
||||
if (result != null && result.data && result.code === 200) {
|
||||
location.href = "index.html";
|
||||
} else {
|
||||
alert(result.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,121 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<!-- 定义适配移动端屏幕比例代码 -->
|
||||
<meta name="viewport"
|
||||
content="width=device-width,user-scalable=no,inital-scale=1.0,maximum-scale=1.0,minimum-scale=1.0">
|
||||
<title></title>
|
||||
<!-- 需要引用的css样式文件 -->
|
||||
<link rel="stylesheet" type="text/css" href="css/css.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/car.css" />
|
||||
<script type="text/javascript" src="js/jquery.min.js"></script>
|
||||
<style>
|
||||
.item>input{
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 网站商品详情页头部模块开始 -->
|
||||
<div class="header">
|
||||
<div class="container">
|
||||
<img src="images/logo.png" >
|
||||
<a onclick="exit()" class="user userNav">
|
||||
<span>退出登录</span>
|
||||
<img src="images/ge.jpg" >
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 网站商品详情页头部模块结束 -->
|
||||
|
||||
<!-- 网站商品详情页当前位置导航模块开始 -->
|
||||
<div class="titleNav">
|
||||
<div class="container">
|
||||
<a href="index.html">首页</a> > <a href="#">历史订单</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 网站商品详情页当前位置导航模块结束 -->
|
||||
|
||||
<!-- 网站商品详情页身体内容模块开始 -->
|
||||
<section class="body">
|
||||
<div class="bnav">
|
||||
<div class="two" style="font-size:16px;">订单描述</div>
|
||||
<div class="three">单价</div>
|
||||
<div class="four">数量</div>
|
||||
<div class="five">全额</div>
|
||||
</div>
|
||||
<ul class="list">
|
||||
</ul>
|
||||
</section>
|
||||
<!-- 网站商品详情页身体内容模块结束 -->
|
||||
<!-- 网站商品详情页页脚模块开始 -->
|
||||
<div class="footer">
|
||||
<div class="container">
|
||||
<img src="images/flogo.png" alt="">
|
||||
<div class="nr">
|
||||
<p>
|
||||
© 我不是药神网版权所有
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 网站商品详情页页脚模块结束 -->
|
||||
<!-- 网站侧边导航 -->
|
||||
<div class="xf">
|
||||
<div class="t"><a href="index.html">主页面</a></div>
|
||||
<div class="t"><a href="classification.html">分类药品</a></div>
|
||||
<div class="t"><a href="car.html">购物车</a></div>
|
||||
<div class="t"><a href="order.html">历史订单</a></div>
|
||||
</div>
|
||||
<script>
|
||||
getOrders();
|
||||
function getOrders() {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: 'order/getOrders',
|
||||
success: function (resultAll) {
|
||||
var result = resultAll.data;
|
||||
var finalhtml = "";
|
||||
$.each(result, function (index, order){
|
||||
finalhtml += '<div class="bnav">';
|
||||
finalhtml += '<div class="orderId" style="font-size:16px;">订单号: '+order.orderId+'</div>';
|
||||
finalhtml += '<div class="orderTime">订单创建时间: '+order.createTime+'</div>';
|
||||
finalhtml += '<div class="pay">共'+order.allAmount+'元</div>';
|
||||
finalhtml += '</div>';
|
||||
$.each(order.orderList, function (index, orderItem) {
|
||||
finalhtml += '<li class="item">';
|
||||
finalhtml += '<div class="two jimg">';
|
||||
finalhtml += '<img src="'+orderItem.picture+"\">"
|
||||
finalhtml += '<p>'+orderItem.drugName+'</p>';
|
||||
finalhtml += '</div>';
|
||||
finalhtml += '<div class="three">¥<span>'+orderItem.price+'</span></div>';
|
||||
finalhtml += '<div class="four">'+orderItem.quantity+'</div>';
|
||||
finalhtml += '<div class="five quane"></div>';
|
||||
finalhtml += '</li>';
|
||||
})
|
||||
})
|
||||
$(".list").html(finalhtml);
|
||||
},
|
||||
error: function (error) {
|
||||
if (error.status === 401) {
|
||||
location.href = "login.html";
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function exit() {
|
||||
var isExit = confirm("确认退出?");
|
||||
if (isExit) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "user/exit",
|
||||
success: function (result) {
|
||||
location.href = "login.html";
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,70 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width,user-scalable=no,inital-scale=1.0,maximum-scale=1.0,minimum-scale=1.0">
|
||||
<title></title>
|
||||
<link rel="stylesheet" type="text/css" href="css/register.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<div class="container">
|
||||
<div class="header-yi">
|
||||
<div class="header-logo"><a href="index.html"><img src="images/flogo.png" ></a></div>
|
||||
<p class="header-text">欢迎注册</p>
|
||||
</div>
|
||||
<div class="header-er">
|
||||
已有账号?请
|
||||
<a href="login.html">登录</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="body">
|
||||
<div class="container" style="height: 400px;">
|
||||
<div class="body-input">
|
||||
<span>用户名</span>
|
||||
<input type="text" class="name" id="userName" name="userName">
|
||||
</div>
|
||||
<div class="body-input body-input-bg">
|
||||
<span>设置密码</span>
|
||||
<input type="password" class="password" id="password" name="password">
|
||||
</div>
|
||||
<div class="body-input body-input-bg">
|
||||
<span>确认密码</span>
|
||||
<input type="password" class="password" id="pswConfirm" name="pswConfirm">
|
||||
</div>
|
||||
<!-- <div class="body-input">-->
|
||||
<!-- <span>邮箱</span>-->
|
||||
<!-- <input type="text" class="name">-->
|
||||
<!-- </div>-->
|
||||
<div class="body-btn">
|
||||
<button class="btn" onclick="register()">确认</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="foot">
|
||||
©我不是药神网版权所有
|
||||
</div>
|
||||
<script src="js/jquery.min.js"></script>
|
||||
<script>
|
||||
function register() {
|
||||
$.ajax({
|
||||
url: "user/register",
|
||||
type: "post",
|
||||
data: {
|
||||
"userName": $("#userName").val(),
|
||||
"password": $("#password").val(),
|
||||
"pswConfirm": $("#pswConfirm").val()
|
||||
},
|
||||
success: function (result) {
|
||||
if (result != null && result.data === "" && result.code === 200) {
|
||||
alert("注册成功, 请继续登录");
|
||||
location.href = "login.html";
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|