From a02a6e0f7b7404e87b6347a5a7f33b431645634e Mon Sep 17 00:00:00 2001 From: nickchange <126672920+nickchange@users.noreply.github.com> Date: 星期三, 11 十月 2023 15:35:47 +0800 Subject: [PATCH] 10.12 --- cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java | 5 + cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java | 18 ++++ cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/CouponClient.java | 4 + .idea/workspace.xml | 61 +++++++++----- cloud-server-activity/src/main/java/com/dsh/activity/mapper/CouponMapper.java | 12 +++ cloud-server-activity/src/main/java/com/dsh/activity/service/ICouponService.java | 2 cloud-server-activity/src/main/java/com/dsh/activity/service/impl/CouponServiceImpl.java | 4 + cloud-server-activity/src/main/resources/mapper/CouponMapper.xml | 82 ++++++++++++++++++++ 8 files changed, 165 insertions(+), 23 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 4ab2004..80bdacc 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -25,10 +25,16 @@ <select /> </component> <component name="ChangeListManager"> - <list default="true" id="cb08d02f-fd4f-4fa2-85fe-abd508fa83ac" name="Default Changelist" comment="10.11"> + <list default="true" id="cb08d02f-fd4f-4fa2-85fe-abd508fa83ac" name="Default Changelist" comment="10.12"> + <change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/cloud-server-account/src/main/java/com/dsh/account/util/PayMoneyUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-account/src/main/java/com/dsh/account/util/PayMoneyUtil.java" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/cloud-server-other/src/main/java/com/dsh/other/util/PayMoneyUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-other/src/main/java/com/dsh/other/util/PayMoneyUtil.java" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/cloud-server-activity/src/main/java/com/dsh/activity/mapper/CouponMapper.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-activity/src/main/java/com/dsh/activity/mapper/CouponMapper.java" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/cloud-server-activity/src/main/java/com/dsh/activity/service/ICouponService.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-activity/src/main/java/com/dsh/activity/service/ICouponService.java" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/cloud-server-activity/src/main/java/com/dsh/activity/service/impl/CouponServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-activity/src/main/java/com/dsh/activity/service/impl/CouponServiceImpl.java" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/cloud-server-activity/src/main/resources/mapper/CouponMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-activity/src/main/resources/mapper/CouponMapper.xml" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/CouponClient.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/CouponClient.java" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java" afterDir="false" /> </list> <option name="SHOW_DIALOG" value="false" /> <option name="HIGHLIGHT_CONFLICTS" value="true" /> @@ -81,21 +87,21 @@ <option name="hideEmptyMiddlePackages" value="true" /> <option name="showLibraryContents" value="true" /> </component> - <component name="PropertiesComponent"><![CDATA[{ - "keyToString": { - "RequestMappingsPanelOrder0": "0", - "RequestMappingsPanelOrder1": "1", - "RequestMappingsPanelWidth0": "75", - "RequestMappingsPanelWidth1": "75", - "WebServerToolWindowFactoryState": "false", - "git-widget-placeholder": "master", - "node.js.detected.package.eslint": "true", - "node.js.selected.package.eslint": "(autodetect)", - "node.js.selected.package.tslint": "(autodetect)", - "settings.editor.selected.configurable": "inlay.hints", - "vue.rearranger.settings.migration": "true" + <component name="PropertiesComponent">{ + "keyToString": { + "RequestMappingsPanelOrder0": "0", + "RequestMappingsPanelOrder1": "1", + "RequestMappingsPanelWidth0": "75", + "RequestMappingsPanelWidth1": "75", + "WebServerToolWindowFactoryState": "false", + "git-widget-placeholder": "master", + "node.js.detected.package.eslint": "true", + "node.js.selected.package.eslint": "(autodetect)", + "node.js.selected.package.tslint": "(autodetect)", + "settings.editor.selected.configurable": "inlay.hints", + "vue.rearranger.settings.migration": "true" } -}]]></component> +}</component> <component name="ReactorSettings"> <option name="notificationShown" value="true" /> </component> @@ -246,8 +252,8 @@ </configuration> <list> <item itemvalue="JUnit.AccountApplicationTests.contextLoads" /> - <item itemvalue="Spring Boot.AccountApplication" /> <item itemvalue="Spring Boot.ManagementApplication" /> + <item itemvalue="Spring Boot.AccountApplication" /> <item itemvalue="Spring Boot.GatewayApplication" /> <item itemvalue="Spring Boot.OtherApplication" /> <item itemvalue="Spring Boot.ActivityApplication" /> @@ -349,7 +355,10 @@ <workItem from="1696847977356" duration="7435000" /> <workItem from="1696898972818" duration="19012000" /> <workItem from="1696992350781" duration="4934000" /> - <workItem from="1697004175378" duration="1809000" /> + <workItem from="1697004175378" duration="3253000" /> + <workItem from="1697007526233" duration="1089000" /> + <workItem from="1697008680148" duration="240000" /> + <workItem from="1697009049694" duration="612000" /> </task> <task id="LOCAL-00001" summary="后台代码删除"> <created>1690249807612</created> @@ -690,7 +699,15 @@ <option name="project" value="LOCAL" /> <updated>1696993684991</updated> </task> - <option name="localTasksCounter" value="45" /> + <task id="LOCAL-00045" summary="10.12"> + <option name="closed" value="true" /> + <created>1697006205900</created> + <option name="number" value="00045" /> + <option name="presentableId" value="LOCAL-00045" /> + <option name="project" value="LOCAL" /> + <updated>1697006205900</updated> + </task> + <option name="localTasksCounter" value="46" /> <servers /> </component> <component name="TypeScriptGeneratedFilesManager"> @@ -731,9 +748,9 @@ <MESSAGE value="9.26。15" /> <MESSAGE value="10.8" /> <MESSAGE value="10.8。1" /> - <MESSAGE value="10.12" /> <MESSAGE value="10.11" /> - <option name="LAST_COMMIT_MESSAGE" value="10.11" /> + <MESSAGE value="10.12" /> + <option name="LAST_COMMIT_MESSAGE" value="10.12" /> </component> <component name="XDebuggerManager"> <breakpoint-manager> diff --git a/cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java b/cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java index 4829342..e9a3473 100644 --- a/cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java +++ b/cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java @@ -238,6 +238,24 @@ return mapList; } + + @ResponseBody + @PostMapping("/base/coupon/queryCouponListSearch1") + public List<Map<String,Object>> getCouponListOfSearch1(@RequestBody CouponListOfSearch ofSearch){ + List<Map<String, Object>> mapList = couponService.queryCouponListOfSearch1(ofSearch); + if (mapList.size() > 0){ + for (Map<String, Object> stringObjectMap : mapList) { + Integer o = (Integer) stringObjectMap.get("id"); + Object startTime = stringObjectMap.get("startTime"); + Object endTime = stringObjectMap.get("endTime"); + stringObjectMap.put("timeValue",startTime + "至"+endTime); + int count = ucService.count(new LambdaQueryWrapper<UserCoupon>() + .eq(UserCoupon::getCouponId, o)); + stringObjectMap.put("hasPickQty",count); + } + } + return mapList; + } @ResponseBody @PostMapping("/base/coupon/couponExamineListSearch") public List<Map<String,Object>> getCouponExamineListOfSearch(@RequestBody CouponExamineListSearch ofSearch){ diff --git a/cloud-server-activity/src/main/java/com/dsh/activity/mapper/CouponMapper.java b/cloud-server-activity/src/main/java/com/dsh/activity/mapper/CouponMapper.java index 091436a..a9439b1 100644 --- a/cloud-server-activity/src/main/java/com/dsh/activity/mapper/CouponMapper.java +++ b/cloud-server-activity/src/main/java/com/dsh/activity/mapper/CouponMapper.java @@ -34,6 +34,18 @@ ); + List<Map<String, Object>> queryCouponListOfSearch1(@Param("name")String name, + @Param("type")Integer type, + @Param("distributionMethod")Integer distributionMethod, + @Param("userPopulation")Integer userPopulation, + @Param("status")Integer status, + @Param("state")Integer state, + @Param("page")Page<Map<String, Object>> page, + @Param("cityCode") String cityCode, + @Param("storeId")Integer storeId + + ); + List<Map<String, Object>> queryCouponExamineList(@Param("name")String name, @Param("type")Integer type, @Param("userPopulation") Integer userPopulation, diff --git a/cloud-server-activity/src/main/java/com/dsh/activity/service/ICouponService.java b/cloud-server-activity/src/main/java/com/dsh/activity/service/ICouponService.java index 3f7fcf6..28016ac 100644 --- a/cloud-server-activity/src/main/java/com/dsh/activity/service/ICouponService.java +++ b/cloud-server-activity/src/main/java/com/dsh/activity/service/ICouponService.java @@ -34,6 +34,8 @@ List<Map<String, Object>> queryCouponListOfSearch(CouponListOfSearch ofSearch); + List<Map<String, Object>> queryCouponListOfSearch1(CouponListOfSearch ofSearch); + List<Map<String, Object>> queryCouponExamineList(CouponExamineListSearch ofSearch); List<Map<String, Object>> listRecord(Page<Object> objectPage, Integer id, List<Integer> ids, Integer type); diff --git a/cloud-server-activity/src/main/java/com/dsh/activity/service/impl/CouponServiceImpl.java b/cloud-server-activity/src/main/java/com/dsh/activity/service/impl/CouponServiceImpl.java index 0377fd4..dc3b928 100644 --- a/cloud-server-activity/src/main/java/com/dsh/activity/service/impl/CouponServiceImpl.java +++ b/cloud-server-activity/src/main/java/com/dsh/activity/service/impl/CouponServiceImpl.java @@ -109,6 +109,10 @@ } @Override + public List<Map<String, Object>> queryCouponListOfSearch1(CouponListOfSearch ofSearch) { + return this.baseMapper.queryCouponListOfSearch1(ofSearch.getName(),ofSearch.getType(),ofSearch.getDistributionMethod(),ofSearch.getUserPopulation(),ofSearch.getStatus(),ofSearch.getState(),ofSearch.getPage(),ofSearch.getCityCode(),ofSearch.getStoreId()); + } + @Override public List<Map<String, Object>> queryCouponExamineList(CouponExamineListSearch ofSearch) { return this.baseMapper.queryCouponExamineList(ofSearch.getName(),ofSearch.getType(),ofSearch.getUserPopulation(),ofSearch.getDistributionMethod(),ofSearch.getAuditStatus(),ofSearch.getPage()); } diff --git a/cloud-server-activity/src/main/resources/mapper/CouponMapper.xml b/cloud-server-activity/src/main/resources/mapper/CouponMapper.xml index 91343f2..6a859aa 100644 --- a/cloud-server-activity/src/main/resources/mapper/CouponMapper.xml +++ b/cloud-server-activity/src/main/resources/mapper/CouponMapper.xml @@ -64,6 +64,88 @@ </if> order by insertTime desc </select> + <select id="queryCouponListOfSearch1" resultType="java.util.Map"> + SELECT id, + `name`, + useScope, + `type`, + distributionMethod, + date_format(startTime ,'%Y-%m-%d') as startTime, + date_format(endTime ,'%Y-%m-%d') as endTime, + userPopulation, + quantityIssued, + pickUpQuantity, + `status`, + state, + illustrate + from t_coupon + where 1 = 1 and distributionMethod = 4 + <if test="cityCode != null"> + and id in( + SELECT DISTINCT couponId FROM + + (SELECT DISTINCT couponId + from t_coupon_store + WHERE storeId = #{storeId} + UNION ALL + SELECT DISTINCT couponId + + from t_coupon_city + WHERE provinceCode = #{cityCode}) o) + </if> + <if test="name != null"> + and `name` like concat('%', #{name}, '%') + </if> + <if test="type != null"> + and type = #{type} + </if> + + <if test="userPopulation != null"> + and userPopulation = #{userPopulation} + </if> + <if test="status !=null"> + and `status` = #{status} + </if> + <if test="state != null"> + and `state` = #{state} + </if> + + + union all + SELECT id, + `name`, + useScope, + `type`, + distributionMethod, + date_format(startTime ,'%Y-%m-%d') as startTime, + date_format(endTime ,'%Y-%m-%d') as endTime, + userPopulation, + quantityIssued, + pickUpQuantity, + `status`, + state, + illustrate + from t_coupon + where 1 = 1 and distributionMethod = 4 and useScope = 1 + + <if test="name != null"> + and `name` like concat('%', #{name}, '%') + </if> + <if test="type != null"> + and type = #{type} + </if> + + <if test="userPopulation != null"> + and userPopulation = #{userPopulation} + </if> + <if test="status !=null"> + and `status` = #{status} + </if> + <if test="state != null"> + and `state` = #{state} + </if> + + </select> <select id="queryCouponExamineList" resultType="java.util.Map"> SELECT id, `name`, diff --git a/cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/CouponClient.java b/cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/CouponClient.java index e90d072..0490859 100644 --- a/cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/CouponClient.java +++ b/cloud-server-management/src/main/java/com/dsh/course/feignClient/activity/CouponClient.java @@ -18,6 +18,10 @@ List<Map<String,Object>> getCouponListOfSearch(@RequestBody CouponListOfSearch ofSearch); + @PostMapping("/base/coupon/queryCouponListSearch1") + List<Map<String,Object>> getCouponListOfSearch1(@RequestBody CouponListOfSearch ofSearch); + + @PostMapping("/base/coupon/couponExamineListSearch") List<Map<String,Object>> getCouponExamineListOfSearch(@RequestBody CouponExamineListSearch ofSearch); diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java index adc2a64..d205961 100644 --- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java +++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java @@ -236,8 +236,11 @@ ofSearch.setState(state); ofSearch.setCityCode(cityCode); ofSearch.setStoreId(storeId); - return client.getCouponListOfSearch(ofSearch); + return client.getCouponListOfSearch1(ofSearch); } + + + @RequestMapping(value = "/listRecord") @ResponseBody public Object listRecord(Integer id,String name, Integer type, String phone) { -- Gitblit v1.7.1