From 8da7ca5f5a5466c76b0d0abe23c7935e13e09136 Mon Sep 17 00:00:00 2001 From: yanghui <2536613402@qq.com> Date: 星期六, 26 十一月 2022 12:50:34 +0800 Subject: [PATCH] Merge branch 'local_20221104' into huacheng_test --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java | 17 ++++++++ springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientMerchantMapper.xml | 9 ++++ springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java | 8 ++++ springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/JWTAuthenticationTokenFilter.java | 1 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComShopFlowerOrderDAO.xml | 4 ++ springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ConvenientMerchantDAO.java | 20 +++++++++- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ConvenientMerchantService.java | 7 +++ springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ConvenientApi.java | 11 +++++ springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/LoginApi.java | 5 +- 9 files changed, 77 insertions(+), 5 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java index c127c81..6628d96 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java @@ -6580,6 +6580,14 @@ R<ConvenientMerchantVO> getUserMerchantInfoByAccount(@RequestParam("account") String account); /** + * 获取用户便民服务商家详情 + * @param account 商家绑定账号 + * @return + */ + @GetMapping("/convenient/getMerchantInfoByAccount") + R<ConvenientMerchantVO> getMerchantInfoByAccount(@RequestParam("account") String account); + + /** * 获取商便民服务商家信息 * @param userId * @return diff --git a/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/LoginApi.java b/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/LoginApi.java index 9f3a0c6..2c7caed 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/LoginApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/LoginApi.java @@ -160,13 +160,13 @@ } log.info("登录用户信息【{}】", loginBody); try { - R<ConvenientMerchantVO> merchant = communityService.getUserMerchantInfoByAccount(account); + R<ConvenientMerchantVO> merchant = communityService.getMerchantInfoByAccount(account); if (R.isOk(merchant)) { ConvenientMerchantVO merchantVO = JSONObject.parseObject(JSONObject.toJSONString(merchant.getData()), ConvenientMerchantVO.class); Boolean accountValid = merchantVO.getAccountStatus() == 1; if (accountValid) { - R result = tokenService.loginMerchantBackStage(account, loginBody.getPassword(),this.getAppId()); + R result = tokenService.loginShopBackStage(account, loginBody.getPassword(),this.getAppId()); return result; } else { return R.fail("账号被禁用"); @@ -174,6 +174,7 @@ } return R.fail(merchant.getMsg()); } catch (Exception e) { + e.printStackTrace(); return R.fail("登陆失败了"); } } diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ConvenientApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ConvenientApi.java index bde477a..65a62bd 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ConvenientApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ConvenientApi.java @@ -423,6 +423,17 @@ } /** + * 获取用户便民服务商家详情 + * + * @param account 商家绑定账号 + * @return + */ + @GetMapping("/getMerchantInfoByAccount") + public R<ConvenientMerchantVO> getMerchantInfoByAccount(@RequestParam("account") String account) { + return convenientMerchantService.getMerchantInfoByAccount(account); + } + + /** * 获取商便民服务商家信息 * * @param userId diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ConvenientMerchantDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ConvenientMerchantDAO.java index 5ee2bb0..f6c8e08 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ConvenientMerchantDAO.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ConvenientMerchantDAO.java @@ -33,6 +33,7 @@ public interface ConvenientMerchantDAO extends BaseMapper<ConvenientMerchantDO> { /** * 删除便民服务商家 + * * @param merchantId * @param operator * @return @@ -41,7 +42,8 @@ /** * 分页查询便民服务商家 运营后台 - * @param page 分页参数 + * + * @param page 分页参数 * @param pageConvenientMerchantDTO * @return */ @@ -50,6 +52,7 @@ /** * 查询商家信息 + * * @param merchantId * @return */ @@ -57,6 +60,7 @@ /** * 根据后台用户id查询 + * * @param userId * @return */ @@ -72,10 +76,11 @@ * @param currentMon * @return */ - IPage<ConvenientMerchantVO> getPopularMerchants(@Param("page") Page page, @Param("communityId") Long communityId, @Param("currentMon") String currentMon,@Param("areaCode")String areaCode); + IPage<ConvenientMerchantVO> getPopularMerchants(@Param("page") Page page, @Param("communityId") Long communityId, @Param("currentMon") String currentMon, @Param("areaCode") String areaCode); /** * 获取指定类型的商家 + * * @param page * @param pageClassifyMerchantDTO * @param currentMon @@ -85,6 +90,7 @@ /** * 获取商家详情 + * * @param merchantId * @param currentMon * @return @@ -93,6 +99,7 @@ /** * 分页搜索商家信息 + * * @param page * @param pageSearchDTO * @param currentMon @@ -102,6 +109,7 @@ /** * 根据查询条件获取商家导出数据 + * * @param exportMerchantDTO * @return */ @@ -109,6 +117,7 @@ /** * 批量更新商家咨询量 + * * @param consultationVOList * @return */ @@ -116,6 +125,7 @@ /** * 批量更新商家浏览量 + * * @param viewVOList * @return */ @@ -123,6 +133,7 @@ /** * 根据指定id获取商家导出数据 + * * @param needExportIds * @return */ @@ -130,6 +141,7 @@ /** * 批量更新商家营业状态 + * * @param convenientMerchantDOList * @param status * @return @@ -138,6 +150,7 @@ /** * 社区商家 + * * @param communityId * @return */ @@ -145,6 +158,7 @@ /** * 大屏分页获取热度排行商家 + * * @param page * @param pagePopularMerchantDTO * @return @@ -160,4 +174,6 @@ StatisticsCommVO getServiceTimesTotalPolylineDate(@Param("communityId") Long communityId, @Param("date") String date); IPage<ConvenientMerchantVO> indexMerchantList(@Param("page") Page page, @Param("pageBaseDTO") PageBaseDTO pageBaseDTO); + + List<ConvenientMerchantVO> getMerchantDetailByAccount(@Param("account") String account); } diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ConvenientMerchantService.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ConvenientMerchantService.java index 3debf88..b5bc5f5 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ConvenientMerchantService.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ConvenientMerchantService.java @@ -79,6 +79,13 @@ R<ConvenientMerchantVO> getUserMerchantInfoByAccount(String account); /** + * 获取用户便民服务商家详情 + * @param account 商家绑定账号 + * @return + */ + R<ConvenientMerchantVO> getMerchantInfoByAccount(String account); + + /** * 获取商便民服务商家信息 * @param userId * @return diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java index 2af73b7..6830495 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java @@ -1,5 +1,6 @@ package com.panzhihua.service_community.service.impl; +import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.NumberUtil; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @@ -225,7 +226,7 @@ @Override public R<ConvenientMerchantVO> getUserMerchantInfoByAccount(String account) { try { - R<LoginUserInfoVO> loginUserInfoVOR = userService.getUserInfo(account + "_10"); + R<LoginUserInfoVO> loginUserInfoVOR = userService.getUserInfo(account + "_5"); LoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(JSONObject.toJSONString(loginUserInfoVOR.getData()), LoginUserInfoVO.class); @@ -248,6 +249,20 @@ } @Override + public R<ConvenientMerchantVO> getMerchantInfoByAccount(String account) { + try { + List<ConvenientMerchantVO> merchantDetailByAccount = this.baseMapper.getMerchantDetailByAccount(account); + if (CollUtil.isEmpty(merchantDetailByAccount)){ + return R.fail(500, "该账号不存在"); + } + ConvenientMerchantVO convenientMerchantVO = merchantDetailByAccount.get(0); + return R.ok(convenientMerchantVO); + } catch (Exception e) { + return R.fail(); + } + } + + @Override public R<ConvenientMerchantVO> getUserConvenientMerchantInfo(Long userId) { ConvenientMerchantDO merchantDO = this.baseMapper.selectOne(new QueryWrapper<ConvenientMerchantDO>() .lambda().eq(ConvenientMerchantDO::getUserId, userId)); diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComShopFlowerOrderDAO.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComShopFlowerOrderDAO.xml index 13ca537..4befe64 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComShopFlowerOrderDAO.xml +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComShopFlowerOrderDAO.xml @@ -281,11 +281,15 @@ union all SELECT count(1) count_num ,'kddd' as count_name FROM `com_shop_flower_order` WHERE delivery_type =2 and delete_status = 1 and pay_status = 2 and store_id = #{storeId} union all + SELECT count(1) count_num ,'tkdd' as count_name FROM `com_shop_flower_order` WHERE delete_status = 1 and pay_status = 2 and `status` in (6,7) and store_id = #{storeId} + union all SELECT IFNULL(sum(pay_amount),0) count_num ,'yysr' as count_name FROM `com_shop_flower_order` WHERE `status` not in (6,7) and store_id = #{storeId} union all SELECT IFNULL(sum(pay_amount),0) count_num ,'tkje' as count_name FROM `com_shop_flower_order` WHERE `status` in (6,7) and store_id = #{storeId} union all SELECT IFNULL(sum(pay_amount),0) count_num ,'ktxje' as count_name FROM `com_shop_flower_order` WHERE `status` in (4,5) and create_at <= date_sub(now(), INTERVAL 15 DAY) and store_id = #{storeId} + + </select> <select id="selectCountOrderDayByStoreId" resultType="com.panzhihua.common.model.vos.shop.ComShopOrderStoreIdCountVO"> diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientMerchantMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientMerchantMapper.xml index 55f0c9d..dd90593 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientMerchantMapper.xml +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientMerchantMapper.xml @@ -326,4 +326,13 @@ #{item.id} </foreach> </update> + + <select id="getMerchantDetailByAccount" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO"> + SELECT + ccm.id, ccm.name, ccm.introduction, ccm.logo, ccm.phone, ccm.begin_at, ccm.end_at, ccm.period,ccm.detailed_address, + ccm.address, ccm.lat, ccm.lon,u.status account_status,u.account,ccm.business_status + FROM com_convenient_merchants ccm LEFT JOIN sys_user u on ccm.user_id = u.user_id WHERE u.type = 5 + and u.account = #{account} + + </select> </mapper> \ No newline at end of file diff --git a/springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/JWTAuthenticationTokenFilter.java b/springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/JWTAuthenticationTokenFilter.java index 1493236..1e91926 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/JWTAuthenticationTokenFilter.java +++ b/springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/JWTAuthenticationTokenFilter.java @@ -324,6 +324,7 @@ noLoginUrl.add("/api/communitybackstage/comBatteryCommodityOrder/syncCloseOrder"); noLoginUrl.add("/api/applets/uu/getQRCode"); noLoginUrl.add("/api/huacheng-applets/uu/getQRCode"); + noLoginUrl.add("/api/applets/wx/flowerWxNotify"); if (noLoginUrl.contains(requestURI)) { List<SimpleGrantedAuthority> authorities = new ArrayList<>(); authorities.add(new SimpleGrantedAuthority(SecurityConstants.ROLE_APPLETS)); -- Gitblit v1.7.1