.idea/workspace.xml
@@ -26,13 +26,48 @@ </component> <component name="ChangeListManager"> <list default="true" id="cb08d02f-fd4f-4fa2-85fe-abd508fa83ac" name="Default Changelist" comment="11.27,9"> <change beforePath="$PROJECT_DIR$/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/encodings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/encodings.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" /> <change afterPath="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/feignclient/other/GameClient.java" afterDir="false" /> <change afterPath="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/feignclient/other/model/TGame.java" afterDir="false" /> <change afterPath="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/util/GDMapGeocodingUtil.java" afterDir="false" /> <change afterPath="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/util/HttpRequestUtil.java" afterDir="false" /> <change afterPath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/course/feignClient/communityWorldCup/Model/WorldCup.java" afterDir="false" /> <change afterPath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/course/feignClient/communityWorldCup/Model/WorldCupListAll.java" afterDir="false" /> <change afterPath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/course/feignClient/communityWorldCup/Model/WorldCupStore.java" afterDir="false" /> <change afterPath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/course/feignClient/communityWorldCup/WorldCupClient.java" afterDir="false" /> <change afterPath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/course/feignClient/communityWorldCup/WorldCupStoreClient.java" afterDir="false" /> <change afterPath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/WorldCupController.java" afterDir="false" /> <change afterPath="$PROJECT_DIR$/cloud-server-management/src/main/webapp/WEB-INF/view/system/worldCup/store.html" afterDir="false" /> <change afterPath="$PROJECT_DIR$/cloud-server-management/src/main/webapp/WEB-INF/view/system/worldCup/worldCup.html" afterDir="false" /> <change afterPath="$PROJECT_DIR$/cloud-server-management/src/main/webapp/WEB-INF/view/system/worldCup/worldCup_add.html" afterDir="false" /> <change afterPath="$PROJECT_DIR$/cloud-server-management/src/main/webapp/WEB-INF/view/system/worldCup/worldCup_edit.html" afterDir="false" /> <change afterPath="$PROJECT_DIR$/cloud-server-management/src/main/webapp/WEB-INF/view/system/worldCup/worldCup_info.html" afterDir="false" /> <change afterPath="$PROJECT_DIR$/cloud-server-management/src/main/webapp/static/modular/system/worldCup/store.js" afterDir="false" /> <change afterPath="$PROJECT_DIR$/cloud-server-management/src/main/webapp/static/modular/system/worldCup/worldCup.js" afterDir="false" /> <change afterPath="$PROJECT_DIR$/cloud-server-management/src/main/webapp/static/modular/system/worldCup/worldCup_info.js" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupPaymentParticipantServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupPaymentParticipantServiceImpl.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-other/src/main/java/com/dsh/other/controller/HomeModuleController.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-other/src/main/java/com/dsh/other/controller/HomeModuleController.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-other/src/main/java/com/dsh/other/entity/HomeModule.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-other/src/main/java/com/dsh/other/entity/HomeModule.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/controller/WorldCupController.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/controller/WorldCupController.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/entity/WorldCupPaymentParticipant.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/entity/WorldCupPaymentParticipant.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/feignclient/course/CoursePackageOrderStudentClient.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/feignclient/course/CoursePackageOrderStudentClient.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/model/DeductionClassHour.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/model/DeductionClassHour.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/IWorldCupService.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/IWorldCupService.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupServiceImpl.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupCompetitorMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupCompetitorMapper.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupPaymentParticipantMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupPaymentParticipantMapper.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-course/src/main/java/com/dsh/course/controller/CoursePackageOrderStudentController.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-course/src/main/java/com/dsh/course/controller/CoursePackageOrderStudentController.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-course/src/main/java/com/dsh/course/model/DeductionClassHour.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-course/src/main/java/com/dsh/course/model/DeductionClassHour.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-course/src/main/java/com/dsh/course/service/ICoursePackageOrderStudentService.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-course/src/main/java/com/dsh/course/service/ICoursePackageOrderStudentService.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-course/src/main/java/com/dsh/course/service/impl/CoursePackageOrderStudentServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-course/src/main/java/com/dsh/course/service/impl/CoursePackageOrderStudentServiceImpl.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/course/feignClient/account/RefereeClient.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/course/feignClient/account/RefereeClient.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/course/mapper/StoreMapper.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/course/mapper/StoreMapper.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/OperatorController.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/OperatorController.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/RefereeController.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/RefereeController.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TStoreController.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TStoreController.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/guns/modular/system/service/IStoreService.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/guns/modular/system/service/IStoreService.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/guns/modular/system/service/impl/StoreServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/guns/modular/system/service/impl/StoreServiceImpl.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-management/src/main/webapp/WEB-INF/view/system/referee/referee.html" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-management/src/main/webapp/WEB-INF/view/system/referee/referee.html" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-management/src/main/webapp/static/modular/system/referee/referee.js" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-management/src/main/webapp/static/modular/system/referee/referee.js" afterDir="false" /> <change beforePath="$PROJECT_DIR$/cloud-server-other/src/main/java/com/dsh/other/controller/GameController.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-other/src/main/java/com/dsh/other/controller/GameController.java" afterDir="false" /> </list> <ignored path="$PROJECT_DIR$/cloud-server-competition/target/" /> <ignored path="$PROJECT_DIR$/cloud-server-other/target/" /> @@ -89,34 +124,118 @@ </usages-collector> <usages-collector id="statistics.file.extensions.open"> <counts> <entry key="java" value="19" /> <entry key="properties" value="2" /> <entry key="xml" value="2" /> <entry key="java" value="50" /> <entry key="properties" value="4" /> <entry key="xml" value="5" /> </counts> </usages-collector> <usages-collector id="statistics.file.types.open"> <counts> <entry key="JAVA" value="19" /> <entry key="Properties" value="2" /> <entry key="XML" value="2" /> <entry key="JAVA" value="50" /> <entry key="Properties" value="4" /> <entry key="XML" value="5" /> </counts> </usages-collector> <usages-collector id="statistics.file.extensions.edit"> <counts> <entry key="java" value="105" /> <entry key="txt" value="5" /> <entry key="java" value="425" /> <entry key="txt" value="17" /> <entry key="xml" value="16" /> </counts> </usages-collector> <usages-collector id="statistics.file.types.edit"> <counts> <entry key="JAVA" value="105" /> <entry key="PLAIN_TEXT" value="5" /> <entry key="JAVA" value="425" /> <entry key="PLAIN_TEXT" value="17" /> <entry key="SQL" value="3" /> <entry key="XML" value="13" /> </counts> </usages-collector> </session> </component> <component name="FileEditorManager"> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300" /> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> <file pinned="false" current-in-tab="true"> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/controller/WorldCupController.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="-836"> <caret line="436" column="46" selection-start-line="436" selection-start-column="46" selection-end-line="436" selection-end-column="46" /> <folding> <element signature="e#22578#22579#0" expanded="true" /> <element signature="e#22634#22635#0" expanded="true" /> <element signature="e#24096#24097#0" expanded="true" /> <element signature="e#24146#24147#0" expanded="true" /> <element signature="e#24683#24684#0" expanded="true" /> <element signature="e#24739#24740#0" expanded="true" /> </folding> </state> </provider> </entry> </file> <file pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/IWorldCupService.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="180"> <caret line="70" column="15" selection-start-line="70" selection-start-column="15" selection-end-line="70" selection-end-column="15" /> </state> </provider> </entry> </file> <file pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupServiceImpl.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="84"> <caret line="617" column="60" selection-start-line="617" selection-start-column="60" selection-end-line="617" selection-end-column="60" /> </state> </provider> </entry> </file> <file pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/entity/WorldCupPaymentParticipant.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="354"> <caret line="47" column="34" selection-start-line="47" selection-start-column="34" selection-end-line="47" selection-end-column="34" /> </state> </provider> </entry> </file> <file pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/IWorldCupPaymentParticipantService.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="230"> <caret line="42" column="19" selection-start-line="42" selection-start-column="19" selection-end-line="42" selection-end-column="19" /> </state> </provider> </entry> </file> <file pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupPaymentParticipantServiceImpl.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="414"> <caret line="127" column="19" selection-start-line="127" selection-start-column="19" selection-end-line="127" selection-end-column="19" /> </state> </provider> </entry> </file> <file pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/model/MyWorldCupInfo.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="171"> <caret line="44" column="54" selection-start-line="44" selection-start-column="54" selection-end-line="44" selection-end-column="54" /> </state> </provider> </entry> </file> <file pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/model/WorldCupInfo.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="125"> <caret line="37" column="20" selection-start-line="37" selection-start-column="20" selection-end-line="37" selection-end-column="20" /> </state> </provider> </entry> </file> </leaf> </component> <component name="FileTemplateManagerImpl"> <option name="RECENT_TEMPLATES"> @@ -130,9 +249,19 @@ <component name="FindInProjectRecents"> <findStrings> <find>2.0</find> <find>getWorldCupListCoach</find> <find>queryParticipantList</find> <find>getWorldCupListAll</find> <find>getAppUserIds</find> <find>getWorldCupInfo</find> <find>getMyWorldCupList</find> <find>queryAppUser1</find> <find>/getWorldCupInfo</find> <find>/getParticipant</find> </findStrings> <dirStrings> <dir>E:\IDEA Workspaces\PlayPai\code</dir> <dir>E:\IDEA Workspaces\PlayPai\code\cloud-server-account</dir> </dirStrings> </component> <component name="Git.Settings"> @@ -152,10 +281,24 @@ <option value="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/CommunityWorldCupApplication.java" /> <option value="$PROJECT_DIR$/cloud-server-gateway/src/main/java/cn/mb/cloud/gateway/filter/PermissionsFilter.java" /> <option value="$PROJECT_DIR$/cloud-server-other/src/main/java/com/dsh/other/controller/StoreConfigController.java" /> <option value="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupPaymentParticipantServiceImpl.java" /> <option value="$PROJECT_DIR$/cloud-server-other/src/main/resources/mapper/BannerMapper.xml" /> <option value="$PROJECT_DIR$/cloud-server-other/src/main/java/com/dsh/other/controller/HomeModuleController.java" /> <option value="$PROJECT_DIR$/cloud-server-other/src/main/java/com/dsh/other/entity/HomeModule.java" /> <option value="$PROJECT_DIR$/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/ParticipantServiceImpl.java" /> <option value="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/entity/WorldCupPayment.java" /> <option value="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/entity/WorldCupCompetitor.java" /> <option value="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/feignclient/account/AppUserClient.java" /> <option value="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/model/WorldCupListVo.java" /> <option value="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/model/WorldCupInfo.java" /> <option value="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupMapper.xml" /> <option value="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/entity/WorldCup.java" /> <option value="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupPaymentParticipantMapper.xml" /> <option value="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/IWorldCupPaymentParticipantService.java" /> <option value="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/model/MyWorldCupInfo.java" /> <option value="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupPaymentParticipantServiceImpl.java" /> <option value="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/entity/WorldCupPaymentParticipant.java" /> <option value="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupServiceImpl.java" /> <option value="$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/controller/WorldCupController.java" /> </list> </option> </component> @@ -188,7 +331,17 @@ </component> <component name="MavenProjectNavigator"> <treeState> <expand /> <expand> <path> <item name="" type="16c1761:MavenProjectsStructure$RootNode" /> <item name="社区世界杯" type="9519ce18:MavenProjectsStructure$ProjectNode" /> </path> <path> <item name="" type="16c1761:MavenProjectsStructure$RootNode" /> <item name="社区世界杯" type="9519ce18:MavenProjectsStructure$ProjectNode" /> <item name="Lifecycle" type="58874e2:MavenProjectsStructure$LifecycleNode" /> </path> </expand> <select /> </treeState> </component> @@ -248,7 +401,7 @@ <property name="RequestMappingsPanelWidth1" value="75" /> <property name="WebServerToolWindowFactoryState" value="false" /> <property name="aspect.path.notification.shown" value="true" /> <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1709178957576" /> <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1709619211990" /> <property name="last_opened_file_path" value="$PROJECT_DIR$" /> <property name="project.structure.last.edited" value="Project" /> <property name="project.structure.proportion" value="0.0" /> @@ -302,7 +455,7 @@ </option> <option name="contentProportion" value="0.24296537" /> </component> <component name="RunManager" selected="Spring Boot.OtherApplication"> <component name="RunManager" selected="Spring Boot.CommunityWorldCupApplication"> <configuration default="true" type="JUnit" factoryName="JUnit"> <shortenClasspath name="MANIFEST" /> <method v="2"> @@ -502,8 +655,8 @@ <item itemvalue="Spring Boot.OtherApplication" /> <item itemvalue="Spring Boot.ActivityApplication" /> <item itemvalue="Spring Boot.CompetitionApplication" /> <item itemvalue="JUnit.AccountApplicationTests.contextLoads" /> <item itemvalue="Spring Boot.CommunityWorldCupApplication" /> <item itemvalue="JUnit.AccountApplicationTests.contextLoads" /> </list> <recent_temporary> <list> @@ -630,30 +783,6 @@ <workItem from="1698627531587" duration="2092000" /> <workItem from="1708947562373" duration="284000" /> <workItem from="1708947995181" duration="6987000" /> </task> <task id="LOCAL-00048" summary="10.13"> <option name="closed" value="true" /> <created>1697024509448</created> <option name="number" value="00048" /> <option name="presentableId" value="LOCAL-00048" /> <option name="project" value="LOCAL" /> <updated>1697024509448</updated> </task> <task id="LOCAL-00049" summary="10.13bug1"> <option name="closed" value="true" /> <created>1697186903441</created> <option name="number" value="00049" /> <option name="presentableId" value="LOCAL-00049" /> <option name="project" value="LOCAL" /> <updated>1697186903441</updated> </task> <task id="LOCAL-00050" summary="10.13bug2"> <option name="closed" value="true" /> <created>1697187817778</created> <option name="number" value="00050" /> <option name="presentableId" value="LOCAL-00050" /> <option name="project" value="LOCAL" /> <updated>1697187817778</updated> </task> <task id="LOCAL-00051" summary="10.13bug2"> <option name="closed" value="true" /> @@ -1002,16 +1131,37 @@ <option name="project" value="LOCAL" /> <updated>1709112234345</updated> </task> <option name="localTasksCounter" value="97" /> <task id="LOCAL-00097" summary="合并代码"> <created>1709534778085</created> <option name="number" value="00097" /> <option name="presentableId" value="LOCAL-00097" /> <option name="project" value="LOCAL" /> <updated>1709534778085</updated> </task> <task id="LOCAL-00098" summary="合并代码"> <created>1709534897759</created> <option name="number" value="00098" /> <option name="presentableId" value="LOCAL-00098" /> <option name="project" value="LOCAL" /> <updated>1709534897759</updated> </task> <task id="LOCAL-00099" summary="合并代码"> <created>1709619248636</created> <option name="number" value="00099" /> <option name="presentableId" value="LOCAL-00099" /> <option name="project" value="LOCAL" /> <updated>1709619248636</updated> </task> <option name="localTasksCounter" value="100" /> <servers /> </component> <component name="TimeTrackingManager"> <option name="totallyTimeSpent" value="7271000" /> <option name="totallyTimeSpent" value="16463000" /> </component> <component name="ToolWindowManager"> <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" /> <layout> <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.25266525" /> <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.25266525" /> <window_info id="Structure" order="1" side_tool="true" weight="0.25" /> <window_info id="Designer" order="2" /> <window_info id="Image Layers" order="3" /> @@ -1019,8 +1169,6 @@ <window_info id="Favorites" order="5" side_tool="true" /> <window_info id="Capture Tool" order="6" /> <window_info id="Web" order="7" side_tool="true" /> <window_info anchor="bottom" id="Spring" /> <window_info anchor="bottom" id="Messages" weight="0.32899022" /> <window_info anchor="bottom" id="Message" order="0" /> <window_info anchor="bottom" id="Find" order="1" /> <window_info anchor="bottom" id="Run" order="2" weight="0.32899022" /> @@ -1033,9 +1181,10 @@ <window_info anchor="bottom" id="Statistic" order="9" /> <window_info anchor="bottom" id="Java Enterprise" order="10" /> <window_info anchor="bottom" id="Database Changes" order="11" show_stripe_button="false" /> <window_info anchor="bottom" id="Version Control" order="12" weight="0.32899022" /> <window_info anchor="bottom" id="Run Dashboard" order="13" visible="true" weight="0.4039088" /> <window_info anchor="right" id="Bean Validation" /> <window_info active="true" anchor="bottom" id="Version Control" order="12" visible="true" weight="0.32899022" /> <window_info anchor="bottom" id="Run Dashboard" order="13" weight="0.19652551" /> <window_info anchor="bottom" id="Spring" order="14" /> <window_info anchor="bottom" id="Messages" order="15" weight="0.32899022" /> <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" /> <window_info anchor="right" id="Ant Build" order="1" weight="0.25" /> <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" /> @@ -1045,6 +1194,7 @@ <window_info anchor="right" id="Database" order="6" /> <window_info anchor="right" id="Palette	" order="7" /> <window_info anchor="right" id="Theme Preview" order="8" /> <window_info anchor="right" id="Bean Validation" order="9" /> </layout> </component> <component name="TypeScriptGeneratedFilesManager"> @@ -1072,7 +1222,6 @@ <option name="myLimit" value="2678400000" /> </component> <component name="VcsManagerConfiguration"> <MESSAGE value="9.26。12" /> <MESSAGE value="9.26。13" /> <MESSAGE value="9.26。14" /> <MESSAGE value="9.26。15" /> @@ -1097,7 +1246,8 @@ <MESSAGE value="商户认证" /> <MESSAGE value="11.27,9" /> <MESSAGE value="修改bug" /> <option name="LAST_COMMIT_MESSAGE" value="修改bug" /> <MESSAGE value="合并代码" /> <option name="LAST_COMMIT_MESSAGE" value="合并代码" /> </component> <component name="XDebuggerManager"> <breakpoint-manager> @@ -1171,31 +1321,10 @@ </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupServiceImpl.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="156"> <caret line="39" column="13" selection-start-line="39" selection-start-column="13" selection-end-line="39" selection-end-column="13" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/controller/WorldCupController.java"> <provider selected="true" editor-type-id="text-editor"> <state> <caret column="33" selection-start-column="8" selection-end-column="33" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/CommunityWorldCupApplication.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="125"> <caret line="17" column="3" lean-forward="true" selection-start-line="17" selection-start-column="3" selection-end-line="17" selection-end-column="3" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/resources/sharding-jdbc.properties"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="175"> <caret line="7" column="32" lean-forward="true" selection-start-line="7" selection-start-column="32" selection-end-line="7" selection-end-column="32" /> </state> </provider> </entry> @@ -1245,17 +1374,6 @@ <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="195"> <caret line="12" column="13" selection-start-line="12" selection-start-column="13" selection-end-line="12" selection-end-column="13" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupPaymentParticipantServiceImpl.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="358"> <caret line="46" lean-forward="true" selection-start-line="46" selection-end-line="46" /> <folding> <element signature="e#1744#1745#0" expanded="true" /> <element signature="e#1771#1772#0" expanded="true" /> </folding> </state> </provider> </entry> @@ -1312,6 +1430,206 @@ </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/.idea/workspace.xml"> <provider selected="true" editor-type-id="text-editor" /> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/target/classes/bootstrap.properties"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="150"> <caret line="12" column="51" selection-start-line="12" selection-start-column="51" selection-end-line="12" selection-end-column="51" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/resources/sharding-jdbc.properties"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="175"> <caret line="7" column="32" lean-forward="true" selection-start-line="7" selection-start-column="32" selection-end-line="7" selection-end-column="32" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/config/Sharding_jdbc/ShardingConfig.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="282"> <caret line="123" column="13" lean-forward="true" selection-start-line="123" selection-start-column="13" selection-end-line="123" selection-end-column="13" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-competition/src/main/java/com/dsh/competition/feignclient/course/CoursePackagePaymentClient.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="251"> <caret line="25" column="12" selection-start-line="25" selection-start-column="12" selection-end-line="25" selection-end-column="12" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-competition/src/main/java/com/dsh/competition/service/impl/ParticipantServiceImpl.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="401"> <caret line="141" column="50" lean-forward="true" selection-start-line="141" selection-start-column="50" selection-end-line="141" selection-end-column="50" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-competition/src/main/java/com/dsh/competition/service/IParticipantService.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="260"> <caret line="39" column="24" selection-start-line="39" selection-start-column="24" selection-end-line="39" selection-end-column="24" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-competition/src/main/java/com/dsh/competition/controller/ParticipantController.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="292"> <caret line="88" column="79" selection-start-line="88" selection-start-column="79" selection-end-line="88" selection-end-column="79" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-competition/src/main/java/com/dsh/competition/entity/PaymentCompetition.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="320"> <caret line="21" column="45" selection-start-line="21" selection-start-column="41" selection-end-line="21" selection-end-column="45" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/entity/WorldCupCompetitor.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="320"> <caret line="20" column="45" selection-start-line="20" selection-start-column="45" selection-end-line="20" selection-end-column="45" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/entity/WorldCupPayment.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="85"> <caret line="21" column="45" selection-start-line="21" selection-start-column="45" selection-end-line="21" selection-end-column="45" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/feignclient/account/AppUserClient.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="421"> <caret line="37" column="45" selection-start-line="37" selection-start-column="32" selection-end-line="37" selection-end-column="45" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupCompetitorServiceImpl.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="307"> <caret line="116" column="28" selection-start-line="116" selection-start-column="15" selection-end-line="116" selection-end-column="28" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/model/WorldCupListVo.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="252"> <caret line="14" column="22" lean-forward="true" selection-start-line="14" selection-start-column="22" selection-end-line="14" selection-end-column="22" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupMapper.xml"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="50"> <caret line="2" column="63" lean-forward="true" selection-start-line="2" selection-start-column="63" selection-end-line="2" selection-end-column="63" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/mapper/WorldCupMapper.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="170"> <caret line="14" column="56" lean-forward="true" selection-start-line="14" selection-start-column="56" selection-end-line="14" selection-end-column="56" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/entity/WorldCup.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="200"> <caret line="110" column="7" lean-forward="true" selection-start-line="102" selection-start-column="32" selection-end-line="122" selection-end-column="28" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupPaymentParticipantMapper.xml"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="19"> <caret line="16" column="33" selection-start-line="16" selection-start-column="16" selection-end-line="16" selection-end-column="33" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/mapper/WorldCupPaymentParticipantMapper.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="340"> <caret line="33" column="42" selection-start-line="33" selection-start-column="25" selection-end-line="33" selection-end-column="42" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-account/src/main/java/com/dsh/account/controller/AppUserController.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="326"> <caret line="604" column="49" selection-start-line="604" selection-start-column="27" selection-end-line="604" selection-end-column="49" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/model/WorldCupInfo.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="125"> <caret line="37" column="20" selection-start-line="37" selection-start-column="20" selection-end-line="37" selection-end-column="20" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/IWorldCupPaymentParticipantService.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="230"> <caret line="42" column="19" selection-start-line="42" selection-start-column="19" selection-end-line="42" selection-end-column="19" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/model/MyWorldCupInfo.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="171"> <caret line="44" column="54" selection-start-line="44" selection-start-column="54" selection-end-line="44" selection-end-column="54" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupPaymentParticipantServiceImpl.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="414"> <caret line="127" column="19" selection-start-line="127" selection-start-column="19" selection-end-line="127" selection-end-column="19" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/IWorldCupService.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="180"> <caret line="70" column="15" selection-start-line="70" selection-start-column="15" selection-end-line="70" selection-end-column="15" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/entity/WorldCupPaymentParticipant.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="354"> <caret line="47" column="34" selection-start-line="47" selection-start-column="34" selection-end-line="47" selection-end-column="34" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupServiceImpl.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="84"> <caret line="617" column="60" selection-start-line="617" selection-start-column="60" selection-end-line="617" selection-end-column="60" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/controller/WorldCupController.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="-836"> <caret line="436" column="46" selection-start-line="436" selection-start-column="46" selection-end-line="436" selection-end-column="46" /> <folding> <element signature="e#22578#22579#0" expanded="true" /> <element signature="e#22634#22635#0" expanded="true" /> <element signature="e#24096#24097#0" expanded="true" /> <element signature="e#24146#24147#0" expanded="true" /> <element signature="e#24683#24684#0" expanded="true" /> <element signature="e#24739#24740#0" expanded="true" /> </folding> </state> </provider> </entry> </component> <component name="masterDetails"> <states> cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/controller/WorldCupController.java
@@ -3,10 +3,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.dsh.communityWorldCup.entity.WorldCup; import com.dsh.communityWorldCup.entity.WorldCupCompetitor; import com.dsh.communityWorldCup.entity.WorldCupPaymentParticipant; import com.dsh.communityWorldCup.entity.WorldCupStore; import com.dsh.communityWorldCup.entity.*; import com.dsh.communityWorldCup.feignclient.account.AppUserClient; import com.dsh.communityWorldCup.feignclient.account.StudentClient; import com.dsh.communityWorldCup.feignclient.account.model.AppUser; @@ -18,10 +15,8 @@ import com.dsh.communityWorldCup.feignclient.other.model.Site; import com.dsh.communityWorldCup.feignclient.other.model.Store; import com.dsh.communityWorldCup.model.*; import com.dsh.communityWorldCup.service.IWorldCupCompetitorService; import com.dsh.communityWorldCup.service.IWorldCupPaymentParticipantService; import com.dsh.communityWorldCup.service.IWorldCupService; import com.dsh.communityWorldCup.service.IWorldCupStoreService; import com.dsh.communityWorldCup.service.*; import com.dsh.communityWorldCup.util.GDMapGeocodingUtil; import com.dsh.communityWorldCup.util.PayMoneyUtil; import com.dsh.communityWorldCup.util.ResultUtil; import com.dsh.communityWorldCup.util.TokenUtil; @@ -37,6 +32,7 @@ import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.PrintWriter; import java.text.SimpleDateFormat; import java.util.*; @@ -88,6 +84,12 @@ @Autowired private IWorldCupCompetitorService worldCupCompetitorService; @Autowired private GDMapGeocodingUtil gdMapGeocodingUtil; @Autowired private IWorldCupPaymentService worldCupPaymentService; @@ -542,6 +544,22 @@ @ResponseBody @PostMapping("/worldCup/addWorldCup") public Integer addWorldCup(@RequestBody WorldCup worldCup){ String lon = worldCup.getLon(); String lat = worldCup.getLat(); Map<String, String> geocode = null; try { geocode = gdMapGeocodingUtil.geocode(lon, lat); } catch (Exception e) { throw new RuntimeException(e); } String province = geocode.get("province"); String provinceCode = geocode.get("provinceCode"); String city = geocode.get("city"); String cityCode = geocode.get("cityCode"); worldCup.setProvince(province.replace("省", "")); worldCup.setProvinceCode(provinceCode); worldCup.setCity(city.replace("市", "")); worldCup.setCityCode(cityCode); worldCupService.save(worldCup); return worldCup.getId(); } @@ -567,6 +585,22 @@ @ResponseBody @PostMapping("/worldCup/editWorldCup") public Integer editWorldCup(@RequestBody WorldCup worldCup){ String lon = worldCup.getLon(); String lat = worldCup.getLat(); Map<String, String> geocode = null; try { geocode = gdMapGeocodingUtil.geocode(lon, lat); } catch (Exception e) { throw new RuntimeException(e); } String province = geocode.get("province"); String provinceCode = geocode.get("provinceCode"); String city = geocode.get("city"); String cityCode = geocode.get("cityCode"); worldCup.setProvince(province.replace("省", "")); worldCup.setProvinceCode(provinceCode); worldCup.setCity(city.replace("市", "")); worldCup.setCityCode(cityCode); worldCupService.updateById(worldCup); return worldCup.getId(); } @@ -607,4 +641,54 @@ } /** * 取消赛事退款操作 * @param id */ @ResponseBody @PostMapping("/worldCup/cancelWorldCupRefund") public void cancelWorldCupRefund(@RequestBody Integer id){ worldCupService.cancelWorldCupRefund(id); } /** * 游戏结束后的通知回调 */ @ResponseBody @PostMapping("/base/worldCup/endWorldCupCallback") public void endWorldCupCallback(){ } /** * 取消赛事后微信退款回调 * @param request * @param response */ @ResponseBody @PostMapping("/base/worldCup/wxRefundWorldCupCallback") public void wxRefundWorldCupCallback(HttpServletRequest request, HttpServletResponse response){ Map<String, String> map = payMoneyUtil.wxRefundCallback(request); if(null != map){ String refund_id = map.get("refund_id"); String out_refund_no = map.get("out_refund_no"); String result = map.get("result"); WorldCupPayment worldCupPayment = worldCupPaymentService.getOne(new QueryWrapper<WorldCupPayment>().eq("code", out_refund_no)); worldCupPayment.setRefundOrderNo(refund_id); worldCupPayment.setRefundTime(new Date()); worldCupPayment.setPayStatus(3); worldCupPaymentService.updateById(worldCupPayment); PrintWriter out = null; try { out = response.getWriter(); } catch (IOException e) { throw new RuntimeException(e); } out.println(result); out.flush(); out.close(); } } } cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/entity/WorldCupPaymentParticipant.java
@@ -4,7 +4,10 @@ import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.util.Date; /** * @author zhibing.pu @@ -48,4 +51,15 @@ */ @TableField("alreadyEntered") private Integer alreadyEntered; /** * 添加时间 */ @TableField("createTime") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date createTime; /** * 课时支付存储的数据 */ @TableField("content") private String content; } cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/feignclient/course/CoursePackageOrderStudentClient.java
@@ -30,5 +30,14 @@ * @param deductionClassHourList */ @PostMapping("/coursePackageOrderStudent/deductionClassHour") boolean deductionClassHour(DeductionClassHourList deductionClassHourList); DeductionClassHourList deductionClassHour(DeductionClassHourList deductionClassHourList); /** * 回退课时后添加排课记录 * @param deductionClassHourList */ @PostMapping("/coursePackageOrderStudent/backspaceClassHour") void backspaceClassHour(DeductionClassHourList deductionClassHourList); } cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/feignclient/other/GameClient.java
New file @@ -0,0 +1,21 @@ package com.dsh.communityWorldCup.feignclient.other; import com.dsh.communityWorldCup.feignclient.other.model.TGame; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; /** * @author zhibing.pu * @Date 2024/3/5 10:39 */ @FeignClient("mb-cloud-other") public interface GameClient { /** * 根据suduid获取游戏数据 * @param sutuId * @return */ @PostMapping("/api/game/getTGameBySutuId") TGame getTGameBySutuId(String sutuId); } cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/feignclient/other/model/TGame.java
New file @@ -0,0 +1,91 @@ package com.dsh.communityWorldCup.feignclient.other.model; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.extension.activerecord.Model; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; import java.io.Serializable; /** * <p> * 智慧球场 * </p> * * @author administrator * @since 2023-09-18 */ @Data @EqualsAndHashCode(callSuper = false) @Accessors(chain = true) @TableName("t_game") public class TGame extends Model<TGame> { private static final long serialVersionUID = 1L; @TableId(value = "id", type = IdType.AUTO) private Integer id; /** * 运营商id 0为平台 */ @TableField("operationId") private Integer operationId; /** * 省 */ private String province; /** * 省code */ @TableField("provinceCode") private String provinceCode; /** * 市 */ private String city; /** * 市code */ @TableField("cityCode") private String cityCode; /** * 门店id */ @TableField("storeId") private Integer storeId; /** * 场地id */ @TableField("siteId") private Integer siteId; /** * 蓝色方id */ private String blue; /** * 红方id */ private String red; private Integer state; @Override protected Serializable pkVal() { return this.id; } } cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/model/DeductionClassHour.java
@@ -24,4 +24,8 @@ * 扣减课时 */ private Integer classHour; /** * 删除的排课数量(用户回退时重新排课) */ private Integer scheduledCourses; } cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/IWorldCupService.java
@@ -81,6 +81,13 @@ /** * 取消赛事后退还费用 * @param id */ void cancelWorldCupRefund(Integer id); /** * 获取比赛管理列表数据 * @param worldCupListAll * @return cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupServiceImpl.java
@@ -3,6 +3,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.alipay.api.AlipayApiException; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.dsh.communityWorldCup.entity.*; @@ -14,8 +15,10 @@ import com.dsh.communityWorldCup.feignclient.competition.model.Participant; import com.dsh.communityWorldCup.feignclient.course.CoursePackageOrderStudentClient; import com.dsh.communityWorldCup.feignclient.course.model.CoursePackageOrderStudent; import com.dsh.communityWorldCup.feignclient.other.GameClient; import com.dsh.communityWorldCup.feignclient.other.StoreClient; import com.dsh.communityWorldCup.feignclient.other.model.Store; import com.dsh.communityWorldCup.feignclient.other.model.TGame; import com.dsh.communityWorldCup.mapper.WorldCupMapper; import com.dsh.communityWorldCup.model.*; import com.dsh.communityWorldCup.service.*; @@ -67,6 +70,9 @@ @Resource private CoursePackageOrderStudentClient coursePackageOrderStudentClient; @Resource private GameClient gameClient; @@ -100,8 +106,6 @@ */ @Override public ResultUtil startWorldCup(StartWorldCup startWorldCup) { //先检测当前是否已经结束 WorldCup worldCup = this.getById(startWorldCup.getWorldCupId()); if(worldCup.getStartTime().getTime() > System.currentTimeMillis()){ return ResultUtil.error("赛事还未开始"); @@ -112,9 +116,19 @@ if(worldCup.getStatus() == 4){ return ResultUtil.error("赛事已取消"); } //1、通过扫码获取的sutuid查询t_game表中的红蓝方sutuid String code = startWorldCup.getCode(); JSONObject object = JSON.parseObject(code); String sutu_id = object.getString("sutu_id"); TGame tGame = gameClient.getTGameBySutuId(sutu_id); if(null == tGame){ return ResultUtil.error("无效的游戏二维码"); } String people = startWorldCup.getPeople(); JSONArray jsonArray = JSON.parseArray(people); String timeStr = UUIDUtil.getTimeStr() + UUIDUtil.getNumberRandom(3); List<Long> ids = new ArrayList<>(); for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); Integer id = jsonObject.getInteger("id"); @@ -130,10 +144,29 @@ worldCupCompetitor.setParticipant("blue".equals(type) ? 1 : 2); worldCupCompetitor.setStartTime(new Date()); worldCupCompetitorService.save(worldCupCompetitor); ids.add(worldCupCompetitor.getId()); //已参赛 worldCupPaymentParticipant.setAlreadyEntered(1); worldCupPaymentParticipantService.updateById(worldCupPaymentParticipant); } //调接口开启游戏 //2、调起开启游戏的接口。 HashMap<String, String> map = new HashMap<>(); map.put("sign", "0DB011836143EEE2C2E072967C9F4E4B"); map.put("space_id", tGame.getSiteId() + ""); map.put("red_sutu_id", tGame.getRed()); map.put("blue_sutu_id", tGame.getBlue()); map.put("api_url", "http://221.182.45.100:56666/communityWorldCup/base/worldCup/endWorldCupCallback"); map.put("custom", JSON.toJSONString(ids)); return ResultUtil.success(); String s = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/batterGame", map); JSONObject jsonObject = JSONObject.parseObject(s); Integer code1 = jsonObject.getInteger("code"); String message = jsonObject.getString("message"); if (200 == code1) { return ResultUtil.success(); } else { return ResultUtil.error(message); } } @@ -384,6 +417,7 @@ //微信 if(payType == 1){ worldCupPayment.setAmount(new BigDecimal(num).multiply(worldCup.getCash())); worldCupPayment.setUnitPrice(worldCupPayment.getAmount().divide(new BigDecimal(num))); worldCupPaymentService.save(worldCupPayment); return payMoneyUtil.weixinpay("社区世界杯报名", "", worldCupPayment.getCode(), worldCup.getCash().toString(), "/base/worldCup/wxPayWorldCupCallback", "APP", ""); @@ -391,6 +425,7 @@ //支付宝 if(payType == 2){ worldCupPayment.setAmount(new BigDecimal(num).multiply(worldCup.getCash())); worldCupPayment.setUnitPrice(worldCupPayment.getAmount().divide(new BigDecimal(num))); worldCupPaymentService.save(worldCupPayment); return payMoneyUtil.alipay("2088330203191220", "社区世界杯报名", "世界杯报名", "", worldCupPayment.getCode(), worldCup.getCash().toString(), "/base/worldCup/aliPayWorldCupCallback"); @@ -405,6 +440,7 @@ worldCupPayment.setAmount(multiply); worldCupPayment.setPayStatus(2); worldCupPayment.setPayTime(new Date()); worldCupPayment.setUnitPrice(worldCupPayment.getAmount().divide(new BigDecimal(num))); worldCupPaymentService.save(worldCupPayment); appUser.setPlayPaiCoins(appUser.getPlayPaiCoins() - multiply.intValue()); @@ -426,6 +462,7 @@ worldCupPaymentParticipant.setParticipantType(isStudent == 0 ? 2 : 1); worldCupPaymentParticipant.setParticipantId(id); worldCupPaymentParticipant.setAlreadyEntered(0); worldCupPaymentParticipant.setCreateTime(new Date()); worldCupPaymentParticipantService.save(worldCupPaymentParticipant); } return ResultUtil.success(); @@ -474,16 +511,29 @@ break; } } } //扣减课时操作 DeductionClassHourList deductionClassHourList = new DeductionClassHourList(); deductionClassHourList.setDeductionClassHourList(list); coursePackageOrderStudentClient.deductionClassHour(deductionClassHourList); //扣减课时操作 DeductionClassHourList deductionClassHourList = new DeductionClassHourList(); deductionClassHourList.setDeductionClassHourList(list); DeductionClassHourList deductionClassHourList1 = coursePackageOrderStudentClient.deductionClassHour(deductionClassHourList); List<DeductionClassHour> deductionClassHourList2 = deductionClassHourList1.getDeductionClassHourList(); WorldCupPaymentParticipant worldCupPaymentParticipant = new WorldCupPaymentParticipant(); worldCupPaymentParticipant.setWorldCupId(paymentWorldCup.getId()); worldCupPaymentParticipant.setWorldCupPaymentId(worldCupPayment.getId()); worldCupPaymentParticipant.setAppUserId(paymentWorldCup.getUid()); worldCupPaymentParticipant.setParticipantType(isStudent == 0 ? 2 : 1); worldCupPaymentParticipant.setParticipantId(id); worldCupPaymentParticipant.setAlreadyEntered(0); worldCupPaymentParticipant.setCreateTime(new Date()); worldCupPaymentParticipant.setContent(JSON.toJSONString(deductionClassHourList2)); worldCupPaymentParticipantService.save(worldCupPaymentParticipant); } worldCupPayment.setAmount(multiply); worldCupPayment.setPayStatus(2); worldCupPayment.setPayTime(new Date()); worldCupPayment.setUnitPrice(worldCupPayment.getAmount().divide(new BigDecimal(num))); worldCupPaymentService.save(worldCupPayment); //添加报名明细 @@ -510,6 +560,7 @@ worldCupPayment.setAmount(BigDecimal.ZERO); worldCupPayment.setPayStatus(2); worldCupPayment.setPayTime(new Date()); worldCupPayment.setUnitPrice(BigDecimal.ZERO); worldCupPaymentService.save(worldCupPayment); //添加报名明细 @@ -528,6 +579,7 @@ worldCupPaymentParticipant.setParticipantType(isStudent == 0 ? 2 : 1); worldCupPaymentParticipant.setParticipantId(id); worldCupPaymentParticipant.setAlreadyEntered(0); worldCupPaymentParticipant.setCreateTime(new Date()); worldCupPaymentParticipantService.save(worldCupPaymentParticipant); } return ResultUtil.success(); @@ -565,6 +617,7 @@ worldCupPaymentParticipant.setParticipantType(isStudent == 0 ? 2 : 1); worldCupPaymentParticipant.setParticipantId(id); worldCupPaymentParticipant.setAlreadyEntered(0); worldCupPaymentParticipant.setCreateTime(new Date()); worldCupPaymentParticipantService.save(worldCupPaymentParticipant); } return ResultUtil.success(); @@ -596,4 +649,110 @@ map.put("total", count); return map; } /** * 取消赛事后退还费用 * @param id */ @Override public void cancelWorldCupRefund(Integer id) { List<WorldCupPaymentParticipant> list = worldCupPaymentParticipantService.list(new QueryWrapper<WorldCupPaymentParticipant>() .eq("worldCupId", id).eq("alreadyEntered", 0)); Set<Long> collect = list.stream().map(WorldCupPaymentParticipant::getWorldCupPaymentId).collect(Collectors.toSet()); for (Long worldCupPaymentId : collect) { List<WorldCupPaymentParticipant> list1 = worldCupPaymentParticipantService.list(new QueryWrapper<WorldCupPaymentParticipant>() .eq("worldCupPaymentId", worldCupPaymentId).eq("alreadyEntered", 0)); WorldCupPayment worldCupPayment = worldCupPaymentService.getById(worldCupPaymentId); BigDecimal multiply = worldCupPayment.getUnitPrice().multiply(new BigDecimal(list1.size())); //微信支付 if(worldCupPayment.getPayType() == 1){ Map<String, String> map = payMoneyUtil.wxRefund(worldCupPayment.getPayOrderNo(), worldCupPayment.getCode(), worldCupPayment.getAmount().toString(), multiply.toString(), "/base/worldCup/wxRefundWorldCupCallback"); if(!"SUCCESS".equals(map.get("return_code"))){ System.err.println("-------------微信退款失败---------"); System.err.println(map.get("return_msg")); } } //支付宝支付 if(worldCupPayment.getPayType() == 2){ Map<String, String> map = null; try { map = payMoneyUtil.aliRefund(worldCupPayment.getPayOrderNo(), multiply.toString()); } catch (AlipayApiException e) { throw new RuntimeException(e); } if("10000".equals(map.get("code"))){ String trade_no = map.get("trade_no"); worldCupPayment.setRefundTime(new Date()); worldCupPayment.setRefundOrderNo(trade_no); worldCupPayment.setPayStatus(3); worldCupPaymentService.updateById(worldCupPayment); } } //玩湃币支付 if(worldCupPayment.getPayType() == 3){ Integer appUserId = worldCupPayment.getAppUserId(); AppUser appUser = appUserClient.getAppUser(appUserId); appUser.setPlayPaiCoins(appUser.getPlayPaiCoins() + multiply.intValue()); appUserClient.updateAppUser(appUser); worldCupPayment.setRefundTime(new Date()); worldCupPayment.setRefundOrderNo(""); worldCupPayment.setPayStatus(3); worldCupPaymentService.updateById(worldCupPayment); }//课时支付 if(worldCupPayment.getPayType() == 4){ for (WorldCupPaymentParticipant worldCupPaymentParticipant : list1) { Integer studentId = worldCupPaymentParticipant.getParticipantId();//构建扣减课时数据 String content = worldCupPaymentParticipant.getContent(); List<DeductionClassHour> list2 = JSON.parseArray(content, DeductionClassHour.class); // Integer classHour = worldCup.getClassHour(); // for (CoursePackageOrderStudent packageOrderStudent : coursePackageOrderStudent) { // Integer laveClassHours = packageOrderStudent.getLaveClassHours(); // // DeductionClassHour deductionClassHour = new DeductionClassHour(); // if(classHour.compareTo(laveClassHours) > 0){ // //不够扣除,轮询直到扣除完 // classHour = classHour - laveClassHours; // deductionClassHour.setId(packageOrderStudent.getId()); // deductionClassHour.setClassHour(laveClassHours); // deductionClassHour.setStudentId(packageOrderStudent.getStudentId()); // deductionClassHour.setCoursePackageId(packageOrderStudent.getCoursePackageId()); // list.add(deductionClassHour); // }else{ // //够扣除直接跳出进行下个学员 // deductionClassHour.setId(packageOrderStudent.getId()); // deductionClassHour.setClassHour(classHour); // deductionClassHour.setStudentId(packageOrderStudent.getStudentId()); // deductionClassHour.setCoursePackageId(packageOrderStudent.getCoursePackageId()); // list.add(deductionClassHour); // break; // } // } } //扣减课时操作 DeductionClassHourList deductionClassHourList = new DeductionClassHourList(); // deductionClassHourList.setDeductionClassHourList(list); coursePackageOrderStudentClient.deductionClassHour(deductionClassHourList); } } for (WorldCupPaymentParticipant worldCupPaymentParticipant : list) { } } } cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/util/GDMapGeocodingUtil.java
New file @@ -0,0 +1,149 @@ package com.dsh.communityWorldCup.util; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.dsh.communityWorldCup.util.httpClinet.HttpClientUtil; import com.dsh.communityWorldCup.util.httpClinet.HttpResult; import org.springframework.stereotype.Component; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * 高德地图的地理编码工具类 */ @Component public class GDMapGeocodingUtil { private String key = "fb131ad2dbfb3f39d7d37d244b92aa2d"; /** * 将行政区域名称转化为坐标 * * @param province * @param city * @param county * @param address * @return */ public Map<String, Object> geocoding(String province, String city, String county, String address) throws Exception { Map<String, Object> map = new HashMap<>(); if (ToolUtil.isEmpty(province)) { map.put("status", -1); map.put("data", "省不能为空"); return map; } if ((ToolUtil.isEmpty(city) && ToolUtil.isNotEmpty(county)) || (ToolUtil.isEmpty(city) && ToolUtil.isNotEmpty(address))) { map.put("status", -1); map.put("data", "市不能为空"); return map; } if ((ToolUtil.isEmpty(county) && ToolUtil.isNotEmpty(address))) { map.put("status", -1); map.put("data", "县/区不能为空"); return map; } String url = "https://restapi.amap.com/v3/geocode/geo?key=" + key + "&output=JSON"; url += "&address=" + province + (ToolUtil.isNotEmpty(city) ? city : "") + (ToolUtil.isNotEmpty(county) ? county : "") + (ToolUtil.isNotEmpty(address) ? address : ""); HttpResult httpResult = HttpClientUtil.pushHttpRequset("GET", url, null, null, "json"); JSONObject jsonObject = JSON.parseObject(httpResult.getData()); String status = jsonObject.getString("status"); List<String> list = new ArrayList<>(); if (status.equals("1")) { JSONArray geocodes = jsonObject.getJSONArray("geocodes"); for (int i = 0; i < geocodes.size(); i++) { String location = geocodes.getJSONObject(i).getString("location"); list.add(location); } } map.put("status", 0); map.put("data", list); return map; } public Map<String, Object> geocoding(String address) throws Exception { Map<String, Object> map = new HashMap<>(); String url = "https://restapi.amap.com/v3/geocode/geo?key=" + key + "&output=JSON&address=" + address; HttpResult httpResult = HttpClientUtil.pushHttpRequset("GET", url, null, null, "json"); JSONObject jsonObject = JSON.parseObject(httpResult.getData()); String status = jsonObject.getString("status"); List<String> list = new ArrayList<>(); if (status.equals("1")) { JSONArray geocodes = jsonObject.getJSONArray("geocodes"); for (int i = 0; i < geocodes.size(); i++) { String location = geocodes.getJSONObject(i).getString("location"); list.add(location); } } map.put("status", 0); map.put("data", list); return map; } /** * 根据经纬度获取行政区域信息 * * @param lon * @param lan * @return * @throws Exception */ public Map<String, String> geocode(String lon, String lan) throws Exception { String url = "https://restapi.amap.com/v3/geocode/regeo?key=" + key + "&location=" + lon + "," + lan; HttpResult httpResult = HttpClientUtil.pushHttpRequset("GET", url, null, null, "json"); JSONObject jsonObject = JSON.parseObject(httpResult.getData()); Map<String, String> map = new HashMap<>(); if (jsonObject.getString("status").equals("1")) { JSONObject regeocode = jsonObject.getJSONObject("regeocode"); JSONObject addressComponent = regeocode.getJSONObject("addressComponent"); String address = regeocode.getString("formatted_address"); map.put("address", address); String code = addressComponent.getString("adcode"); String province = addressComponent.getString("province"); String city = addressComponent.getString("city"); String district = addressComponent.getString("district"); map.put("province", province); map.put("provinceCode", code.substring(0, 2) + "0000"); map.put("city", city); map.put("cityCode", code.substring(0, 4) + "00"); map.put("district", district); map.put("districtCode", code); } return map; } /** * 坐标转换 * * @param locations 经度和纬度用","分割,经度在前,纬度在后,经纬度小数点后不得超过6位。多个坐标对之间用”|”进行分隔最多支持40对坐标。 * @param coordsys 可选值:gps;mapbar;baidu;autonavi(不进行转换) * @return * @throws Exception */ public Map<String, String> convert(String locations, String coordsys) throws Exception { String url = "https://restapi.amap.com/v3/assistant/coordinate/convert?locations=" + locations + "&coordsys=" + coordsys + "&output=json&key=" + key; HttpResult httpResult = HttpClientUtil.pushHttpRequset("GET", url, null, null, "json"); JSONObject jsonObject = JSON.parseObject(httpResult.getData()); Map<String, String> map = new HashMap<>(); if ("1".equals(jsonObject.getString("status"))) { map.put("code", jsonObject.getString("infocode"));//"10000" map.put("info", jsonObject.getString("info"));//status为0时,info返回错误原;否则返回“OK”。 map.put("locations", jsonObject.getString("locations").split(";")[0]);//转换之后的坐标。若有多个坐标,则用 “;”进行区分和间隔 } else { map.put("code", jsonObject.getString("infocode")); map.put("info", jsonObject.getString("info"));//status为0时,info返回错误原;否则返回“OK”。 } return map; } } cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/util/HttpRequestUtil.java
New file @@ -0,0 +1,246 @@ package com.dsh.communityWorldCup.util; import com.alibaba.fastjson.JSONObject; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpException; import org.apache.commons.httpclient.SimpleHttpConnectionManager; import org.apache.commons.httpclient.methods.GetMethod; import org.apache.commons.httpclient.methods.PostMethod; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.PrintWriter; import java.security.MessageDigest; import java.util.Map; public class HttpRequestUtil { public static String postRequest(String url, Map<String, String> params) { // 构造HttpClient的实例 HttpClient httpClient = new HttpClient(); // 创建POST方法的实例 PostMethod postMethod = new PostMethod(url); // 设置请求头信息 postMethod.setRequestHeader("Connection", "close"); postMethod.addRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8"); // 添加参数 for (Map.Entry<String, String> entry : params.entrySet()) { postMethod.addParameter(entry.getKey(), entry.getValue()); } // 使用系统提供的默认的恢复策略,设置请求重试处理,用的是默认的重试处理:请求三次 httpClient.getParams().setBooleanParameter("http.protocol.expect-continue", false); // 接收处理结果 String result = null; try { // 执行Http Post请求 httpClient.executeMethod(postMethod); // 返回处理结果 result = postMethod.getResponseBodyAsString(); } catch (HttpException e) { // 发生致命的异常,可能是协议不对或者返回的内容有问题 System.out.println("请检查输入的URL!"); e.printStackTrace(); } catch (IOException e) { // 发生网络异常 System.out.println("发生网络异常!"); e.printStackTrace(); } finally { // 释放链接 postMethod.releaseConnection(); // 关闭HttpClient实例 if (httpClient != null) { ((SimpleHttpConnectionManager) httpClient.getHttpConnectionManager()).shutdown(); httpClient = null; } } return result; } public static String postRequest1(String url, Map<String, String> params, String appKey, String appSecret) { // 构造HttpClient的实例 HttpClient httpClient = new HttpClient(); // 创建POST方法的实例 PostMethod postMethod = new PostMethod(url); // 设置请求头信息 String nonce = String.valueOf(Double.valueOf(Math.random() * 1000000.0D).intValue()); String timeMillis = String.valueOf(System.currentTimeMillis()); String signature = string2Sha1(appSecret + nonce + timeMillis); postMethod.setRequestHeader("Host", "api-cn.ronghub.com"); postMethod.setRequestHeader("App-Key", appKey); postMethod.setRequestHeader("Signature", signature); postMethod.setRequestHeader("Nonce", nonce); postMethod.setRequestHeader("Timestamp", timeMillis); postMethod.setRequestHeader("Host", "api-cn.ronghub.com"); postMethod.addRequestHeader("Content-Type", "application/json"); // 添加参数 for (Map.Entry<String, String> entry : params.entrySet()) { postMethod.addParameter(entry.getKey(), entry.getValue()); } // 使用系统提供的默认的恢复策略,设置请求重试处理,用的是默认的重试处理:请求三次 httpClient.getParams().setBooleanParameter("http.protocol.expect-continue", false); // 接收处理结果 String result = null; try { // 执行Http Post请求 httpClient.executeMethod(postMethod); // 返回处理结果 result = postMethod.getResponseBodyAsString(); } catch (HttpException e) { // 发生致命的异常,可能是协议不对或者返回的内容有问题 System.out.println("请检查输入的URL!"); e.printStackTrace(); } catch (IOException e) { // 发生网络异常 System.out.println("发生网络异常!"); e.printStackTrace(); } finally { // 释放链接 postMethod.releaseConnection(); // 关闭HttpClient实例 if (httpClient != null) { ((SimpleHttpConnectionManager) httpClient.getHttpConnectionManager()).shutdown(); httpClient = null; } } return result; } private static String string2Sha1(String str) { if (str == null || str.length() == 0) { return null; } char hexDigits[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; try { MessageDigest mdTemp = MessageDigest.getInstance("SHA1"); mdTemp.update(str.getBytes("UTF-8")); byte[] md = mdTemp.digest(); int j = md.length; char buf[] = new char[j * 2]; int k = 0; for (int i = 0; i < j; i++) { byte byte0 = md[i]; buf[k++] = hexDigits[byte0 >>> 4 & 0xf]; buf[k++] = hexDigits[byte0 & 0xf]; } return new String(buf); } catch (Exception e) { return null; } } public static String getRequest(String url, Map<String, String> params) { // 构造HttpClient实例 HttpClient client = new HttpClient(); // 拼接参数 String paramStr = ""; for (String key : params.keySet()) { paramStr = paramStr + "&" + key + "=" + params.get(key); } paramStr = paramStr.substring(1); // 创建GET方法的实例 GetMethod method = new GetMethod(url + "?" + paramStr); // 接收返回结果 String result = null; try { // 执行HTTP GET方法请求 client.executeMethod(method); // 返回处理结果 result = method.getResponseBodyAsString(); } catch (HttpException e) { // 发生致命的异常,可能是协议不对或者返回的内容有问题 System.out.println("请检查输入的URL!"); e.printStackTrace(); } catch (IOException e) { // 发生网络异常 System.out.println("发生网络异常!"); e.printStackTrace(); } finally { // 释放链接 method.releaseConnection(); // 关闭HttpClient实例 if (client != null) { ((SimpleHttpConnectionManager) client .getHttpConnectionManager()).shutdown(); client = null; } } return result; } /** * 发送网络请求 * * @param url * @return */ public static String sendNetRequest(String url, Map<String, String> params) { // 构造HttpClient实例 HttpClient client = new HttpClient(); String paramStr = ""; for (String key : params.keySet()) { paramStr = paramStr + "&" + key + "=" + params.get(key); } paramStr = paramStr.substring(1); System.err.println(url + "?" + paramStr); // 创建GET方法的实例 GetMethod method = new GetMethod(url + "?" + paramStr); // 接收返回结果 String result = null; try { // 执行HTTP GET方法请求 client.executeMethod(method); // 返回处理结果 result = method.getResponseBodyAsString(); } catch (HttpException e) { // 发生致命的异常,可能是协议不对或者返回的内容有问题 System.out.println("请检查输入的URL!"); e.printStackTrace(); } catch (IOException e) { // 发生网络异常 System.out.println("发生网络异常!"); e.printStackTrace(); } finally { // 释放链接 method.releaseConnection(); // 关闭HttpClient实例 if (client != null) { ((SimpleHttpConnectionManager) client.getHttpConnectionManager()).shutdown(); client = null; } } return result; } /** * jsonp跨域请求数据响应<br/> * 方法名:responsejsonpData<br/> * * @param request * @param response * @param map void<br/> * @throws <br/> * @author:Mryang<br/> * @createTime:2016年7月31日-下午11:17:31 <br/> * @tel: 15198268054<br /> * @since 1.0.0 */ public void responsejsonpData(HttpServletRequest request, HttpServletResponse response, Map<String, Object> map) { response.setCharacterEncoding("UTF-8"); response.setHeader("Content-Type", "text/html;Charset=utf-8"); try { PrintWriter writer = response.getWriter(); String params = request.getParameter("callback"); String json = JSONObject.toJSONString(map); writer.print(params + "(" + json + ")"); } catch (IOException e) { e.printStackTrace(); } } } cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupCompetitorMapper.xml
@@ -9,7 +9,7 @@ participantId, count(*) as num from t_world_cup_competitor where 1 = 1 where DATE_FORMAT(NOW(), '%Y-%m-%d') = DATE_FORMAT(startTime, '%Y-%m-%d') <if test="null != appUserIds and appUserIds.size() > 0"> and appUserId in <foreach collection="appUserIds" item="item" index="index" open="(" separator="," close=")"> cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupPaymentParticipantMapper.xml
@@ -7,9 +7,9 @@ <select id="getWorldCupPaymentParticipant" resultType="com.dsh.communityWorldCup.entity.WorldCupPaymentParticipant"> select * from t_world_cup_payment_participant where worldCupId = #{worldCupId} and participantType = #{participantType} and participantId = #{participantId} and worldCupPaymentId in ( where alreadyEntered = 0 and worldCupId = #{worldCupId} and participantType = #{participantType} and participantId = #{participantId} and worldCupPaymentId in ( select id from t_world_cup_payment where worldCupId = #{worldCupId} and payStatus = 2 and state = 1 ) ) order by createTime desc limit 0, 1 </select> cloud-server-course/src/main/java/com/dsh/course/controller/CoursePackageOrderStudentController.java
@@ -42,7 +42,18 @@ */ @ResponseBody @PostMapping("/deductionClassHour") public boolean deductionClassHour(@RequestBody DeductionClassHourList deductionClassHourList){ public DeductionClassHourList deductionClassHour(@RequestBody DeductionClassHourList deductionClassHourList){ return coursePackageOrderStudentService.deductionClassHour(deductionClassHourList); } /** * 回退课时和回退排课数据 * @param deductionClassHourList */ @ResponseBody @PostMapping("/backspaceClassHour") public void backspaceClassHour(DeductionClassHourList deductionClassHourList){ coursePackageOrderStudentService.backspaceClassHour(deductionClassHourList); } } cloud-server-course/src/main/java/com/dsh/course/model/DeductionClassHour.java
@@ -24,4 +24,8 @@ * 扣减课时 */ private Integer classHour; /** * 删除的排课数量(用户回退时重新排课) */ private Integer scheduledCourses; } cloud-server-course/src/main/java/com/dsh/course/service/ICoursePackageOrderStudentService.java
@@ -29,5 +29,12 @@ * @param deductionClassHourList * @return */ boolean deductionClassHour(DeductionClassHourList deductionClassHourList); DeductionClassHourList deductionClassHour(DeductionClassHourList deductionClassHourList); /** * 回退课时和回退排课数据 * @param deductionClassHourList */ void backspaceClassHour(DeductionClassHourList deductionClassHourList); } cloud-server-course/src/main/java/com/dsh/course/service/impl/CoursePackageOrderStudentServiceImpl.java
@@ -216,7 +216,7 @@ * @return */ @Override public boolean deductionClassHour(DeductionClassHourList deductionClassHourList) { public DeductionClassHourList deductionClassHour(DeductionClassHourList deductionClassHourList) { try { List<DeductionClassHour> list = deductionClassHourList.getDeductionClassHourList(); for (DeductionClassHour deductionClassHour : list) { @@ -251,6 +251,8 @@ List<CoursePackageScheduling> coursePackageSchedulings = packageSchedulings.subList(0, n); List<Long> collect = coursePackageSchedulings.stream().map(CoursePackageScheduling::getId).collect(Collectors.toList()); coursePackageSchedulingService.removeByIds(collect); deductionClassHour.setScheduledCourses(n); } this.updateById(coursePackageOrderStudent); @@ -264,10 +266,30 @@ courseCounsum.setAppUserId(coursePackageOrderStudent.getAppUserId()); courseCounsumService.save(courseCounsum); } return true; return deductionClassHourList; }catch (Exception e){ e.printStackTrace(); } return false; return null; } /** * 回退课时和回退排课数据 * @param deductionClassHourList */ @Override public void backspaceClassHour(DeductionClassHourList deductionClassHourList) { List<DeductionClassHour> list = deductionClassHourList.getDeductionClassHourList(); for (DeductionClassHour deductionClassHour : list) { CoursePackageOrderStudent coursePackageOrderStudent = this.getById(deductionClassHour.getId()); Integer laveClassHours = coursePackageOrderStudent.getLaveClassHours(); coursePackageOrderStudent.setLaveClassHours(coursePackageOrderStudent.getLaveClassHours() + deductionClassHour.getClassHour()); //需要排课的节数 Integer scheduledCourses = deductionClassHour.getScheduledCourses(); // coursePackageService } } } cloud-server-management/src/main/java/com/dsh/course/feignClient/account/RefereeClient.java
@@ -39,4 +39,12 @@ */ @PostMapping("/referee/getRefereeById") Referee getRefereeById(Integer id); /** * 修改裁判 * @param referee */ @PostMapping("/referee/editReferee") void editReferee(Referee referee); } cloud-server-management/src/main/java/com/dsh/course/feignClient/communityWorldCup/Model/WorldCup.java
New file @@ -0,0 +1,152 @@ package com.dsh.course.feignClient.communityWorldCup.Model; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.math.BigDecimal; import java.util.Date; /** * 社区世界杯 * @author zhibing.pu * @Date 2024/2/18 16:58 */ @Data public class WorldCup { /** * 主键 */ private Integer id; /** * 名称 */ private String name; /** * 开始时间 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date startTime; /** * 结束时间 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date endTime; /** * 报名结束时间 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date registrationClosingTime; /** * 开始年龄 */ private Integer startAge; /** * 结束年龄 */ private Integer endAge; /** * 报名性别(0=全部,1=男,2=女) */ private Integer gender; /** * 支付方式(1=免费,2=现金支付,3=玩湃币支付,4=课时支付) */ private String payType; /** * 现金 */ private BigDecimal cash; /** * 玩湃币 */ private Integer paiCoin; /** * 课时 */ private Integer classHour; /** * 最多报名人数 */ private Integer maxPeople; /** * 基础报名人数 */ private Integer basePeople; /** * 参赛获得积分 */ private Integer participationIntegral; /** * 胜利获得积分 */ private Integer winIntegral; /** * 省 */ @TableField("province") private String province; /** * 省 */ @TableField("provinceCode") private String provinceCode; /** * 市 */ @TableField("city") private String city; /** * 市 */ @TableField("cityCode") private String cityCode; /** * 参赛地址 */ private String address; /** * 经度 */ private String lon; /** * 纬度 */ private String lat; /** * 封面图 */ private String coverImg; /** * 首页默认背景图 */ private String homeBackdropImg; /** * 比赛图片 */ private String infoImg; /** * 比赛简介 */ private String intro; /** * 比赛详情 */ private String content; /** * 比赛状态(1=未开始,2=已开始,3=已结束,4=已取消) */ private Integer status; /** * 添加时间 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date createTime; /** * 已比赛次数 */ private Integer matchNumber; } cloud-server-management/src/main/java/com/dsh/course/feignClient/communityWorldCup/Model/WorldCupListAll.java
New file @@ -0,0 +1,35 @@ package com.dsh.course.feignClient.communityWorldCup.Model; import lombok.Data; /** * @author zhibing.pu * @Date 2024/3/2 10:56 */ @Data public class WorldCupListAll { /** * 比赛名称 */ private String name; /** * 开始时间 */ private String startTime; /** * 结束时间 */ private String endTime; /** * 比赛状态(1=未开始,2=已开始,3=已结束,4=已取消) */ private Integer status; /** * 页码 */ private Integer offset; /** * 页条数 */ private Integer limit; } cloud-server-management/src/main/java/com/dsh/course/feignClient/communityWorldCup/Model/WorldCupStore.java
New file @@ -0,0 +1,37 @@ package com.dsh.course.feignClient.communityWorldCup.Model; import lombok.Data; /** * 社区世界杯门店 * @author zhibing.pu * @Date 2024/2/18 18:06 */ @Data public class WorldCupStore { /** * 主键 */ private Integer id; /** * 世界杯id */ private Integer worldCupId; /** * 门店id */ private Integer storeId; /** * 是否开启世界杯按钮(0=否,1=是) */ private Integer isOpen; /** * 世界杯入口背景图 */ private String backgroundImage; /** * 排序 */ private Integer sort; } cloud-server-management/src/main/java/com/dsh/course/feignClient/communityWorldCup/WorldCupClient.java
New file @@ -0,0 +1,60 @@ package com.dsh.course.feignClient.communityWorldCup; import com.dsh.course.feignClient.communityWorldCup.Model.WorldCup; import com.dsh.course.feignClient.communityWorldCup.Model.WorldCupListAll; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import java.util.Map; /** * @author zhibing.pu * @Date 2024/3/2 10:58 */ @FeignClient("mb-cloud-communityWorldCup") public interface WorldCupClient { /** * 获取比赛管理列表页数据 * @param worldCupListAll * @return */ @PostMapping("/worldCup/getWorldCupListAll") Map<String, Object> getWorldCupListAll(WorldCupListAll worldCupListAll); /** * 添加社区世界杯 * @param worldCup * @return 数据id */ @PostMapping("/worldCup/addWorldCup") Integer addWorldCup(WorldCup worldCup); /** * 添加社区世界杯 * @param worldCup * @return 数据id */ @PostMapping("/worldCup/editWorldCup") void editWorldCup(WorldCup worldCup); /** * 根据id获取数据 * @param id * @return */ @PostMapping("/worldCup/getWorldCupById") WorldCup getWorldCupById(Integer id); /** * 取消赛事退款操作 * @param id */ @PostMapping("/worldCup/cancelWorldCupRefund") void cancelWorldCupRefund(Integer id); } cloud-server-management/src/main/java/com/dsh/course/feignClient/communityWorldCup/WorldCupStoreClient.java
New file @@ -0,0 +1,42 @@ package com.dsh.course.feignClient.communityWorldCup; import com.dsh.course.feignClient.communityWorldCup.Model.WorldCupStore; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import java.util.List; /** * @author zhibing.pu * @Date 2024/3/4 9:58 */ @FeignClient("mb-cloud-communityWorldCup") public interface WorldCupStoreClient { /** * 添加社区世界杯和门店关系数据 * @param worldCupStore */ @PostMapping("/worldCup/addWorldCupStore") void addWorldCupStore(WorldCupStore worldCupStore); /** * 删除世界杯门店关系数据 * @param worldCupId */ @PostMapping("/worldCup/addWorldCupStore") void delWorldCupStore(@RequestBody Integer worldCupId); /** * 根据世界杯id获取门店关系数据 * @param worldCupId * @return */ @PostMapping("/worldCup/getWorldCupStoreAllList") List<WorldCupStore> getWorldCupStoreAllList(Integer worldCupId); } cloud-server-management/src/main/java/com/dsh/course/mapper/StoreMapper.java
@@ -76,4 +76,13 @@ List<TStoreListVo> listAllStore(@Param("page") Page<TStoreListVo> page, @Param("provinceCode") String provinceCode, @Param("cityCode") String cityCode, @Param("name") String name, @Param("phone") String phone, @Param("shopName") String shopName, @Param("id") Integer id); List<Map<String, Object>> listStoreAll(Page page, @Param("name") String name, @Param("operator") Integer operator, @Param("provinceCode") String provinceCode, @Param("cityCode") String cityCode); List<Map<String, Object>> listStoreAllByIds(@Param("ids") List<Integer> ids); } cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/OperatorController.java
@@ -856,4 +856,15 @@ } return ResultUtil.success("添加成功"); } /** * 获取所有运营商 * @return */ @ResponseBody @PostMapping("/getOperatorListAll") public Object getOperatorListAll(){ return operatorService.list(new QueryWrapper<TOperator>().eq("state", 1)); } } cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/RefereeController.java
@@ -91,4 +91,40 @@ map.put("city", citys); return map; } /** * 修改裁判数据 * @param referee * @return */ @ResponseBody @PostMapping("/editReferee") public ResultUtil editReferee(Referee referee){ Region region = regionService.getOne(new QueryWrapper<Region>().eq("code", referee.getProvinceCode())); referee.setProvince(region.getName()); region = regionService.getOne(new QueryWrapper<Region>().eq("code", referee.getCityCode())); referee.setCity(region.getName()); refereeClient.editReferee(referee); return ResultUtil.success(); } /** * 修改状态 * @param id * @param state * @return */ @ResponseBody @PostMapping("/updateState") public ResultUtil updateState(Integer id, Integer state){ Referee referee = new Referee(); referee.setState(state); referee.setId(id); refereeClient.editReferee(referee); return ResultUtil.success(); } } cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TStoreController.java
@@ -1,7 +1,17 @@ package com.dsh.guns.modular.system.controller.code; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.dsh.guns.core.base.controller.BaseController; import com.dsh.guns.core.common.constant.factory.PageFactory; import com.dsh.guns.modular.system.service.IStoreService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import java.util.List; import java.util.Map; /** * @author zhibing.pu @@ -9,5 +19,18 @@ */ @Controller @RequestMapping("/store") public class TStoreController { public class TStoreController extends BaseController { @Autowired private IStoreService storeService; @ResponseBody @PostMapping("/listAll") public Object listAll(String name, Integer operator, String provinceCode, String cityCode){ Page page = new PageFactory<List<Map<String, Object>>>().defaultPage(); List<Map<String, Object>> mapList = storeService.listStoreAll(page, name, operator, provinceCode, cityCode); page.setRecords(mapList); return super.packForBT(page); } } cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/WorldCupController.java
New file @@ -0,0 +1,200 @@ package com.dsh.guns.modular.system.controller.code; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.dsh.course.feignClient.communityWorldCup.Model.WorldCupStore; import com.dsh.course.feignClient.communityWorldCup.WorldCupClient; import com.dsh.course.feignClient.communityWorldCup.Model.WorldCup; import com.dsh.course.feignClient.communityWorldCup.Model.WorldCupListAll; import com.dsh.course.feignClient.communityWorldCup.WorldCupStoreClient; import com.dsh.guns.modular.system.service.IStoreService; import com.dsh.guns.modular.system.util.DateUtil; import com.dsh.guns.modular.system.util.ResultUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import javax.annotation.Resource; import java.sql.ResultSet; import java.text.SimpleDateFormat; import java.util.*; import java.util.stream.Collectors; /** * @author zhibing.pu * @Date 2024/3/2 10:40 */ @Controller @RequestMapping("/worldCup") public class WorldCupController { private String PREFIX = "/system/worldCup/"; @Resource private WorldCupClient worldCupClient; @Resource private WorldCupStoreClient worldCupStoreClient; @Autowired private IStoreService storeService; /** * 跳转列表页 * @return */ @RequestMapping("") public String showWorldCupList(){ return PREFIX + "worldCup.html"; } /** * 跳转到添加页 * @return */ @RequestMapping("/openAddWorldCup") public String openAddWorldCup(){ return PREFIX + "worldCup_add.html"; } @RequestMapping("/openEditWorldCup") public String openEditWorldCup(Model model, Integer id){ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); WorldCup worldCup = worldCupClient.getWorldCupById(id); model.addAttribute("item", worldCup); model.addAttribute("startTime", sdf.format(worldCup.getStartTime())); model.addAttribute("endTime", sdf.format(worldCup.getEndTime())); model.addAttribute("registrationClosingTime", null != worldCup.getRegistrationClosingTime() ? sdf.format(worldCup.getRegistrationClosingTime()) : ""); List<WorldCupStore> worldCupStoreAllList = worldCupStoreClient.getWorldCupStoreAllList(id); List<Integer> collect = worldCupStoreAllList.stream().map(WorldCupStore::getStoreId).collect(Collectors.toList()); List<Map<String, Object>> mapList = storeService.listStoreAllByIds(collect); model.addAttribute("stores", JSON.toJSONString(mapList)); return PREFIX + "worldCup_edit.html"; } @RequestMapping("/openInfoWorldCup") public String openInfoWorldCup(Model model, Integer id){ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); WorldCup worldCup = worldCupClient.getWorldCupById(id); model.addAttribute("item", worldCup); model.addAttribute("startTime", sdf.format(worldCup.getStartTime())); model.addAttribute("endTime", sdf.format(worldCup.getEndTime())); model.addAttribute("registrationClosingTime", null != worldCup.getRegistrationClosingTime() ? sdf.format(worldCup.getRegistrationClosingTime()) : ""); List<WorldCupStore> worldCupStoreAllList = worldCupStoreClient.getWorldCupStoreAllList(id); List<Integer> collect = worldCupStoreAllList.stream().map(WorldCupStore::getStoreId).collect(Collectors.toList()); List<Map<String, Object>> mapList = storeService.listStoreAllByIds(collect); model.addAttribute("stores", JSON.toJSONString(mapList)); return PREFIX + "worldCup_info.html"; } /** * 跳转到门店选择页面 * @return */ @RequestMapping("/openStore") public String openStore(){ return PREFIX + "store.html"; } /** * 获取列表数据 * @param worldCupList * @return */ @ResponseBody @PostMapping("/listAll") public Object listAll(WorldCupListAll worldCupList){ return worldCupClient.getWorldCupListAll(worldCupList); } /** * 添加社区世界杯 * @param worldCup * @param stores * @return */ @ResponseBody @PostMapping("/addWorldCup") public ResultUtil addWorldCup(WorldCup worldCup, String stores){ worldCup.setStatus(1); worldCup.setCreateTime(new Date()); worldCup.setMatchNumber(0); Integer integer = worldCupClient.addWorldCup(worldCup); if(null != integer){ JSONArray jsonArray = JSON.parseArray(stores); for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); Integer id = jsonObject.getInteger("id"); WorldCupStore worldCupStore = new WorldCupStore(); worldCupStore.setStoreId(id); worldCupStore.setWorldCupId(integer); worldCupStore.setIsOpen(0); worldCupStoreClient.addWorldCupStore(worldCupStore); } } return ResultUtil.success(); } /** * 编辑社区世界杯 * @param worldCup * @param stores * @return */ @ResponseBody @PostMapping("/editWorldCup") public ResultUtil editWorldCup(WorldCup worldCup, String stores){ WorldCup worldCup1 = worldCupClient.getWorldCupById(worldCup.getId()); if(worldCup1.getStartTime().before(DateUtil.getDate())){ return ResultUtil.error("赛事已开始,不能编辑"); } worldCupClient.editWorldCup(worldCup); worldCupStoreClient.delWorldCupStore(worldCup.getId()); JSONArray jsonArray = JSON.parseArray(stores); for (int i = 0; i < jsonArray.size(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); Integer id = jsonObject.getInteger("id"); WorldCupStore worldCupStore = new WorldCupStore(); worldCupStore.setStoreId(id); worldCupStore.setWorldCupId(worldCup.getId()); worldCupStore.setIsOpen(0); worldCupStoreClient.addWorldCupStore(worldCupStore); } return ResultUtil.success(); } /** * 修改赛事状态 * @param id * @param state * @return */ @ResponseBody @PostMapping("/updateState") public ResultUtil updateState(Integer id, Integer state){ WorldCup worldCup = new WorldCup(); worldCup.setId(id); worldCup.setStatus(state); worldCupClient.editWorldCup(worldCup); //开始处理已支付的退费 worldCupClient.cancelWorldCupRefund(id); return ResultUtil.success(); } } cloud-server-management/src/main/java/com/dsh/guns/modular/system/service/IStoreService.java
@@ -79,4 +79,8 @@ List<TStoreListVo> listAllStore(Page<TStoreListVo> page, String provinceCode, String cityCode, String name, String phone, String shopName, Integer objectId); List<Map<String, Object>> listStoreAll(Page page, String name, Integer operator, String provinceCode, String cityCode); List<Map<String, Object>> listStoreAllByIds(List<Integer> ids); } cloud-server-management/src/main/java/com/dsh/guns/modular/system/service/impl/StoreServiceImpl.java
@@ -132,4 +132,15 @@ public void updateBenefits(Integer id, String p1) { this.baseMapper.updateBasicBenefits(id,p1); } @Override public List<Map<String, Object>> listStoreAll(Page page, String name, Integer operator, String provinceCode, String cityCode) { return this.baseMapper.listStoreAll(page, name, operator, provinceCode, cityCode); } @Override public List<Map<String, Object>> listStoreAllByIds(List<Integer> ids) { return this.baseMapper.listStoreAllByIds(ids); } } cloud-server-management/src/main/resources/mapper/TStoreMapper.xml
@@ -171,4 +171,49 @@ and t1.name like concat("%",#{shopName},"%") </if> </select> <select id="listStoreAll" resultType="map"> select a.id, CONCAT(a.province, a.city) as province, b.name as operator, a.name, c.gate from t_store a left join t_operator b on (a.operatorId = b.id) left join (select GROUP_CONCAT(id) as gate, storeId from t_gate group by storeId) c on (a.id = c.storeId) where a.state = 1 <if test="null != name and '' != name"> and a.name like CONCAT('%', #{name}, '%') </if> <if test="null != operator"> and a.operatorId = #{operator} </if> <if test="null != provinceCode and '' != provinceCode"> and a.provinceCode = #{provinceCode} </if> <if test="null != cityCode and '' != cityCode"> and a.cityCode = #{cityCode} </if> </select> <select id="listStoreAllByIds" resultType="map"> select a.id, CONCAT(a.province, a.city) as province, b.name as operator, a.name, c.gate from t_store a left join t_operator b on (a.operatorId = b.id) left join (select GROUP_CONCAT(id) as gate, storeId from t_gate group by storeId) c on (a.id = c.storeId) where a.id in <foreach collection="ids" item="item" index="index" open="(" separator="," close=")"> #{item} </foreach> </select> </mapper> cloud-server-management/src/main/webapp/WEB-INF/view/system/referee/referee.html
@@ -22,7 +22,7 @@ 所在省 </button> </div> <select class="form-control" id="provinceCode" > <select class="form-control" id="provinceCode" onchange="Referee.region('cityCode', this)"> <option value="">请选择</option> </select> </div> cloud-server-management/src/main/webapp/WEB-INF/view/system/worldCup/store.html
New file @@ -0,0 +1,68 @@ @layout("/common/_container.html"){ <div class="row"> <div class="col-sm-12"> <div class="ibox float-e-margins"> <div class="ibox-title"> <h5>参与赛点</h5> </div> <div class="ibox-content"> <div class="row row-lg"> <div class="col-sm-12"> <div class="row"> <div class="col-sm-3"> <div class="input-group"> <div class="input-group-btn open"> <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> 所在省 </button> </div> <select class="form-control" id="provinceCode" onchange="Store.region('cityCode', this)"> <option value="">请选择</option> </select> </div> </div> <div class="col-sm-3"> <div class="input-group"> <div class="input-group-btn open"> <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> 所在市 </button> </div> <select class="form-control" id="cityCode" > <option value="">请选择</option> </select> </div> </div> <div class="col-sm-3"> <div class="input-group"> <div class="input-group-btn open"> <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> 所属运营商 </button> </div> <select class="form-control" id="operator" > <option value="">请选择</option> </select> </div> </div> <div class="col-sm-3"> <#NameCon id="name" name="门店名称:" /> </div> <div class="col-sm-3"> <#button name="搜索" icon="fa-search" clickFun="Store.search()"/> <#button name="重置" icon="fa-trash" clickFun="Store.resetSearch()" space="true"/> </div> </div> <#table id="StoreTable"/> <div style="text-align: center;"> <#button btnCss="danger" name="关闭" id="cancel" icon="fa-eraser" clickFun="Store.close()"/> <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="Store.addSubmit()"/> </div> </div> </div> </div> </div> </div> </div> <script src="${ctxPath}/modular/system/worldCup/store.js"></script> @} cloud-server-management/src/main/webapp/WEB-INF/view/system/worldCup/worldCup.html
New file @@ -0,0 +1,75 @@ @layout("/common/_container.html"){ <div class="row"> <div class="col-sm-12"> <div class="ibox float-e-margins"> <div class="ibox-title"> <h5>社区世界杯比赛管理</h5> </div> <div class="ibox-content"> <div class="row row-lg"> <div class="col-sm-12"> <div class="row"> <div class="col-sm-3"> <#NameCon id="name" name="比赛名称:" /> </div> <div class="col-sm-3"> <#NameCon id="startTime" name="开始时间:" /> </div> <div class="col-sm-3"> <#NameCon id="endTime" name="结束时间:" /> </div> <div class="col-sm-3"> <div class="input-group"> <div class="input-group-btn open"> <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> 状态 </button> </div> <select class="form-control" id="status"> <option value="">全部</option> <option value="1">未开始</option> <option value="2">已开始</option> <option value="3">已结束</option> <option value="4">已取消</option> </select> </div> </div> <div class="col-sm-3"> <#button name="搜索" icon="fa-search" clickFun="WorldCup.search()"/> <#button name="重置" icon="fa-trash" clickFun="WorldCup.resetSearch()" space="true"/> </div> </div> <div class="hidden-xs" id="WorldCupTableToolbar" role="group"> @if(shiro.hasPermission("/worldCup/openAddWorldCup")){ <#button name="添加" icon="fa-plus" clickFun="WorldCup.openAddWorldCup()"/> @} @if(shiro.hasPermission("/worldCup/openEditWorldCup")){ <#button name="编辑" icon="fa-edit" clickFun="WorldCup.openEditWorldCup()" space="true"/> @} @if(shiro.hasPermission("/worldCup/cancelWorldCup")){ <#button name="取消" icon="fa-edit" clickFun="WorldCup.cancelWorldCup()" space="true"/> @} @if(shiro.hasPermission("/worldCup/openWorldCupInfo")){ <#button name="查看详情" icon="fa-edit" clickFun="WorldCup.openWorldCupInfo()" space="true"/> @} @if(shiro.hasPermission("/worldCup/registeredPersonnel")){ <#button name="已报名人员" icon="fa-edit" clickFun="WorldCup.registeredPersonnel()" space="true"/> @} </div> <#table id="WorldCupTable"/> </div> </div> </div> </div> </div> </div> <script src="${ctxPath}/modular/system/worldCup/worldCup.js"></script> <script> laydate.render({ elem: '#startTime' }); laydate.render({ elem: '#endTime' }); </script> @} cloud-server-management/src/main/webapp/WEB-INF/view/system/worldCup/worldCup_add.html
New file @@ -0,0 +1,278 @@ @layout("/common/_container.html"){ <style type="text/css"> #stores{ width: 100%; } #stores td, #stores th{ border: 1px solid #eee; text-align: center; height: 40px; line-height: 40px; } #stores td select, #stores td div, #stores td div input, #stores td input{ height: 100%; width: 95%; border: none; text-indent: 10px; } </style> <div class="ibox float-e-margins"> <div class="ibox-content"> <div class="form-horizontal" id="userInfoForm"> <input type="hidden" id="id" value=""> <div class="row"> <div class="form-group"> <label class="col-sm-3 control-label">*比赛名称:</label> <div class="col-sm-3"> <input class="form-control" id="name"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*开始时间:</label> <div class="col-sm-3"> <input class="form-control" id="startTime"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*结束时间:</label> <div class="col-sm-3"> <input class="form-control" id="endTime"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">报名截止时间:</label> <div class="col-sm-3"> <input class="form-control" id="registrationClosingTime"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*报名年龄:</label> <div class="col-sm-1"> <input class="form-control" id="startAge" type="number" min="0"> </div> <label style="float: left;line-height: 35px;">岁至:</label> <div class="col-sm-1"> <input class="form-control" id="endAge" type="number" min="0"> </div> <label style="float: left;line-height: 35px;">岁</label> </div> <div class="form-group"> <label class="col-sm-3 control-label">*报名性别</label> <div class="col-sm-3"> <select class="form-control" id="gender"> <option value="0">全部</option> <option value="1">男</option> <option value="2">女</option> </select> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*支付方式:</label> <div class="col-sm-9" id="payType"> <input type="checkbox" item="free" value="0" checked>免费 <input type="checkbox" item="cash" value="1">现金支付 <input type="checkbox" item="paiCoin" value="2">玩湃币支付 <input type="checkbox" item="classHour" value="3">课时支付 </div> </div> <div class="form-group cash" hidden> <label class="col-sm-3 control-label">*现金支付:</label> <div class="col-sm-3"> <input class="form-control" id="cash" type="number" min="0"> </div> </div> <div class="form-group paiCoin" hidden> <label class="col-sm-3 control-label">*玩湃币支付:</label> <div class="col-sm-3"> <input class="form-control" id="paiCoin" type="number" min="0"> </div> </div> <div class="form-group classHour" hidden> <label class="col-sm-3 control-label">*课时支付:</label> <div class="col-sm-3"> <input class="form-control" id="classHour" type="number" min="0"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*报名人数:</label> <div class="col-sm-3"> <input class="form-control" id="maxPeople" type="number" min="0"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*基础报名人数:</label> <div class="col-sm-3"> <input class="form-control" id="basePeople" type="number" min="0"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*参赛可获积分:</label> <div class="col-sm-3"> <input class="form-control" id="participationIntegral" type="number" min="0"> </div> <label style="float: left;line-height: 35px;">胜场可获积分</label> <div class="col-sm-3"> <input class="form-control" id="winIntegral" type="number" min="0"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*比赛地点:</label> <div class="col-sm-7"> <input class="form-control" id="address" onchange="WorldCupInfo.searchByStationName(this,1)"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*坐标选择:</label> <div class="col-sm-7"> <div id="container" style="height: 500px;" ></div> </div> <input type="hidden" id="longitude"/> <input type="hidden" id="latitude"/> </div> <div class="form-group"> <label class="col-sm-3 control-label">参与赛点:</label> <div class="col-sm-7"> <button onclick="WorldCupInfo.openStore()">选择门店</button> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label"></label> <div class="col-sm-7"> <table id="stores"> <thead> <tr> <th>所在省市</th><th>所属运营商</th><th>门店名称</th><th>操作</th> </tr> </thead> <tbody> </tbody> </table> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">赛事简介</label> <div class="col-sm-7"> <textarea class="form-control" id="intro" style="height:200px"></textarea> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label head-scu-label">比赛封面图</label> <div class="col-sm-2"> <div id="coverImgPreId"> <div><img width="100px" height="100px" src="${ctxPath}/img/NoPIC.png"></div> </div> </div> <div class="col-sm-1"> <div class="head-scu-btn upload-btn" id="coverImgBtnId"> <i class="fa fa-upload"></i> 文件上传 </div> </div> <input type="hidden" id="coverImg" /> <label class="col-sm-1 control-label">首页默认背景图</label> <div class="col-sm-2"> <div id="homeBackdropImgPreId"> <div><img width="100px" height="100px" src="${ctxPath}/img/NoPIC.png"></div> </div> </div> <div class="col-sm-1"> <div class="head-scu-btn upload-btn" id="homeBackdropImgBtnId"> <i class="fa fa-upload"></i> 文件上传 </div> </div> <input type="hidden" id="homeBackdropImg" /> </div> <div class="row" id="app1"> <div class="form-group"> <label class="col-sm-3 control-label head-scu-label">*比赛图片(请上传不超过五张图片): </label> <div class="col-sm-7"> <el-upload :limit="5" class="avatar-uploader" action="/tCouponManage/uploadPic" list-type="picture-card" accept="." :on-success="handleAvatarSuccess" :on-remove="handleRemove"> <i class="el-icon-plus"></i> </el-upload> <el-dialog :visible.sync="dialogVisible"> <img width="100%" :src="imageUrl1" alt=""> </el-dialog> </div> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">比赛详情</label> <div class="col-sm-7" style="padding: 0px;"> <textarea id="content" style="height: 800px;width: 100%;"></textarea> </div> </div> </div> </div> <div class="row btn-group-m-t"> <div class="col-sm-10"> <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="WorldCupInfo.addSubmit()"/> <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="WorldCupInfo.close()"/> </div> </div> </div> </div> <script src="${ctxPath}/modular/system/worldCup/worldCup_info.js"></script> <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script> <script src="${ctxPath}/js/vue/vue.js"></script> <script src="${ctxPath}/js/elementui/index.js"></script> <link rel="stylesheet" href="${ctxPath}/js/elementui/index.css"> <script> laydate.render({ elem: '#startTime' }); laydate.render({ elem: '#endTime' }); laydate.render({ elem: '#registrationClosingTime' }); var vue2 = new Vue({ el: '#app1', props: { // 数量限制 limit: { type: Number, default: 2 }, }, data: { autoUpload: true,//自动上传 imageUrl1: '',//模型数据,用于上传图片完成后图片预览 dialogVisible: false }, methods: { handleAvatarSuccess(res, file) { WorldCupInfo.goodsPicArray1.push({ 'name': file.name, 'uuid': file.uuid, 'url': file.response }); }, beforeAvatarUpload(file) { const isLt2M = file.size / 1024 / 1024 < 10; if (!isLt2M) { this.$message.error('上传图片大小不能超过 10MB!'); } return isLt2M; }, handleRemove(file, fileList) { WorldCupInfo.goodsPicArray1 = WorldCupInfo.goodsPicArray1.filter(item => { return item.uid != file.uid; }); }, }, created() { }, }); </script> @} cloud-server-management/src/main/webapp/WEB-INF/view/system/worldCup/worldCup_edit.html
New file @@ -0,0 +1,299 @@ @layout("/common/_container.html"){ <style type="text/css"> #stores{ width: 100%; } #stores td, #stores th{ border: 1px solid #eee; text-align: center; height: 40px; line-height: 40px; } #stores td select, #stores td div, #stores td div input, #stores td input{ height: 100%; width: 95%; border: none; text-indent: 10px; } </style> <div class="ibox float-e-margins"> <div class="ibox-content"> <div class="form-horizontal" id="userInfoForm"> <input type="hidden" id="id" value="${item.id}"> <input type="hidden" id="storeInfo", value='${stores}'> <div class="row"> <div class="form-group"> <label class="col-sm-3 control-label">*比赛名称:</label> <div class="col-sm-3"> <input class="form-control" id="name" value="${item.name}"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*开始时间:</label> <div class="col-sm-3"> <input class="form-control" id="startTime" value="${startTime}"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*结束时间:</label> <div class="col-sm-3"> <input class="form-control" id="endTime" value="${endTime}"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">报名截止时间:</label> <div class="col-sm-3"> <input class="form-control" id="registrationClosingTime" value="${registrationClosingTime}"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*报名年龄:</label> <div class="col-sm-1"> <input class="form-control" id="startAge" type="number" min="0" value="${item.startAge}"> </div> <label style="float: left;line-height: 35px;">岁至:</label> <div class="col-sm-1"> <input class="form-control" id="endAge" type="number" min="0" value="${item.endAge}"> </div> <label style="float: left;line-height: 35px;">岁</label> </div> <div class="form-group"> <label class="col-sm-3 control-label">*报名性别</label> <div class="col-sm-3"> <select class="form-control" id="gender"> <option value="0" ${0 == item.gender ? 'selected' : ''}>全部</option> <option value="1" ${1 == item.gender ? 'selected' : ''}>男</option> <option value="2" ${2 == item.gender ? 'selected' : ''}>女</option> </select> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*支付方式:</label> <div class="col-sm-9" id="payType"> <input type="checkbox" item="free" value="0" ${null != item.cash || null != item.paiCoin || null != item.classHour ? '' : 'checked'}>免费 <input type="checkbox" item="cash" value="1" ${null == item.cash ? '' : 'checked'}>现金支付 <input type="checkbox" item="paiCoin" value="2" ${null == item.paiCoin ? '' : 'checked'}>玩湃币支付 <input type="checkbox" item="classHour" value="3" ${null == item.classHour ? '' : 'checked'}>课时支付 </div> </div> <div class="form-group cash" ${null == item.cash ? 'hidden' : ''}> <label class="col-sm-3 control-label">*现金支付:</label> <div class="col-sm-3"> <input class="form-control" id="cash" type="number" min="0" value="${item.cash}"> </div> </div> <div class="form-group paiCoin" ${null == item.paiCoin ? 'hidden' : ''}> <label class="col-sm-3 control-label">*玩湃币支付:</label> <div class="col-sm-3"> <input class="form-control" id="paiCoin" type="number" min="0" value="${item.paiCoin}"> </div> </div> <div class="form-group classHour" ${null == item.classHour ? 'hidden' : ''}> <label class="col-sm-3 control-label">*课时支付:</label> <div class="col-sm-3"> <input class="form-control" id="classHour" type="number" min="0" value="${item.classHour}"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*报名人数:</label> <div class="col-sm-3"> <input class="form-control" id="maxPeople" type="number" min="0" value="${item.maxPeople}"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*基础报名人数:</label> <div class="col-sm-3"> <input class="form-control" id="basePeople" type="number" min="0" value="${item.basePeople}"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*参赛可获积分:</label> <div class="col-sm-3"> <input class="form-control" id="participationIntegral" type="number" min="0" value="${item.participationIntegral}"> </div> <label style="float: left;line-height: 35px;">胜场可获积分</label> <div class="col-sm-3"> <input class="form-control" id="winIntegral" type="number" min="0" value="${item.winIntegral}"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*比赛地点:</label> <div class="col-sm-7"> <input class="form-control" id="address" onchange="WorldCupInfo.searchByStationName(this,1)" value="${item.address}"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*坐标选择:</label> <div class="col-sm-7"> <div id="container" style="height: 500px;" ></div> </div> <input type="hidden" id="longitude" value="${item.lon}"/> <input type="hidden" id="latitude" value="${item.lat}"/> </div> <div class="form-group"> <label class="col-sm-3 control-label">参与赛点:</label> <div class="col-sm-7"> <button onclick="WorldCupInfo.openStore()">选择门店</button> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label"></label> <div class="col-sm-7"> <table id="stores"> <thead> <tr> <th>所在省市</th><th>所属运营商</th><th>门店名称</th><th>操作</th> </tr> </thead> <tbody> </tbody> </table> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">赛事简介</label> <div class="col-sm-7"> <textarea class="form-control" id="intro" style="height:200px">${item.intro}</textarea> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label head-scu-label">比赛封面图</label> <div class="col-sm-2"> <div id="coverImgPreId"> <div><img width="100px" height="100px" src="${item.coverImg}"></div> </div> </div> <div class="col-sm-1"> <div class="head-scu-btn upload-btn" id="coverImgBtnId"> <i class="fa fa-upload"></i> 文件上传 </div> </div> <input type="hidden" id="coverImg" value="${item.coverImg}"/> <label class="col-sm-1 control-label">首页默认背景图</label> <div class="col-sm-2"> <div id="homeBackdropImgPreId"> <div><img width="100px" height="100px" src="${item.homeBackdropImg}"></div> </div> </div> <div class="col-sm-1"> <div class="head-scu-btn upload-btn" id="homeBackdropImgBtnId"> <i class="fa fa-upload"></i> 文件上传 </div> </div> <input type="hidden" id="homeBackdropImg" value="${item.homeBackdropImg}"/> </div> <div class="row" id="app1"> <div class="form-group"> <label class="col-sm-3 control-label head-scu-label">*比赛图片(请上传不超过五张图片): </label> <div class="col-sm-7"> <el-upload :limit="5" class="avatar-uploader" action="/tCouponManage/uploadPic" list-type="picture-card" accept="." :file-list="imageUrl2" :on-success="handleAvatarSuccess" :on-remove="handleRemove"> <i class="el-icon-plus"></i> </el-upload> <el-dialog :visible.sync="dialogVisible"> <img width="100%" :src="imageUrl1" alt=""> </el-dialog> </div> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">比赛详情</label> <div class="col-sm-7" style="padding: 0px;"> <textarea id="content" style="height: 800px;width: 100%;">${item.content}</textarea> </div> </div> </div> </div> <div class="row btn-group-m-t"> <div class="col-sm-10"> <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="WorldCupInfo.editSubmit()"/> <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="WorldCupInfo.close()"/> </div> </div> </div> </div> <script src="${ctxPath}/modular/system/worldCup/worldCup_info.js"></script> <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script> <script src="${ctxPath}/js/vue/vue.js"></script> <script src="${ctxPath}/js/elementui/index.js"></script> <link rel="stylesheet" href="${ctxPath}/js/elementui/index.css"> <script> laydate.render({ elem: '#startTime' }); laydate.render({ elem: '#endTime' }); laydate.render({ elem: '#registrationClosingTime' }); let id = '${item.infoImg}' let obj = [] var vue2 = new Vue({ el: '#app1', props: { // 数量限制 limit: { type: Number, default: 2 }, }, data: { autoUpload: true,//自动上传 imageUrl1: '',//模型数据,用于上传图片完成后图片预览 imageUrl2: JSON.parse(id), dialogVisible: false }, methods: { handleAvatarSuccess(res, file) { WorldCupInfo.goodsPicArray1.push({ 'name': file.name, 'uuid': file.uuid, 'url': file.response }); }, changeImg(){ var i = id.split(",") for (let j = 0; j <i.length; j++) { let obj={ name:i[j], uuid:i[j], url:i[j], } this.imageUrl2.push(obj) } }, beforeAvatarUpload(file) { const isLt2M = file.size / 1024 / 1024 < 10; if (!isLt2M) { this.$message.error('上传图片大小不能超过 10MB!'); } return isLt2M; }, handleRemove(file, fileList) { WorldCupInfo.goodsPicArray1 = WorldCupInfo.goodsPicArray1.filter(item => { return item.uid != file.uid; }); }, }, created() { // this.changeImg() WorldCupInfo.goodsPicArray1 = this.imageUrl2 }, }); </script> @} cloud-server-management/src/main/webapp/WEB-INF/view/system/worldCup/worldCup_info.html
New file @@ -0,0 +1,282 @@ @layout("/common/_container.html"){ <style type="text/css"> #stores{ width: 100%; } #stores td, #stores th{ border: 1px solid #eee; text-align: center; height: 40px; line-height: 40px; } #stores td select, #stores td div, #stores td div input, #stores td input{ height: 100%; width: 95%; border: none; text-indent: 10px; } </style> <div class="ibox float-e-margins"> <div class="ibox-content"> <div class="form-horizontal" id="userInfoForm"> <input type="hidden" id="id" value="${item.id}"> <input type="hidden" id="storeInfo", value='${stores}'> <div class="row"> <div class="form-group"> <label class="col-sm-3 control-label">*比赛名称:</label> <div class="col-sm-3"> <input class="form-control" id="name" value="${item.name}" disabled> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*开始时间:</label> <div class="col-sm-3"> <input class="form-control" id="startTime" value="${startTime}" disabled> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*结束时间:</label> <div class="col-sm-3"> <input class="form-control" id="endTime" value="${endTime}" disabled> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">报名截止时间:</label> <div class="col-sm-3"> <input class="form-control" id="registrationClosingTime" value="${registrationClosingTime}" disabled> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*报名年龄:</label> <div class="col-sm-1"> <input class="form-control" id="startAge" type="number" min="0" value="${item.startAge}" disabled> </div> <label style="float: left;line-height: 35px;">岁至:</label> <div class="col-sm-1"> <input class="form-control" id="endAge" type="number" min="0" value="${item.endAge}" disabled> </div> <label style="float: left;line-height: 35px;">岁</label> </div> <div class="form-group"> <label class="col-sm-3 control-label">*报名性别</label> <div class="col-sm-3"> <select class="form-control" id="gender" disabled> <option value="0" ${0 == item.gender ? 'selected' : ''}>全部</option> <option value="1" ${1 == item.gender ? 'selected' : ''}>男</option> <option value="2" ${2 == item.gender ? 'selected' : ''}>女</option> </select> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*支付方式:</label> <div class="col-sm-9" id="payType"> <input type="checkbox" item="free" value="0" ${null != item.cash || null != item.paiCoin || null != item.classHour ? '' : 'checked'} disabled>免费 <input type="checkbox" item="cash" value="1" ${null == item.cash ? '' : 'checked'} disabled>现金支付 <input type="checkbox" item="paiCoin" value="2" ${null == item.paiCoin ? '' : 'checked'} disabled>玩湃币支付 <input type="checkbox" item="classHour" value="3" ${null == item.classHour ? '' : 'checked'} disabled>课时支付 </div> </div> <div class="form-group cash" ${null == item.cash ? 'hidden' : ''}> <label class="col-sm-3 control-label">*现金支付:</label> <div class="col-sm-3"> <input class="form-control" id="cash" type="number" min="0" value="${item.cash}" disabled> </div> </div> <div class="form-group paiCoin" ${null == item.paiCoin ? 'hidden' : ''}> <label class="col-sm-3 control-label">*玩湃币支付:</label> <div class="col-sm-3"> <input class="form-control" id="paiCoin" type="number" min="0" value="${item.paiCoin}" disabled> </div> </div> <div class="form-group classHour" ${null == item.classHour ? 'hidden' : ''}> <label class="col-sm-3 control-label">*课时支付:</label> <div class="col-sm-3"> <input class="form-control" id="classHour" type="number" min="0" value="${item.classHour}" disabled> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*报名人数:</label> <div class="col-sm-3"> <input class="form-control" id="maxPeople" type="number" min="0" value="${item.maxPeople}" disabled> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*基础报名人数:</label> <div class="col-sm-3"> <input class="form-control" id="basePeople" type="number" min="0" value="${item.basePeople}" disabled> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*参赛可获积分:</label> <div class="col-sm-3"> <input class="form-control" id="participationIntegral" type="number" min="0" value="${item.participationIntegral}" disabled> </div> <label style="float: left;line-height: 35px;">胜场可获积分</label> <div class="col-sm-3"> <input class="form-control" id="winIntegral" type="number" min="0" value="${item.winIntegral}" disabled> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*比赛地点:</label> <div class="col-sm-7"> <input class="form-control" id="address" onchange="WorldCupInfo.searchByStationName(this,1)" value="${item.address}" disabled> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">*坐标选择:</label> <div class="col-sm-7"> <div id="container" style="height: 500px;" ></div> </div> <input type="hidden" id="longitude" value="${item.lon}"/> <input type="hidden" id="latitude" value="${item.lat}"/> </div> <div class="form-group"> <label class="col-sm-3 control-label">参与赛点:</label> <div class="col-sm-7"> <button onclick="WorldCupInfo.openStore()" disabled>选择门店</button> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label"></label> <div class="col-sm-7"> <table id="stores"> <thead> <tr> <th>所在省市</th><th>所属运营商</th><th>门店名称</th><th>操作</th> </tr> </thead> <tbody> </tbody> </table> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">赛事简介</label> <div class="col-sm-7"> <textarea class="form-control" id="intro" style="height:200px">${item.intro}</textarea> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label head-scu-label">比赛封面图</label> <div class="col-sm-2"> <div id="coverImgPreId"> <div><img width="100px" height="100px" src="${item.coverImg}"></div> </div> </div> <input type="hidden" id="coverImg" value="${item.coverImg}"/> <label class="col-sm-1 control-label">首页默认背景图</label> <div class="col-sm-2"> <div id="homeBackdropImgPreId"> <div><img width="100px" height="100px" src="${item.homeBackdropImg}"></div> </div> </div> <input type="hidden" id="homeBackdropImg" value="${item.homeBackdropImg}"/> </div> <div class="row" id="app1"> <div class="form-group"> <label class="col-sm-3 control-label head-scu-label">*比赛图片(请上传不超过五张图片): </label> <div class="col-sm-7"> <el-upload :limit="5" class="avatar-uploader" action="" list-type="picture-card" accept="." :file-list="imageUrl2" :on-remove="handleRemove"> <i class="el-icon-plus"></i> </el-upload> <el-dialog :visible.sync="dialogVisible"> <img width="100%" :src="imageUrl1" alt=""> </el-dialog> </div> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">比赛详情</label> <div class="col-sm-7" style="padding: 0px;"> <textarea id="content" style="height: 800px;width: 100%;">${item.content}</textarea> </div> </div> </div> </div> </div> </div> <script src="${ctxPath}/modular/system/worldCup/worldCup_info.js"></script> <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script> <script src="${ctxPath}/js/vue/vue.js"></script> <script src="${ctxPath}/js/elementui/index.js"></script> <link rel="stylesheet" href="${ctxPath}/js/elementui/index.css"> <script> laydate.render({ elem: '#startTime' }); laydate.render({ elem: '#endTime' }); laydate.render({ elem: '#registrationClosingTime' }); let id = '${item.infoImg}' let obj = [] var vue2 = new Vue({ el: '#app1', props: { // 数量限制 limit: { type: Number, default: 2 }, }, data: { autoUpload: true,//自动上传 imageUrl1: '',//模型数据,用于上传图片完成后图片预览 imageUrl2: JSON.parse(id), dialogVisible: false }, methods: { handleAvatarSuccess(res, file) { WorldCupInfo.goodsPicArray1.push({ 'name': file.name, 'uuid': file.uuid, 'url': file.response }); }, changeImg(){ var i = id.split(",") for (let j = 0; j <i.length; j++) { let obj={ name:i[j], uuid:i[j], url:i[j], } this.imageUrl2.push(obj) } }, beforeAvatarUpload(file) { const isLt2M = file.size / 1024 / 1024 < 10; if (!isLt2M) { this.$message.error('上传图片大小不能超过 10MB!'); } return isLt2M; }, handleRemove(file, fileList) { WorldCupInfo.goodsPicArray1 = WorldCupInfo.goodsPicArray1.filter(item => { return item.uid != file.uid; }); }, }, created() { // this.changeImg() WorldCupInfo.goodsPicArray1 = this.imageUrl2 }, }); </script> @} cloud-server-management/src/main/webapp/static/modular/system/referee/referee.js
@@ -109,10 +109,10 @@ if(res.code == 200){ Feng.success("添加成功"); layer.closeAll(); Referee.table.refresh(); }else{ Feng.error(res.msg); } MgrUser.table.refresh(); }, function (data) { Feng.error("添加失败!" + data.responseJSON.message + "!"); }); @@ -202,12 +202,12 @@ } var ajax = new $ax(Feng.ctxPath + "/referee/editReferee", function (res) { if (res.code == 200) { Feng.success("添加成功"); Feng.success("编辑成功"); layer.closeAll(); Referee.table.refresh(); } else { Feng.error(res.msg); } MgrUser.table.refresh(); }, function (data) { Feng.error("添加失败!" + data.responseJSON.message + "!"); }); @@ -265,29 +265,24 @@ Referee.delReferee = function (){ if(this.check()){ var operation = function(){ var userId = MgrUser.seItem.id; var ajax = new $ax(Feng.ctxPath + "/mgr/delete", function () { if(language==1){ Feng.success("删除成功!"); }else if(language==2){ Feng.success("Delete succeeded!"); }else { Feng.success("Hapus berhasil!"); var ajax = new $ax(Feng.ctxPath + "/referee/updateState", function (res) { if (res.code == 200) { Feng.success("删除成功"); layer.closeAll(); Referee.table.refresh(); } else { Feng.error(res.msg); } MgrUser.table.refresh(); }, function (data) { if(language==1){ Feng.error("删除失败!" + data.responseJSON.message + "!"); }else if(language==2){ Feng.error("Delete failed!" + data.responseJSON.message + "!"); }else { Feng.error("Hapus gagal!" + data.responseJSON.message + "!"); } Feng.error("添加失败!" + data.responseJSON.message + "!"); }); ajax.set("userId", userId); ajax.setData({ 'id': Referee.seItem.id, 'state': 3 }); ajax.start(); }; Feng.confirm("是否删除员工: " + MgrUser.seItem.name + "?",operation); Feng.confirm("是否删除裁判:" + Referee.seItem.name + "?",operation); } } @@ -297,33 +292,26 @@ * 上架 */ Referee.onShelf = function () { if (this.check()){ var selected = $('#' + this.id).bootstrapTable('getSelections'); const data1 = { ids:[], state:null if(this.check()){ var operation = function(){ var ajax = new $ax(Feng.ctxPath + "/referee/updateState", function (res) { if (res.code == 200) { Feng.success("删除成功"); layer.closeAll(); Referee.table.refresh(); } else { Feng.error(res.msg); } }, function (data) { Feng.error("添加失败!" + data.responseJSON.message + "!"); }); ajax.setData({ 'id': Referee.seItem.id, 'state': 1 }); ajax.start(); }; selected.forEach(function(obj) { console.log("查看选中") console.log(obj) var id = obj.id; data1.ids.push(id); }); data1.state = 1; $.ajax({ url: Feng.ctxPath + "/referee/changeState", type: "POST", contentType: "application/json", // 设置请求头的 Content-Type data: JSON.stringify(data1), // 将数据转换为 JSON 字符串 success: function(response) { Feng.success("解冻成功!"); Referee.search(); }, error: function(xhr, status, error) { var errorMessage = xhr.responseText ? xhr.responseText : "解冻失败!"; } }); Feng.confirm("是否解冻裁判:" + Referee.seItem.name + "?",operation); } }; @@ -331,30 +319,26 @@ * 下架 */ Referee.offShelf = function () { if (this.check()){ var selected = $('#' + this.id).bootstrapTable('getSelections'); const data1 = { ids:[], state:null if(this.check()){ var operation = function(){ var ajax = new $ax(Feng.ctxPath + "/referee/updateState", function (res) { if (res.code == 200) { Feng.success("删除成功"); layer.closeAll(); Referee.table.refresh(); } else { Feng.error(res.msg); } }, function (data) { Feng.error("添加失败!" + data.responseJSON.message + "!"); }); ajax.setData({ 'id': Referee.seItem.id, 'state': 2 }); ajax.start(); }; selected.forEach(function(obj) { var id = obj.id; data1.ids.push(id); }); data1.state = 2; $.ajax({ url: Feng.ctxPath + "/referee/changeState", type: "POST", contentType: "application/json", // 设置请求头的 Content-Type data: JSON.stringify(data1), // 将数据转换为 JSON 字符串 success: function(response) { Feng.success("冻结成功!"); Referee.search(); }, error: function(xhr, status, error) { var errorMessage = xhr.responseText ? xhr.responseText : "冻结失败!"; } }); Feng.confirm("是否冻结裁判:" + Referee.seItem.name + "?",operation); } }; @@ -412,4 +396,6 @@ var table = new BSTable(Referee.id, "/referee/listAll", defaultColunms); table.setPaginationType("server"); Referee.table = table.init(); Referee.region('provinceCode', null); }); cloud-server-management/src/main/webapp/static/modular/system/worldCup/store.js
New file @@ -0,0 +1,120 @@ /** * 跨城站点管理管理初始化 */ var Store = { id: "StoreTable", //表格id seItem: null, //选中的条目 table: null, layerIndex: -1 }; /** * 初始化表格的列 */ Store.initColumn = function () { return [ {field: 'selectItem', checkbox: true}, {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, {title: '所在省市', field: 'province', visible: true, align: 'center', valign: 'middle',width:'20%',}, {title: '所属运营商', field: 'operator', visible: true, align: 'center', valign: 'middle',}, {title: '门店名称', field: 'name', visible: true, align: 'center', valign: 'middle'}, {title: '闸机ID', field: 'gate', visible: true, align: 'center', valign: 'middle'}, ]; }; /** * 检查是否选中 */ Store.check = function () { var selected = $('#' + this.id).bootstrapTable('getSelections'); if(selected.length == 0){ Feng.info("请先选中表格中的某一记录!"); return false; }else{ Store.seItem = selected[0]; return true; } }; Store.region = function (node, e){ let pcode = null; if(null != e){ pcode = $(e).val(); } var ajax = new $ax(Feng.ctxPath + "/region/getRegion", function (res) { let html = '<option value="">请选择</option>'; for (let i = 0; i < res.length; i++) { html += '<option value="' + res[i].code + '">' + res[i].name + '</option>'; } $('#' + node).html(html) }, function (data) { Feng.error("添加失败!" + data.responseJSON.message + "!"); }); ajax.setData({ 'pcode': pcode }); ajax.start(); } /** * 关闭此对话框 */ Store.close = function() { parent.layer.close(window.parent.WorldCupInfo.layerIndex); }; Store.addSubmit = function (){ var selected = $('#' + this.id).bootstrapTable('getSelections'); if(selected.length == 0){ Feng.info("请先选中表格中的某一记录!"); return false; }else{ window.parent.WorldCupInfo.stores = selected; window.parent.WorldCupInfo.initStore(); Store.close(); } } Store.search = function () { var queryData = {}; queryData['userName'] = $("#name").val(); queryData['operator'] =$("#operator").val(); queryData['provinceCode'] =$("#provinceCode").val(); queryData['cityCode'] =$("#cityCode").val(); Store.table.refresh({query: queryData}); }; Store.resetSearch = function () { $("#name").val(""); $("#operator").val(""); $("#provinceCode").val(""); $("#cityCode").val(""); Store.search(); }; $(function () { var defaultColunms = Store.initColumn(); var table = new BSTable(Store.id, "/store/listAll", defaultColunms); table.setPaginationType("server"); Store.table = table.init(); Store.region('provinceCode', null); var ajax = new $ax(Feng.ctxPath + "/operator/getOperatorListAll", function (res) { let html = '<option value="">请选择</option>'; for (let i = 0; i < res.length; i++) { html += '<option value="' + res[i].id + '">' + res[i].name + '</option>'; } $('#operator').html(html) }, function (data) { Feng.error("添加失败!" + data.responseJSON.message + "!"); }); ajax.start(); }); cloud-server-management/src/main/webapp/static/modular/system/worldCup/worldCup.js
New file @@ -0,0 +1,186 @@ /** * 跨城站点管理管理初始化 */ var WorldCup = { id: "WorldCupTable", //表格id seItem: null, //选中的条目 table: null, layerIndex: -1, }; /** * 初始化表格的列 */ WorldCup.initColumn = function () { return [ {field: 'selectItem', checkbox: true}, {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, {title: '比赛名字', field: 'name', visible: true, align: 'center', valign: 'middle',width:'20%',}, {title: '开始时间', field: 'startTime', visible: true, align: 'center', valign: 'middle',}, {title: '结束时间', field: 'endTime', visible: true, align: 'center', valign: 'middle'}, {title: '报名条件', field: 'age', visible: true, align: 'center', valign: 'middle', formatter:function (data, item) { return item.age + "," + {0:"全部",1:"男",2:"女"}[item.gender] } }, {title: '最大报名人数-已报名人数', field: 'maxPeople', visible: true, align: 'center', valign: 'middle'}, {title: '状态', field: 'status', visible: true, align: 'center', valign: 'middle', formatter:function (data) { return {1:"未开始",2:"已开始",3:"已结束", 4:"已取消"}[data] } }, ]; }; /** * 检查是否选中 */ WorldCup.check = function () { var selected = $('#' + this.id).bootstrapTable('getSelections'); if(selected.length == 0){ Feng.info("请先选中表格中的某一记录!"); return false; }else{ WorldCup.seItem = selected[0]; return true; } }; /** * 商户号认证 */ WorldCup.openAddWorldCup = function () { var index = layer.open({ type: 2, title: '添加比赛', area: ['100%', '100%'], //宽高 fix: false, //不固定 maxmin: true, content: Feng.ctxPath + '/worldCup/openAddWorldCup' }); this.layerIndex = index; }; /** * 编辑 */ WorldCup.openEditWorldCup = function () { if(this.check()){ var index = layer.open({ type: 2, title: '编辑比赛', area: ['100%', '100%'], //宽高 fix: false, //不固定 maxmin: true, content: Feng.ctxPath + '/worldCup/openEditWorldCup?id=' + WorldCup.seItem.id }); this.layerIndex = index; } }; WorldCup.openWorldCupInfo = function () { if(this.check()){ var index = layer.open({ type: 2, title: '比赛详情', area: ['100%', '100%'], //宽高 fix: false, //不固定 maxmin: true, content: Feng.ctxPath + '/worldCup/openInfoWorldCup?id=' + WorldCup.seItem.id }); this.layerIndex = index; } }; /** * 删除 */ WorldCup.cancelWorldCup = function (){ if(this.check()){ var operation = function(){ var ajax = new $ax(Feng.ctxPath + "/worldCup/updateState", function (res) { if (res.code == 200) { Feng.success("删除成功"); layer.closeAll(); WorldCup.table.refresh(); } else { Feng.error(res.msg); } }, function (data) { Feng.error("添加失败!" + data.responseJSON.message + "!"); }); ajax.setData({ 'id': WorldCup.seItem.id, 'state': 4 }); ajax.start(); }; Feng.confirm("确认取消所选比赛吗?",operation); } } /** * 下架 */ WorldCup.registeredPersonnel = function () { if(this.check()){ var operation = function(){ var ajax = new $ax(Feng.ctxPath + "/worldCup/updateState", function (res) { if (res.code == 200) { Feng.success("删除成功"); layer.closeAll(); WorldCup.table.refresh(); } else { Feng.error(res.msg); } }, function (data) { Feng.error("添加失败!" + data.responseJSON.message + "!"); }); ajax.setData({ 'id': WorldCup.seItem.id, 'state': 2 }); ajax.start(); }; Feng.confirm("是否冻结裁判:" + WorldCup.seItem.name + "?",operation); } }; /** * 关闭此对话框 */ WorldCup.close = function() { parent.layer.close(window.parent.WorldCup.layerIndex); }; WorldCup.search = function () { var queryData = {}; queryData['name'] = $("#name").val(); queryData['startTime'] =$("#startTime").val(); queryData['endTime'] =$("#endTime").val(); queryData['status'] =$("#status").val(); WorldCup.table.refresh({query: queryData}); }; WorldCup.resetSearch = function () { $("#name").val(""); $("#startTime").val(""); $("#endTime").val(""); $("#status").val(""); WorldCup.search(); }; $(function () { var defaultColunms = WorldCup.initColumn(); var table = new BSTable(WorldCup.id, "/worldCup/listAll", defaultColunms); table.setPaginationType("server"); WorldCup.table = table.init(); }); cloud-server-management/src/main/webapp/static/modular/system/worldCup/worldCup_info.js
New file @@ -0,0 +1,571 @@ /** * 用户详情对话框(可用于添加和修改对话框) */ var WorldCupInfo = { userInfoData: {}, stores:[], goodsPicArray1: [] }; /** * 关闭此对话框 */ WorldCupInfo.close = function () { parent.layer.close(window.parent.WorldCup.layerIndex); }; /** * 提交添加用户 */ WorldCupInfo.addSubmit = function () { let name = $('#name').val(); let startTime = $('#startTime').val(); let endTime = $('#endTime').val(); let registrationClosingTime = $('#registrationClosingTime').val(); let startAge = $('#startAge').val(); let endAge = $('#endAge').val(); let gender = $('#gender').val(); let payType = []; let cash = $('#cash').val(); let paiCoin = $('#paiCoin').val(); let classHour = $('#classHour').val(); let maxPeople = $('#maxPeople').val(); let basePeople = $('#basePeople').val(); let participationIntegral = $('#participationIntegral').val(); let winIntegral = $('#winIntegral').val(); let address = $('#address').val(); let longitude = $('#longitude').val(); let latitude = $('#latitude').val(); let intro = $('#intro').val(); let coverImg = $('#coverImg').val(); let homeBackdropImg = $('#homeBackdropImg').val(); let content = editor.getContent(); if(null == name || '' == name){ Feng.error("请填写有效的比赛名称"); return } if(null == startTime || '' == startTime){ Feng.error("请选择有效的开始时间"); return } if(null == endTime || '' == endTime){ Feng.error("请选择有效的结束时间"); return } if(null == startAge || '' == startAge){ Feng.error("请填写有效的报名开始年龄"); return } if(null == endAge || '' == endAge){ Feng.error("请填写有效的报名结束年龄"); return } if(parseInt(startAge) > parseInt(endAge)){ Feng.error("报名开始年龄不能大于结束年龄"); return } $('#payType input[type="checkbox"]').each(function (i, e){ if($(e).is(":checked")){ payType.push($(e).val()); if($(e).val() == 1 && null == cash){ Feng.error("请输入有效的现金支付金额"); return } if($(e).val() == 2 && null == paiCoin){ Feng.error("请输入有效的玩湃币支付数量"); return } if($(e).val() == 3 && null == classHour){ Feng.error("请输入有效的课时支付数量"); return } } }) if(null == maxPeople || '' == maxPeople){ Feng.error("请填写有效的报名人数"); return } if(null == basePeople || '' == basePeople){ Feng.error("请填写有效的基础报名人数"); return } if(null == participationIntegral || '' == participationIntegral){ Feng.error("请填写有效的参赛可获积分"); return } if(null == winIntegral || '' == winIntegral){ Feng.error("请填写有效的胜场可获积分"); return } if(null == address || '' == address){ Feng.error("请填写有效的比赛地点"); return } if(null == longitude || '' == longitude){ Feng.error("无效的坐标,请重新输入地址"); return } if(null == latitude || '' == latitude){ Feng.error("无效的坐标,请重新输入地址"); return } if(WorldCupInfo.stores.length == 0){ Feng.error("请选择参赛门店"); return } if(null == intro || '' == intro){ Feng.error("请填写有效的赛事简介"); return } if(null == coverImg || '' == coverImg){ Feng.error("请上传有效的比赛封面图"); return } if(null == homeBackdropImg || '' == homeBackdropImg){ Feng.error("请上传有效的首页默认背景图"); return } if(WorldCupInfo.goodsPicArray1 == 0){ Feng.error("请上传有效的比赛图片"); return } if(null == content || '' == content){ Feng.error("请填写有效的比赛详情"); return } let data = { 'name': name, 'startTime': new Date(startTime + " 00:00:00"), 'endTime': new Date(endTime + " 23:59:59"), 'registrationClosingTime': (null != registrationClosingTime && '' != registrationClosingTime ? new Date(registrationClosingTime + " 23:59:59") : registrationClosingTime), 'startAge': startAge, 'endAge': endAge, 'gender': gender, 'payType': payType.toString(), 'cash': cash, 'paiCoin': paiCoin, 'classHour': classHour, 'maxPeople': maxPeople, 'basePeople': basePeople, 'participationIntegral' : participationIntegral, 'winIntegral' : winIntegral, 'address': address, 'lon': longitude, 'lat': latitude, 'coverImg': coverImg, 'homeBackdropImg': homeBackdropImg, 'infoImg': JSON.stringify(WorldCupInfo.goodsPicArray1), 'intro': intro, 'content': content, 'stores': JSON.stringify(WorldCupInfo.stores) } //提交信息 var ajax = new $ax(Feng.ctxPath + "/worldCup/addWorldCup", function (res) { if (res.code==200){ Feng.success("添加成功!"); WorldCupInfo.close(); window.parent.WorldCup.refresh(); }else{ Feng.error(res.msg); } }, function (data) { Feng.error("添加失败!" + data.responseJSON.message + "!"); }); ajax.set(data); ajax.start(); }; /** * 提交修改 */ WorldCupInfo.editSubmit = function () { let name = $('#name').val(); let startTime = $('#startTime').val(); let endTime = $('#endTime').val(); let registrationClosingTime = $('#registrationClosingTime').val(); let startAge = $('#startAge').val(); let endAge = $('#endAge').val(); let gender = $('#gender').val(); let payType = []; let cash = $('#cash').val(); let paiCoin = $('#paiCoin').val(); let classHour = $('#classHour').val(); let maxPeople = $('#maxPeople').val(); let basePeople = $('#basePeople').val(); let participationIntegral = $('#participationIntegral').val(); let winIntegral = $('#winIntegral').val(); let address = $('#address').val(); let longitude = $('#longitude').val(); let latitude = $('#latitude').val(); let intro = $('#intro').val(); let coverImg = $('#coverImg').val(); let homeBackdropImg = $('#homeBackdropImg').val(); let content = editor.getContent(); if(null == name || '' == name){ Feng.error("请填写有效的比赛名称"); return } if(null == startTime || '' == startTime){ Feng.error("请选择有效的开始时间"); return } if(null == endTime || '' == endTime){ Feng.error("请选择有效的结束时间"); return } if(null == startAge || '' == startAge){ Feng.error("请填写有效的报名开始年龄"); return } if(null == endAge || '' == endAge){ Feng.error("请填写有效的报名结束年龄"); return } if(parseInt(startAge) > parseInt(endAge)){ Feng.error("报名开始年龄不能大于结束年龄"); return } $('#payType input[type="checkbox"]').each(function (i, e){ if($(e).is(":checked")){ payType.push($(e).val()); if($(e).val() == 1 && null == cash){ Feng.error("请输入有效的现金支付金额"); return } if($(e).val() == 2 && null == paiCoin){ Feng.error("请输入有效的玩湃币支付数量"); return } if($(e).val() == 3 && null == classHour){ Feng.error("请输入有效的课时支付数量"); return } } }) if(null == maxPeople || '' == maxPeople){ Feng.error("请填写有效的报名人数"); return } if(null == basePeople || '' == basePeople){ Feng.error("请填写有效的基础报名人数"); return } if(null == participationIntegral || '' == participationIntegral){ Feng.error("请填写有效的参赛可获积分"); return } if(null == winIntegral || '' == winIntegral){ Feng.error("请填写有效的胜场可获积分"); return } if(null == address || '' == address){ Feng.error("请填写有效的比赛地点"); return } if(null == longitude || '' == longitude){ Feng.error("无效的坐标,请重新输入地址"); return } if(null == latitude || '' == latitude){ Feng.error("无效的坐标,请重新输入地址"); return } if(WorldCupInfo.stores.length == 0){ Feng.error("请选择参赛门店"); return } if(null == intro || '' == intro){ Feng.error("请填写有效的赛事简介"); return } if(null == coverImg || '' == coverImg){ Feng.error("请上传有效的比赛封面图"); return } if(null == homeBackdropImg || '' == homeBackdropImg){ Feng.error("请上传有效的首页默认背景图"); return } if(WorldCupInfo.goodsPicArray1 == 0){ Feng.error("请上传有效的比赛图片"); return } if(null == content || '' == content){ Feng.error("请填写有效的比赛详情"); return } let data = { 'id': $('#id').val(), 'name': name, 'startTime': new Date(startTime + " 00:00:00"), 'endTime': new Date(endTime + " 23:59:59"), 'registrationClosingTime': (null != registrationClosingTime && '' != registrationClosingTime ? new Date(registrationClosingTime + " 23:59:59") : registrationClosingTime), 'startAge': startAge, 'endAge': endAge, 'gender': gender, 'payType': payType.toString(), 'cash': cash, 'paiCoin': paiCoin, 'classHour': classHour, 'maxPeople': maxPeople, 'basePeople': basePeople, 'participationIntegral' : participationIntegral, 'winIntegral' : winIntegral, 'address': address, 'lon': longitude, 'lat': latitude, 'coverImg': coverImg, 'homeBackdropImg': homeBackdropImg, 'infoImg': JSON.stringify(WorldCupInfo.goodsPicArray1), 'intro': intro, 'content': content, 'stores': JSON.stringify(WorldCupInfo.stores) } //提交信息 var ajax = new $ax(Feng.ctxPath + "/worldCup/editWorldCup", function (res) { if (res.code==200){ Feng.success("编辑成功!"); WorldCupInfo.close(); window.parent.WorldCup.refresh(); }else{ Feng.error(res.msg); } }, function (data) { Feng.error("编辑失败!" + data.responseJSON.message + "!"); }); ajax.set(data); ajax.start(); }; $(function () { Feng.initValidator("userInfoForm", WorldCupInfo.validateFields); // 初始化头像上传 var coverImg = new $WebUpload("coverImg"); coverImg.setUploadBarId("progressBar1"); coverImg.init(); var homeBackdropImg = new $WebUpload("homeBackdropImg"); homeBackdropImg.setUploadBarId("progressBar2"); homeBackdropImg.init(); $('#payType input[type="checkbox"]').click(function (){ let v = $(this).val(); if($(this).is(":checked")){ if(v == 0){ $('.cash').hide(); $('.classHour').hide(); $('.paiCoin').hide(); $('#payType input[item="cash"]').attr('checked', false); $('#payType input[item="classHour"]').attr('checked', false); $('#payType input[item="paiCoin"]').attr('checked', false); $('#cash').val(''); $('#classHour').val(''); $('#paiCoin').val(''); } if(v == 1){ $('#payType input[item="free"]').attr('checked', false); $('.cash').show(); } if(v == 2){ $('#payType input[item="free"]').attr('checked', false); $('.paiCoin').show(); } if(v == 3){ $('#payType input[item="free"]').attr('checked', false); $('.classHour').show(); } }else{ if(v == 0){ $('.cash').hide(); $('.classHour').hide(); $('.paiCoin').hide(); $('#payType input[item="cash"]').attr('checked', false); $('#payType input[item="classHour"]').attr('checked', false); $('#payType input[item="paiCoin"]').attr('checked', false); $('#cash').val(''); $('#classHour').val(''); $('#paiCoin').val(''); } if(v == 1){ $('.cash').hide(); } if(v == 2){ $('.classHour').hide(); } if(v == 3){ $('.paiCoin').hide(); } } }); if(null != $('#id').val()){ WorldCupInfo.stores = JSON.parse($('#storeInfo').val()); WorldCupInfo.initStore(); let lng = $('#longitude').val(); let lat = $('#latitude').val(); // 地图实例 map = new AMap.Map('container', { resizeEnable: true, // 允许缩放 center: [lng, lat], // 设置地图的中心点 zoom: 15 // 设置地图的缩放级别,0 - 20 }); //地图画点 addMarker(lng,lat); } }); var map = new AMap.Map('container', { resizeEnable: true, // 允许缩放 zoom: 15 // 设置地图的缩放级别,0 - 20 }); var marker; //搜索地图 WorldCupInfo.searchByStationName = function(e,type){ var keyword=""; if(type==2){ keyword = $(e).parent().prev().find("input").val(); }else { if($("#address").val()!=null && $("#address").val()!=''){ keyword = $("#address").val(); } } type=1; AMap.plugin('AMap.Geocoder', function() { var geocoder = new AMap.Geocoder(); console.log(geocoder) console.log(keyword) geocoder.getLocation(keyword, function(status, result) { console.log(status,result) if (status === 'complete' && result.info === 'OK') { // 经纬度 var lng = result.geocodes[0].location.lng; var lat = result.geocodes[0].location.lat; $("#longitude").val(lng) $("#latitude").val(lat) // 地图实例 map = new AMap.Map('container', { resizeEnable: true, // 允许缩放 center: [lng, lat], // 设置地图的中心点 zoom: 15 // 设置地图的缩放级别,0 - 20 }); //地图画点 //addMarker(lng,lat); if(type==1 || type==2){ showInfoClick(); if(lng == null){ }else{ addMarker(lng,lat); } }else{ } } else { console.log('定位失败!'); } }); }); } //地图点击事件 function showInfoClick(){ map.on('click', function (e) { addMarker(e.lnglat.getLng(),e.lnglat.getLat()); }); } //删除点 function removeMarkers(){ if(marker!=null){ map.remove(marker); } } // 实例化点标记 function addMarker(lon,lat) { removeMarkers(); marker = new AMap.Marker({ map: map, position: new AMap.LngLat(lon, lat), // 经纬度 }); //加经纬度 $("#lon").val(lon); $("#lat").val(lat); var lnglatXY = [lon, lat];//地图上所标点的坐标 AMap.service('AMap.Geocoder',function() {//回调函数 geocoder = new AMap.Geocoder({ }); geocoder.getAddress(lnglatXY, function (status, result) { if (status === 'complete' && result.info === 'OK') { //获得了有效的地址信息: //即,result.regeocode.formattedAddress // alert(result.regeocode.formattedAddress) //document.getElementById("address").value=result.regeocode.formattedAddress;//将获取到的地址信息赋值给文本框,保存进数据库 var address = result.regeocode.formattedAddress; var city = result.regeocode.addressComponent.city; var province = result.regeocode.addressComponent.province; var district = result.regeocode.addressComponent.district; $("#address").val(address); } else { //获取地址失败 } }); }) } WorldCupInfo.openStore = function () { var index = layer.open({ type: 2, title: '参与赛点', area: ['80%', '80%'], //宽高 fix: false, //不固定 maxmin: true, content: Feng.ctxPath + '/worldCup/openStore' }); this.layerIndex = index; }; WorldCupInfo.initStore = function (){ let html = ''; for (let i = 0; i < WorldCupInfo.stores.length; i++) { let item = WorldCupInfo.stores[i]; html += '<tr><td>' + item.province + '</td><td>' + (typeof item.operator == "undefined" ? "" : item.operator) + '</td><td>' + item.name + '</td><td><button style="height: 30px;\n' + ' line-height: 30px;\n' + ' font-size: 14px;\n' + ' width: 50px" onclick="WorldCupInfo.delStore(' + item.id + ')">删除</button></td></tr>' } $('#stores tbody').html(html); } WorldCupInfo.delStore = function (id){ let arr = []; for (let i = 0; i < WorldCupInfo.stores.length; i++) { let item = WorldCupInfo.stores[i]; if(id != item.id){ arr.push(item); } } WorldCupInfo.stores = arr; WorldCupInfo.initStore(); } var editor = null; $(function () { //初始化编辑器 editor = UE.getEditor('content'); }); cloud-server-other/src/main/java/com/dsh/other/controller/GameController.java
@@ -18,10 +18,7 @@ import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.math.BigDecimal; @@ -411,4 +408,15 @@ } /** * 根据sutuid获取游戏数据 * @param sutuId * @return */ @ResponseBody @PostMapping("/getTGameBySutuId") public TGame getTGameBySutuId(@RequestBody String sutuId){ return gameService.getOne(new QueryWrapper<TGame>().eq("blue", sutuId).or() .eq("red", sutuId).eq("state", 0)); } }