| | |
| | | R<ConvenientMerchantVO> getUserMerchantInfoByAccount(@RequestParam("account") String account); |
| | | |
| | | /** |
| | | * 获取用户便民服务商家详情 |
| | | * @param account 商家绑定账号 |
| | | * @return |
| | | */ |
| | | @GetMapping("/convenient/getMerchantInfoByAccount") |
| | | R<ConvenientMerchantVO> getMerchantInfoByAccount(@RequestParam("account") String account); |
| | | |
| | | /** |
| | | * 获取商便民服务商家信息 |
| | | * @param userId |
| | | * @return |
| | |
| | | } |
| | | 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("账号被禁用"); |
| | |
| | | } |
| | | return R.fail(merchant.getMsg()); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return R.fail("登陆失败了"); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取用户便民服务商家详情 |
| | | * |
| | | * @param account 商家绑定账号 |
| | | * @return |
| | | */ |
| | | @GetMapping("/getMerchantInfoByAccount") |
| | | public R<ConvenientMerchantVO> getMerchantInfoByAccount(@RequestParam("account") String account) { |
| | | return convenientMerchantService.getMerchantInfoByAccount(account); |
| | | } |
| | | |
| | | /** |
| | | * 获取商便民服务商家信息 |
| | | * |
| | | * @param userId |
| | |
| | | public interface ConvenientMerchantDAO extends BaseMapper<ConvenientMerchantDO> { |
| | | /** |
| | | * 删除便民服务商家 |
| | | * |
| | | * @param merchantId |
| | | * @param operator |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 分页查询便民服务商家 运营后台 |
| | | * @param page 分页参数 |
| | | * |
| | | * @param page 分页参数 |
| | | * @param pageConvenientMerchantDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询商家信息 |
| | | * |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 根据后台用户id查询 |
| | | * |
| | | * @param userId |
| | | * @return |
| | | */ |
| | |
| | | * @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 |
| | |
| | | |
| | | /** |
| | | * 获取商家详情 |
| | | * |
| | | * @param merchantId |
| | | * @param currentMon |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 分页搜索商家信息 |
| | | * |
| | | * @param page |
| | | * @param pageSearchDTO |
| | | * @param currentMon |
| | |
| | | |
| | | /** |
| | | * 根据查询条件获取商家导出数据 |
| | | * |
| | | * @param exportMerchantDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 批量更新商家咨询量 |
| | | * |
| | | * @param consultationVOList |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 批量更新商家浏览量 |
| | | * |
| | | * @param viewVOList |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 根据指定id获取商家导出数据 |
| | | * |
| | | * @param needExportIds |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 批量更新商家营业状态 |
| | | * |
| | | * @param convenientMerchantDOList |
| | | * @param status |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 社区商家 |
| | | * |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 大屏分页获取热度排行商家 |
| | | * |
| | | * @param page |
| | | * @param pagePopularMerchantDTO |
| | | * @return |
| | |
| | | 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); |
| | | } |
| | |
| | | R<ConvenientMerchantVO> getUserMerchantInfoByAccount(String account); |
| | | |
| | | /** |
| | | * 获取用户便民服务商家详情 |
| | | * @param account 商家绑定账号 |
| | | * @return |
| | | */ |
| | | R<ConvenientMerchantVO> getMerchantInfoByAccount(String account); |
| | | |
| | | /** |
| | | * 获取商便民服务商家信息 |
| | | * @param userId |
| | | * @return |
| | |
| | | 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; |
| | |
| | | @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); |
| | | |
| | |
| | | } |
| | | |
| | | @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)); |
| | |
| | | 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"> |
| | |
| | | #{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> |