Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/PlayPai
Conflicts:
cloud-server-activity/src/main/java/com/dsh/activity/mapper/PointsMerchandiseMapper.java
cloud-server-activity/src/main/java/com/dsh/activity/service/PointsMerchandiseService.java
cloud-server-activity/src/main/java/com/dsh/activity/service/impl/PointsMerchandiseServiceImpl.java
cloud-server-activity/src/main/resources/mapper/PointsMerchandiseMapper.xml
cloud-server-course/src/main/java/com/dsh/course/controller/CourseStudentController.java
cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/PointMercharsClient.java
cloud-server-management/src/main/webapp/static/modular/system/tGoods/tGoods_info.js
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="AnalysisUIOptions"> |
| | | <option name="GROUP_BY_SEVERITY" value="true" /> |
| | | </component> |
| | | <component name="AutoImportSettings"> |
| | | <option name="autoReloadType" value="SELECTIVE" /> |
| | | </component> |
| | |
| | | <select /> |
| | | </component> |
| | | <component name="ChangeListManager"> |
| | | <list default="true" id="cb08d02f-fd4f-4fa2-85fe-abd508fa83ac" name="Default Changelist" comment="9.26。7" /> |
| | | <list default="true" id="cb08d02f-fd4f-4fa2-85fe-abd508fa83ac" name="Default Changelist" comment="9.26。15"> |
| | | <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> |
| | | <change beforePath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/BallController.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/BallController.java" afterDir="false" /> |
| | | <change beforePath="$PROJECT_DIR$/cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/ball_pre_add.html" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/ball_pre_add.html" afterDir="false" /> |
| | | <change beforePath="$PROJECT_DIR$/cloud-server-other/src/main/java/com/dsh/other/controller/BallController.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-other/src/main/java/com/dsh/other/controller/BallController.java" afterDir="false" /> |
| | | </list> |
| | | <option name="SHOW_DIALOG" value="false" /> |
| | | <option name="HIGHLIGHT_CONFLICTS" value="true" /> |
| | | <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> |
| | |
| | | <component name="MavenImportPreferences"> |
| | | <option name="generalSettings"> |
| | | <MavenGeneralSettings> |
| | | <option name="mavenHome" value="$PROJECT_DIR$/../../../apache-maven/apache-maven-3.6.1" /> |
| | | <option name="userSettingsFile" value="D:\apache-maven\apache-maven-3.6.1\conf\settings.xml" /> |
| | | <option name="mavenHome" value="使用 Maven 包装器" /> |
| | | </MavenGeneralSettings> |
| | | </option> |
| | | </component> |
| | | <component name="PackageJsonUpdateNotifier"> |
| | | <dismissed value="$PROJECT_DIR$/package.json" /> |
| | | </component> |
| | | <component name="ProblemsViewState"> |
| | | <option name="selectedTabId" value="ProjectErrors" /> |
| | | </component> |
| | | <component name="ProjectId" id="2T0poWYlZShlnPso29uxjn4gQQo" /> |
| | | <component name="ProjectLevelVcsManager" settingsEditedManually="true"> |
| | |
| | | <option name="hideEmptyMiddlePackages" value="true" /> |
| | | <option name="showLibraryContents" value="true" /> |
| | | </component> |
| | | <component name="PropertiesComponent">{ |
| | | "keyToString": { |
| | | "DefaultHtmlFileTemplate": "HTML File", |
| | | "RequestMappingsPanelOrder0": "0", |
| | | "RequestMappingsPanelOrder1": "1", |
| | | "RequestMappingsPanelWidth0": "75", |
| | | "RequestMappingsPanelWidth1": "75", |
| | | "RunOnceActivity.OpenProjectViewOnStart": "true", |
| | | "RunOnceActivity.ShowReadmeOnStart": "true", |
| | | "WebServerToolWindowFactoryState": "false", |
| | | "git-widget-placeholder": "master", |
| | | "ignore.virus.scanning.warn.message": "true", |
| | | "last_opened_file_path": "D:/JavaTool/PlayPai1/cloud-server-management/src/main/webapp/static/modular/system/coursePackage", |
| | | "node.js.detected.package.eslint": "true", |
| | | "node.js.detected.package.tslint": "true", |
| | | "node.js.selected.package.eslint": "(autodetect)", |
| | | "node.js.selected.package.tslint": "(autodetect)", |
| | | "nodejs_package_manager_path": "npm", |
| | | "project.structure.last.edited": "模块", |
| | | "project.structure.proportion": "0.15", |
| | | "project.structure.side.proportion": "0.54367816", |
| | | "settings.editor.selected.configurable": "preferences.pluginManager", |
| | | "spring.configuration.checksum": "b0c8222ba40624e179f539b98c2e8cad", |
| | | "vue.rearranger.settings.migration": "true" |
| | | <component name="PropertiesComponent"><![CDATA[{ |
| | | "keyToString": { |
| | | "DefaultHtmlFileTemplate": "HTML File", |
| | | "RequestMappingsPanelOrder0": "0", |
| | | "RequestMappingsPanelOrder1": "1", |
| | | "RequestMappingsPanelWidth0": "75", |
| | | "RequestMappingsPanelWidth1": "75", |
| | | "RunOnceActivity.OpenProjectViewOnStart": "true", |
| | | "RunOnceActivity.ShowReadmeOnStart": "true", |
| | | "WebServerToolWindowFactoryState": "false", |
| | | "git-widget-placeholder": "master", |
| | | "ignore.virus.scanning.warn.message": "true", |
| | | "last_opened_file_path": "D:/ttt/java/PlayPai/cloud-server-management/src/main/webapp/WEB-INF/view/system/ball", |
| | | "node.js.detected.package.eslint": "true", |
| | | "node.js.detected.package.tslint": "true", |
| | | "node.js.selected.package.eslint": "(autodetect)", |
| | | "node.js.selected.package.tslint": "(autodetect)", |
| | | "nodejs_package_manager_path": "npm", |
| | | "project.structure.last.edited": "模块", |
| | | "project.structure.proportion": "0.15", |
| | | "project.structure.side.proportion": "0.54367816", |
| | | "service.view.auto.scroll.to.source": "true", |
| | | "settings.editor.selected.configurable": "MavenSettings", |
| | | "spring.configuration.checksum": "7fb6c6ffe49cf7315145a28a96be3d8f", |
| | | "vue.rearranger.settings.migration": "true" |
| | | } |
| | | }</component> |
| | | }]]></component> |
| | | <component name="ReactorSettings"> |
| | | <option name="notificationShown" value="true" /> |
| | | </component> |
| | | <component name="RecentsManager"> |
| | | <key name="CopyFile.RECENT_KEYS"> |
| | | <recent name="D:\ttt\java\PlayPai\cloud-server-management\src\main\webapp\WEB-INF\view\system\ball" /> |
| | | <recent name="D:\ttt\java\PlayPai\cloud-server-management\src\main\webapp\static\modular\system\ball" /> |
| | | <recent name="D:\ttt\java\PlayPai\cloud-server-other\src\main\resources\mapper" /> |
| | | <recent name="D:\JavaTool\PlayPai1\cloud-server-management\src\main\webapp\static\modular\system\coursePackage" /> |
| | | <recent name="D:\JavaTool\PlayPai1\cloud-server-management\src\main\webapp\WEB-INF\view\system\coursePackage" /> |
| | | <recent name="D:\JavaTool\PlayPai1\cloud-server-management\src\main\webapp\WEB-INF\view\system\tStudent" /> |
| | | <recent name="D:\JavaTool\PlayPai1\cloud-server-management\src\main\webapp\static\modular\system\tCoupon" /> |
| | | <recent name="D:\JavaTool\PlayPai1\cloud-server-management\src\main\webapp\WEB-INF\view\system" /> |
| | | </key> |
| | | <key name="MoveFile.RECENT_KEYS"> |
| | | <recent name="D:\JavaTool\PlayPai1\cloud-server-management\src\main\webapp\static\modular\system\tStudent" /> |
| | |
| | | <recent name="D:\ttt\java\PlayPai\cloud-server-parent" /> |
| | | </key> |
| | | <key name="CopyClassDialog.RECENTS_KEY"> |
| | | <recent name="com.dsh.course.mapper" /> |
| | | <recent name="com.dsh.course.service.impl" /> |
| | | <recent name="com.dsh.course.service" /> |
| | | <recent name="com.dsh.course.entity" /> |
| | | <recent name="com.dsh.course.entity.dto" /> |
| | | <recent name="com.dsh.other.mapper" /> |
| | | <recent name="com.dsh.other.service.impl" /> |
| | | <recent name="com.dsh.other.service" /> |
| | | <recent name="com.dsh.other.entity" /> |
| | | <recent name="com.dsh.other.controller" /> |
| | | </key> |
| | | </component> |
| | | <component name="RunDashboard"> |
| | |
| | | <item itemvalue="Spring Boot.OtherApplication" /> |
| | | <item itemvalue="Spring Boot.UserApplication" /> |
| | | <item itemvalue="Spring Boot.AccountApplication" /> |
| | | <item itemvalue="Spring Boot.AuthApplication" /> |
| | | <item itemvalue="Spring Boot.ActivityApplication" /> |
| | | <item itemvalue="Spring Boot.AuthApplication" /> |
| | | <item itemvalue="Spring Boot.CourseApplication" /> |
| | | <item itemvalue="Spring Boot.CompetitionApplication" /> |
| | | <item itemvalue="应用程序.BigDecimalToChineseWords" /> |
| | |
| | | <workItem from="1695633789585" duration="4703000" /> |
| | | <workItem from="1695638521906" duration="1415000" /> |
| | | <workItem from="1695689815334" duration="13353000" /> |
| | | <workItem from="1695718856285" duration="16156000" /> |
| | | <workItem from="1695718856285" duration="22098000" /> |
| | | <workItem from="1695775091167" duration="4246000" /> |
| | | <workItem from="1695794503293" duration="3283000" /> |
| | | <workItem from="1695799021203" duration="5869000" /> |
| | | <workItem from="1695820563853" duration="56000" /> |
| | | <workItem from="1695863479059" duration="12419000" /> |
| | | <workItem from="1696427897814" duration="1362000" /> |
| | | <workItem from="1696433675086" duration="2211000" /> |
| | | <workItem from="1696462020097" duration="481000" /> |
| | | <workItem from="1696465598653" duration="19850000" /> |
| | | </task> |
| | | <task id="LOCAL-00001" summary="后台代码删除"> |
| | | <created>1690249807612</created> |
| | |
| | | <option name="project" value="LOCAL" /> |
| | | <updated>1695735077405</updated> |
| | | </task> |
| | | <option name="localTasksCounter" value="28" /> |
| | | <task id="LOCAL-00028" summary="9.26。7"> |
| | | <option name="closed" value="true" /> |
| | | <created>1695735363112</created> |
| | | <option name="number" value="00028" /> |
| | | <option name="presentableId" value="LOCAL-00028" /> |
| | | <option name="project" value="LOCAL" /> |
| | | <updated>1695735363112</updated> |
| | | </task> |
| | | <task id="LOCAL-00029" summary="9.26。8"> |
| | | <option name="closed" value="true" /> |
| | | <created>1695735796008</created> |
| | | <option name="number" value="00029" /> |
| | | <option name="presentableId" value="LOCAL-00029" /> |
| | | <option name="project" value="LOCAL" /> |
| | | <updated>1695735796008</updated> |
| | | </task> |
| | | <task id="LOCAL-00030" summary="9.26。9"> |
| | | <option name="closed" value="true" /> |
| | | <created>1695736281231</created> |
| | | <option name="number" value="00030" /> |
| | | <option name="presentableId" value="LOCAL-00030" /> |
| | | <option name="project" value="LOCAL" /> |
| | | <updated>1695736281231</updated> |
| | | </task> |
| | | <task id="LOCAL-00031" summary="9.26。10"> |
| | | <option name="closed" value="true" /> |
| | | <created>1695739914189</created> |
| | | <option name="number" value="00031" /> |
| | | <option name="presentableId" value="LOCAL-00031" /> |
| | | <option name="project" value="LOCAL" /> |
| | | <updated>1695739914189</updated> |
| | | </task> |
| | | <task id="LOCAL-00032" summary="9.26。11"> |
| | | <option name="closed" value="true" /> |
| | | <created>1695740202022</created> |
| | | <option name="number" value="00032" /> |
| | | <option name="presentableId" value="LOCAL-00032" /> |
| | | <option name="project" value="LOCAL" /> |
| | | <updated>1695740202022</updated> |
| | | </task> |
| | | <task id="LOCAL-00033" summary="9.26。12"> |
| | | <option name="closed" value="true" /> |
| | | <created>1695795966970</created> |
| | | <option name="number" value="00033" /> |
| | | <option name="presentableId" value="LOCAL-00033" /> |
| | | <option name="project" value="LOCAL" /> |
| | | <updated>1695795966970</updated> |
| | | </task> |
| | | <task id="LOCAL-00034" summary="9.26。13"> |
| | | <option name="closed" value="true" /> |
| | | <created>1695820597140</created> |
| | | <option name="number" value="00034" /> |
| | | <option name="presentableId" value="LOCAL-00034" /> |
| | | <option name="project" value="LOCAL" /> |
| | | <updated>1695820597140</updated> |
| | | </task> |
| | | <task id="LOCAL-00035" summary="9.26。14"> |
| | | <option name="closed" value="true" /> |
| | | <created>1695886217811</created> |
| | | <option name="number" value="00035" /> |
| | | <option name="presentableId" value="LOCAL-00035" /> |
| | | <option name="project" value="LOCAL" /> |
| | | <updated>1695886217811</updated> |
| | | </task> |
| | | <task id="LOCAL-00036" summary="9.26。15"> |
| | | <option name="closed" value="true" /> |
| | | <created>1696485767075</created> |
| | | <option name="number" value="00036" /> |
| | | <option name="presentableId" value="LOCAL-00036" /> |
| | | <option name="project" value="LOCAL" /> |
| | | <updated>1696485767076</updated> |
| | | </task> |
| | | <task id="LOCAL-00037" summary="9.26。15"> |
| | | <option name="closed" value="true" /> |
| | | <created>1696488897294</created> |
| | | <option name="number" value="00037" /> |
| | | <option name="presentableId" value="LOCAL-00037" /> |
| | | <option name="project" value="LOCAL" /> |
| | | <updated>1696488897295</updated> |
| | | </task> |
| | | <task id="LOCAL-00038" summary="9.26。15"> |
| | | <option name="closed" value="true" /> |
| | | <created>1696489413711</created> |
| | | <option name="number" value="00038" /> |
| | | <option name="presentableId" value="LOCAL-00038" /> |
| | | <option name="project" value="LOCAL" /> |
| | | <updated>1696489413712</updated> |
| | | </task> |
| | | <option name="localTasksCounter" value="39" /> |
| | | <servers /> |
| | | </component> |
| | | <component name="TypeScriptGeneratedFilesManager"> |
| | |
| | | <MESSAGE value="9.26。5" /> |
| | | <MESSAGE value="9.26。6" /> |
| | | <MESSAGE value="9.26。7" /> |
| | | <option name="LAST_COMMIT_MESSAGE" value="9.26。7" /> |
| | | <MESSAGE value="9.26。8" /> |
| | | <MESSAGE value="9.26。9" /> |
| | | <MESSAGE value="9.26。10" /> |
| | | <MESSAGE value="9.26。11" /> |
| | | <MESSAGE value="9.26。12" /> |
| | | <MESSAGE value="9.26。13" /> |
| | | <MESSAGE value="9.26。14" /> |
| | | <MESSAGE value="9.26。15" /> |
| | | <option name="LAST_COMMIT_MESSAGE" value="9.26。15" /> |
| | | </component> |
| | | <component name="XDebuggerManager"> |
| | | <breakpoint-manager> |
| | |
| | | </line-breakpoint> |
| | | <line-breakpoint type="java-line"> |
| | | <url>file://$PROJECT_DIR$/cloud-server-course/src/main/java/com/dsh/course/controller/CoursePackagePaymentController.java</url> |
| | | <line>1294</line> |
| | | <line>1355</line> |
| | | <option name="timeStamp" value="14" /> |
| | | </line-breakpoint> |
| | | </breakpoints> |
| | |
| | | #¿ª·¢»·¾³ |
| | | datasource.master0.type=com.alibaba.druid.pool.DruidDataSource |
| | | datasource.master0.driverClassName=com.mysql.cj.jdbc.Driver |
| | | datasource.master0.url=jdbc:mysql://192.168.110.80:3306/playpai_account?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai |
| | | datasource.master0.url=jdbc:mysql://8.137.22.229:3306/playpai_account?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai |
| | | datasource.master0.username=root |
| | | datasource.master0.password=123456 |
| | | datasource.master0.password=playpai2023! |
| | | datasource.master0.maxActive=20 |
| | | datasource.master0.maxWait=60000 |
| | | datasource.master0.minIdle=5 |
| | |
| | | import com.dsh.activity.feignclient.course.model.CoursePackagePaymentConfig; |
| | | import com.dsh.activity.feignclient.model.*; |
| | | import com.dsh.activity.feignclient.other.StoreClient; |
| | | import com.dsh.activity.feignclient.other.model.Store; |
| | | import com.dsh.activity.feignclient.other.model.StoreDetailOfCourse; |
| | | import com.dsh.activity.model.CoachChangeStateVO; |
| | | import com.dsh.activity.model.PointMerchandiseIncomeVo; |
| | | import com.dsh.activity.model.PointMerchandiseVo; |
| | | import com.dsh.activity.model.request.*; |
| | | import com.dsh.activity.model.response.GoodsInfoOneVo; |
| | | import com.dsh.activity.model.response.StoreVos; |
| | | import com.dsh.activity.service.*; |
| | | import com.dsh.activity.util.GDMapGeocodingUtil; |
| | | import com.dsh.activity.util.StrUtils; |
| | |
| | | public List<PointMerchandiseIncomeVo> getAmount(){ |
| | | return userPointsMerchandiseService.getAmount(); |
| | | } |
| | | |
| | | @Resource |
| | | private PointsMerchandiseCityService pmdsCityService; |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/pointMerchars/convertGoods") |
| | |
| | | return mapList; |
| | | } |
| | | |
| | | @PostMapping("/base/pointMerchars/queryPointMerchaseById") |
| | | public PointsMerchandise queryPointMerchaseById(@RequestBody Integer id){ |
| | | return pmdsService.getById(id); |
| | | } |
| | | |
| | | @PostMapping("/base/pointMerchars/getshopName") |
| | | public Integer getshopName(@RequestBody Integer id){ |
| | | List<PointsMerchandiseStore> list = pmdstoService.list(new LambdaQueryWrapper<PointsMerchandiseStore>().eq(PointsMerchandiseStore::getPointsMerchandiseId, id)); |
| | | PointsMerchandiseStore pointsMerchandiseStore = list.get(0); |
| | | Integer storeId = pointsMerchandiseStore.getStoreId(); |
| | | return storeId; |
| | | } |
| | | |
| | | |
| | | @PostMapping("/base/pointMerchars/queryDetailsOfGoods") |
| | | public GoodsInfoOneVo queryDetailsOfGoods(@RequestBody Integer id){ |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | GoodsInfoOneVo infoOneVo = new GoodsInfoOneVo(); |
| | | PointsMerchandise byId = pmdsService.getById(id); |
| | | |
| | | if (ToolUtil.isNotEmpty(byId)){ |
| | | infoOneVo.setName(byId.getName()); |
| | | infoOneVo.setCover(byId.getCover()); |
| | | infoOneVo.setPics(byId.getProductImages()); |
| | | infoOneVo.setPrice(byId.getPrice()); |
| | | infoOneVo.setExchangeMethod(byId.getRedemptionMethod()); |
| | | switch (byId.getRedemptionMethod()){ |
| | | case 1: |
| | | infoOneVo.setIntegral(byId.getIntegral()); |
| | | break; |
| | | case 2: |
| | | infoOneVo.setIntegral(byId.getIntegral()); |
| | | infoOneVo.setCash(byId.getCash()); |
| | | break; |
| | | case 3: |
| | | infoOneVo.setCash(byId.getCash()); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | switch (byId.getUserPopulation()){ |
| | | case 1: |
| | | infoOneVo.setUserPopulation("全部用户"); |
| | | break; |
| | | case 2: |
| | | infoOneVo.setUserPopulation("年度会员"); |
| | | break; |
| | | case 3: |
| | | infoOneVo.setUserPopulation("已有学员用户"); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | infoOneVo.setQuantityIssued(byId.getQuantityIssued()); |
| | | List<UserPointsMerchandise> list = upmseService.list(new LambdaQueryWrapper<UserPointsMerchandise>() |
| | | .eq(UserPointsMerchandise::getPointsMerchandiseId,byId.getId())); |
| | | infoOneVo.setUseScope(byId.getUseScope()); |
| | | switch (byId.getUseScope()){ |
| | | case 1: |
| | | infoOneVo.setExchangeArea("全国通用"); |
| | | break; |
| | | case 2: |
| | | infoOneVo.setExchangeArea("指定城市"); |
| | | break; |
| | | case 3: |
| | | infoOneVo.setExchangeArea("指定门店"); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | infoOneVo.setHasPicked(list.size()); |
| | | infoOneVo.setPickUpQuantity(byId.getPickUpQuantity()); |
| | | infoOneVo.setValidTime(simpleDateFormat.format(byId.getStartTime())+"至"+ simpleDateFormat.format(byId.getEndTime())); |
| | | infoOneVo.setRedemptionInstructions(byId.getRedemptionInstructions()); |
| | | infoOneVo.setSort(byId.getSort()); |
| | | } |
| | | return infoOneVo; |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/pointMerchars/getProvinces") |
| | | public List<StoreVos> getProvinces(@RequestBody Integer id){ |
| | | List<StoreVos> storeVos = new ArrayList<>(); |
| | | List<PointsMerchandiseCity> list = pmdsCityService.list(new LambdaQueryWrapper<PointsMerchandiseCity>() |
| | | .eq(PointsMerchandiseCity::getPointsMerchandiseId,id)); |
| | | if (list.size() > 0 ){ |
| | | for (PointsMerchandiseCity pointsMerchandiseCity : list) { |
| | | StoreVos storeVos1 = new StoreVos(); |
| | | storeVos1.setNum1(pointsMerchandiseCity.getProvince()); |
| | | storeVos1.setNum2(pointsMerchandiseCity.getCity()); |
| | | storeVos.add(storeVos1); |
| | | } |
| | | } |
| | | return storeVos; |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/pointMerchars/getStoreList") |
| | | public List<StoreVos> getStoreList(@RequestBody Integer id){ |
| | | List<StoreVos> storeVos = new ArrayList<>(); |
| | | List<PointsMerchandiseStore> list = pmdstoService.list(new QueryWrapper<PointsMerchandiseStore>() |
| | | .eq("pointsMerchandiseId",id)); |
| | | if (list.size() > 0 ){ |
| | | List<Integer> collect = list.stream().map(PointsMerchandiseStore::getStoreId).collect(Collectors.toList()); |
| | | List<Store> stores = stoClient.queryStoreByIds(collect); |
| | | if (stores.size() > 0 ){ |
| | | for (Store store : stores) { |
| | | StoreVos storeVos1 = new StoreVos(); |
| | | storeVos1.setNum1(store.getProvince() +"省"+ store.getCity() +"市"); |
| | | storeVos1.setNum2(store.getName()); |
| | | storeVos.add(storeVos1); |
| | | } |
| | | } |
| | | } |
| | | return storeVos; |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/pointMerchars/updateGoodsDetail") |
| | | public boolean updateGoodsDetail(@RequestBody Map<String, Object> map){ |
| | | try { |
| | | Integer pointMerchandiseId = (Integer) map.get("pointMerchandiseId"); |
| | | PointsMerchandise byId1 = pmdsService.getById(pointMerchandiseId); |
| | | |
| | | Integer quantityIssued = (Integer) map.get("quantityIssued"); |
| | | Integer pickUpQuantity = (Integer) map.get("pickUpQuantity"); |
| | | String redemptionInstructions = (String) map.get("redemptionInstructions"); |
| | | String cover = (String) map.get("cover"); |
| | | String productImages = (String) map.get("productImages"); |
| | | Integer sort = (Integer) map.get("sort"); |
| | | |
| | | byId1.setQuantityIssued(quantityIssued); |
| | | byId1.setPickUpQuantity(pickUpQuantity); |
| | | byId1.setRedemptionInstructions(redemptionInstructions); |
| | | if (ToolUtil.isNotEmpty(cover)){ |
| | | byId1.setCover(cover); |
| | | } |
| | | if (ToolUtil.isNotEmpty(productImages)){ |
| | | byId1.setProductImages(productImages); |
| | | } |
| | | byId1.setSort(sort); |
| | | pmdsService.updateById(byId1); |
| | | return true; |
| | | }catch (Exception e){ |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @PostMapping("/base/pointMerchars/add") |
| | | public Integer add(@RequestBody PointsMerchandise pointsMerchandise){ |
| | | Integer storeId = pointsMerchandise.getShelves(); |
| | | pointsMerchandise.setShelves(2); |
| | | boolean save = pmdsService.save(pointsMerchandise); |
| | | if(save && ToolUtil.isNotEmpty(storeId) && pointsMerchandise.getType()==2){ |
| | | PointsMerchandiseStore pointsMerchandiseStore = new PointsMerchandiseStore(); |
| | | pointsMerchandiseStore.setPointsMerchandiseId(pointsMerchandise.getId()); |
| | | pointsMerchandiseStore.setStoreId(storeId); |
| | | save = pmdstoService.save(pointsMerchandiseStore); |
| | | } |
| | | if(save && pointsMerchandise.getType()==2 && ToolUtil.isNotEmpty(pointsMerchandise.getProvinceCode())){ |
| | | pmdsService.saveCity(pointsMerchandise.getId(),pointsMerchandise.getProvince(),pointsMerchandise.getProvinceCode(),pointsMerchandise.getCity(),pointsMerchandise.getCityCode()); |
| | | } |
| | | if(save){ |
| | | return pointsMerchandise.getId(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | @PostMapping("/base/pointMerchars/addOther") |
| | | public Boolean addOther(@RequestBody String pam){ |
| | | Boolean save =false; |
| | | String[] split = pam.split("_"); |
| | | for (String s : split[1].split(",")) { |
| | | PointsMerchandiseStore pointsMerchandiseStore = new PointsMerchandiseStore(); |
| | | pointsMerchandiseStore.setPointsMerchandiseId(Integer.valueOf(split[0])); |
| | | pointsMerchandiseStore.setStoreId(Integer.valueOf(s)); |
| | | save = pmdstoService.save(pointsMerchandiseStore); |
| | | } |
| | | return save; |
| | | } |
| | | |
| | | @PostMapping("/base/pointMerchars/addCitys") |
| | | public Boolean addCitys(@RequestBody ArrayList<Map<String, String>> objects){ |
| | | try { |
| | | for (Map<String, String> object : objects) { |
| | | pmdsService.saveCity(Integer.valueOf(object.get("id")),object.get("pName"),object.get("pCode"),object.get("cName"),object.get("cCode")); |
| | | } |
| | | return true; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return false; |
| | | } |
| | | |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/pointMerchars/writeOffGoodsStatus") |
| | | public boolean writeOffGoodsStatus(@RequestBody Map<String, Object> map){ |
| | | try { |
| | | String o = (String) map.get("goodsId"); |
| | | Integer managerId = (Integer) map.get("managerId"); |
| | | UserPointsMerchandise byId = upmseService.getOne(new LambdaQueryWrapper<UserPointsMerchandise>() |
| | | .eq(UserPointsMerchandise::getId,Long.parseLong(o) )); |
| | | if (byId.getStatus() == 2){ |
| | | return false; |
| | | } |
| | | byId.setStatus(2); |
| | | byId.setVerificationUserId(managerId); |
| | | byId.setVerificationTime(new Date()); |
| | | upmseService.update(byId,new LambdaQueryWrapper<UserPointsMerchandise>() |
| | | .eq(UserPointsMerchandise::getUserId,byId.getUserId()) |
| | | .eq(UserPointsMerchandise::getId,byId.getId())); |
| | | System.out.println(byId); |
| | | return true; |
| | | }catch (Exception e){ |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | |
| | | * 开始时间 |
| | | */ |
| | | @TableField("startTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date startTime; |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @TableField("endTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date endTime; |
| | | /** |
| | | * 使用范围(1=全国,2=指定城市,3=指定门店) |
| | |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | /** |
| | | * 课包支付配置id |
New file |
| | |
| | | package com.dsh.activity.entity; |
| | | |
| | | 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 jqs |
| | | * @since 2023-07-12 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_points_merchandise_city") |
| | | public class PointsMerchandiseCity extends Model<PointsMerchandiseCity> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 积分商品id |
| | | */ |
| | | @TableField("pointsMerchandiseId") |
| | | private Integer pointsMerchandiseId; |
| | | /** |
| | | * |
| | | */ |
| | | @TableField("city") |
| | | private String city; |
| | | /** |
| | | * |
| | | */ |
| | | @TableField("cityCode") |
| | | private String cityCode; |
| | | /** |
| | | * |
| | | */ |
| | | @TableField("province") |
| | | private String province; |
| | | /** |
| | | * |
| | | */ |
| | | @TableField("provinceCode") |
| | | private String provinceCode; |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.activity.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.activity.entity.PointsMerchandiseCity; |
| | | |
| | | /** |
| | | * <p> |
| | | * 积分商品使用门店关系数据 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-07-12 |
| | | */ |
| | | public interface PointsMerchandiseCityMapper extends BaseMapper<PointsMerchandiseCity> { |
| | | |
| | | } |
| | |
| | | List<Map<String, Object>> ticketList(@Param("query") IntegralGoodsOfSearch ofSearch); |
| | | |
| | | int changeState(@Param("query") CoachChangeStateVO dto); |
| | | |
| | | void saveCity(@Param("id") Integer id, @Param("province") String province, @Param("provinceCode") String provinceCode, @Param("city") String city, @Param("cityCode") String cityCode); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.activity.model.response; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class GoodsInfoOneVo { |
| | | |
| | | |
| | | String name; |
| | | /** |
| | | * 封面图 |
| | | */ |
| | | String cover; |
| | | /** |
| | | * 原价 |
| | | */ |
| | | BigDecimal price; |
| | | /** |
| | | * 兑换方式(1=积分,2=现金+积分, 3=现金) |
| | | */ |
| | | Integer exchangeMethod; |
| | | /** |
| | | * 现金 |
| | | */ |
| | | BigDecimal cash; |
| | | /** |
| | | * 积分 |
| | | */ |
| | | Integer integral; |
| | | /** |
| | | * 图片 |
| | | */ |
| | | String pics; |
| | | /** |
| | | * 用户人群 |
| | | */ |
| | | String userPopulation; |
| | | /** |
| | | * 发放数量 |
| | | */ |
| | | Integer quantityIssued; |
| | | /** |
| | | * 已领数量 |
| | | */ |
| | | Integer hasPicked; |
| | | /** |
| | | * 限领数量 |
| | | */ |
| | | Integer pickUpQuantity; |
| | | /** |
| | | * 有效期 |
| | | */ |
| | | String validTime; |
| | | /** |
| | | * 兑换地点 |
| | | */ |
| | | String exchangeArea; |
| | | /** |
| | | * 兑换地点 (1=全国,2=指定城市,3=指定门店) |
| | | */ |
| | | Integer useScope; |
| | | /** |
| | | * 商品说明 |
| | | */ |
| | | String redemptionInstructions; |
| | | /** |
| | | * 排序 |
| | | */ |
| | | Integer sort; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.activity.model.response; |
| | | |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class StoreVos { |
| | | |
| | | String num1; |
| | | |
| | | String num2; |
| | | } |
New file |
| | |
| | | package com.dsh.activity.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.activity.entity.PointsMerchandiseCity; |
| | | |
| | | /** |
| | | * <p> |
| | | * 积分商品使用门店关系数据 服务类 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-07-12 |
| | | */ |
| | | public interface PointsMerchandiseCityService extends IService<PointsMerchandiseCity> { |
| | | |
| | | } |
| | |
| | | |
| | | List<Map<String, Object>> queryGoodsListOfSearch(IntegralGoodsOfSearch ofSearch); |
| | | |
| | | void saveCity(Integer id, String province, String provinceCode, String city, String cityCode); |
| | | |
| | | List<Map<String, Object>> ticketList(IntegralGoodsOfSearch ofSearch); |
| | | |
| | | Object changeState(CoachChangeStateVO dto); |
New file |
| | |
| | | package com.dsh.activity.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.activity.entity.PointsMerchandiseCity; |
| | | import com.dsh.activity.mapper.PointsMerchandiseCityMapper; |
| | | import com.dsh.activity.service.PointsMerchandiseCityService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 积分商品使用门店关系数据 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-07-12 |
| | | */ |
| | | @Service |
| | | public class PointsMerchandiseCityServiceImpl extends ServiceImpl<PointsMerchandiseCityMapper, PointsMerchandiseCity> implements PointsMerchandiseCityService { |
| | | |
| | | } |
| | |
| | | ofSearch.getUserPopulation(),ofSearch.getActiveStatus(),ofSearch.getState(),ofSearch.getPage()); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void saveCity(Integer id, String province, String provinceCode, String city, String cityCode) { |
| | | this.baseMapper.saveCity(id,province,provinceCode,city,cityCode); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> ticketList(IntegralGoodsOfSearch ofSearch) { |
| | | return this.baseMapper.ticketList(ofSearch); |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dsh.activity.mapper.PointsMerchandiseCityMapper"> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | <insert id="saveCity"> |
| | | insert into t_points_merchandise_city (id,pointsMerchandiseId,city,cityCode,province,provinceCode) value (null ,#{id},#{city},#{cityCode},#{province},#{provinceCode}) |
| | | </insert> |
| | | |
| | | </mapper> |
| | |
| | | #¿ª·¢»·¾³ |
| | | datasource.master0.type=com.alibaba.druid.pool.DruidDataSource |
| | | datasource.master0.driverClassName=com.mysql.cj.jdbc.Driver |
| | | datasource.master0.url=jdbc:mysql://192.168.110.80:3306/playpai_activity?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai |
| | | datasource.master0.url=jdbc:mysql://8.137.22.229:3306/playpai_activity?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai |
| | | datasource.master0.username=root |
| | | datasource.master0.password=123456 |
| | | datasource.master0.password=playpai2023! |
| | | datasource.master0.maxActive=20 |
| | | datasource.master0.maxWait=60000 |
| | | datasource.master0.minIdle=5 |
| | |
| | | #¿ª·¢»·¾³ |
| | | datasource.master0.type=com.alibaba.druid.pool.DruidDataSource |
| | | datasource.master0.driverClassName=com.mysql.cj.jdbc.Driver |
| | | datasource.master0.url=jdbc:mysql://192.168.110.80:3306/playpai_competition?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai |
| | | datasource.master0.url=jdbc:mysql://8.137.22.229:3306/playpai_competition?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai |
| | | datasource.master0.username=root |
| | | datasource.master0.password=123456 |
| | | datasource.master0.password=playpai2023! |
| | | datasource.master0.maxActive=20 |
| | | datasource.master0.maxWait=60000 |
| | | datasource.master0.minIdle=5 |
| | |
| | | |
| | | |
| | | import cn.mb.cloud.common.data.controller.BaseController; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.entity.TCourse; |
| | | import com.dsh.course.entity.TCoursePackage; |
| | | import com.dsh.course.entity.TCoursePackagePayment; |
| | | import com.dsh.course.entity.TCoursePackageType; |
| | | import com.dsh.course.feignclient.model.ExerciseVideo; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.PrintWriter; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | @PostMapping("/course/getPageageType") |
| | | public List<Map<String, Object>> getPageageType(){ |
| | | List<TCoursePackageType> list = coursePackageTypeService.list(new LambdaQueryWrapper<TCoursePackageType>().eq(TCoursePackageType::getState, 1)); |
| | | ArrayList<Map<String, Object>> objects = new ArrayList<>(); |
| | | for (TCoursePackageType tCoursePackageType : list) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("id",tCoursePackageType.getId()); |
| | | map.put("name",tCoursePackageType.getName()); |
| | | objects.add(map); |
| | | } |
| | | return objects; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取课程管理列表数据 |
| | | * @param queryCourseList |
| | |
| | | public List<TCourse> queryCourseByType(@RequestBody Integer type){ |
| | | return courseService.list(new QueryWrapper<TCourse>().eq("type", type).eq("state", 1)); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/course/queryPackageById") |
| | | public List<String> queryPackageById(@RequestBody Integer coursePackageId){ |
| | | ArrayList<String> strings = new ArrayList<>(); |
| | | TCoursePackage byId = coursePackageService.getById(coursePackageId); |
| | | Integer coursePackageTypeId = byId.getCoursePackageTypeId(); |
| | | strings.add(coursePackageTypeService.getById(coursePackageTypeId).getName()); |
| | | strings.add(byId.getName()); |
| | | |
| | | return strings; |
| | | |
| | | } |
| | | |
| | | @PostMapping("/course/getHours") |
| | | public String getHours(@RequestBody Integer coursePackageId1){ |
| | | return coursePackageService.getHours(coursePackageId1); |
| | | } |
| | | } |
| | |
| | | @ResponseBody |
| | | @PostMapping("/coursePackage/addCoursePackage") |
| | | public Integer addCoursePackage(@RequestBody TCoursePackage coursePackage){ |
| | | coursePackage.setNeedNum(coursePackage.getCodeTime()); |
| | | return coursePackageService.addCoursePackage(coursePackage); |
| | | } |
| | | |
| | |
| | | package com.dsh.course.controller; |
| | | |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | |
| | | import com.dsh.course.feignclient.account.AppUserClient; |
| | | import com.dsh.course.feignclient.account.StudentClient; |
| | | import com.dsh.course.feignclient.account.model.Student; |
| | | import com.dsh.course.mapper.CoursePackageSchedulingMapper; |
| | | import com.dsh.course.model.dto.ToClassDto; |
| | | import com.dsh.course.service.*; |
| | | import com.dsh.course.util.ResultUtil; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.swing.text.html.parser.Entity; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Api |
| | |
| | | return counsumService.getRefund(); |
| | | } |
| | | |
| | | |
| | | @Resource |
| | | private CoursePackageSchedulingMapper coursePackageSchedulingService; |
| | | //获取学员课时数信息 |
| | | @RequestMapping("/getInfo") |
| | | @ResponseBody |
| | |
| | | List<TCoursePackage> list = packageService.list(new QueryWrapper<TCoursePackage>() |
| | | .select("id", "name") |
| | | .eq("storeId", storeId) |
| | | .eq("type","1") |
| | | .eq("type","1").ne("id",id) |
| | | ); |
| | | List<SelectDto> selectDtos = new ArrayList<>(); |
| | | for (TCoursePackage t :list){ |
| | |
| | | payment.setLaveClassHours(laveClassHoursnew); |
| | | payment.setTotalClassHours(totalClassHoursnew); |
| | | payment.setAppUserId(null); |
| | | payment.setStatus(3); |
| | | |
| | | paymentService.updateById(payment); |
| | | |
| | |
| | | holi.setLaveClassHours(toHoliDto.getClassNum()); |
| | | holi.setState(1); |
| | | holi.setInsertTime(new Date()); |
| | | holi.setPayStatus(2); |
| | | paymentService.save(holi); |
| | | |
| | | TCoursePackage tCoursePackage = packageService.getById(toHoliDto.getClassId()); |
| | | String classWeeks = tCoursePackage.getClassWeeks(); |
| | | List<Integer> week = week(classWeeks); |
| | | |
| | | String[] split = tCoursePackage.getClassStartTime().split(","); |
| | | String[] split1 = tCoursePackage.getClassEndTime().split(","); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| | | SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| | | // 本周周几 |
| | | int i = DateUtil.dayOfWeek(new Date())-1; |
| | | for (Integer integer : week) { |
| | | if(integer<i){ |
| | | // 找下一周的时间 |
| | | Calendar instance = Calendar.getInstance(); |
| | | instance.add(Calendar.DATE,7-(i-integer)); |
| | | Date time = instance.getTime(); |
| | | |
| | | for (int i1 = 0; i1 < split.length; i1++) { |
| | | |
| | | CoursePackageScheduling coursePackageScheduling = new CoursePackageScheduling(); |
| | | coursePackageScheduling.setCoursePackageId(tCoursePackage.getId()); |
| | | try { |
| | | Date parse = format1.parse(format.format(time) + " " + split[i1]); |
| | | Date parse1 = format1.parse(format.format(time) + " " + split1[i1]); |
| | | coursePackageScheduling.setClassDate(parse); |
| | | coursePackageScheduling.setEndDate(parse1); |
| | | coursePackageScheduling.setStatus(1); |
| | | coursePackageSchedulingService.insert(coursePackageScheduling); |
| | | |
| | | CoursePackageStudent student1 = new CoursePackageStudent(); |
| | | student1.setAppUserId(student.getAppUserId()); |
| | | student1.setStudentId(student.getId()); |
| | | student1.setCoursePackageId(tCoursePackage.getId()); |
| | | student1.setCoursePackagePaymentId(holi.getId()); |
| | | student1.setCoursePackageSchedulingId(coursePackageScheduling.getId()); |
| | | student1.setSignInOrNot(1); |
| | | student1.setReservationStatus(1); |
| | | student1.setInsertTime(new Date()); |
| | | studentService.save(student1); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } |
| | | |
| | | }else if(integer>i) { |
| | | Calendar instance = Calendar.getInstance(); |
| | | instance.add(Calendar.DATE,integer-i); |
| | | Date time1 = instance.getTime(); |
| | | List<Date> list = new ArrayList<>(); |
| | | list.add(time1); |
| | | instance.add(Calendar.DATE,7); |
| | | Date time2 = instance.getTime(); |
| | | list.add(time2); |
| | | for (Date time : list) { |
| | | for (int i1 = 0; i1 < split.length; i1++) { |
| | | CoursePackageScheduling coursePackageScheduling = new CoursePackageScheduling(); |
| | | coursePackageScheduling.setCoursePackageId(tCoursePackage.getId()); |
| | | try { |
| | | Date parse = format1.parse(format.format(time) + " " + split[i1]); |
| | | Date parse1 = format1.parse(format.format(time) + " " + split1[i1]); |
| | | coursePackageScheduling.setClassDate(parse); |
| | | coursePackageScheduling.setEndDate(parse1); |
| | | coursePackageScheduling.setStatus(1); |
| | | coursePackageSchedulingService.insert(coursePackageScheduling); |
| | | |
| | | CoursePackageStudent student1 = new CoursePackageStudent(); |
| | | student1.setAppUserId(student.getAppUserId()); |
| | | student1.setStudentId(student.getId()); |
| | | student1.setCoursePackageId(tCoursePackage.getId()); |
| | | student1.setCoursePackagePaymentId(holi.getId()); |
| | | student1.setCoursePackageSchedulingId(coursePackageScheduling.getId()); |
| | | student1.setSignInOrNot(1); |
| | | student1.setReservationStatus(1); |
| | | student1.setInsertTime(new Date()); |
| | | studentService.save(student1); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | }else { |
| | | Calendar instance = Calendar.getInstance(); |
| | | instance.add(Calendar.DATE,7); |
| | | Date time = instance.getTime(); |
| | | |
| | | for (int i1 = 0; i1 < split.length; i1++) { |
| | | CoursePackageScheduling coursePackageScheduling = new CoursePackageScheduling(); |
| | | coursePackageScheduling.setCoursePackageId(tCoursePackage.getId()); |
| | | try { |
| | | Date parse = format1.parse(format.format(time) + " " + split[i1]); |
| | | Date parse1 = format1.parse(format.format(time) + " " + split1[i1]); |
| | | coursePackageScheduling.setClassDate(parse); |
| | | coursePackageScheduling.setEndDate(parse1); |
| | | coursePackageScheduling.setStatus(1); |
| | | coursePackageSchedulingService.insert(coursePackageScheduling); |
| | | |
| | | CoursePackageStudent student1 = new CoursePackageStudent(); |
| | | student1.setAppUserId(student.getAppUserId()); |
| | | student1.setStudentId(student.getId()); |
| | | student1.setCoursePackageId(tCoursePackage.getId()); |
| | | student1.setCoursePackagePaymentId(holi.getId()); |
| | | student1.setCoursePackageSchedulingId(coursePackageScheduling.getId()); |
| | | student1.setSignInOrNot(1); |
| | | student1.setReservationStatus(1); |
| | | student1.setInsertTime(new Date()); |
| | | studentService.save(student1); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | System.out.println("保存成功=============》="+holi); |
| | | |
| | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | private List<Integer> week(String week){ |
| | | String[] split = week.split(";"); |
| | | ArrayList<Integer> integers = new ArrayList<>(); |
| | | for (String s : split) { |
| | | switch (s){ |
| | | case "周一": |
| | | integers.add(1); |
| | | break; |
| | | case "周二": |
| | | integers.add(2); |
| | | break; |
| | | case "周三": |
| | | integers.add(3); |
| | | break; |
| | | case "周四": |
| | | integers.add(4); |
| | | break; |
| | | case "周五": |
| | | integers.add(5); |
| | | break; |
| | | case "周六": |
| | | integers.add(6); |
| | | break; |
| | | case "周日": |
| | | integers.add(7); |
| | | break; |
| | | } |
| | | } |
| | | return integers; |
| | | } |
| | | |
| | | @RequestMapping(value = "/toTrans",produces = MediaType.APPLICATION_JSON_UTF8_VALUE, consumes = "application/json;charset=UTF-8") |
| | |
| | | holi.setLaveClassHours(laveClassHours); |
| | | holi.setState(1); |
| | | holi.setInsertTime(new Date()); |
| | | holi.setPayStatus(2); |
| | | paymentService.save(holi); |
| | | |
| | | System.out.println("保存成功=============》="+holi); |
| | | |
| | | TCoursePackage tCoursePackage = packageService.getById(toHoliDto.getClassId()); |
| | | String classWeeks = tCoursePackage.getClassWeeks(); |
| | | List<Integer> week = week(classWeeks); |
| | | |
| | | String[] split = tCoursePackage.getClassStartTime().split(","); |
| | | String[] split1 = tCoursePackage.getClassEndTime().split(","); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| | | SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| | | // 本周周几 |
| | | int i = DateUtil.dayOfWeek(new Date())-1; |
| | | for (Integer integer : week) { |
| | | if(integer<i){ |
| | | // 找下一周的时间 |
| | | Calendar instance = Calendar.getInstance(); |
| | | instance.add(Calendar.DATE,7-(i-integer)); |
| | | Date time = instance.getTime(); |
| | | |
| | | for (int i1 = 0; i1 < split.length; i1++) { |
| | | |
| | | CoursePackageScheduling coursePackageScheduling = new CoursePackageScheduling(); |
| | | coursePackageScheduling.setCoursePackageId(tCoursePackage.getId()); |
| | | try { |
| | | Date parse = format1.parse(format.format(time) + " " + split[i1]); |
| | | Date parse1 = format1.parse(format.format(time) + " " + split1[i1]); |
| | | coursePackageScheduling.setClassDate(parse); |
| | | coursePackageScheduling.setEndDate(parse1); |
| | | coursePackageScheduling.setStatus(1); |
| | | coursePackageSchedulingService.insert(coursePackageScheduling); |
| | | |
| | | CoursePackageStudent student1 = new CoursePackageStudent(); |
| | | student1.setAppUserId(student.getAppUserId()); |
| | | student1.setStudentId(student.getId()); |
| | | student1.setCoursePackageId(tCoursePackage.getId()); |
| | | student1.setCoursePackagePaymentId(holi.getId()); |
| | | student1.setCoursePackageSchedulingId(coursePackageScheduling.getId()); |
| | | student1.setSignInOrNot(1); |
| | | student1.setReservationStatus(1); |
| | | student1.setInsertTime(new Date()); |
| | | studentService.save(student1); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } |
| | | |
| | | }else if(integer>i) { |
| | | Calendar instance = Calendar.getInstance(); |
| | | instance.add(Calendar.DATE,integer-i); |
| | | Date time1 = instance.getTime(); |
| | | List<Date> list = new ArrayList<>(); |
| | | list.add(time1); |
| | | instance.add(Calendar.DATE,7); |
| | | Date time2 = instance.getTime(); |
| | | list.add(time2); |
| | | for (Date time : list) { |
| | | for (int i1 = 0; i1 < split.length; i1++) { |
| | | CoursePackageScheduling coursePackageScheduling = new CoursePackageScheduling(); |
| | | coursePackageScheduling.setCoursePackageId(tCoursePackage.getId()); |
| | | try { |
| | | Date parse = format1.parse(format.format(time) + " " + split[i1]); |
| | | Date parse1 = format1.parse(format.format(time) + " " + split1[i1]); |
| | | coursePackageScheduling.setClassDate(parse); |
| | | coursePackageScheduling.setEndDate(parse1); |
| | | coursePackageScheduling.setStatus(1); |
| | | coursePackageSchedulingService.insert(coursePackageScheduling); |
| | | |
| | | CoursePackageStudent student1 = new CoursePackageStudent(); |
| | | student1.setAppUserId(student.getAppUserId()); |
| | | student1.setStudentId(student.getId()); |
| | | student1.setCoursePackageId(tCoursePackage.getId()); |
| | | student1.setCoursePackagePaymentId(holi.getId()); |
| | | student1.setCoursePackageSchedulingId(coursePackageScheduling.getId()); |
| | | student1.setSignInOrNot(1); |
| | | student1.setReservationStatus(1); |
| | | student1.setInsertTime(new Date()); |
| | | studentService.save(student1); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | }else { |
| | | Calendar instance = Calendar.getInstance(); |
| | | instance.add(Calendar.DATE,7); |
| | | Date time = instance.getTime(); |
| | | |
| | | for (int i1 = 0; i1 < split.length; i1++) { |
| | | CoursePackageScheduling coursePackageScheduling = new CoursePackageScheduling(); |
| | | coursePackageScheduling.setCoursePackageId(tCoursePackage.getId()); |
| | | try { |
| | | Date parse = format1.parse(format.format(time) + " " + split[i1]); |
| | | Date parse1 = format1.parse(format.format(time) + " " + split1[i1]); |
| | | coursePackageScheduling.setClassDate(parse); |
| | | coursePackageScheduling.setEndDate(parse1); |
| | | coursePackageScheduling.setStatus(1); |
| | | coursePackageSchedulingService.insert(coursePackageScheduling); |
| | | |
| | | CoursePackageStudent student1 = new CoursePackageStudent(); |
| | | student1.setAppUserId(student.getAppUserId()); |
| | | student1.setStudentId(student.getId()); |
| | | student1.setCoursePackageId(tCoursePackage.getId()); |
| | | student1.setCoursePackagePaymentId(holi.getId()); |
| | | student1.setCoursePackageSchedulingId(coursePackageScheduling.getId()); |
| | | student1.setSignInOrNot(1); |
| | | student1.setReservationStatus(1); |
| | | student1.setInsertTime(new Date()); |
| | | studentService.save(student1); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | student1.setCoursePackageId(tCoursePackage.getId()); |
| | | student1.setCoursePackagePaymentId(tCoursePackagePayment1.getId()); |
| | | student1.setCoursePackageSchedulingId(coursePackageScheduling.getId()); |
| | | student1.setSignInOrNot(0); |
| | | student1.setSignInOrNot(1); |
| | | student1.setReservationStatus(1); |
| | | student1.setInsertTime(new Date()); |
| | | student1.setType(1); |
| | |
| | | student1.setCoursePackageId(tCoursePackage.getId()); |
| | | student1.setCoursePackagePaymentId(paymentId); |
| | | student1.setCoursePackageSchedulingId(coursePackageScheduling.getId()); |
| | | student1.setSignInOrNot(0); |
| | | student1.setSignInOrNot(1); |
| | | student1.setReservationStatus(1); |
| | | student1.setInsertTime(new Date()); |
| | | cpsMapper.insert(student1); |
| | |
| | | student1.setCoursePackageId(tCoursePackage.getId()); |
| | | student1.setCoursePackagePaymentId(paymentId); |
| | | student1.setCoursePackageSchedulingId(coursePackageScheduling.getId()); |
| | | student1.setSignInOrNot(0); |
| | | student1.setSignInOrNot(1); |
| | | student1.setReservationStatus(1); |
| | | student1.setInsertTime(new Date()); |
| | | cpsMapper.insert(student1); |
| | |
| | | coursePackageScheduling.setClassDate(parse); |
| | | coursePackageScheduling.setEndDate(parse1); |
| | | coursePackageScheduling.setStatus(1); |
| | | coursePackageScheduling.setCourseId(tCoursePackage.getId()); |
| | | coursePackageScheduling.setIntegral(0); |
| | | coursePackageScheduling.setCancelClasses(""); |
| | | coursePackageScheduling.setDeductClassHour(0); |
| | | coursePackageSchedulingService.save(coursePackageScheduling); |
| | | |
| | | CoursePackageStudent student1 = new CoursePackageStudent(); |
| | |
| | | student1.setCoursePackageId(tCoursePackage.getId()); |
| | | student1.setCoursePackagePaymentId(paymentId); |
| | | student1.setCoursePackageSchedulingId(coursePackageScheduling.getId()); |
| | | student1.setSignInOrNot(0); |
| | | student1.setSignInOrNot(1); |
| | | student1.setReservationStatus(1); |
| | | student1.setInsertTime(new Date()); |
| | | cpsMapper.insert(student1); |
| | |
| | | cancelClasses, |
| | | deductClassHour, |
| | | integral |
| | | FROM t_course_package_scheduling where coursePackageId = #{item.coursePackageId} order by classDate desc |
| | | FROM t_course_package_scheduling where coursePackageId = #{item.coursePackageId} GROUP BY classDate |
| | | order by classDate desc |
| | | |
| | | </select> |
| | | </mapper> |
| | |
| | | #¿ª·¢»·¾³ |
| | | datasource.master0.type=com.alibaba.druid.pool.DruidDataSource |
| | | datasource.master0.driverClassName=com.mysql.cj.jdbc.Driver |
| | | datasource.master0.url=jdbc:mysql://192.168.110.80:3306/playpai_course?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai |
| | | datasource.master0.url=jdbc:mysql://8.137.22.229:3306/playpai_course?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai |
| | | datasource.master0.username=root |
| | | datasource.master0.password=123456 |
| | | datasource.master0.password=playpai2023! |
| | | datasource.master0.maxActive=20 |
| | | datasource.master0.maxWait=60000 |
| | | datasource.master0.minIdle=5 |
| | |
| | | import com.dsh.course.feignClient.activity.model.PointMercharsVo; |
| | | import com.dsh.guns.modular.system.model.CoachChangeStateVO; |
| | | import com.dsh.guns.modular.system.model.PointMerchandiseIncomeVo; |
| | | import com.dsh.course.feignClient.activity.model.PointsMerchandise; |
| | | import com.dsh.guns.modular.system.model.GoodsInfoOneVo; |
| | | import com.dsh.guns.modular.system.model.StoreVos; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | @PostMapping("/base/pointMerchars/queryUserPayedGoodsList") |
| | | List<Map<String, Object>> queryUserPayedGoodsList(@RequestBody PointMercharsPayedVo pointMercharsPayedVo); |
| | | |
| | | @PostMapping("/base/pointMerchars/queryPointMerchaseById") |
| | | PointsMerchandise queryPointMerchaseById(Integer id); |
| | | |
| | | |
| | | @PostMapping("/base/pointMerchars/getshopName") |
| | | Integer getshopName(Integer id); |
| | | |
| | | |
| | | @PostMapping("/base/pointMerchars/queryDetailsOfGoods") |
| | | GoodsInfoOneVo queryDetailsOfGoods(@RequestBody Integer id); |
| | | |
| | | @PostMapping("/base/pointMerchars/getProvinces") |
| | | List<StoreVos> getProvinces(@RequestBody Integer id); |
| | | |
| | | @PostMapping("/base/pointMerchars/getStoreList") |
| | | List<StoreVos> getStoreList(@RequestBody Integer id); |
| | | |
| | | @PostMapping("/base/pointMerchars/updateGoodsDetail") |
| | | boolean updateGoodsDetail(@RequestBody Map<String, Object> stringObjectHashMap); |
| | | |
| | | @PostMapping("/base/pointMerchars/add") |
| | | Integer add(PointsMerchandise pointsMerchandise); |
| | | |
| | | |
| | | @PostMapping("/base/pointMerchars/addOther") |
| | | Boolean addOther(@RequestBody String pam); |
| | | |
| | | @PostMapping("/base/pointMerchars/addCitys") |
| | | Boolean addCitys(@RequestBody List<Map<String, String>> objects); |
| | | |
| | | @PostMapping("/base/pointMerchars/writeOffGoodsStatus") |
| | | boolean writeOffGoodsStatus(@RequestBody Map<String, Object> map); |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.activity.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 com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 积分商品 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-07-04 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_points_merchandise") |
| | | public class PointsMerchandise extends Model<PointsMerchandise> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 类型(1=实体商品,2=课包商品,3=门票商品 4=优惠券) |
| | | */ |
| | | @TableField("type") |
| | | private Integer type; |
| | | /** |
| | | * 商品名称 |
| | | */ |
| | | @TableField("name") |
| | | private String name; |
| | | /** |
| | | * 课包id |
| | | */ |
| | | @TableField("coursePackageId") |
| | | private Integer coursePackageId; |
| | | /** |
| | | * 原价 |
| | | */ |
| | | @TableField("price") |
| | | private BigDecimal price; |
| | | /** |
| | | * 兑换方式(1=积分,2=现金+积分) |
| | | */ |
| | | @TableField("redemptionMethod") |
| | | private Integer redemptionMethod; |
| | | /** |
| | | * 所需现金 |
| | | */ |
| | | @TableField("cash") |
| | | private BigDecimal cash; |
| | | /** |
| | | * 所属积分 |
| | | */ |
| | | @TableField("integral") |
| | | private Integer integral; |
| | | /** |
| | | * 商品封面 |
| | | */ |
| | | @TableField("cover") |
| | | private String cover; |
| | | /** |
| | | * 商品图片 |
| | | */ |
| | | @TableField("productImages") |
| | | private String productImages; |
| | | /** |
| | | * 用户人群(1=全部用户,2=年度会员,3=已有学员用户) |
| | | */ |
| | | @TableField("userPopulation") |
| | | private Integer userPopulation; |
| | | /** |
| | | * 发放数量 |
| | | */ |
| | | @TableField("quantityIssued") |
| | | private Integer quantityIssued; |
| | | /** |
| | | * 限领数量 |
| | | */ |
| | | @TableField("pickUpQuantity") |
| | | private Integer pickUpQuantity; |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | @TableField("startTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date startTime; |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @TableField("endTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date endTime; |
| | | /** |
| | | * 使用范围(1=全国,2=指定城市,3=指定门店) |
| | | */ |
| | | @TableField("useScope") |
| | | private Integer useScope; |
| | | /** |
| | | * 省 |
| | | */ |
| | | @TableField("province") |
| | | private String province; |
| | | /** |
| | | * 省编号 |
| | | */ |
| | | @TableField("provinceCode") |
| | | private String provinceCode; |
| | | /** |
| | | * 市 |
| | | */ |
| | | @TableField("city") |
| | | private String city; |
| | | /** |
| | | * 市编号 |
| | | */ |
| | | @TableField("cityCode") |
| | | private String cityCode; |
| | | /** |
| | | * 兑换说明 |
| | | */ |
| | | @TableField("redemptionInstructions") |
| | | private String redemptionInstructions; |
| | | /** |
| | | * 排序 |
| | | */ |
| | | @TableField("sort") |
| | | private Integer sort; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | @TableField("state") |
| | | private Integer state; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | /** |
| | | * 课包支付配置id |
| | | */ |
| | | @TableField("coursePackageConfigId") |
| | | private Integer coursePackageConfigId; |
| | | /** |
| | | * 1=上架 2=下架 |
| | | */ |
| | | @TableField("shelves") |
| | | private Integer shelves; |
| | | @TableField("cardType") |
| | | private Integer cardType; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/course/queryCourseByType") |
| | | List<TCourse> queryCourseByType(Integer type); |
| | | |
| | | |
| | | @PostMapping("/course/getPageageType") |
| | | List<Map<String, Object>> getPageageType(); |
| | | |
| | | |
| | | |
| | | @PostMapping("/course/queryPackageById") |
| | | List<String> queryPackageById(Integer coursePackageId); |
| | | |
| | | @PostMapping("/course/getHours") |
| | | String getHours(Integer coursePackageId1); |
| | | } |
| | |
| | | @RequestMapping(value = "/courdent/toHoli",produces = MediaType.APPLICATION_JSON_UTF8_VALUE, consumes = "application/json;charset=UTF-8") |
| | | String toHoli(@RequestBody ToHoliDto toHoliDto); |
| | | @RequestMapping(value = "/courdent/toTrans",produces = MediaType.APPLICATION_JSON_UTF8_VALUE, consumes = "application/json;charset=UTF-8") |
| | | |
| | | String toTrans(@RequestBody ToHoliDto toHoliDto); |
| | | |
| | | |
New file |
| | |
| | | package com.dsh.course.feignClient.other; |
| | | |
| | | import com.dsh.course.dto.StudentSearch; |
| | | import com.dsh.course.dto.TStudentDto; |
| | | import com.dsh.course.feignClient.other.model.Banner; |
| | | import com.dsh.guns.modular.system.model.AdvertisementChangeStateDTO; |
| | | import com.dsh.guns.modular.system.model.AdvertisementQuery; |
| | | import com.dsh.guns.modular.system.model.Game; |
| | | import com.dsh.guns.modular.system.model.dto.BallQueryDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import java.util.List; |
| | | |
| | | @FeignClient(value = "mb-cloud-other") |
| | | public interface BallClient { |
| | | |
| | | @PostMapping("/student/webStudentList") |
| | | List<Game> list(@RequestBody BallQueryDto ballQueryDto); |
| | | @PostMapping("/save") |
| | | void save(@RequestBody Game game); |
| | | } |
| | |
| | | coach.setCityManagerId(objectId); |
| | | |
| | | } |
| | | if (coach.getDiploma().equals("")) coach.setDiploma(null); |
| | | if (coach.getDiploma().equals("")) { |
| | | coach.setDiploma(null); |
| | | } |
| | | if (coach.getCertificateImg().equals("") ){ |
| | | coach.setCertificateImg(null); |
| | | } |
| | |
| | | for (QueryAppUserVO queryAppUserVO : queryAppUserVOS) { |
| | | if (queryAppUserVO.getSalesmanUserId()!=null){ |
| | | for (User sale : sales) { |
| | | if (queryAppUserVO.getSalesmanUserId() == sale.getId()){ |
| | | if (queryAppUserVO.getSalesmanUserId().equals(sale.getId())){ |
| | | result.add(queryAppUserVO); |
| | | } |
| | | } |
| | |
| | | @RequestMapping(value = "/onChange") |
| | | @ResponseBody |
| | | public Object onChange(Integer oneId) { |
| | | if (oneId == null) return null; |
| | | if (oneId == null) { |
| | | return null; |
| | | } |
| | | try { |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, oneId)); |
| | | QueryWrapper<TCity> query = new QueryWrapper<TCity>().eq("parent_id", one.getId()); |
| | |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.model.TSite; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.model.dto.SelectDto; |
| | | import com.dsh.guns.modular.system.service.ICoursePackageService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.ITSiteService; |
| | |
| | | public String showExamineCoursePackageDetails(Model model, Integer id){ |
| | | TCoursePackage tCoursePackage = coursePackageService.queryById(id); |
| | | model.addAttribute("item", tCoursePackage); |
| | | System.out.println("============"+ tCoursePackage.getAuditStatus()); |
| | | model.addAttribute("auditStatus", tCoursePackage.getAuditStatus()); |
| | | |
| | | model.addAttribute("authRemark", tCoursePackage.getAuthRemark()); |
| | | |
| | | model.addAttribute("classTime", tCoursePackage.getClassStartTime() + ":00 - " + tCoursePackage.getClassEndTime() + ":00"); |
| | | String[] split = tCoursePackage.getClassWeeks().split(";"); |
| | | List<String> list5 = Arrays.asList("周一", "周二", "周三", "周四", "周五", "周六", "周日"); |
| | |
| | | List<Coach> coaches = coachClient.queryCoachByCity(cityCode); |
| | | model.addAttribute("coach", coaches); |
| | | List<CoursePackagePaymentConfig> list4 = coursePackagePaymentConfigClient.queryCoursePackagePaymentConfigList(id); |
| | | model.addAttribute("coursePackagePaymentConfig", list4.remove(0)); |
| | | model.addAttribute("coursePackagePaymentConfigs", list4); |
| | | if(list4.size()!=0){ |
| | | CoursePackagePaymentConfig coursePackagePaymentConfig = list4.get(0); |
| | | model.addAttribute("cashPayment", coursePackagePaymentConfig.getCashPayment() == 0 ? false : true); |
| | | model.addAttribute("playPaiCoin", coursePackagePaymentConfig.getPlayPaiCoin() == 0 ? false : true); |
| | | model.addAttribute("playPaiCoin", coursePackagePaymentConfig.getPlayPaiCoin() == 0 ? false : true);} |
| | | model.addAttribute("coursePackagePaymentConfig", list4.remove(0)); |
| | | model.addAttribute("coursePackagePaymentConfigs", list4); |
| | | |
| | | return PREFIX + "examineCoursePackage_info.html"; |
| | | } |
| | | |
| | |
| | | @ResponseBody |
| | | @PostMapping("/queryCity") |
| | | public List<Map<String, Object>> queryCity(String code){ |
| | | |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | String cityCode = null; |
| | |
| | | CityManager cityManager = cityManagerClient.queryCityManagerById(objectId); |
| | | cityCode = cityManager.getCityCode(); |
| | | } |
| | | System.out.println("======="+storeService.queryCity(code, cityCode)); |
| | | return storeService.queryCity(code, cityCode); |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/queryCity1/{code}") |
| | | public ResultUtil queryCity1(@PathVariable("code") String code){ |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | String cityCode = null; |
| | | if(objectType == 2){//城市管理员 |
| | | CityManager cityManager = cityManagerClient.queryCityManagerById(objectId); |
| | | cityCode = cityManager.getCityCode(); |
| | | } |
| | | System.out.println("======="+storeService.queryCity(code, cityCode)); |
| | | // return storeService.queryCity(code, cityCode); |
| | | return new ResultUtil(0,null,null,storeService.queryCity(code, cityCode),null); |
| | | } |
| | | |
| | | |
| | |
| | | @PostMapping("/queryStore") |
| | | public List<TStore> queryStore(String cityCode){ |
| | | List<TStore> list = storeService.list(new QueryWrapper<TStore>().eq("cityCode", cityCode).eq("state", 1)); |
| | | System.out.println("====list="+list); |
| | | return list; |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/queryStore1/{cityCode}") |
| | | public ResultUtil queryStore1(@PathVariable("cityCode") String cityCode){ |
| | | List<TStore> list = storeService.list(new QueryWrapper<TStore>().select("id","name").eq("cityCode", cityCode).eq("state", 1)); |
| | | // Map<String,Integer> map = new LinkedHashMap<>(); |
| | | List<SelectDto> selectDtos = new ArrayList<>(); |
| | | Map<String,Integer> map = new HashMap<>(); |
| | | // for (TStore store : list) { |
| | | // SelectDto selectDto = new SelectDto(); |
| | | // selectDto.setId(Long.valueOf(store.getId())); |
| | | // selectDto.setValue(store.getName()); |
| | | // selectDtos.add(selectDto); |
| | | // |
| | | // } |
| | | // map.put("options",selectDtos); |
| | | |
| | | return new ResultUtil(0,0,null,list,null); |
| | | } |
| | | |
| | | /** |
| | |
| | | @ResponseBody |
| | | @PostMapping("/querySite") |
| | | public List<TSite> querySite(Integer storeId){ |
| | | List<TSite> list = siteService.list(new QueryWrapper<TSite>().eq("storeId", storeId).eq("state", 1)); |
| | | System.out.println("==storeId==="+storeId); |
| | | List<TSite> list = siteService.list(new QueryWrapper<TSite>().select("id","name").eq("storeId", storeId).eq("state", 1)); |
| | | return list; |
| | | } |
| | | |
| | |
| | | import com.dsh.course.feignClient.activity.CouponClient; |
| | | import com.dsh.course.feignClient.activity.PointMercharsClient; |
| | | import com.dsh.course.feignClient.activity.model.*; |
| | | import com.dsh.course.feignClient.course.CourseClient; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import com.dsh.guns.core.base.tips.ErrorTip; |
| | | import com.dsh.guns.core.base.tips.SuccessTip; |
| | | import com.dsh.guns.core.common.constant.factory.PageFactory; |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.model.CouponDataVo; |
| | | import com.dsh.guns.modular.system.model.Region; |
| | | import com.dsh.guns.modular.system.model.TCity; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.service.ICityService; |
| | | import com.dsh.guns.modular.system.service.IRegionService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | |
| | | |
| | | @Controller |
| | | @RequestMapping("/tGoods") |
| | | public class TGoodsController { |
| | | public class TGoodsController extends BaseController { |
| | | |
| | | |
| | | |
| | |
| | | private AppUserClient appUserClient; |
| | | @Autowired |
| | | private ICityService cityService; |
| | | |
| | | @Autowired |
| | | private CourseClient courseClient; |
| | | |
| | | @Resource |
| | | private PointMercharsClient pointMercharsClient; |
| | |
| | | model.addAttribute("userType",objectType); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | List<Map<String,Object>> listOne = courseClient.getPageageType(); |
| | | model.addAttribute("courseType",listOne); |
| | | |
| | | |
| | | return PREFIX + "TGoods_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tGoods_info") |
| | | public String tGoodsInfo(Model model) { |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | System.out.println(objectType); |
| | | model.addAttribute("userType",objectType); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | return PREFIX + "TGoods_detail_one.html"; |
| | | } |
| | | |
| | | @RequestMapping("/goods_info/{id}") |
| | | public String memberCouponInfo(@PathVariable Integer id, Model model) { |
| | | PointsMerchandise pointMercharsVo = pointMercharsClient.queryPointMerchaseById(id); |
| | | model.addAttribute("item",pointMercharsVo); |
| | | if(pointMercharsVo.getType()==2){ |
| | | Date startTime = pointMercharsVo.getStartTime(); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| | | model.addAttribute("sTime",format.format(startTime)); |
| | | model.addAttribute("eTime",format.format(pointMercharsVo.getEndTime())); |
| | | Integer shopId = pointMercharsClient.getshopName(id); |
| | | TStore byId = storeService.getById(shopId); |
| | | model.addAttribute("shopName",byId.getName()); |
| | | Integer coursePackageId = pointMercharsVo.getCoursePackageId(); |
| | | List<String> name = courseClient.queryPackageById(coursePackageId); |
| | | Integer coursePackageId1 = pointMercharsVo.getCoursePackageId(); |
| | | String classHours = courseClient.getHours(coursePackageId1); |
| | | model.addAttribute("typeName",name.get(0)); |
| | | model.addAttribute("pageName",name.get(1)); |
| | | model.addAttribute("classHours",classHours); |
| | | String productImages = pointMercharsVo.getProductImages(); |
| | | ArrayList<String> strings = new ArrayList<>(); |
| | | for (String s : productImages.split(",")) { |
| | | strings.add(s); |
| | | } |
| | | model.addAttribute("pictures",strings); |
| | | return PREFIX + "TGoods_detail_two.html"; |
| | | }else { |
| | | GoodsInfoOneVo infoOneVo = pointMercharsClient.queryDetailsOfGoods(id); |
| | | System.out.println("pointMercharsVo:"+infoOneVo); |
| | | model.addAttribute("item",infoOneVo); |
| | | String[] split = infoOneVo.getPics().split(","); |
| | | List<String> list = Arrays.asList(split); |
| | | if (infoOneVo.getUseScope() == 2){ |
| | | List<StoreVos> provinces = pointMercharsClient.getProvinces(id); |
| | | model.addAttribute("city",provinces); |
| | | } |
| | | if (infoOneVo.getUseScope() == 2){ |
| | | List<StoreVos> storeVos = pointMercharsClient.getStoreList(id); |
| | | model.addAttribute("store",storeVos); |
| | | } |
| | | model.addAttribute("pictures",list); |
| | | model.addAttribute("exchangeMethod",infoOneVo.getExchangeMethod()); |
| | | return PREFIX + "TGoods_detail_one.html"; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | client.insertIntoData(dataVo); |
| | | return new SuccessTip<>(); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 商品详情 |
| | | * @param pointMerchandiseId 商品Id |
| | | * @param quantityIssued 发放数量 |
| | | * @param pickUpQuantity 限领数量 |
| | | * @param redemptionInstructions 说明 |
| | | * @param cover 封面图 |
| | | * @param productImages 商品图片 |
| | | * @param sort 排序 |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update( Integer id,Integer num,Integer num1,String text){ |
| | | Coupon coupon = client.queryCouponById(id); |
| | | coupon.setQuantityIssued(num); |
| | | coupon.setPickUpQuantity(num1); |
| | | coupon.setIllustrate(text); |
| | | client.updateCouponData(coupon); |
| | | public Object update( Integer pointMerchandiseId,Integer quantityIssued,Integer pickUpQuantity,String redemptionInstructions,String cover,String productImages,Integer sort){ |
| | | Map<String, Object> stringObjectHashMap = new HashMap<>(); |
| | | stringObjectHashMap.put("pointMerchandiseId",pointMerchandiseId); |
| | | stringObjectHashMap.put("quantityIssued",quantityIssued); |
| | | stringObjectHashMap.put("pickUpQuantity",pickUpQuantity); |
| | | stringObjectHashMap.put("redemptionInstructions",redemptionInstructions); |
| | | stringObjectHashMap.put("cover",cover); |
| | | stringObjectHashMap.put("productImages",productImages); |
| | | stringObjectHashMap.put("sort",sort); |
| | | System.out.println(stringObjectHashMap); |
| | | pointMercharsClient.updateGoodsDetail(stringObjectHashMap); |
| | | return new SuccessTip<>(); |
| | | } |
| | | /* |
| | | ajax.set("typeAll",typeAll); |
| | | ajax.set("provinceCode",pCode); |
| | | ajax.set("cityCode",cCode); |
| | | ajax.set("storeId",storeId); |
| | | ajax.set("coursePackageTypeId",coursePackageTypeId); |
| | | ajax.set("coursePackageId",coursePackageId); |
| | | ajax.set("coursePackageConfigId",coursePackageConfigId); |
| | | ajax.set("price",price); |
| | | ajax.set("type",type); |
| | | ajax.set("integral",integral); |
| | | ajax.set("cash",cash); |
| | | ajax.set("cover",cover1); |
| | | ajax.set("imgOne",imgOne); |
| | | ajax.set("userPopulation",userPopulation); |
| | | ajax.set("quantityIssued",quantityIssued); |
| | | ajax.set("pickUpQuantity",pickUpQuantity); |
| | | ajax.set("startTime",startTime); |
| | | ajax.set("text",text); |
| | | ajax.set("sort",sort); |
| | | ajax.set("useScope",company); |
| | | ajax.set("cityIds",cts); |
| | | ajax.set("storeIds",stores); |
| | | */ |
| | | @PostMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add( Integer typeAll,String provinceCode,String cityCode,Integer storeId,Integer coursePackageTypeId,Integer coursePackageId,Integer coursePackageConfigId, |
| | | Double price,Integer type,Integer integral,Double cash,String cover,String imgOne,Integer userPopulation,Integer quantityIssued,Integer pickUpQuantity, |
| | | String startTime,String text,Integer sort,String name,Integer useScope,String cityIds,String storeIds,Integer cardType |
| | | ) throws ParseException { |
| | | PointsMerchandise pointsMerchandise = new PointsMerchandise(); |
| | | pointsMerchandise.setType(typeAll); |
| | | pointsMerchandise.setName(name); |
| | | pointsMerchandise.setCoursePackageId(coursePackageId); |
| | | pointsMerchandise.setPrice(new BigDecimal(price)); |
| | | pointsMerchandise.setRedemptionMethod(type); |
| | | if(type==2 || type==3){ |
| | | pointsMerchandise.setCash(new BigDecimal(cash)); |
| | | } |
| | | if(type==1 || type==2){ |
| | | pointsMerchandise.setIntegral(integral); |
| | | } |
| | | pointsMerchandise.setCover(cover); |
| | | pointsMerchandise.setProductImages(imgOne); |
| | | pointsMerchandise.setUserPopulation(userPopulation); |
| | | pointsMerchandise.setCardType(cardType); |
| | | pointsMerchandise.setQuantityIssued(quantityIssued); |
| | | pointsMerchandise.setPickUpQuantity(pickUpQuantity); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| | | pointsMerchandise.setStartTime(format.parse(startTime.split(" - ")[0])); |
| | | pointsMerchandise.setEndTime(format.parse(startTime.split(" - ")[1])); |
| | | pointsMerchandise.setUseScope(useScope); |
| | | if(ToolUtil.isNotEmpty(provinceCode)){ |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, provinceCode)); |
| | | pointsMerchandise.setProvinceCode(provinceCode); |
| | | pointsMerchandise.setProvince(one.getName()); |
| | | } |
| | | if(ToolUtil.isNotEmpty(cityCode)){ |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, cityCode)); |
| | | pointsMerchandise.setCityCode(cityCode); |
| | | pointsMerchandise.setCity(one.getName()); |
| | | } |
| | | pointsMerchandise.setRedemptionInstructions(text); |
| | | pointsMerchandise.setSort(sort); |
| | | pointsMerchandise.setState(1); |
| | | pointsMerchandise.setInsertTime(new Date()); |
| | | pointsMerchandise.setCoursePackageConfigId(coursePackageConfigId); |
| | | // 代替storeId |
| | | pointsMerchandise.setShelves(storeId); |
| | | Integer id = pointMercharsClient.add(pointsMerchandise); |
| | | if(typeAll!=2){ |
| | | if(useScope==2){ |
| | | ArrayList<Map<String,String>> objects = new ArrayList<>(); |
| | | for (String s : cityIds.split(",")) { |
| | | TCity tCity = cityService.getById(Integer.valueOf(s)); |
| | | HashMap<String, String> map = new HashMap<>(); |
| | | TCity pCity = cityService.getById(tCity.getParentId()); |
| | | map.put("pName",pCity.getName()); |
| | | map.put("pCode",pCity.getCode()); |
| | | map.put("cName",tCity.getName()); |
| | | map.put("cCode",tCity.getCode()); |
| | | map.put("id",id.toString()); |
| | | objects.add(map); |
| | | } |
| | | pointMercharsClient.addCitys(objects); |
| | | }else if(useScope==3){ |
| | | String pam = id+"_"+storeIds; |
| | | // 添加多个城市 门店 |
| | | try{ |
| | | pointMercharsClient.addOther(pam); |
| | | |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | return new SuccessTip<>(); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * 跳转到修改车辆管理 |
| | | * 跳转到修改商品详情 |
| | | */ |
| | | @RequestMapping("/tGoods_update/{id}") |
| | | public String tCityUpdate(@PathVariable Integer id, Model model) { |
| | |
| | | PointMercharsVo pointMercharsVo = pointMercharsClient.queryPointMerchaseDetailOfId(id); |
| | | System.out.println("pointMercharsVo:"+pointMercharsVo); |
| | | String[] split = pointMercharsVo.getPics().split(","); |
| | | List<String> list = Arrays.asList(split); |
| | | model.addAttribute("id",id); |
| | | model.addAttribute("item",pointMercharsVo); |
| | | model.addAttribute("pictures",split); |
| | | model.addAttribute("pictures",list); |
| | | System.out.println(list); |
| | | return PREFIX + "TGoods_edit.html"; |
| | | } |
| | | |
| | |
| | | */ |
| | | @RequestMapping("/write_off") |
| | | @ResponseBody |
| | | public Object GoodsWriteOff(Integer id){ |
| | | System.out.println(id); |
| | | // TODO: 2023/8/15 核销操作 |
| | | public Object GoodsWriteOff(String id){ |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Map<String, Object> stringObjectHashMap = new HashMap<>(); |
| | | stringObjectHashMap.put("goodsId",id); |
| | | stringObjectHashMap.put("managerId",objectType); |
| | | boolean b = pointMercharsClient.writeOffGoodsStatus(stringObjectHashMap); |
| | | System.out.println(b); |
| | | if (b){ |
| | | return new SuccessTip<>(); |
| | | }else { |
| | | return ERROR; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | List<TQueryBenefitsVideosVO> courseByCourseIds = courseClient.getCourseByCourseIds(vo); |
| | | for (BenefitsVideos benefitsVideos : benefitVideoById) { |
| | | for (TQueryBenefitsVideosVO courseByCourseId : courseByCourseIds) { |
| | | if (benefitsVideos.getCourseId() == courseByCourseId.getId()){ |
| | | if (benefitsVideos.getCourseId().equals(courseByCourseId.getId())){ |
| | | courseByCourseId.setIntegral(benefitsVideos.getIntegral()); |
| | | courseByCourseId.setBenefitsVideosId(benefitsVideos.getId()); |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.controller.system; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.course.feignClient.account.CityManagerClient; |
| | | import com.dsh.course.feignClient.account.CoachClient; |
| | | import com.dsh.course.feignClient.account.model.CityManager; |
| | | import com.dsh.course.feignClient.account.model.Coach; |
| | | import com.dsh.course.feignClient.course.CoursePackageClient; |
| | | import com.dsh.course.feignClient.course.CoursePackageDiscountClient; |
| | | import com.dsh.course.feignClient.course.CoursePackagePaymentConfigClient; |
| | | import com.dsh.course.feignClient.course.CoursePackageTypeClient; |
| | | import com.dsh.course.feignClient.course.model.TCoursePackageType; |
| | | import com.dsh.course.feignClient.other.BallClient; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.model.dto.BallQueryDto; |
| | | import com.dsh.guns.modular.system.model.dto.ConsumeQuery; |
| | | import com.dsh.guns.modular.system.service.ICityService; |
| | | import com.dsh.guns.modular.system.service.ICoursePackageService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.ITSiteService; |
| | | import com.dsh.guns.modular.system.util.HttpRequestUtil; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import com.google.common.base.Ascii; |
| | | import com.google.gson.JsonObject; |
| | | import com.netflix.ribbon.proxy.annotation.Http; |
| | | import com.sun.org.apache.xerces.internal.impl.io.ASCIIReader; |
| | | import io.netty.util.AsciiString; |
| | | import io.rong.util.HttpUtil; |
| | | import org.apache.commons.lang.StringEscapeUtils; |
| | | import org.apache.logging.log4j.util.Base64Util; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpRequest; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.util.Base64Utils; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.BufferedReader; |
| | | import java.io.InputStreamReader; |
| | | import java.io.OutputStream; |
| | | import java.net.HttpURLConnection; |
| | | import java.net.URL; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.*; |
| | | |
| | | @Controller |
| | | @RequestMapping("/ball") |
| | | public class BallController extends BaseController { |
| | | private String PREFIX = "/system/ball/"; |
| | | @Resource |
| | | private BallClient ballClient; |
| | | @Autowired |
| | | private ICityService cityService; |
| | | |
| | | @Autowired |
| | | private ICoursePackageService coursePackageService; |
| | | |
| | | @Resource |
| | | private CoursePackageTypeClient coursePackageTypeClient; |
| | | |
| | | @Autowired |
| | | private IStoreService storeService; |
| | | |
| | | @Resource |
| | | private CityManagerClient cityManagerClient; |
| | | |
| | | @Autowired |
| | | private ITSiteService siteService; |
| | | |
| | | @Resource |
| | | private CoachClient coachClient; |
| | | |
| | | @Resource |
| | | private CoursePackagePaymentConfigClient coursePackagePaymentConfigClient; |
| | | |
| | | @Resource |
| | | private CoursePackageDiscountClient coursePackageDiscountClient; |
| | | |
| | | @Resource |
| | | private CoursePackageClient coursePackageClient; |
| | | |
| | | @RequestMapping("/tolist") |
| | | public String tolist(Model model) { |
| | | |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",roleid); |
| | | |
| | | return PREFIX+"ball.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取变更列表 |
| | | */ |
| | | /** |
| | | * 获取有效期 |
| | | */ |
| | | @RequestMapping("/list") |
| | | @ResponseBody |
| | | public List<Game> changelist(BallQueryDto ballQueryDto) { |
| | | System.out.println("=======ballQueryDto=========="+ballQueryDto); |
| | | |
| | | return ballClient.list(ballQueryDto); |
| | | } |
| | | |
| | | @RequestMapping("/save") |
| | | @ResponseBody |
| | | public ResultUtil save(String red,String blue,String province,String city, Integer site,Integer store) { |
| | | // JSONObject jsonObject = JSONObject.parseObject("111"); |
| | | Game game = new Game(); |
| | | game.setRed(red); |
| | | game.setBlue(blue); |
| | | game.setProvince(province); |
| | | game.setCity(city); |
| | | game.setSiteId(site); |
| | | game.setStoreId(store); |
| | | System.out.println("============"+game); |
| | | ballClient.save(game); |
| | | return null; |
| | | } |
| | | |
| | | @RequestMapping("/pre_add") |
| | | public String add(Model model) { |
| | | // Map<String,String> map = new HashMap<>(); |
| | | // map.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); |
| | | // map.put("space_id","1001"); |
| | | // map.put("sutu_id","1001"); |
| | | // |
| | | // String request = HttpRequestUtil.getRequest("https://try.daowepark.com/v7/user_api/general/gameList", map); |
| | | // System.out.println("=======request=========="+request); |
| | | //// |
| | | //// return ballClient.list(ballQueryDto); |
| | | // } |
| | | |
| | | Map<String,String> map =new HashMap<>(); |
| | | map.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); |
| | | map.put("space_id","1001"); |
| | | map.put("sutu_id","1001"); |
| | | |
| | | String req = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/gameList", map); |
| | | System.out.println("================"+req); |
| | | // AsciiString cached = AsciiString.cached(req); |
| | | String convertedString = StringEscapeUtils.unescapeJava(req); |
| | | |
| | | System.out.println("-------------"+convertedString); |
| | | JSONObject parse = JSONObject.parseObject(convertedString); |
| | | JSONArray data = JSONObject.parseArray(parse.getString("data")); |
| | | JSONObject jsonObject =data.getJSONObject(0); |
| | | |
| | | |
| | | |
| | | // |
| | | |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | List<TCoursePackageType> tCoursePackageTypes = coursePackageTypeClient.queryAllCoursePackageType(); |
| | | model.addAttribute("coursePackageType", tCoursePackageTypes); |
| | | String cityCode = null; |
| | | if(objectType == 2){//城市管理员 |
| | | CityManager cityManager = cityManagerClient.queryCityManagerById(objectId); |
| | | cityCode = cityManager.getCityCode(); |
| | | } |
| | | List<Map<String, Object>> list = storeService.queryProvince(cityCode); |
| | | model.addAttribute("province", list); |
| | | Object code = list.get(0).get("code"); |
| | | List<Map<String, Object>> list1 = storeService.queryCity(code.toString(), cityCode); |
| | | model.addAttribute("city", list1); |
| | | String code1 = list1.get(0).get("code").toString(); |
| | | List<TStore> list2 = storeService.list(new QueryWrapper<TStore>().eq("cityCode", code1).eq("state", 1)); |
| | | model.addAttribute("store", list2); |
| | | TStore store = list2.get(0); |
| | | List<TSite> list3 = siteService.list(new QueryWrapper<TSite>().eq("storeId", store.getId()).eq("state", 1)); |
| | | model.addAttribute("site", list3); |
| | | |
| | | |
| | | return PREFIX+"ball_pre_add.html"; |
| | | }} |
| | |
| | | * @author fengshuonan |
| | | * @date 2017-05-05 23:10 |
| | | */ |
| | | |
| | | @Controller |
| | | @RequestMapping("/kaptcha") |
| | | public class KaptchaController { |
| | |
| | | |
| | | if (resultUtil==""||resultUtil==null){ |
| | | return new ResultUtil<>(0,0,"报名成功"); |
| | | }else |
| | | return new ResultUtil<>(0,0,"报名成功,以下学员剩余课时不足"+resultUtil); |
| | | }else{ |
| | | return new ResultUtil<>(0,0,"报名成功,以下学员剩余课时不足"+resultUtil);} |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | if (resultUtil==""){ |
| | | return new ResultUtil<>(0,0,"报名成功"); |
| | | }else |
| | | return new ResultUtil<>(0,0,"报名成功,以下学员剩余课时不足"+resultUtil); |
| | | }else{ |
| | | return new ResultUtil<>(0,0,"报名成功,以下学员剩余课时不足"+resultUtil);} |
| | | } |
| | | |
| | | //赠课 |
| | |
| | | try { |
| | | if (clazz.isAssignableFrom(String.class)) { |
| | | // ----2016-12-19---zhuangqian----防止beetlsql对空字符串不检测导致无法入库的问题---- |
| | | if (StrKit.isBlank(String.valueOf(value))) |
| | | if (StrKit.isBlank(String.valueOf(value))) { |
| | | return " "; |
| | | else |
| | | } else { |
| | | return String.valueOf(value); |
| | | } |
| | | } |
| | | return clazz.cast(value); |
| | | } catch (ClassCastException e) { |
| | |
| | | return null; |
| | | } |
| | | |
| | | if (StrKit.isBlank(valueStr)) return null; |
| | | if (StrKit.isBlank(valueStr)) { |
| | | return null; |
| | | } |
| | | |
| | | BasicType basicType = null; |
| | | try { |
| | |
| | | c = strText.charAt(i); |
| | | intAsc = (int) c; |
| | | strHex = Integer.toHexString(intAsc); |
| | | if (intAsc > 128) |
| | | if (intAsc > 128) { |
| | | str.append("\\u" + strHex); |
| | | else // 低位在前面补00 |
| | | } else // 低位在前面补00 |
| | | { |
| | | str.append("\\u00" + strHex); |
| | | } |
| | | } |
| | | return str.toString(); |
| | | } |
| | | |
| | |
| | | * |
| | | */ |
| | | public static String md5(String input) { |
| | | if (input == null) |
| | | if (input == null) { |
| | | return null; |
| | | } |
| | | |
| | | try { |
| | | // 拿到一个MD5转换器(如果想要SHA1参数换成”SHA1”) |
| | |
| | | private static String byteArrayToString(byte[] byteArray){ |
| | | StringBuilder strBuilder = new StringBuilder(); |
| | | for (int i = 0; i < byteArray.length; i++) { |
| | | if (Integer.toHexString(0xFF & byteArray[i]).length() == 1) |
| | | if (Integer.toHexString(0xFF & byteArray[i]).length() == 1) { |
| | | strBuilder.append("0").append(Integer.toHexString(0xFF & byteArray[i])); |
| | | else |
| | | } else { |
| | | strBuilder.append(Integer.toHexString(0xFF & byteArray[i])); |
| | | } |
| | | } |
| | | return strBuilder.toString(); |
| | | } |
| | | |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | @Data |
| | | public class Game { |
| | | private Integer id; |
| | | private Integer operationId; |
| | | private String operation; |
| | | private String province; |
| | | |
| | | private String provinceCode; |
| | | private String city; |
| | | private String cityCode; |
| | | private Integer storeId; |
| | | private String store; |
| | | |
| | | private Integer siteId; |
| | | |
| | | private String site; |
| | | |
| | | private String blue; |
| | | private String red; |
| | | |
| | | private Date insertTime; |
| | | |
| | | // 获取和设置方法 |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class GoodsInfoOneVo { |
| | | |
| | | |
| | | String name; |
| | | /** |
| | | * 封面图 |
| | | */ |
| | | String cover; |
| | | /** |
| | | * 原价 |
| | | */ |
| | | BigDecimal price; |
| | | /** |
| | | * 兑换方式(1=积分,2=现金+积分, 3=现金) |
| | | */ |
| | | Integer exchangeMethod; |
| | | /** |
| | | * 现金 |
| | | */ |
| | | BigDecimal cash; |
| | | /** |
| | | * 积分 |
| | | */ |
| | | Integer integral; |
| | | /** |
| | | * 图片 |
| | | */ |
| | | String pics; |
| | | /** |
| | | * 用户人群 |
| | | */ |
| | | String userPopulation; |
| | | /** |
| | | * 发放数量 |
| | | */ |
| | | Integer quantityIssued; |
| | | /** |
| | | * 已领数量 |
| | | */ |
| | | Integer hasPicked; |
| | | /** |
| | | * 限领数量 |
| | | */ |
| | | Integer pickUpQuantity; |
| | | /** |
| | | * 有效期 |
| | | */ |
| | | String validTime; |
| | | /** |
| | | * 兑换点 |
| | | */ |
| | | String exchangeArea; |
| | | /** |
| | | * 兑换地点 (1=全国,2=指定城市,3=指定门店) |
| | | */ |
| | | Integer useScope; |
| | | /** |
| | | * 商品说明 |
| | | */ |
| | | String redemptionInstructions; |
| | | /** |
| | | * 排序 |
| | | */ |
| | | Integer sort; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class StoreVos { |
| | | |
| | | String num1; |
| | | |
| | | String num2; |
| | | |
| | | String num3; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class BallQueryDto { |
| | | String provinceCode; |
| | | String cityCode; |
| | | String store; |
| | | String site; |
| | | |
| | | } |
| | |
| | | } |
| | | List<CoursePackageStudent> coursePackageStudents = coursePackageStudentClient.queryByCoursePackageSchedulingId(id); |
| | | if(coursePackageStudents.size() > 0){ |
| | | return ResultUtil.error("不能取消本次"); |
| | | // return ResultUtil.error("不能取消本次"); |
| | | } |
| | | coursePackageScheduling = new CoursePackageScheduling(); |
| | | coursePackageScheduling.setId(id); |
| | |
| | | tCoursePackagePayment.setLaveClassHours(tCoursePackagePayment.getLaveClassHours() - deductClassHour); |
| | | } |
| | | |
| | | if(coursePackageStudent.getSignInOrNot() == 0){ |
| | | if(coursePackageStudent.getReservationStatus() == 0){ |
| | | tCoursePackagePayment.setAbsencesNumber(tCoursePackagePayment.getAbsencesNumber() + 1); |
| | | } |
| | | System.out.println("====tCoursePackagePayment====="+tCoursePackagePayment); |
| | |
| | | |
| | | import java.io.IOException; |
| | | import java.io.PrintWriter; |
| | | import java.net.URISyntaxException; |
| | | import java.util.Iterator; |
| | | import java.util.Map; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | |
| | | import org.apache.commons.httpclient.SimpleHttpConnectionManager; |
| | | import org.apache.commons.httpclient.methods.GetMethod; |
| | | import org.apache.commons.httpclient.methods.PostMethod; |
| | | import org.apache.http.HttpResponse; |
| | | import org.apache.http.client.ClientProtocolException; |
| | | import org.apache.http.client.methods.HttpGet; |
| | | import org.apache.http.client.methods.HttpPost; |
| | | import org.apache.http.client.utils.URIBuilder; |
| | | import org.apache.http.impl.client.CloseableHttpClient; |
| | | import org.apache.http.impl.client.HttpClientBuilder; |
| | | import org.apache.http.util.EntityUtils; |
| | | |
| | | public class HttpRequestUtil { |
| | | |
| | | /*** |
| | | * get请求(带参数) |
| | | * @param url |
| | | * @return String |
| | | */ |
| | | public static String getReq(String url, Map<String, String> params) { |
| | | String result = null; |
| | | try { |
| | | URIBuilder uriBuilder = new URIBuilder(url); |
| | | Iterator maplist = params.entrySet().iterator(); |
| | | while (maplist.hasNext()) { |
| | | Map.Entry<String, String> map = (Map.Entry<String, String>) maplist.next(); |
| | | uriBuilder.addParameter(map.getKey(), map.getValue()); |
| | | } |
| | | CloseableHttpClient client = HttpClientBuilder.create().build(); |
| | | HttpPost get = new HttpPost(uriBuilder.build()); |
| | | get.addHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36"); |
| | | HttpResponse response = client.execute(get); |
| | | result = EntityUtils.toString(response.getEntity(), "UTF-8"); |
| | | |
| | | } catch (URISyntaxException e) { |
| | | e.printStackTrace(); |
| | | } catch (ClientProtocolException e) { |
| | | e.printStackTrace(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return result; |
| | | } |
| | | public static String postRequest(String url, Map<String, String> params) { |
| | | // 构造HttpClient的实例 |
| | | HttpClient httpClient = new HttpClient(); |
| | |
| | | public class OrderUtil { |
| | | |
| | | /* 订单号 */ |
| | | private static long orderNum = 0l; |
| | | private static long orderNum = 0L; |
| | | |
| | | /* 日期 */ |
| | | private static String date; |
| | |
| | | String str = new SimpleDateFormat("yyMMddHHmmss").format(new Date()); |
| | | if (date == null || !date.equals(str)) { |
| | | date = str; |
| | | orderNum = 0l; |
| | | orderNum = 0L; |
| | | } |
| | | orderNum++; |
| | | long orderNo = Long.parseLong((date)) * 1000000; |
| | |
| | | char_array_4[1] = (byte) (((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4)); |
| | | char_array_4[2] = (byte) (((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6)); |
| | | char_array_4[3] = (byte) (char_array_3[2] & 0x3f); |
| | | for (i = 0; (i < 4); i++) |
| | | for (i = 0; (i < 4); i++) { |
| | | retContent += base64_alphabet[char_array_4[i]]; |
| | | } |
| | | i = 0; |
| | | } |
| | | } |
| | | |
| | | // handling the last input content |
| | | if (i > 0) { |
| | | for (j = i; j < 3; j++) |
| | | for (j = i; j < 3; j++) { |
| | | char_array_3[j] = 0; // padding of zero |
| | | } |
| | | |
| | | char_array_4[0] = (byte) ((char_array_3[0] & 0xfc) >> 2); // right |
| | | // shift |
| | |
| | | char_array_4[2] = (byte) (((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6)); |
| | | char_array_4[3] = (byte) (char_array_3[2] & 0x3f); |
| | | |
| | | for (j = 0; (j < i + 1); j++) |
| | | for (j = 0; (j < i + 1); j++) { |
| | | retContent += base64_alphabet[char_array_4[j]]; |
| | | } |
| | | |
| | | while ((i++ < 3)) |
| | | // padding of '=' of output string |
| | | { |
| | | retContent += '='; |
| | | } |
| | | |
| | | } |
| | | return retContent; |
| | |
| | | mLength--; |
| | | char_array_4[i++] = data[enCode++]; |
| | | if (i == 4) { |
| | | for (i = 0; i < 4; i++) |
| | | for (i = 0; i < 4; i++) { |
| | | char_array_4[i] = findChar((char) char_array_4[i]); |
| | | } |
| | | |
| | | char_array_3[0] = (byte) ((char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4)); |
| | | char_array_3[1] = (byte) (((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2)); |
| | | char_array_3[2] = (byte) (((char_array_4[2] & 0x3) << 6) + char_array_4[3]); |
| | | |
| | | for (i = 0; (i < 3); i++) |
| | | for (i = 0; (i < 3); i++) { |
| | | retContent += (char) char_array_3[i]; |
| | | } |
| | | i = 0; |
| | | } |
| | | } |
| | | |
| | | // last content handling |
| | | if (i > 0) { |
| | | for (j = i; j < 4; j++) |
| | | for (j = i; j < 4; j++) { |
| | | char_array_4[j] = 0; |
| | | } |
| | | |
| | | for (j = 0; j < 4; j++) |
| | | for (j = 0; j < 4; j++) { |
| | | char_array_4[j] = findChar((char) char_array_4[j]); |
| | | } |
| | | |
| | | char_array_3[0] = (byte) ((char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4)); |
| | | char_array_3[1] = (byte) (((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2)); |
| | | char_array_3[2] = (byte) (((char_array_4[2] & 0x3) << 6) + char_array_4[3]); |
| | | |
| | | for (j = 0; (j < i - 1); j++) |
| | | for (j = 0; (j < i - 1); j++) { |
| | | retContent += (char) char_array_3[j]; |
| | | } |
| | | } |
| | | |
| | | return retContent; |
| | | } |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row" id = "ttt"> |
| | | <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"> |
| | | @if(role=='1'){ |
| | | <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="pCode" onchange="TCompetition.oneChange(this)"> |
| | | <option value="">全部</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(role=='1'){ |
| | | <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="cCode"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="store" name="门店名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="site" name="场地名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="userName" name="所属用户" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TStudent.search()"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TStudentTableToolbar" role="group"> |
| | | <#button name="添加" icon="fa-plus" clickFun="TStudent.openAddTStudent()"/> |
| | | |
| | | <#button name="修改" icon="fa-edit" clickFun="TStudent.openTStudentDetail()" space="true"/> |
| | | <#button name="查看详情" icon="fa-edit" clickFun="TStudent.openTStudentDetail1()" space="true"/> |
| | | |
| | | @if(shiro.hasPermission("/tStudent/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="TStudent.delete()" space="true"/> |
| | | @} |
| | | <!-- <button id="exportButton">TTTTTTTTTT</button>--> |
| | | </div> |
| | | <#table id="TStudentTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/ball/ball.js"></script> |
| | | <script src="${ctxPath}/modular/system/tShop/tShop.js"></script> |
| | | <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.4.0/jspdf.umd.min.js"> |
| | | </script> |
| | | <script> |
| | | |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | <div class="row"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所在省:</label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control" id="provinceCode" name="provinceCode"> |
| | | @for(obj in province){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所在市:</label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control" id="cityCode" name="cityCode"> |
| | | @for(obj in city){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所属门店:</label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control" id="storeId" name="storeId"> |
| | | @for(obj in store){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*上课场地:</label> |
| | | <div class="col-sm-4"> |
| | | <select class="form-control" id="siteId" name="siteId"> |
| | | @for(obj in site){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div class="hr-line-dashed"></div> |
| | | |
| | | <div id="config"> |
| | | |
| | | <div> |
| | | <div class="col-sm-4"> |
| | | <div>游戏1*</div> |
| | | <div id="pic"> |
| | | <div id="headPic" class="headPic"> |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | | <img src="${ctxPath}/img/NoPIC.png" id="img" style="width: 200px; height: 150px; border: 1px solid black;"> |
| | | </div> |
| | | <input type="file" id="fil" class="fil" hidden="hidden"> |
| | | </div> |
| | | |
| | | <input type="text" class="form-control"> |
| | | <input type="text" class="form-control"> |
| | | <input type="text" class="form-control"> |
| | | </div> |
| | | |
| | | <div class="col-sm-4"> |
| | | <div>游戏1*</div> |
| | | |
| | | <div id="pic"> |
| | | 图片:<div id="headPic" class="headPic"> |
| | | <img src="${ctxPath}/img/NoPIC.png" id="img" style="width: 200px; height: 150px; border: 1px solid black;"> |
| | | </div> |
| | | <input type="file" id="fil" class="fil" hidden="hidden"> |
| | | </div> |
| | | |
| | | <input type="text" class="form-control"> |
| | | <input type="text" class="form-control"> |
| | | <input type="text" class="form-control"> |
| | | </div> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <h3>课时设置</h3> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*支付方式:</label> |
| | | <div class="col-sm-4" style="margin-top: 6px;"> |
| | | <input type="checkbox" name="payType" value="1"> 现金 |
| | | <input type="checkbox" name="payType" value="2"> 玩湃币 |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- <input type="text" id = "counpons">--> |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="CoursePackageInfo.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="CoursePackageInfo.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/ball/ball_info.js"></script> |
| | | <script type="text/javascript"> |
| | | laydate.render({ |
| | | elem: '#classStartTime' |
| | | ,type: 'time' |
| | | ,range: true |
| | | }); |
| | | |
| | | laydate.render({ |
| | | elem: '#holitime' |
| | | ,range: true //或 range: '~' 来自定义分割字符 |
| | | }); |
| | | |
| | | var avatarUp = new $WebUpload("coverDrawing"); |
| | | avatarUp.setUploadBarId("progressBar"); |
| | | avatarUp.init(); |
| | | |
| | | var avatarUp1 = new $WebUpload("detailDrawing"); |
| | | avatarUp1.setUploadBarId("progressBar"); |
| | | avatarUp1.init(); |
| | | |
| | | var avatarUp1 = new $WebUpload("introduceDrawing"); |
| | | avatarUp1.setUploadBarId("progressBar"); |
| | | avatarUp1.init(); |
| | | function addTime(){ |
| | | var i = $('#dayTime > div').length |
| | | |
| | | let htmlStr =' <div style="display:flex">\n' + |
| | | ' <input class="form-control" id="classStartTime'+i+'" name="classStartTime" placeholder="请选择" style="width: 200px;">\n' + |
| | | ' <i class="fa fa-trash-o" style="font-size:24px" onclick="removePrice1(this)"></i>\n' + |
| | | ' </div>' |
| | | $('#dayTime').append(htmlStr); |
| | | console.log("========="+i) |
| | | laydate.render({ |
| | | elem: '#classStartTime'+i, |
| | | type: 'time', |
| | | range: true |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | let fil = document.querySelector('#fil') // 文件框,只不过隐藏了起来 |
| | | let headPic = document.querySelector('#headPic') //图片上传框 |
| | | |
| | | headPic.addEventListener('click', function () { |
| | | fil.click() //点击上传图片,文件上传框打开 |
| | | }) |
| | | |
| | | //头像上传 |
| | | fil.addEventListener('change', function (e) {//注意,头像上传时用的时change事件 |
| | | // console.log(this.files[0]); //文件的信息都放在files里 |
| | | let fd = new FormData() |
| | | fd.append('file', this.files[0]) |
| | | //原生ajax实现实现图片上传 |
| | | let xhr = new XMLHttpRequest() //创建ajax对象 |
| | | xhr.open('post', Feng.ctxPath + '/mgr/uploadImg') |
| | | xhr.send(fd) //将格式处理好的数据,作为参数发送 |
| | | xhr.onreadystatechange = function () { |
| | | // if (xhr.code != 1) { |
| | | let data = xhr.responseText; |
| | | console.log(data); |
| | | $('#img').src = data; |
| | | img.src = data |
| | | // } |
| | | } |
| | | }) |
| | | |
| | | // document.addEventListener('DOMContentLoaded', function() { |
| | | // |
| | | // let filList = document.querySelectorAll('.fil'); // 获取所有具有类名为 'fil' 的元素列表 |
| | | // let headPicList = document.querySelectorAll('.headPic'); // 获取所有具有类名为 'headPic' 的元素列表 |
| | | // |
| | | // // 为每个元素添加事件监听器 |
| | | // filList.forEach(function(fil) { |
| | | // fil.addEventListener('change', function(e) { |
| | | // let fd = new FormData(); |
| | | // fd.append('file', this.files[0]); |
| | | // let xhr = new XMLHttpRequest(); |
| | | // xhr.open('post', Feng.ctxPath + '/mgr/uploadImg'); |
| | | // xhr.send(fd); |
| | | // xhr.onreadystatechange = function() { |
| | | // // if (xhr.readyState === 4 && xhr.status === 200) { |
| | | // let data = xhr.responseText; |
| | | // console.log(data); |
| | | // headPicList.forEach(function(headPic) { |
| | | // headPic.querySelector('img').src = data; |
| | | // }); |
| | | // // } |
| | | // }; |
| | | // }); |
| | | // }); |
| | | // |
| | | // // 为每个元素添加点击事件监听器 |
| | | // headPicList.forEach(function(headPic) { |
| | | // headPic.addEventListener('click', function() { |
| | | // let fil = this.querySelector('.fil'); |
| | | // fil.click(); |
| | | // }); |
| | | // }); |
| | | // }); |
| | | |
| | | </script> |
| | | @} |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="zh"> |
| | | <head> |
| | | <meta charset="UTF-8" /> |
| | | <title>amis demo</title> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <meta |
| | | name="viewport" |
| | | content="width=device-width, initial-scale=1, maximum-scale=1" |
| | | /> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> |
| | | <link rel="stylesheet" href="${ctxPath}/sdk/sdk.css" /> |
| | | <link rel="stylesheet" href="${ctxPath}/sdk/helper.css" /> |
| | | <link rel="stylesheet" href="${ctxPath}/sdk/iconfont.css" /> |
| | | <!-- 这是默认主题所需的,如果是其他主题则不需要 --> |
| | | <!-- 从 1.1.0 开始 sdk.css 将不支持 IE 11,如果要支持 IE11 请引用这个 css,并把前面那个删了 --> |
| | | <!-- <link rel="stylesheet" href="sdk-ie11.css" /> --> |
| | | <!-- 不过 amis 开发团队几乎没测试过 IE 11 下的效果,所以可能有细节功能用不了,如果发现请报 issue --> |
| | | <style> |
| | | html, |
| | | body, |
| | | .app-wrapper { |
| | | position: relative; |
| | | width: 100%; |
| | | height: 100%; |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div id="root" class="app-wrapper"></div> |
| | | <script src="${ctxPath}/sdk/sdk.js"></script> |
| | | <script type="text/javascript"> |
| | | (function () { |
| | | let amis = amisRequire('amis/embed'); |
| | | // 通过替换下面这个配置来生成不同页面 |
| | | let amisJSON = { |
| | | "type": "page", |
| | | "id": "u:8c028a595aa6", |
| | | "body": [ |
| | | { |
| | | "type": "form", |
| | | "id": "u:24af29be25d2", |
| | | "title": "表单", |
| | | "body": [ |
| | | { |
| | | "label": "所属运营商:", |
| | | "type": "select", |
| | | "name": "operator", |
| | | "id": "u:970f68a2c4ee", |
| | | "mode": "horizontal", |
| | | "size": "lg", |
| | | "multiple": false, |
| | | "source": { |
| | | "url": "/api/v1/rep/cus/", |
| | | "method": "get", |
| | | "messages": { |
| | | } |
| | | }, |
| | | "labelField": "customerName", |
| | | "valueField": "id", |
| | | "showInvalidMatch": false, |
| | | "searchable": true, |
| | | "clearable": true, |
| | | "horizontal": { |
| | | "leftFixed": "lg" |
| | | } |
| | | }, |
| | | { |
| | | "type": "input-city", |
| | | "label": "所在省:", |
| | | "name": "province", |
| | | "id": "u:091b190331f6", |
| | | "mode": "horizontal", |
| | | "allowCity": false, |
| | | "allowDistrict": false, |
| | | "onEvent": { |
| | | "change": { |
| | | "weight": 0, |
| | | "actions": [ |
| | | { |
| | | "componentId": "u:63c85c19f3aa", |
| | | "actionType": "reload", |
| | | "dataMergeMode": "merge" |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | "type": "select", |
| | | "label": "所在市:", |
| | | "name": "city", |
| | | "id": "u:63c85c19f3aa", |
| | | "multiple": false, |
| | | "mode": "horizontal", |
| | | "size": "md", |
| | | "horizontal": { |
| | | "leftFixed": "lg" |
| | | }, |
| | | "source": { |
| | | "url": "/coursePackage/queryCity1/$province", |
| | | "method": "post", |
| | | "messages": { |
| | | }, |
| | | "sendOn": "this.province != null &&this.province != ' '" |
| | | }, |
| | | "onEvent": { |
| | | "change": { |
| | | "weight": 0, |
| | | "actions": [ |
| | | { |
| | | "componentId": "u:576899b1b531", |
| | | "actionType": "reload", |
| | | "dataMergeMode": "merge" |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | "labelField": "name", |
| | | "valueField": "code" |
| | | }, |
| | | { |
| | | "type": "select", |
| | | "label": "所属门店:", |
| | | "name": "store", |
| | | "id": "u:576899b1b531", |
| | | "multiple": false, |
| | | "mode": "horizontal", |
| | | "size": "md", |
| | | "horizontal": { |
| | | "leftFixed": "lg" |
| | | }, |
| | | "source": { |
| | | "method": "post", |
| | | "url": "/coursePackage/queryStore1/$city", |
| | | "messages": { |
| | | }, |
| | | "sendOn": "this.city != null &&this.city != ' '" |
| | | }, |
| | | "labelField": "name", |
| | | "valueField": "id", |
| | | "onEvent": { |
| | | "change": { |
| | | "weight": 0, |
| | | "actions": [ |
| | | { |
| | | "componentId": "u:0d288f4bdd8e", |
| | | "actionType": "reload", |
| | | "dataMergeMode": "merge" |
| | | }, |
| | | { |
| | | "componentId": "u:0d288f4bdd8e", |
| | | "args": { |
| | | "value": " " |
| | | }, |
| | | "actionType": "setValue" |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | "type": "select", |
| | | "label": "所属场地:", |
| | | "name": "site", |
| | | "id": "u:0d288f4bdd8e", |
| | | "multiple": false, |
| | | "mode": "horizontal", |
| | | "size": "md", |
| | | "horizontal": { |
| | | "leftFixed": "lg" |
| | | }, |
| | | "source": { |
| | | "url": "/coursePackage/querySite", |
| | | "method": "post", |
| | | "messages": { |
| | | }, |
| | | "data": { |
| | | "storeId": "$store" |
| | | }, |
| | | "dataType": "form" |
| | | }, |
| | | "labelField": "name", |
| | | "valueField": "id" |
| | | }, |
| | | { |
| | | "type": "tpl", |
| | | "tpl": "设备ID:", |
| | | "inline": true, |
| | | "wrapperComponent": "", |
| | | "id": "u:587781d5d181", |
| | | "style": { |
| | | "marginLeft": "0" |
| | | } |
| | | }, |
| | | { |
| | | "type": "input-text", |
| | | "label": "蓝色方", |
| | | "name": "blue", |
| | | "id": "u:a4dbdeb9165e", |
| | | "mode": "inline", |
| | | "size": "xs", |
| | | "horizontal": { |
| | | "leftFixed": "sm" |
| | | }, |
| | | "value": "" |
| | | }, |
| | | { |
| | | "type": "input-text", |
| | | "label": "红色方", |
| | | "name": "red", |
| | | "id": "u:b0544634a698", |
| | | "mode": "inline" |
| | | }, |
| | | { |
| | | "type": "tpl", |
| | | "tpl": "请编辑内容", |
| | | "inline": true, |
| | | "wrapperComponent": "", |
| | | "id": "u:89c3a95a6721" |
| | | }, |
| | | { |
| | | "type": "button", |
| | | "label": "按钮", |
| | | "onEvent": { |
| | | "click": { |
| | | "actions": [ |
| | | { |
| | | "componentId": "u:24af29be25d2", |
| | | "actionType": "submit" |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | "id": "u:b96a47957f17" |
| | | }, |
| | | { |
| | | "type": "divider", |
| | | "id": "u:cc7161244b32" |
| | | }, |
| | | { |
| | | "type": "tpl", |
| | | "id": "u:89c3a95a6721", |
| | | "tpl": "游戏配置:", |
| | | "inline": true, |
| | | "wrapperComponent": "h2" |
| | | }, |
| | | { |
| | | "type": "container", |
| | | "body": [ |
| | | { |
| | | "type": "card", |
| | | "header": { |
| | | "title": "激战球场", |
| | | "subTitle": "副标题" |
| | | }, |
| | | "body": [ |
| | | { |
| | | "type": "input-image", |
| | | "label": "背景图:", |
| | | "name": "image", |
| | | "autoUpload": true, |
| | | "proxy": true, |
| | | "uploadType": "fileReceptor", |
| | | "imageClassName": "r w-full", |
| | | "receiver": { |
| | | "url": "object-upload://default", |
| | | "method": "post" |
| | | }, |
| | | "id": "u:824383a8e878", |
| | | "labelClassName": "text-dark" |
| | | }, |
| | | { |
| | | "type": "input-text", |
| | | "label": "游戏名称", |
| | | "name": "ciji", |
| | | "id": "u:a4dbdeb9115e", |
| | | "mode": "inline", |
| | | "labelClassName": "text-dark m-b", |
| | | "value": "激战球场" |
| | | }, |
| | | { |
| | | "type": "input-text", |
| | | "label": "玩派币", |
| | | "name": "cijiCoin", |
| | | "id": "u:99015dfd4264", |
| | | "mode": "inline", |
| | | "labelClassName": "text-dark m-b text-lg" |
| | | }, |
| | | { |
| | | "type": "input-text", |
| | | "label": "现金", |
| | | "name": "cijiCash", |
| | | "id": "u:31888fb92add", |
| | | "mode": "inline", |
| | | "labelClassName": "text-dark m-b text-lg" |
| | | }, |
| | | { |
| | | "type": "input-text", |
| | | "label": "积分", |
| | | "name": "cijiInt", |
| | | "id": "u:c42ab4593d20", |
| | | "mode": "inline", |
| | | "labelClassName": "text-dark m-b text-lg" |
| | | } |
| | | ], |
| | | "actions": [ |
| | | ], |
| | | "id": "u:8445330f451b" |
| | | } |
| | | ], |
| | | "style": { |
| | | "position": "static", |
| | | "display": "block", |
| | | "flexWrap": "nowrap", |
| | | "maxWidth": "300px", |
| | | "overflowX": "auto", |
| | | "margin": "0" |
| | | }, |
| | | "id": "u:08adb1dcf6b9", |
| | | "isFixedHeight": false, |
| | | "isFixedWidth": false |
| | | } |
| | | ], |
| | | "api": { |
| | | "url": "/ball/save", |
| | | "method": "post", |
| | | "messages": { |
| | | }, |
| | | "dataType": "json" |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | let amisScoped = amis.embed('#root', amisJSON); |
| | | |
| | | |
| | | })(); |
| | | |
| | | function test(){ |
| | | console.log("测试成功") |
| | | } |
| | | |
| | | var myButton = document.getElementById("ttt"); |
| | | myButton.addEventListener("click",test); |
| | | </script> |
| | | |
| | | </body> |
| | | </html> |
| | |
| | | @if(shiro.hasPermission("/coursePackage/examineCoursePackage")){ |
| | | <#button name="审核" icon="fa-plus" clickFun="ExamineCoursePackage.examineCoursePackage()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/coursePackage/detailsExamineCoursePackage")){ |
| | | <#button name="详情" icon="fa-check-circle" clickFun="ExamineCoursePackage.detailsExamineCoursePackage()" space="true"/> |
| | | @} |
| | | |
| | | </div> |
| | | <#table id="managerTable"/> |
| | | </div> |
| | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*审核状态:</label> |
| | | <div class="col-sm-8" style="margin-top: 6px;"> |
| | | <input name="auditStatus" type="radio" value="2"/> 通过 |
| | | <input name="auditStatus" type="radio" value="3"/> 拒绝 |
| | | <input name="auditStatus" type="radio" value="2" ${auditStatus == 2 ? 'checked' : ''}/> 通过 |
| | | <input name="auditStatus" type="radio" value="3" ${auditStatus == 3 ? 'checked':''}/> 拒绝 |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*拒绝理由:</label> |
| | | <div class="col-sm-8" style="margin-top: 6px;"> |
| | | <textarea id="authRemark" style="width: 100%;height: 200px;" placeholder="请输入拒绝理由"></textarea> |
| | | <textarea id="authRemark" style="width: 100%;height: 200px;" placeholder="请输入拒绝理由" >${authRemark!}</textarea> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | </div> |
| | | <div id="b1"> |
| | | <#input id="name" name="商品名称" type="text"/> |
| | | <div class="form-group" id="ticket" hidden> |
| | | <label class="col-sm-3 control-label">门票类型:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="radio" name="cardType" value="1" checked> 日卡 |
| | | <input type="radio" name="cardType" value="2"> 月卡 |
| | | <input type="radio" name="cardType" value="3" > 季卡 |
| | | <input type="radio" name="cardType" value="4" > 年卡 |
| | | </div> |
| | | </div> |
| | | <#input id="price" name="原价" type="text"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">兑换方式:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="radio" name="redemptionMethod" value="1" checked> 积分 |
| | | <input type="radio" name="redemptionMethod" value="2" > 现金+积分 |
| | | <input type="radio" name="redemptionMethod" value="3" > 现金 |
| | | <input type="radio" name="redemptionMethod" value="1" onclick="updateMethod(3)" checked> 积分 |
| | | <input type="radio" name="redemptionMethod" value="2" onclick="updateMethod(4)"> 现金+积分 |
| | | <input type="radio" name="redemptionMethod" value="3" onclick="updateMethod(5)"> 现金 |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | </div> |
| | | |
| | | <#avatar id="cover" name="商品封面" /> |
| | | <div class="row" id="app" style="margin-left: 225px;" > |
| | | <div class="col-sm-6"> |
| | | |
| | | <div class="row" id="app" > |
| | | <div class="col-sm-6" style="width: 100%"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">商品图片: </label> |
| | | <div class="col-sm-2" style="margin-top: 2%"> |
| | | <label class="col-sm-3 control-label" style="width: 15%;margin-left: 7%">*商品图片(请上传不超过五张图片): </label> |
| | | <div class="col-sm-2" style="width: 100%;margin-left: 12%;margin-top: 1%"> |
| | | <el-upload |
| | | :limit="5" |
| | | class="avatar-uploader" |
| | | action="/tCouponManage/uploadPic" |
| | | :on-success="handleAvatarSuccess" |
| | | list-type="picture-card" |
| | | accept=".jpg,.jpeg,.png,.JPG,.JPEG" |
| | | :on-remove="handleRemove" |
| | | :before-upload="beforeAvatarUpload"> |
| | | <img v-if="imageUrl" :src="imageUrl" class="avatar"> |
| | | <i v-else class="el-icon-plus avatar-uploader-icon"></i> |
| | | :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> |
| | | |
| | |
| | | <label class="col-sm-3">*适用范围: </label> |
| | | <div class="col-sm-2" id="belongsNationwide" > |
| | | <input class="col-sm-1" onclick="scopeOfApplication1()" name="company" type="radio" |
| | | value="0" checked style="margin-top: 10px"/> |
| | | value="1" checked style="margin-top: 10px"/> |
| | | <label class="col-sm-1" style="width: 38%;margin-top: 7px">全国通用</label> |
| | | </div> |
| | | <div class="col-sm-2" id="belongsCity" > |
| | | <input class="col-sm-1" name="company" onclick="scopeOfApplication2()" type="radio" |
| | | value="1" style="margin-top: 10px"/> |
| | | value="2" style="margin-top: 10px"/> |
| | | <label class="col-sm-1" style="width: 38%;margin-top: 7px">指定城市</label> |
| | | </div> |
| | | <div class="col-sm-2" id="belongsStore" > |
| | | <input class="col-sm-1" name="company" onclick="scopeOfApplication3()" type="radio" |
| | | value="1" style="margin-left: 4%;margin-top: 10px;width: 13px;height: 13px"/> |
| | | value="3" style="margin-left: 4%;margin-top: 10px;width: 13px;height: 13px"/> |
| | | <label class="col-sm-1" style="width: 38%;margin-top: 6px;">指定门店</label> |
| | | </div> |
| | | </div> |
| | |
| | | <option value="">请选择</option> |
| | | </select> |
| | | <label class="col-sm-1" style="width: 7%;margin-top: 7px">市</label> |
| | | <label name="addBranch" class="col-sm-1" onclick="TCarInfoDlg.addBranch()" style="border: 0px;cursor: pointer;margin-top: 1%"><i class="fa fa-plus-circle"></i></label> |
| | | <label name="addBranch" class="col-sm-1" onclick="TGoodsInfoDlg.addBranch()" style="border: 0px;cursor: pointer;margin-top: 1%"><i class="fa fa-plus-circle"></i></label> |
| | | </div> |
| | | <div id="cityDemo"></div> |
| | | </div> |
| | |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="pCode" name="pCode" onchange="TCarInfoDlg.oneChange(this)"> |
| | | <select class="form-control" id="pCode" name="pCode" onchange="TGoodsInfoDlg.oneChange(this)"> |
| | | <option value="">选择省</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="cCode" name="cCode"> |
| | | <select class="form-control" id="cCode" name="cCode" onchange="TGoodsInfoDlg.storeChange(this)"> |
| | | <option value="">选择市</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">所属门店:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="storeId" name="storeId"> |
| | | <option value="">选择门店</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">课包类型:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="coursePackageTypeId" name="pCode" onchange="TGoodsInfoDlg.packageChange(this)"> |
| | | <option value="">选择课包类型</option> |
| | | @for(obj in courseType){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">课包名称:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="coursePackageId" name="coursePackageId" onchange="TGoodsInfoDlg.timeChange(this)"> |
| | | <option value="">选择课包</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">课时数:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="coursePackageConfigId" name="coursePackageConfigId"> |
| | | <option value="">选择课时数</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">原价:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="price1" name="price" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">兑换方式:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="radio" name="redemptionMethod" value="1" checked onclick="updateMethod(1)" > 积分 |
| | | <input type="radio" name="redemptionMethod" value="2" onclick="updateMethod(2)"> 现金+积分 |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" id="y3" hidden> |
| | | <label class="col-sm-3 control-label">所需现金:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="cash1" name="cash" type="text"> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="y4"> |
| | | <label class="col-sm-3 control-label">所需积分:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="integral1" name="integral" type="text"> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <#avatar id="cover1" name="*商品封面" /> |
| | | <div class="row" id="app1" > |
| | | <div class="col-sm-6" style="width: 100%"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label" style="width: 15%;margin-left: 7%">*商品图片(请上传不超过五张图片): </label> |
| | | <div class="col-sm-2" style="width: 100%;margin-left: 12%;margin-top: 1%"> |
| | | <el-upload |
| | | :limit="5" |
| | | class="avatar-uploader" |
| | | action="/tCouponManage/uploadPic" |
| | | list-type="picture-card" |
| | | accept=".jpg,.jpeg,.png,.JPG,.JPEG" |
| | | :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> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">用户人群:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="radio" name="userPopulation" value="1" checked> 全部用户 |
| | | <input type="radio" name="userPopulation" value="2" > 年度会员 |
| | | <input type="radio" name="userPopulation" value="3" > 已有学员用户 |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">发放数量:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="quantityIssued1" name="quantityIssued" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">限领数量:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="pickUpQuantity1" name="pickUpQuantity" type="text"> |
| | | </div> |
| | | </div> |
| | | <#input id="startTime1" name="有效期" type="text"/> |
| | | |
| | | <div class="form-group" style="margin-left:262px"> |
| | | <label class="col-sm-1 control-label">兑换说明:</label> |
| | | <div class="col-sm-5"> |
| | | <textarea type="text/plain" id="editor1" style="height: 300px;width: 800px;"></textarea> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">排序:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="sort1" name="sort" type="text"> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TGoodsInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TGoodsInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <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 src="${ctxPath}/modular/system/tGoods/tGoods_info.js"></script> |
| | | <script src="${ctxPath}/modular/system/tGoods/TStoreInfo.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#startTime', |
| | | range: true |
| | | }); |
| | | laydate.render({ |
| | | elem: '#startTime1', |
| | | range: true |
| | | }); |
| | | function updateMethod(e) { |
| | | console.log(e) |
| | | if(e==1){ |
| | | $("#y3").hide() |
| | | $("#y4").show() |
| | | }else if(e==2){ |
| | | $("#y4").show() |
| | | $("#y3").show() |
| | | }else if(e==3){ |
| | | $("#y1").hide() |
| | | $("#y2").show() |
| | | }else if(e==4){ |
| | | $("#y1").show() |
| | | $("#y2").show() |
| | | }else if(e==5) { |
| | | $("#y2").hide() |
| | | $("#y1").show() |
| | | } |
| | | |
| | | } |
| | | let i =1; |
| | | function updateType(e) { |
| | | |
| | | if(e==2){ |
| | | $("#b1").hide() |
| | | $("#b2").show() |
| | | if(i==1){ |
| | | var drivingLicensePhoto = new $WebUpload("cover1"); |
| | | drivingLicensePhoto.setUploadBarId("progressBar"); |
| | | drivingLicensePhoto.init(); |
| | | i++; |
| | | } |
| | | $("#ticket").hide() |
| | | }else { |
| | | $("#b2 ").hide() |
| | | $("#b1").show() |
| | | $("#ticket").show() |
| | | } |
| | | } |
| | | |
| | |
| | | }, |
| | | methods: { |
| | | handleAvatarSuccess(res, file) { |
| | | TCarInfoDlg.goodsPicArray.push(file); |
| | | TGoodsInfoDlg.goodsPicArray.push(file); |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | const isLt2M = file.size / 1024 / 1024 < 10; |
| | |
| | | return isLt2M; |
| | | }, |
| | | handleRemove(file, fileList) { |
| | | couponInfoDlg.goodsPicArray = couponInfoDlg.goodsPicArray.filter(item => { |
| | | TGoodsInfoDlg.goodsPicArray = TGoodsInfoDlg.goodsPicArray.filter(item => { |
| | | return item.uid != file.uid; |
| | | }); |
| | | }, |
| | | }, |
| | | created() { |
| | | }, |
| | | }); |
| | | var vue2 = new Vue({ |
| | | el: '#app1', |
| | | data: { |
| | | autoUpload: true,//自动上传 |
| | | imageUrl1: '',//模型数据,用于上传图片完成后图片预览 |
| | | dialogVisible: false |
| | | }, |
| | | methods: { |
| | | handleAvatarSuccess(res, file) { |
| | | TGoodsInfoDlg.goodsPicArray1.push(file); |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | const isLt2M = file.size / 1024 / 1024 < 10; |
| | | if (!isLt2M) { |
| | | this.$message.error('上传图片大小不能超过 10MB!'); |
| | | } |
| | | return isLt2M; |
| | | }, |
| | | handleRemove(file, fileList) { |
| | | TGoodsInfoDlg.goodsPicArray = TGoodsInfoDlg.goodsPicArray.filter(item => { |
| | | return item.uid != file.uid; |
| | | }); |
| | | }, |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <style> |
| | | .avatar-uploader .el-upload { |
| | | border: 1px dashed #d9d9d9; |
| | | border-radius: 6px; |
| | | cursor: pointer; |
| | | position: relative; |
| | | height: 100px; |
| | | width: 100px; |
| | | overflow: hidden; |
| | | display: inline-block; |
| | | } |
| | | |
| | | .avatar-uploader .el-upload:hover { |
| | | border-color: #409eff; |
| | | } |
| | | |
| | | .avatar-uploader-icon { |
| | | font-size: 28px; |
| | | color: #8c939d; |
| | | width: 100px; |
| | | height: 100px; |
| | | line-height: 110px; |
| | | margin-top: 40px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .avatar { |
| | | width: 100px; |
| | | height: 100px; |
| | | display: block; |
| | | } |
| | | |
| | | .col-sm-12 { |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .col-sm-12 select { |
| | | height: 33px; |
| | | } |
| | | </style> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <div id="b1"> |
| | | <#input id="name" name="*商品名称:" type="text" value="${item.name}" readonly="true" /> |
| | | |
| | | <#input id="cover" name="*原价:" avatarImg="${item.price}" readonly="true" /> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label">*兑换方式:</label> |
| | | <div class="col-sm-4"> |
| | | @if(exchangeMethod == 1){ |
| | | <input class="col-sm-1 control-label" name="userGroup" type="radio" |
| | | value="1" checked style="margin-top: 10px" disabled/> |
| | | <label class="col-sm-1" style="margin-left: -15px;width: 16%;margin-top: 7px">全部用户</label> |
| | | <input class="col-sm-1 control-label" name="userGroup" type="radio" |
| | | value="2" style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px" disabled/> |
| | | <label class="col-sm-1" style="width: 16%;margin-top: 7px">年度会员</label> |
| | | <input class="col-sm-1 control-label" name="userGroup" type="radio" |
| | | value="3" style="margin-left: 4%;margin-top: 10px;width: 13px;height: 13px" disabled/> |
| | | <label class="col-sm-1" style="width: 18%;margin-top: 5px">已有学员用户</label> |
| | | @} |
| | | |
| | | @if(exchangeMethod == 2){ |
| | | <input class="col-sm-1 control-label" name="userGroup" type="radio" |
| | | value="1" style="margin-top: 10px" disabled/> |
| | | <label class="col-sm-1" style="margin-left: -15px;width: 16%;margin-top: 7px">全部用户</label> |
| | | <input class="col-sm-1 control-label" name="userGroup" type="radio" |
| | | value="2" checked style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px" disabled/> |
| | | <label class="col-sm-1" style="width: 16%;margin-top: 7px">年度会员</label> |
| | | <input class="col-sm-1 control-label" name="userGroup" type="radio" |
| | | value="3" style="margin-left: 4%;margin-top: 10px;width: 13px;height: 13px" disabled/> |
| | | <label class="col-sm-1" style="width: 18%;margin-top: 5px">已有学员用户</label> |
| | | @} |
| | | |
| | | @if(exchangeMethod == 3){ |
| | | <input class="col-sm-1 control-label" name="userGroup" type="radio" |
| | | value="1" style="margin-top: 10px" disabled/> |
| | | <label class="col-sm-1" style="margin-left: -15px;width: 16%;margin-top: 7px">全部用户</label> |
| | | <input class="col-sm-1 control-label" name="userGroup" type="radio" |
| | | value="2" style="margin-left: 5%;margin-top: 10px;width: 13px;height: 13px" disabled/> |
| | | <label class="col-sm-1" style="width: 16%;margin-top: 7px">年度会员</label> |
| | | <input class="col-sm-1 control-label" name="userGroup" type="radio" |
| | | value="3" checked style="margin-left: 4%;margin-top: 10px;width: 13px;height: 13px" disabled/> |
| | | <label class="col-sm-1" style="width: 18%;margin-top: 5px">已有学员用户</label> |
| | | @} |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <#input id="cover" name="*所需现金:" avatarImg="${item.cash}" readonly="true" /> |
| | | <#input id="cover" name="*所需积分:" avatarImg="${item.integral}" readonly="true" /> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label">*商品封面:</label> |
| | | <div class="col-sm-4"> |
| | | <img height="100px" width="100px" src="${item.cover}"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label">*商品图片:</label> |
| | | <div class="col-sm-4"> |
| | | @if(pictures != null){ |
| | | @for(im in pictures){ |
| | | <img height="100px" width="100px" src="${im}"> |
| | | @} |
| | | @} |
| | | </div> |
| | | </div> |
| | | |
| | | <#input id="quantityIssued" name="*用户人群:" type="text" value="${item.userPopulation}" readonly="true" /> |
| | | <#input id="quantityIssued" name="*发放数量:" type="text" value="${item.quantityIssued}" readonly="true" /> |
| | | <#input id="quantityIssued" name="*限领数量:" type="text" value="${item.pickUpQuantity}" readonly="true" /> |
| | | <#input id="quantityIssued" name="*已兑换数量:" type="text" value="${item.hasPicked}" readonly="true" /> |
| | | <#input id="quantityIssued" name="*有效期:" type="text" value="${item.validTime}" readonly="true" /> |
| | | |
| | | <#input id="quantityIssued" name="*兑换地点:" type="text" value="${item.exchangeArea}" readonly="true" /> |
| | | |
| | | @if(item.useScope == 2){ |
| | | <table class="table table-bordered" style="width: 70%;margin-left: 228px;" > |
| | | <thead> |
| | | <tr> |
| | | <td>所在省市</td> |
| | | <td>所属账号</td> |
| | | <td>门店名称</td> |
| | | </tr> |
| | | </thead> |
| | | @for(s in store){ |
| | | <td>${s.num1}</td> |
| | | <td>${s.num2}</td> |
| | | <td>${s.num3}</td> |
| | | @} |
| | | </table> |
| | | @} |
| | | |
| | | @if(item.useScope == 3){ |
| | | <table class="table table-bordered" style="width: 70%;margin-left: 228px;" > |
| | | <thead> |
| | | <tr> |
| | | <td>所在省市</td> |
| | | <td>所属账号</td> |
| | | <td>门店名称</td> |
| | | </tr> |
| | | </thead> |
| | | @for(c in city){ |
| | | <td>${c.num1}</td> |
| | | <td>${c.num2}</td> |
| | | @} |
| | | </table> |
| | | @} |
| | | <div class="form-group" style="margin-left:262px"> |
| | | <label class="col-sm-3 control-label">兑换说明:</label> |
| | | <div class="col-sm-4"> |
| | | <textarea type="text/plain" id="editor" style="height: 300px;width: 800px;" readonly>${item.redemptionInstructions}</textarea> |
| | | </div> |
| | | </div> |
| | | <#input id="quantityIssued" name="*排序:" type="text" value="${item.sort}" readonly="true" /> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="danger" name="关闭" id="cancel" icon="fa-eraser" clickFun="TGoodsInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <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 src="${ctxPath}/modular/system/tGoods/tGoods_info.js"></script> |
| | | <script> |
| | | var vue2 = new Vue({ |
| | | el: '#app', |
| | | data: { |
| | | autoUpload: true,//自动上传 |
| | | imageUrl1: '',//模型数据,用于上传图片完成后图片预览 |
| | | dialogVisible: false |
| | | }, |
| | | methods: { |
| | | handleAvatarSuccess(res, file) { |
| | | TGoodsInfoDlg.goodsPicArray.push(file.response); |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | const isLt2M = file.size / 1024 / 1024 < 10; |
| | | if (!isLt2M) { |
| | | this.$message.error('上传图片大小不能超过 10MB!'); |
| | | } |
| | | return isLt2M; |
| | | }, |
| | | handleRemove(file, fileList) { |
| | | TGoodsInfoDlg.goodsPicArray = TGoodsInfoDlg.goodsPicArray.filter(item => { |
| | | return item.uid != file.uid; |
| | | }); |
| | | }, |
| | | }, |
| | | created() { |
| | | }, |
| | | }); |
| | | </script> |
| | | @} |
| | |
| | | height: 100px; |
| | | width: 100px; |
| | | overflow: hidden; |
| | | display: inline-block; |
| | | } |
| | | |
| | | .avatar-uploader .el-upload:hover { |
| | |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <div id="b1"> |
| | | |
| | | <input id="goodsId" value="${id}" hidden="hidden"> |
| | | <#input id="name" name="商品名称" type="text" value="${item.name}" readonly="true" /> |
| | | |
| | | <#avatar id="cover" name="商品封面:" avatarImg="${item.cover}" /> |
| | |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">商品图片(请上传不超过五张图片): </label> |
| | | <div class="col-sm-2" style="width: 100%;margin-left: 12%;margin-top: 1%"> |
| | | <div class="col-sm-2" style="width: 100%;margin-left: 24%;margin-top: 1%"> |
| | | <div class="avatar-uploader" style="display: flex;"> |
| | | @for(im in pictures){ |
| | | <div style="margin-right: 16px;position: relative"> |
| | | <img height="100px" width="100px" src="${im}"> |
| | | <i class="el-icon-delete" onclick="delImg(this)" style="color: red;font-size: 18px;position: absolute;left: 0;right: 0;top: 0;bottom: 0"></i> |
| | | </div> |
| | | @} |
| | | <el-upload |
| | | :limit="5" |
| | | class="avatar-uploader" |
| | |
| | | :on-remove="handleRemove"> |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | | <el-dialog :visible.sync="dialogVisible"> |
| | | <!-- <img width="100%" :src="imageUrl1" alt="">--> |
| | | @for(im in pictures){ |
| | | <img width="100%" src="${im}"> |
| | | @} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">发放数量:</label> |
| | | <div class="col-sm-9"> |
| | |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TGoodsInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TGoodsInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | }, |
| | | methods: { |
| | | handleAvatarSuccess(res, file) { |
| | | TCarInfoDlg.goodsPicArray.push(file); |
| | | TGoodsInfoDlg.goodsPicArray.push(file.response); |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | const isLt2M = file.size / 1024 / 1024 < 10; |
| | |
| | | return isLt2M; |
| | | }, |
| | | handleRemove(file, fileList) { |
| | | TCarInfoDlg.goodsPicArray = TCarInfoDlg.goodsPicArray.filter(item => { |
| | | TGoodsInfoDlg.goodsPicArray = TGoodsInfoDlg.goodsPicArray.filter(item => { |
| | | return item.uid != file.uid; |
| | | }); |
| | | }, |
| | |
| | | "body": [ |
| | | { |
| | | "type": "form", |
| | | "title": "表单", |
| | | "hidden": true, |
| | | "id": "u:285d560cf7ab", |
| | | "title": "表单1", |
| | | "body": [ |
| | | { |
| | | "label": "文本", |
| | | "type": "input-text", |
| | | "name": "id", |
| | | "id": "u:99d3d8869d55" |
| | | "id": "u:99d3d8869d55", |
| | | "hidden": true |
| | | }, |
| | | { |
| | | "label": "文本", |
| | | "type": "input-text", |
| | | "name": "ids", |
| | | "id": "u:5b12dc7c90" |
| | | "id": "u:5b12dc7c90", |
| | | "hidden": true |
| | | } |
| | | ], |
| | | "api": { |
| | |
| | | "method": "post", |
| | | "requestAdaptor": "", |
| | | "adaptor": "", |
| | | "messages": {}, |
| | | "messages": { |
| | | }, |
| | | "dataType": "form" |
| | | }, |
| | | "id": "u:285d560cf7ab" |
| | | "actions": [ |
| | | ], |
| | | "wrapWithPanel": false, |
| | | "visible": true |
| | | }, |
| | | { |
| | | "type": "property", |
| | |
| | | "url": "/tStudent/backmoney", |
| | | "params": { |
| | | "ids": "$ids", |
| | | "id": "$id" |
| | | "id": "$studentId" |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var TStudent = { |
| | | id: "TStudentTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TStudent.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '所属运营商', field: 'operation', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '省', field: 'province', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '市', field: 'city', visible: true, align: 'center', valign: 'middle'}, |
| | | { title: '门店名称', field: 'store', visible: true, align: 'center', valign: 'middle'}, |
| | | { title: '所属场地', field: 'site', visible: true, align: 'center', valign: 'middle'}, |
| | | { title: '设备ID', field: 'blue', visible: true, align: 'center', valign: 'middle'}, |
| | | { title: '设备类型', field: 'red', visible: true, align: 'center', valign: 'middle'}, |
| | | { title: '设备类型', field: 'red', visible: true, align: 'center', valign: 'middle'}, |
| | | { title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle'} |
| | | |
| | | |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TStudent.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TStudent.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | | TStudent.openAddTStudent = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/ball/pre_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开修改 |
| | | */ |
| | | TStudent.openTStudentDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tStudent/tStudent_update/' + TStudent.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 打开详情 |
| | | */ |
| | | TStudent.openTStudentDetail1 = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tStudent/tStudent_info/' + TStudent.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | TStudent.delete = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tStudent/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | TStudent.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tStudentId",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TStudent.search = function () { |
| | | var queryData = {}; |
| | | queryData['provinceCode'] = $("#pCode").val(); |
| | | queryData['cityCode'] = $("#cCode").val(); |
| | | queryData['store'] = $("#store").val(); |
| | | queryData['site'] = $("#site").val(); |
| | | |
| | | |
| | | TStudent.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TStudent.initColumn(); |
| | | var table = new BSTable(TStudent.id, "/ball/list", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TStudent.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 用户详情对话框(可用于添加和修改对话框) |
| | | */ |
| | | var CoursePackageInfo = { |
| | | userInfoData: {}, |
| | | }; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | CoursePackageInfo.close = function () { |
| | | parent.layer.close(window.parent.CoursePackage.layerIndex); |
| | | }; |
| | | |
| | | |
| | | CoursePackageInfo.openDia = function (i) { |
| | | |
| | | let index = layer.open({ |
| | | type: 2, |
| | | title: '编辑', |
| | | area: ['80%', '80%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/coursePackage/conpun/'+i |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | CoursePackageInfo.openDia1 = function (i) { |
| | | var ids = $("#counpons"+i).val() |
| | | |
| | | console.log($("#counpons"+i).val()) |
| | | let index = layer.open({ |
| | | type: 2, |
| | | title: '编辑', |
| | | area: ['80%', '80%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/coursePackage/conpun1'+'/'+i+'?conpunids='+ids |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | /** |
| | | * 提交添加用户 |
| | | */ |
| | | CoursePackageInfo.addSubmit = function () { |
| | | let province = $('#provinceCode option:checked').text(); |
| | | let provinceCode = $('#provinceCode').val(); |
| | | let city = $('#cityCode option:checked').text(); |
| | | let cityCode = $('#cityCode').val(); |
| | | let storeId = $('#storeId').val(); |
| | | let coursePackageTypeId = $('#coursePackageTypeId').val(); |
| | | let name = $('#name').val(); |
| | | let siteId = $('#siteId').val(); |
| | | let coachId = $('#coachId').val(); |
| | | let maxSubscribeNumber = $('#maxSubscribeNumber').val(); |
| | | let codeTime = $('#codeTime').val(); |
| | | let type = $('#type').val(); |
| | | let holitime = $('#holitime').val(); |
| | | |
| | | |
| | | // let classStartTime = JSON.stringify($('#classStartTime').val()); |
| | | |
| | | |
| | | var inputElements = document.querySelectorAll('input[name="classStartTime"]'); |
| | | let classStartTime = JSON.stringify(Array.from(inputElements).map(function(element) { |
| | | return element.value; |
| | | })) |
| | | |
| | | let classWeeks = ''; |
| | | $('input[name="classWeeks"]:checked').each(function (index, e) { |
| | | classWeeks += $(e).val() + ";"; |
| | | }) |
| | | let coverDrawing = $('#coverDrawing').val(); |
| | | let detailDrawing = $('#detailDrawing').val(); |
| | | let introduceDrawing = $('#introduceDrawing').val(); |
| | | let sort = $('#sort').val(); |
| | | let validDays = $('#validDays').val(); |
| | | let price = []; |
| | | $('#price > .form-group').each(function (i, e) { |
| | | let classHours = $($(e).find(".classNumber_span input[class='classNumber']")[0]).val(); |
| | | let cash = $($(e).find(".cash_span input[class='cash']")[0]).val(); |
| | | let paiCoin = $($(e).find(".paiCoin_span input[class='paiCoin']")[0]).val(); |
| | | let counpons = $($(e).find(".counpons")).val(); |
| | | price.push({ |
| | | classHours: classHours, |
| | | cashPayment: typeof cash == "undefined" ? 0 : cash, |
| | | playPaiCoin: typeof paiCoin == "undefined" ? 0 : paiCoin, |
| | | couponIds: typeof counpons == "undefined" ? 0 : counpons |
| | | }); |
| | | }); |
| | | if(null == provinceCode || '' == provinceCode){ |
| | | Feng.error("所在省不能为空"); |
| | | return |
| | | } |
| | | if(null == cityCode || '' == cityCode){ |
| | | Feng.error("所在市不能为空"); |
| | | return |
| | | } |
| | | if(null == storeId || '' == storeId){ |
| | | Feng.error("所属门店不能为空"); |
| | | return |
| | | } |
| | | if(null == coursePackageTypeId || '' == coursePackageTypeId){ |
| | | Feng.error("课程类型不能为空"); |
| | | return |
| | | } |
| | | if(null == name || '' == name){ |
| | | Feng.error("课包名称不能为空"); |
| | | return |
| | | } |
| | | if(null == siteId || '' == siteId){ |
| | | Feng.error("上课场地不能为空"); |
| | | return |
| | | } |
| | | if(null == coachId || '' == coachId){ |
| | | Feng.error("授课教师不能为空"); |
| | | return |
| | | } |
| | | // if(null == maxSubscribeNumber || '' == maxSubscribeNumber){ |
| | | // Feng.error("最多预约人数不能为空"); |
| | | // return |
| | | // } |
| | | // if(null == codeTime || '' == codeTime){ |
| | | // Feng.error("扣除课时数不能为空不能为空"); |
| | | // return |
| | | // } |
| | | // if(null == classStartTime || '' == classStartTime){ |
| | | // Feng.error("上课时间不能为空"); |
| | | // return |
| | | // } |
| | | // if(null == classWeeks || '' == classWeeks){ |
| | | // Feng.error("上课时间不能为空"); |
| | | // return |
| | | // } |
| | | classWeeks = classWeeks.substring(0, classWeeks.length - 1); |
| | | |
| | | if(null == coverDrawing || '' == coverDrawing){ |
| | | Feng.error("课包封面不能为空"); |
| | | return |
| | | } |
| | | if(null == detailDrawing || '' == detailDrawing){ |
| | | Feng.error("详情页不能为空"); |
| | | return |
| | | } |
| | | if(null == introduceDrawing || '' == introduceDrawing){ |
| | | Feng.error("课包介绍不能为空"); |
| | | return |
| | | } |
| | | // if(null == validDays || '' == validDays){ |
| | | // Feng.error("课时有效期不能为空"); |
| | | // return |
| | | // } |
| | | |
| | | let obj = { |
| | | province: province, |
| | | provinceCode: provinceCode, |
| | | city: city, |
| | | cityCode: cityCode, |
| | | storeId: storeId, |
| | | coursePackageTypeId: coursePackageTypeId, |
| | | name: name, |
| | | siteId: siteId, |
| | | coachId: coachId, |
| | | maxSubscribeNumber: maxSubscribeNumber, |
| | | classStartTime: classStartTime, |
| | | codeTime:codeTime, |
| | | // classStartTime: classStartTime.split(" - ")[0], |
| | | // classEndTime: classStartTime.split(" - ")[1], |
| | | classWeeks: classWeeks, |
| | | coverDrawing: coverDrawing, |
| | | detailDrawing: detailDrawing, |
| | | introduceDrawing: introduceDrawing, |
| | | sort: sort, |
| | | validDays: validDays, |
| | | coursePackagePaymentConfig: JSON.stringify(price), |
| | | type:type, |
| | | holitime:holitime |
| | | } |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/coursePackage/addCoursePackage", function (data) { |
| | | if(data.code == 200){ |
| | | Feng.success("添加成功!"); |
| | | CoursePackageInfo.close(); |
| | | window.parent.CoursePackage.table.refresh(); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | | }, function (data) { |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(obj); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | CoursePackageInfo.editSubmit = function () { |
| | | let id = $('#id').val(); |
| | | let province = $('#provinceCode option:checked').text(); |
| | | let provinceCode = $('#provinceCode').val(); |
| | | let city = $('#cityCode option:checked').text(); |
| | | let cityCode = $('#cityCode').val(); |
| | | let storeId = $('#storeId').val(); |
| | | let coursePackageTypeId = $('#coursePackageTypeId').val(); |
| | | let name = $('#name').val(); |
| | | let siteId = $('#siteId').val(); |
| | | let coachId = $('#coachId').val(); |
| | | let maxSubscribeNumber = $('#maxSubscribeNumber').val(); |
| | | let codeTime = $('#codeTime').val(); |
| | | let type = $('#type').val(); |
| | | |
| | | let holitime = $('#holitime').val(); |
| | | |
| | | var inputElements = document.querySelectorAll('input[name="classStartTime"]'); |
| | | let classStartTime = JSON.stringify(Array.from(inputElements).map(function(element) { |
| | | return element.value; |
| | | })) |
| | | |
| | | // let classStartTime = $('#classStartTime').val(); |
| | | let classWeeks = ''; |
| | | $('input[name="classWeeks"]:checked').each(function (index, e) { |
| | | classWeeks += $(e).val() + ";"; |
| | | }) |
| | | let coverDrawing = $('#coverDrawing').val(); |
| | | let detailDrawing = $('#detailDrawing').val(); |
| | | let introduceDrawing = $('#introduceDrawing').val(); |
| | | let sort = $('#sort').val(); |
| | | let validDays = $('#validDays').val(); |
| | | // let counpons = $($(e).find(".counpons")).val(); |
| | | |
| | | let price = []; |
| | | $('#price>.form-group').each(function (i, e) { |
| | | let classHours = $($(e).find(".classNumber_span input[class='classNumber']")[0]).val(); |
| | | let cash = $($(e).find(".cash_span input[class='cash']")[0]).val(); |
| | | let paiCoin = $($(e).find(".paiCoin_span input[class='paiCoin']")[0]).val(); |
| | | let counpons = $($(e).find(".counpons")).val(); |
| | | |
| | | price.push({ |
| | | classHours: classHours, |
| | | cashPayment: typeof cash == "undefined" ? 0 : cash, |
| | | playPaiCoin: typeof paiCoin == "undefined" ? 0 : paiCoin, |
| | | couponIds: typeof counpons == "undefined" ? 0 : counpons |
| | | |
| | | }) |
| | | }); |
| | | if(null == provinceCode || '' == provinceCode){ |
| | | Feng.error("所在省不能为空"); |
| | | return |
| | | } |
| | | if(null == cityCode || '' == cityCode){ |
| | | Feng.error("所在市不能为空"); |
| | | return |
| | | } |
| | | if(null == storeId || '' == storeId){ |
| | | Feng.error("所属门店不能为空"); |
| | | return |
| | | } |
| | | if(null == coursePackageTypeId || '' == coursePackageTypeId){ |
| | | Feng.error("课程类型不能为空"); |
| | | return |
| | | } |
| | | if(null == name || '' == name){ |
| | | Feng.error("课包名称不能为空"); |
| | | return |
| | | } |
| | | if(null == siteId || '' == siteId){ |
| | | Feng.error("上课场地不能为空"); |
| | | return |
| | | } |
| | | if(null == coachId || '' == coachId){ |
| | | Feng.error("授课教师不能为空"); |
| | | return |
| | | } |
| | | // if(null == maxSubscribeNumber || '' == maxSubscribeNumber){ |
| | | // Feng.error("最多预约人数不能为空"); |
| | | // return |
| | | // } |
| | | // if(null == codeTime || '' == codeTime){ |
| | | // Feng.error("扣除课时不能为空"); |
| | | // return |
| | | // } |
| | | // if(null == classStartTime || '' == classStartTime){ |
| | | // Feng.error("上课时间不能为空"); |
| | | // return |
| | | // } |
| | | // if(null == classWeeks || '' == classWeeks){ |
| | | // Feng.error("周不能为空"); |
| | | // return |
| | | // } |
| | | classWeeks = classWeeks.substring(0, classWeeks.length - 1); |
| | | |
| | | if(null == coverDrawing || '' == coverDrawing){ |
| | | Feng.error("课包封面不能为空"); |
| | | return |
| | | } |
| | | if(null == detailDrawing || '' == detailDrawing){ |
| | | Feng.error("详情页不能为空"); |
| | | return |
| | | } |
| | | if(null == introduceDrawing || '' == introduceDrawing){ |
| | | Feng.error("课包介绍不能为空"); |
| | | return |
| | | } |
| | | // if(null == validDays || '' == validDays){ |
| | | // Feng.error("课时有效期不能为空"); |
| | | // return |
| | | // } |
| | | |
| | | let obj = { |
| | | id: id, |
| | | province: province, |
| | | provinceCode: provinceCode, |
| | | city: city, |
| | | cityCode: cityCode, |
| | | storeId: storeId, |
| | | coursePackageTypeId: coursePackageTypeId, |
| | | name: name, |
| | | siteId: siteId, |
| | | coachId: coachId, |
| | | maxSubscribeNumber: maxSubscribeNumber, |
| | | codeTime: codeTime, |
| | | type:type, |
| | | classStartTime: classStartTime, |
| | | // classEndTime: classStartTime.split(" - ")[1], |
| | | classWeeks: classWeeks, |
| | | coverDrawing: coverDrawing, |
| | | detailDrawing: detailDrawing, |
| | | introduceDrawing: introduceDrawing, |
| | | sort: sort, |
| | | validDays: validDays, |
| | | coursePackagePaymentConfig: JSON.stringify(price), |
| | | holitime:holitime |
| | | } |
| | | |
| | | console.log("======="+obj) |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/coursePackage/updateCoursePackage", function (data) { |
| | | if(data.code == 200){ |
| | | Feng.success("编辑成功!"); |
| | | CoursePackageInfo.close(); |
| | | window.parent.CoursePackage.table.refresh(); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | | }, function (data) { |
| | | Feng.error("编辑失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(obj); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | function queryStore() { |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/queryStore", function (data) { |
| | | let htmlStr = ''; |
| | | for (let i = 0; i < data.length; i++) { |
| | | htmlStr += '<option value="' + data[i].id + '">' + data[i].name + '</option>' |
| | | } |
| | | $('#storeId').html(htmlStr); |
| | | |
| | | querySite(); |
| | | }, function (data) { |
| | | Feng.error("获取失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("cityCode", $('#cityCode').val()); |
| | | ajax.start(); |
| | | } |
| | | |
| | | |
| | | |
| | | function querySite(){ |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/querySite", function (data) { |
| | | let htmlStr = ''; |
| | | for (let i = 0; i < data.length; i++) { |
| | | htmlStr += '<option value="' + data[i].id + '">' + data[i].name + '</option>' |
| | | } |
| | | $('#siteId').html(htmlStr); |
| | | }, function (data) { |
| | | Feng.error("获取失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("storeId", $('#storeId').val()); |
| | | ajax.start(); |
| | | } |
| | | |
| | | |
| | | function queryCoach(){ |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/queryCoach", function (data) { |
| | | let htmlStr = ''; |
| | | for (let i = 0; i < data.length; i++) { |
| | | htmlStr += '<option value="' + data[i].id + '">' + data[i].name + '</option>' |
| | | } |
| | | $('#coachId').html(htmlStr); |
| | | }, function (data) { |
| | | Feng.error("获取失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("cityCode", $('#cityCode').val()); |
| | | ajax.start(); |
| | | } |
| | | |
| | | |
| | | function addPrice(y){ |
| | | console.log("===="+y) |
| | | let cash = false; |
| | | let paiCoin = false; |
| | | $('input[name="payType"]:checked').each(function (index, e) { |
| | | let v = $(e).val(); |
| | | if(v == 1){ |
| | | cash = true; |
| | | } |
| | | if(v == 2){ |
| | | paiCoin = true; |
| | | } |
| | | }) |
| | | var i = $('#price > div').length+1 |
| | | let htmlStr = '' |
| | | |
| | | |
| | | if (y===1){ |
| | | |
| | | htmlStr += '<div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">*课时数:</label>\n' + |
| | | ' <div class="col-sm-8">\n' + |
| | | ' <span class="classNumber_span"><input class="classNumber" type="number" min="0" placeholder="请输入" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> </span> <span class="cash_span">\n'; |
| | | |
| | | } |
| | | if (y===2){ |
| | | |
| | | htmlStr += '<div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label"></label>\n' + |
| | | ' <div class="col-sm-8">\n' + |
| | | ' <span class="classNumber_span" hidden="hidden"><input class="classNumber" type="number" min="0" placeholder="请输入" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> </span> <span class="cash_span">\n'; |
| | | |
| | | } |
| | | '<div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">*课时数:</label>\n' + |
| | | ' <div class="col-sm-8">\n' + |
| | | ' <span class="classNumber_span"><input class="classNumber" type="number" min="0" placeholder="请输入" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> </span> <span class="cash_span">\n'; |
| | | if(cash){ |
| | | htmlStr += '现金支付:<input class="cash" type="number" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> ¥ \n'; |
| | | } |
| | | htmlStr += '</span> <span class="paiCoin_span">'; |
| | | if(paiCoin){ |
| | | htmlStr += '玩湃币支付:<input class="paiCoin" type="number" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> 币 \n'; |
| | | } |
| | | htmlStr += '<button type="button" class="btn btn-info " onclick="CoursePackageInfo.openDia('+i+')" id="ensure">\n' + |
| | | ' <i class="fa fa-check"></i> 优惠卷\n' + |
| | | '</button>'; |
| | | |
| | | htmlStr += '</span> <i class="fa fa-trash-o" style="font-size:24px" onclick="removePrice(this)"></i>\n' + |
| | | '</div>\n' +'<input type="text" hidden="hidden" class = "counpons" id = "counpons'+i+'" >'+i+ |
| | | '</div>'; |
| | | $('#price').append(htmlStr); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | function removePrice(e){ |
| | | $(e).parent('div').parent('div').remove(); |
| | | } |
| | | |
| | | function removePrice1(e){ |
| | | $(e).parent('div').remove(); |
| | | } |
| | | |
| | | |
| | | |
| | | $(function () { |
| | | $('#provinceCode').change(function () { |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/queryCity", function (data) { |
| | | let htmlStr = ''; |
| | | for (let i = 0; i < data.length; i++) { |
| | | htmlStr += '<option value="' + data[i].code + '">' + data[i].name + '</option>' |
| | | } |
| | | $('#cityCode').html(htmlStr); |
| | | |
| | | queryStore(); |
| | | queryCoach(); |
| | | }, function (data) { |
| | | Feng.error("获取失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("code", $(this).val()); |
| | | ajax.start(); |
| | | }) |
| | | |
| | | |
| | | $('#cityCode').change(function () { |
| | | queryStore(); |
| | | }) |
| | | |
| | | |
| | | $('#storeId').change(function () { |
| | | querySite(); |
| | | }) |
| | | |
| | | $('input[name="payType"]').click(function () { |
| | | $('input[name="payType"]').each(function (index, e) { |
| | | let v = $(e).val(); |
| | | if(v == 1) { |
| | | if (e.checked) { |
| | | $('span[class="cash_span"]').each(function (index, e) { |
| | | $(e).html('现金支付:<input class="cash" type="number" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> ¥ '); |
| | | }) |
| | | } else { |
| | | $('span[class="cash_span"]').each(function (index, e) { |
| | | $(e).html(''); |
| | | }) |
| | | } |
| | | } |
| | | |
| | | if(v == 2){ |
| | | if (e.checked) { |
| | | $('span[class="paiCoin_span"]').each(function (index, e) { |
| | | $(e).html('玩湃币支付:<input class="paiCoin" type="number" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"> 币 ') |
| | | }) |
| | | } else { |
| | | $('span[class="paiCoin_span"]').each(function (index, e) { |
| | | $(e).html(''); |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | |
| | | }); |
| | |
| | | if(res.code == 200){ |
| | | Feng.success("保存成功!"); |
| | | layer.closeAll(); |
| | | RegistrationRecord.table.refresh(); |
| | | ClassRecord.table.refresh(); |
| | | }else{ |
| | | Feng.error(res.msg); |
| | | } |
| | |
| | | }, |
| | | {title: '到课状态', field: 'signInOrNot', align: 'center', valign: 'middle', |
| | | formatter: function (v, row) { |
| | | if (row.reservationStatus === 0) { |
| | | if (row.signInOrNot === 2) { |
| | | return '请假'; |
| | | } else { |
| | | switch (v) { |
| | |
| | | Feng.error("请选择审核结果"); |
| | | return |
| | | } |
| | | let authRemark = $('#authRemark').text(); |
| | | |
| | | let authRemark = $('#authRemark').val(); |
| | | console.log("========="+authRemark) |
| | | |
| | | |
| | | if(3 == auditStatus && '' == authRemark){ |
| | | Feng.error("请输入拒绝理由"); |
| | | return |
| | |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title:'编辑', |
| | | title:'详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tGoods/tCity_update/' + TPointProducts.seItem.id |
| | | content: Feng.ctxPath + '/tGoods/goods_info/' + TPointProducts.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | |
| | | * 初始化车辆管理详情对话框 |
| | | */ |
| | | var language=1; |
| | | var TCarInfoDlg = { |
| | | tCarInfoData : {}, |
| | | var TGoodsInfoDlg = { |
| | | tGoodsInfoData : {}, |
| | | validateFields: { |
| | | }, |
| | | goodsPicArray:[], |
| | | goodsPicArray1:[], |
| | | storeIds: [], |
| | | |
| | | }; |
| | |
| | | /** |
| | | * 验证数据是否为空 |
| | | */ |
| | | TCarInfoDlg.validate = function () { |
| | | TGoodsInfoDlg.validate = function () { |
| | | $('#carInfoForm').data("bootstrapValidator").resetForm(); |
| | | $('#carInfoForm').bootstrapValidator('validate'); |
| | | return $("#carInfoForm").data('bootstrapValidator').isValid(); |
| | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TCarInfoDlg.clearData = function() { |
| | | this.tCarInfoData = {}; |
| | | TGoodsInfoDlg.clearData = function() { |
| | | this.tGoodsInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TCarInfoDlg.set = function(key, val) { |
| | | this.tCarInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | TGoodsInfoDlg.set = function(key, val) { |
| | | this.tGoodsInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TCarInfoDlg.get = function(key) { |
| | | TGoodsInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TCarInfoDlg.close = function() { |
| | | TGoodsInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.TPointProducts.layerIndex); |
| | | } |
| | | |
| | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TCarInfoDlg.collectData = function() { |
| | | TGoodsInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('isPlatCar') |
| | |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | // 门票管理页面的门店列表展示 |
| | | function storeList1(){ |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '门店列表', |
| | | area: ['80%', '80%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tCouponManage/storeList' |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | TCarInfoDlg.selecUserOpt = function (arrays){ |
| | | console.log(arrays) |
| | | //获取所有的值 |
| | |
| | | console.log(e); |
| | | var row = $(e).closest('tr'); |
| | | var value = row.find('#id').val(); |
| | | TCarInfoDlg.storeIds.splice(TCarInfoDlg.storeIds.indexOf(parseInt(value)), 1) |
| | | TGoodsInfoDlg.storeIds.splice(TGoodsInfoDlg.storeIds.indexOf(parseInt(value)), 1) |
| | | $(e).parent().parent().remove(); |
| | | console.log('storeIds',TCarInfoDlg.storeIds) |
| | | console.log('storeIds',TGoodsInfoDlg.storeIds) |
| | | } |
| | | TCarInfoDlg.delete = function (o) { |
| | | TGoodsInfoDlg.delete = function (o) { |
| | | $(o).parent("div").remove() |
| | | } |
| | | var num = 0; |
| | | TCarInfoDlg.addBranch = function () { |
| | | TGoodsInfoDlg.addBranch = function () { |
| | | num=num+1; |
| | | var a= ""; |
| | | a = "<div style=\'margin-left: 25%\' class=\"col-sm-9 control-label\">\n" + |
| | |
| | | " <option value=\"\">请选择</option>\n" + |
| | | " </select>\n" + |
| | | " <label class=\"col-sm-1\" style=\"width: 7%;margin-top: 7px\">市</label>\n" + |
| | | " <label name=\"addBranch\" class=\"col-sm-1\" onclick=\"TCarInfoDlg.delete(this)\" style=\"border: 0px;cursor: pointer;margin-top: 1%\"><i class=\"fa fa-trash\"></i></label>"+ |
| | | " <label name=\"addBranch\" class=\"col-sm-1\" onclick=\"TGoodsInfoDlg.delete(this)\" style=\"border: 0px;cursor: pointer;margin-top: 1%\"><i class=\"fa fa-trash\"></i></label>"+ |
| | | " </div>"; |
| | | $("#cityDemo").append($(a)); |
| | | getProvince(num); |
| | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TCarInfoDlg.addSubmit = function() { |
| | | TGoodsInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | |
| | | return ; |
| | | } |
| | | |
| | | let typeAll = document.querySelector('input[name="type"]:checked').value; |
| | | if(typeAll==2){ |
| | | let pCode = $("#pCode").val() |
| | | let cCode = $("#cCode").val() |
| | | let name = $("#name").val() |
| | | let phone = $("#phone").val() |
| | | |
| | | if(pCode==''){ |
| | | Feng.info("请选择省") |
| | | return; |
| | |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | if(name==''){ |
| | | Feng.info("管理员姓名不能为空") |
| | | let storeId = $("#storeId").val() |
| | | if(storeId==''){ |
| | | Feng.info("请选择门店") |
| | | return; |
| | | } |
| | | if(phone==''){ |
| | | Feng.info("管理员手机号不能为空") |
| | | let coursePackageTypeId = $("#coursePackageTypeId").val() |
| | | if(coursePackageTypeId==''){ |
| | | Feng.info("请选择课包类型") |
| | | return; |
| | | } |
| | | let coursePackageId = $("#coursePackageId").val() |
| | | if(coursePackageId==''){ |
| | | Feng.info("请选择课包") |
| | | return; |
| | | } |
| | | let coursePackageConfigId = $("#coursePackageConfigId").val() |
| | | if(coursePackageConfigId==''){ |
| | | Feng.info("请选择课时数") |
| | | return; |
| | | } |
| | | let price = $("#price1").val() |
| | | if(price==''){ |
| | | Feng.info("请填写原价") |
| | | return; |
| | | } |
| | | let type = document.querySelector('input[name="redemptionMethod"]:checked').value; |
| | | if(type==''){ |
| | | Feng.info("请选择兑换方式") |
| | | return; |
| | | } |
| | | let integral=''; |
| | | let cash=''; |
| | | if(type==1){ |
| | | integral = $("#integral1").val() |
| | | if(integral==''){ |
| | | Feng.info("请填写所需积分") |
| | | return; |
| | | } |
| | | } |
| | | if(type==2){ |
| | | integral = $("#integral1").val() |
| | | if(integral==''){ |
| | | Feng.info("请填写所需积分") |
| | | return; |
| | | } |
| | | cash = $("#cash1").val() |
| | | if(cash==''){ |
| | | Feng.info("请填写所需现金") |
| | | return; |
| | | } |
| | | } |
| | | |
| | | let cover1 = $("#cover1").val() |
| | | // if(cover1==''){ |
| | | // Feng.info("请上传封面") |
| | | // return; |
| | | // } |
| | | var goodImgs = this.goodsPicArray1; |
| | | var imgOne =""; |
| | | if(goodImgs.length==0){ |
| | | }else { |
| | | for (let i = 0; i <goodImgs.length; i++) { |
| | | if(i==goodImgs.length-1){ |
| | | imgOne += (goodImgs[i].response) |
| | | }else { |
| | | imgOne+=(goodImgs[i].response+",") |
| | | } |
| | | } |
| | | } |
| | | |
| | | let userPopulation = document.querySelector('input[name="userPopulation"]:checked').value; |
| | | if(userPopulation==''){ |
| | | Feng.info("请选择用户人群") |
| | | return; |
| | | } |
| | | |
| | | let quantityIssued = $("#quantityIssued1").val() |
| | | if(quantityIssued==''){ |
| | | Feng.info("请填写发放数量") |
| | | return; |
| | | } |
| | | let pickUpQuantity = $("#pickUpQuantity1").val() |
| | | if(pickUpQuantity==''){ |
| | | Feng.info("请填写限领数量") |
| | | return; |
| | | } |
| | | let startTime = $("#startTime1").val() |
| | | if(startTime==''){ |
| | | Feng.info("请选择有效期") |
| | | return; |
| | | } |
| | | let text = TGoodsInfoDlg.editor1.getContent(); |
| | | console.log(text) |
| | | if(text==""){ |
| | | Feng.info("请输入兑换说明") |
| | | return; |
| | | } |
| | | |
| | | let sort = $("#sort1").val() |
| | | if(sort==''){ |
| | | Feng.info("请填写排序") |
| | | return; |
| | | } |
| | | |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/add", function(data){ |
| | | var ajax = new $ax(Feng.ctxPath + "/tGoods/add", function(data){ |
| | | if(data=="5001"){ |
| | | Feng.error("改账号已经存在"); |
| | | }else |
| | |
| | | }else { |
| | | Feng.success("Sangat berhasil ditambah!"); |
| | | } |
| | | window.parent.TCompetition.table.refresh(); |
| | | TCarInfoDlg.close(); |
| | | window.parent.TPointProducts.table.refresh(); |
| | | TGoodsInfoDlg.close(); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("typeAll",typeAll); |
| | | ajax.set("provinceCode",pCode); |
| | | ajax.set("cityCode",cCode); |
| | | ajax.set("storeId",storeId); |
| | | ajax.set("coursePackageTypeId",coursePackageTypeId); |
| | | ajax.set("coursePackageId",coursePackageId); |
| | | ajax.set("coursePackageConfigId",coursePackageConfigId); |
| | | ajax.set("price",price); |
| | | ajax.set("type",type); |
| | | ajax.set("integral",integral); |
| | | ajax.set("cash",cash); |
| | | ajax.set("cover",cover1); |
| | | ajax.set("imgOne",imgOne); |
| | | ajax.set("userPopulation",userPopulation); |
| | | ajax.set("quantityIssued",quantityIssued); |
| | | ajax.set("pickUpQuantity",pickUpQuantity); |
| | | ajax.set("startTime",startTime); |
| | | ajax.set("text",text); |
| | | ajax.set("sort",sort); |
| | | ajax.start(); |
| | | |
| | | }else { |
| | | let name = $("#name").val() |
| | | if(name==''){ |
| | | Feng.info("请填写商品名称") |
| | | return; |
| | | } |
| | | let price = $("#price").val() |
| | | if(price==''){ |
| | | Feng.info("请填写原价") |
| | | return; |
| | | } |
| | | let type = document.querySelector('input[name="redemptionMethod"]:checked').value; |
| | | if(type==''){ |
| | | Feng.info("请选择兑换方式") |
| | | return; |
| | | } |
| | | |
| | | let integral=''; |
| | | let cash=''; |
| | | if(type==1){ |
| | | integral = $("#integral").val() |
| | | if(integral==''){ |
| | | Feng.info("请填写所需积分") |
| | | return; |
| | | } |
| | | } |
| | | if(type==2){ |
| | | integral = $("#integral").val() |
| | | if(integral==''){ |
| | | Feng.info("请填写所需积分") |
| | | return; |
| | | } |
| | | cash = $("#cash").val() |
| | | if(cash==''){ |
| | | Feng.info("请填写所需现金") |
| | | return; |
| | | } |
| | | } |
| | | if(type==3){ |
| | | cash = $("#cash").val() |
| | | if(cash==''){ |
| | | Feng.info("请填写所需现金") |
| | | return; |
| | | } |
| | | } |
| | | |
| | | let cover1 = $("#cover").val() |
| | | var goodImgs = this.goodsPicArray; |
| | | var imgOne =""; |
| | | if(goodImgs.length==0){ |
| | | }else { |
| | | for (let i = 0; i <goodImgs.length; i++) { |
| | | if(i==goodImgs.length-1){ |
| | | imgOne += (goodImgs[i].response) |
| | | }else { |
| | | imgOne+=(goodImgs[i].response+",") |
| | | } |
| | | } |
| | | } |
| | | |
| | | let userPopulation = document.querySelector('input[name="userPopulation"]:checked').value; |
| | | if(userPopulation==''){ |
| | | Feng.info("请选择用户人群") |
| | | return; |
| | | } |
| | | |
| | | let quantityIssued = $("#quantityIssued").val() |
| | | if(quantityIssued==''){ |
| | | Feng.info("请填写发放数量") |
| | | return; |
| | | } |
| | | let pickUpQuantity = $("#pickUpQuantity").val() |
| | | if(pickUpQuantity==''){ |
| | | Feng.info("请填写限领数量") |
| | | return; |
| | | } |
| | | let startTime = $("#startTime").val() |
| | | if(startTime==''){ |
| | | Feng.info("请选择有效期") |
| | | return; |
| | | } |
| | | |
| | | let company = document.querySelector('input[name="company"]:checked').value; |
| | | |
| | | var cityIds = []; |
| | | var cts = ""; |
| | | if (company === '2'){ |
| | | var myselect=document.getElementById('cityData'); |
| | | var seCity = myselect.options[myselect.selectedIndex].value; |
| | | if (seCity === null || seCity === undefined || seCity === ''){ |
| | | return Feng.error('请选中一个省市'); |
| | | } |
| | | cityIds.push(seCity); |
| | | if (num > 0){ |
| | | for (let i = 1; i <= num; i++) { |
| | | var insSelect=document.getElementById('cityData'+i); |
| | | var inData = insSelect.options[insSelect.selectedIndex].value; |
| | | if (inData !== undefined || inData !== null || inData !== ''){ |
| | | cityIds.push(inData); |
| | | } |
| | | } |
| | | cts = cityIds.join(','); |
| | | }else { |
| | | cts = cityIds |
| | | } |
| | | } |
| | | |
| | | const commaSeparatedString = this.goodsPicArray.join(','); |
| | | |
| | | var stores = ""; |
| | | if (company === '3'){ |
| | | console.log('3---this.storeIds',this.storeIds); |
| | | if (TGoodsInfoDlg.storeIds.length === 0 ){ |
| | | return Feng.error('请至少选择一个门店'); |
| | | } |
| | | stores = this.storeIds.join(','); |
| | | console.log('stores--===--',stores) |
| | | } |
| | | |
| | | let text = TGoodsInfoDlg.editor.getContent(); |
| | | console.log(text) |
| | | if(text==""){ |
| | | Feng.info("请输入兑换说明") |
| | | return; |
| | | } |
| | | |
| | | let sort = $("#sort").val() |
| | | if(sort==''){ |
| | | Feng.info("请填写排序") |
| | | return; |
| | | } |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tGoods/add", function(data){ |
| | | if(data=="5001"){ |
| | | Feng.error("改账号已经存在"); |
| | | }else |
| | | if(data.code == 200){ |
| | | if(language==1){ |
| | | Feng.success("添加成功!"); |
| | | }else if(language==2){ |
| | | Feng.success("Successfully added!"); |
| | | }else { |
| | | Feng.success("Sangat berhasil ditambah!"); |
| | | } |
| | | window.parent.TPointProducts.table.refresh(); |
| | | TGoodsInfoDlg.close(); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tCarInfoData); |
| | | ajax.set("provinceCode",pCode); |
| | | ajax.set("cityCode",cCode); |
| | | ajax.set("typeAll",typeAll); |
| | | ajax.set("name",name); |
| | | ajax.set("phone",phone); |
| | | ajax.set("price",price); |
| | | ajax.set("type",type); |
| | | ajax.set("integral",integral); |
| | | ajax.set("cash",cash); |
| | | ajax.set("cover",cover1); |
| | | ajax.set("imgOne",imgOne); |
| | | ajax.set("userPopulation",userPopulation); |
| | | ajax.set("quantityIssued",quantityIssued); |
| | | ajax.set("pickUpQuantity",pickUpQuantity); |
| | | ajax.set("startTime",startTime); |
| | | ajax.set("useScope",company); |
| | | ajax.set("cityIds",cts); |
| | | ajax.set("storeIds",stores); |
| | | ajax.set("text",text); |
| | | ajax.set("sort",sort); |
| | | ajax.set("cardType",document.querySelector('input[name="cardType"]:checked').value); |
| | | ajax.start(); |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 删除图片的函数 |
| | | * @param e |
| | | */ |
| | | function delImg(e){ |
| | | |
| | | $(e).parent().remove(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TCarInfoDlg.editSubmit = function() { |
| | | TGoodsInfoDlg.editSubmit = function() { |
| | | let cover = $("#cover").val(); |
| | | let goodsId = $("#goodsId").val(); |
| | | var productImages = ""; |
| | | if (TGoodsInfoDlg.goodsPicArray.length > 0){ |
| | | productImages = TGoodsInfoDlg.goodsPicArray.join(','); |
| | | } |
| | | let quantityIssued = $("#quantityIssued").val(); |
| | | let pickUpQuantity = $("#pickUpQuantity").val(); |
| | | let editor = jQuery.trim(TGoodsInfoDlg.editor.getContent()); |
| | | console.log('editor:',editor) |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | let pCode = $("#pCode").val() |
| | | let cCode = $("#cCode").val() |
| | | let name = $("#name").val() |
| | | let phone = $("#phone").val() |
| | | let sort = $("#sort").val(); |
| | | |
| | | if(pCode==''){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | if (quantityIssued === undefined || quantityIssued === null || quantityIssued === ''){ |
| | | return Feng.error('发放数量不能为空!'); |
| | | } |
| | | if(cCode==''){ |
| | | Feng.info("请选择市") |
| | | return; |
| | | if (pickUpQuantity === undefined || pickUpQuantity === null || pickUpQuantity === ''){ |
| | | return Feng.error('限领数量不能为空!'); |
| | | } |
| | | if(name==''){ |
| | | Feng.info("管理员姓名不能为空") |
| | | return; |
| | | let quantityHas = $("#quantityHas").val(); |
| | | if (quantityIssued <= quantityHas){ |
| | | return Feng.error('发放数量小于已领数量!'); |
| | | } |
| | | if(phone==''){ |
| | | Feng.info("管理员手机号不能为空") |
| | | return; |
| | | |
| | | |
| | | if (editor === undefined || editor === null || editor === ''){ |
| | | return Feng.error('兑换说明不能为空!'); |
| | | } |
| | | if (sort === undefined || sort === null || sort === ''){ |
| | | return Feng.error('排序不能为空!'); |
| | | } |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/update", function(data){ |
| | | if(data=="5001"){ |
| | | Feng.error("改账号已经存在"); |
| | | }else |
| | | if(data.code == 200){ |
| | | if(language==1){ |
| | | var ajax = new $ax(Feng.ctxPath + "/tGoods/update", function(data){ |
| | | Feng.success("修改成功!"); |
| | | }else if(language==2){ |
| | | Feng.success("Modify successfully!"); |
| | | }else { |
| | | Feng.success("Mengubah dengan sukses!"); |
| | | } |
| | | window.parent.TCompetition.table.refresh(); |
| | | TCarInfoDlg.close(); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | | window.parent.TPointProducts.table.refresh(); |
| | | TGoodsInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("provinceCode",pCode); |
| | | ajax.set("cityCode",cCode); |
| | | ajax.set("name",name); |
| | | ajax.set("phone",phone); |
| | | ajax.set("id",$("#id").val()); |
| | | ajax.set("pointMerchandiseId",goodsId); |
| | | ajax.set("quantityIssued",quantityIssued); |
| | | ajax.set("pickUpQuantity",pickUpQuantity); |
| | | ajax.set("redemptionInstructions",editor); |
| | | ajax.set("cover",cover); |
| | | ajax.set("productImages",productImages); |
| | | ajax.set("sort",sort); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | |
| | | getProvince(null); |
| | | Feng.initValidator("carInfoForm", TCarInfoDlg.validateFields); |
| | | Feng.initValidator("carInfoForm", TGoodsInfoDlg.validateFields); |
| | | // 初始化图片上传 |
| | | var carPhoto = new $WebUpload("cover"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | |
| | | var drivingLicensePhoto = new $WebUpload("drivingLicensePhoto"); |
| | | drivingLicensePhoto.setUploadBarId("progressBar"); |
| | | drivingLicensePhoto.init(); |
| | | TCarInfoDlg.editor = UE.getEditor('editor'); |
| | | var drivingLicensePhoto = new $WebUpload("drivingLicensePhoto"); |
| | | drivingLicensePhoto.setUploadBarId("progressBar"); |
| | | drivingLicensePhoto.init(); |
| | | TGoodsInfoDlg.editor = UE.getEditor('editor'); |
| | | TGoodsInfoDlg.editor1 = UE.getEditor('editor1'); |
| | | }); |
| | | |
| | | /** |
| | | * 选择分公司后执行 |
| | | */ |
| | | TCarInfoDlg.oneChange = function (e) { |
| | | TGoodsInfoDlg.oneChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/onChange", function(data){ |
| | | if(data!=null){ |
| | |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | TGoodsInfoDlg.storeChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/storeChange", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择门店</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#storeId").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | TGoodsInfoDlg.packageChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/packageChange", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择课包</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#coursePackageId").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | TGoodsInfoDlg.timeChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/timeChange", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择课时数</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.classHours+"</option>"; |
| | | }); |
| | | $("#coursePackageConfigId").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 类型改变执行 |
| | | * @param e |
| | | */ |
| | | TCarInfoDlg.companyTypeClick = function (e) { |
| | | TGoodsInfoDlg.companyTypeClick = function (e) { |
| | | if (1 == e){ |
| | | $(".companyDiv").hide(); |
| | | } else if (2 == e){ |
| | |
| | | /** |
| | | * 车辆品牌改变时执行 |
| | | */ |
| | | TCarInfoDlg.brandChange = function (e) { |
| | | TGoodsInfoDlg.brandChange = function (e) { |
| | | var carBrandId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCar/brandChange", function(data){ |
| | | if(data!=null){ |
| | |
| | | /** |
| | | * 专车服务被点击 |
| | | */ |
| | | TCarInfoDlg.zcServerClick = function () { |
| | | TGoodsInfoDlg.zcServerClick = function () { |
| | | var serverBox1 = $('#serverBox1').prop('checked'); |
| | | if (serverBox1){ |
| | | $("#zcModelDiv").show(); |
| | |
| | | /** |
| | | * 跨城服务被点击 |
| | | */ |
| | | TCarInfoDlg.kcServerClick = function () { |
| | | TGoodsInfoDlg.kcServerClick = function () { |
| | | var serverBox3 = $('#serverBox3').prop('checked'); |
| | | if (serverBox3){ |
| | | $("#kcModelDiv").show(); |
| | |
| | | {title: '联系方式', field: 'phone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '使用状态', field: 'status', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | return {1: "未使用", 2: "待核销"}[value] |
| | | return {1: "未使用", 2: "已核销"}[value] |
| | | } |
| | | }, |
| | | ]; |
| | |
| | | * @constructor |
| | | */ |
| | | TPayInfo.WriteOff = function (){ |
| | | if (this.check()) { |
| | | if (TPayInfo.check()) { |
| | | if (TPayInfo.seItem.status === 2){ |
| | | return Feng.error("重复核销!"); |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/tGoods/write_off", function (data) { |
| | | Feng.success("核销成功!"); |
| | | TPayInfo.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("核销失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",this.seItem.id); |
| | | ajax.set("id",TPayInfo.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.dsh.other.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.other.entity.*; |
| | | import com.dsh.other.feignclient.model.AdvertisementChangeStateDTO; |
| | | import com.dsh.other.feignclient.model.AdvertisementQuery; |
| | | import com.dsh.other.model.BannerVo; |
| | | import com.dsh.other.service.GameService; |
| | | import com.dsh.other.service.IBannerService; |
| | | import com.dsh.other.util.ResultUtil; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/7/11 17:48 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("") |
| | | public class BallController { |
| | | @Autowired |
| | | private GameService gameService; |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/student/webStudentList") |
| | | public List<Game> list(@RequestBody BallQueryDto ballQueryDto){ |
| | | List<Game> games = gameService.queryAll(ballQueryDto); |
| | | return games; |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/save") |
| | | public void save(@RequestBody Game game){ |
| | | |
| | | gameService.save(game); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.other.entity; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class BallQueryDto { |
| | | String provinceCode; |
| | | String cityCode; |
| | | String store; |
| | | String site; |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.other.entity; |
| | | |
| | | 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 lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_game") |
| | | public class Game { |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | @TableField("operationId") |
| | | private Integer operationId; |
| | | private String operation; |
| | | @TableField("province") |
| | | private String province; |
| | | @TableField("provinceCode") |
| | | private String provinceCode; |
| | | @TableField("city") |
| | | private String city; |
| | | @TableField("cityCode") |
| | | private String cityCode; |
| | | @TableField("storeId") |
| | | private Integer storeId; |
| | | private String store; |
| | | @TableField("siteId") |
| | | private Integer siteId; |
| | | |
| | | private String site; |
| | | @TableField("blue") |
| | | |
| | | private String blue; |
| | | @TableField("red") |
| | | |
| | | private String red; |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | |
| | | // 获取和设置方法 |
| | | } |
New file |
| | |
| | | package com.dsh.other.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.other.entity.BallQueryDto; |
| | | import com.dsh.other.entity.Game; |
| | | import com.dsh.other.entity.Notice; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 公告 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-07-03 |
| | | */ |
| | | public interface GameMapper extends BaseMapper<Game> { |
| | | |
| | | List<Game> queryAll(BallQueryDto ballQueryDto); |
| | | } |
New file |
| | |
| | | package com.dsh.other.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.other.entity.BallQueryDto; |
| | | import com.dsh.other.entity.Game; |
| | | import com.dsh.other.entity.Protocol; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/6/14 15:04 |
| | | */ |
| | | public interface GameService extends IService<Game> { |
| | | List<Game> queryAll(BallQueryDto ballQueryDto); |
| | | } |
New file |
| | |
| | | package com.dsh.other.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.other.entity.BallQueryDto; |
| | | import com.dsh.other.entity.Game; |
| | | import com.dsh.other.entity.Notice; |
| | | import com.dsh.other.mapper.GameMapper; |
| | | import com.dsh.other.mapper.NoticeMapper; |
| | | import com.dsh.other.service.GameService; |
| | | import com.dsh.other.service.NoticeService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 公告 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author jqs |
| | | * @since 2023-07-03 |
| | | */ |
| | | @Service |
| | | public class GameServiceImpl extends ServiceImpl<GameMapper, Game> implements GameService { |
| | | |
| | | @Override |
| | | public List<Game> queryAll(BallQueryDto ballQueryDto) { |
| | | return this.baseMapper.queryAll(ballQueryDto); |
| | | } |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dsh.other.mapper.GameMapper"> |
| | | |
| | | <select id="queryAll" resultType="com.dsh.other.entity.Game"> |
| | | SELECT |
| | | ga.*,st.`name` as store,op.`name` as operation,si.`name` as site |
| | | FROM |
| | | t_game ga |
| | | LEFT JOIN t_store st ON ga.storeId = st.id |
| | | LEFT JOIN t_operator op ON ga.operationId = op.id |
| | | LEFT JOIN t_site si on ga.siteId = si.id |
| | | <where> |
| | | <if test="provinceCode!=null and provinceCode!=''"> |
| | | ga.provinceCode = #{provinceCode} |
| | | |
| | | </if> |
| | | <if test="cityCode!=null and cityCode!=''"> |
| | | and ga.cityCode = #{cityCode} |
| | | |
| | | </if> |
| | | <if test="store!=null and store!=''"> |
| | | and st.`name` = #{store} |
| | | |
| | | </if> |
| | | <if test="site!=null and site!=''"> |
| | | and si.`name` = #{site} |
| | | |
| | | </if> |
| | | </where> |
| | | |
| | | |
| | | </select> |
| | | </mapper> |