| | |
| | | Shop shop = remoteShopService.getShop(merGoodsPageDto.getShopId()).getData(); |
| | | merGoodsPageVoList.forEach(merGoodsPageVo -> { |
| | | ShopGoods shopGoods = shopGoodsService.getByShopIdAndGoodsId(merGoodsPageDto.getShopId(), merGoodsPageVo.getGoodsId()); |
| | | //后台开启经销商统一售价,且经销商设置了统一售价,加盟商不能修改价格 |
| | | if (1 == shop.getModifyPricePermission() && null != shopGoods) { |
| | | merGoodsPageVo.setModifyPricePermission(0); |
| | | merGoodsPageVo.setIsUnifiedPrice(1); |
| | | merGoodsPageVo.setUnifiedPrice(shopGoods.getSalesPrice()); |
| | | merGoodsPageVo.setUnifiedServerNum(shopGoods.getServiceNum()); |
| | | } else { |
| | | //经销商不限制修改价格权限 |
| | | if(1 == shop.getShopType()){ |
| | | merGoodsPageVo.setModifyPricePermission(1); |
| | | merGoodsPageVo.setIsUnifiedPrice(0); |
| | | if (null != shopGoods) { |
| | | merGoodsPageVo.setIsUnifiedPrice(1); |
| | | merGoodsPageVo.setUnifiedPrice(shopGoods.getSalesPrice()); |
| | | merGoodsPageVo.setUnifiedServerNum(shopGoods.getServiceNum()); |
| | | } |
| | | }else{ |
| | | //后台开启经销商统一售价,且经销商设置了统一售价,加盟商不能修改价格 |
| | | if (1 == shop.getModifyPricePermission() && null != shopGoods) { |
| | | merGoodsPageVo.setModifyPricePermission(0); |
| | | merGoodsPageVo.setIsUnifiedPrice(1); |
| | | merGoodsPageVo.setUnifiedPrice(shopGoods.getSalesPrice()); |
| | | merGoodsPageVo.setUnifiedServerNum(shopGoods.getServiceNum()); |
| | | } else { |
| | | merGoodsPageVo.setModifyPricePermission(1); |
| | | merGoodsPageVo.setIsUnifiedPrice(0); |
| | | } |
| | | } |
| | | |
| | | }); |
| | | return R.ok(page.setRecords(merGoodsPageVoList)); |
| | | } |
| | |
| | | @Override |
| | | public void editMerShopGoods(MerShopGoodsEditDto merShopGoodsEditDto) { |
| | | Shop shop = remoteShopService.getShop(merShopGoodsEditDto.getShopId()).getData(); |
| | | if (2 == shop.getShopType()) { |
| | | Shop belongShop = remoteShopService.getShop(shop.getBelongShopId()).getData(); |
| | | ShopGoods shopGoods = shopGoodsService.getByShopIdAndGoodsId(shop.getBelongShopId(), merShopGoodsEditDto.getGoodsId()); |
| | | if (null != shopGoods && 1 == belongShop.getModifyPricePermission()) { |
| | | throw new ServiceException("经销商开启了统一价格管理"); |
| | | } |
| | | } |
| | | // if (2 == shop.getShopType()) { |
| | | // Shop belongShop = remoteShopService.getShop(shop.getBelongShopId()).getData(); |
| | | // ShopGoods shopGoods = shopGoodsService.getByShopIdAndGoodsId(shop.getBelongShopId(), merShopGoodsEditDto.getGoodsId()); |
| | | // if (null != shopGoods && 1 == belongShop.getModifyPricePermission()) { |
| | | // throw new ServiceException("经销商开启了统一价格管理"); |
| | | // } |
| | | // } |
| | | |
| | | Goods goods = this.getById(merShopGoodsEditDto.getGoodsId()); |
| | | if (merShopGoodsEditDto.getSalePrice().compareTo(goods.getMininumPrice()) < 0) { |
| | |
| | | <result property="goodsType" column="goods_type" /> |
| | | <result property="relationShopName" column="relation_shop_name" /> |
| | | <result property="memberNurse" column="member_nurse" /> |
| | | <result property="bindingTime" column="binding_time" /> |
| | | <result property="frozenFlag" column="frozen_flag" /> |
| | | <result property="bindingType" column="binding_type" /> |
| | | <result property="lastServiceId" column="last_service_id" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectMemberVo"> |
| | | select user_id, del_flag, member_id, member_no, wx_openid, mini_openid, wx_unionid, relation_shop_id, nick_name, real_name, mobile, gender, referrer, customer_source, level, birthday, create_time, update_time, update_user_id, user_tags, avatar, binding_flag, goods_type,relation_shop_name,member_nurse from t_member |
| | | select user_id, del_flag, member_id, member_no, wx_openid, mini_openid, wx_unionid, relation_shop_id, nick_name, real_name, mobile, gender, referrer, customer_source, level, birthday, create_time, update_time, update_user_id, user_tags, avatar, binding_flag, goods_type,relation_shop_name,member_nurse,binding_time,frozen_flag,binding_type,last_service_id from t_member |
| | | </sql> |
| | | |
| | | <select id="selectMemberList" parameterType="com.ruoyi.system.api.domain.poji.member.Member" resultMap="MemberResult"> |
| | |
| | | |
| | | @ApiModelProperty(value = "订单id") |
| | | private String orderId; |
| | | |
| | | |
| | | @ApiModelProperty(value = "核销用户电话号码") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "核销用户姓名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "实收金额") |
| | | private BigDecimal relReceiveMoney; |
| | |
| | | } |
| | | Member member = remoteMemberService.getMemberByMobile(phone).getData();//绑定用户判断核销商户 |
| | | if(null == member){ |
| | | throw new ServiceException("手机号还未注册账户,请先进行注册"); |
| | | String name = merVerifyOrderDto.getName(); |
| | | //创建新用户 |
| | | String memberId = IdUtils.simpleUUID(); |
| | | SysUser sysUser = new SysUser(); |
| | | sysUser.setUserName(memberId); |
| | | sysUser.setUserType("03"); |
| | | sysUser.setNickName(name); |
| | | sysUser.setPhonenumber(phone); |
| | | sysUser.setAvatar("https://hongruitang.oss-cn-beijing.aliyuncs.com/default.png"); |
| | | String password = "hongruitang"; |
| | | sysUser.setPassword(SecurityUtils.encryptPassword(password)); |
| | | sysUser = remoteUserService.registerUser(sysUser).getData(); |
| | | member = new Member(); |
| | | member.setMemberId(memberId); |
| | | member.setUserId(sysUser.getUserId()); |
| | | member.setMobile(phone); |
| | | member.setRealName(name); |
| | | member.setNickName(name); |
| | | member.setBindingFlag(1); |
| | | member.setBindingType(3); |
| | | member.setRelationShopId(shopId); |
| | | member.setRelationShopName(shop.getShopName()); |
| | | remoteMemberService.createNewMember(member); |
| | | } |
| | | if (member.getBindingFlag() == 1) { |
| | | if (!member.getRelationShopId().equals(shopId)) { |
| | |
| | | toc.receivable_money receivableMoney, |
| | | toc.create_time createTime, |
| | | toc.pay_money payMoney, |
| | | -- CASE WHEN toc.unbinding_flag = 0 THEN toc.shop_id WHEN toc.unbinding_flag = 1 AND toc.order_from = 1 THEN |
| | | toc.shop_id WHEN toc.order_status = 3 THEN toc.shop_id ELSE NULL END shopId, |
| | | toc.shop_id shopId, |
| | | toc.use_time verifyTime, |
| | | CASE toc.order_from |
| | |
| | | WHEN 5 THEN '美团' |
| | | WHEN 6 THEN '抖音' |
| | | WHEN 7 THEN '快手' |
| | | END orderFrom |
| | | -- #{param.keyword} AS keyword |
| | | END orderFrom, |
| | | #{param.keyword} AS keyword |
| | | FROM t_order toc |
| | | WHERE toc.del_flag = 0 AND toc.order_from != 2 -- 不查找秒杀活动的订单 |
| | | WHERE toc.del_flag = 0 AND toc.order_from != 2 |
| | | <if test="param.orderStatus != null"> |
| | | AND toc.order_status = #{param.orderStatus} |
| | | </if> |
| | |
| | | if (e.getIsDefault()==1){ |
| | | shop.setIsDefault(true); |
| | | } |
| | | if(null != shop && 1 == shop.getShopType()){ |
| | | shop.setModifyPricePermission(1); |
| | | } |
| | | return shop; |
| | | }).collect(Collectors.toList()); |
| | | return R.ok(collect); |