Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/qijisheng
| | |
| | | } |
| | | |
| | | //添加门店员工关系数据 |
| | | UserShop userShop = new UserShop(); |
| | | userShop.setUserId(one.getUserId()); |
| | | userShop.setShopId(sysUser1.getObjectId()); |
| | | userShop.setRoleType(2); |
| | | userShop.setRoleId(user.getRoleId()); |
| | | userShop.setDeptId(user.getDeptId()); |
| | | userShop.setNickName(user.getNickName()); |
| | | userShop.setCreateTime(LocalDateTime.now()); |
| | | userShopService.save(userShop); |
| | | UserShop one1 = userShopService.getOne(new LambdaQueryWrapper<UserShop>().eq(UserShop::getUserId, one.getUserId()).eq(UserShop::getShopId, sysUser1.getObjectId())); |
| | | if(null == one1){ |
| | | UserShop userShop = new UserShop(); |
| | | userShop.setUserId(one.getUserId()); |
| | | userShop.setShopId(sysUser1.getObjectId()); |
| | | userShop.setRoleType(2); |
| | | userShop.setRoleId(user.getRoleId()); |
| | | userShop.setDeptId(user.getDeptId()); |
| | | userShop.setNickName(user.getNickName()); |
| | | userShop.setCreateTime(LocalDateTime.now()); |
| | | userShopService.save(userShop); |
| | | } |
| | | }else{ |
| | | user.setCreateBy(SecurityUtils.getUsername()); |
| | | user.setPassword(SecurityUtils.encryptPassword("a123456")); |
| | |
| | | userPointDetailVO.setVariablePoint(p.getVariablePoint()); |
| | | String format = p.getCreateTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | userPointDetailVO.setCreateTime(format); |
| | | Integer historicalPoint = p.getHistoricalPoint(); |
| | | Integer balance = p.getBalance(); |
| | | if (historicalPoint != null && balance != null) { |
| | | userPointDetailVO.setFlag(historicalPoint > balance ? 2 : 1); |
| | | } |
| | | return userPointDetailVO; |
| | | }).collect(Collectors.toList()); |
| | | PageInfo<UserPointDetailVO> pageInfo1 = new PageInfo<>(pageCurr, pageSize); |
| | |
| | | @ApiModelProperty(value = "变动时间") |
| | | private String createTime; |
| | | |
| | | @ApiModelProperty(value = "增或减标识: 1-增 2-减") |
| | | private Integer flag; |
| | | } |
| | |
| | | @ApiImplicitParam(value = "订单id", name = "id", required = true, dataType = "String"), |
| | | }) |
| | | @GetMapping("/writeOff") |
| | | public R<Void> writeOff(String id, Integer shopId, String technicianId){ |
| | | orderService.writeOff(id, shopId, technicianId); |
| | | public R<Void> writeOff(String code, Integer shopId, String technicianId){ |
| | | orderService.writeOff(code, shopId, technicianId); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void writeOff(String id,Integer shopId, String technicianId) { |
| | | public void writeOff(String id, Integer shopId, String technicianId) { |
| | | LoginUser loginUserApplet = tokenService.getLoginUserApplet(); |
| | | Order order = orderMapper.selectById(id); |
| | | boolean check = check(order, shopId, loginUserApplet.getUserid()); |
| | |
| | | userPoint.setAppUserId(order.getAppUserId()); |
| | | userPoint.setObjectId(order.getId()); |
| | | userPointClient.saveUserPoint(userPoint); |
| | | appUserClient.editAppUserById(appUser); |
| | | } |
| | | |
| | | order.setRefundStatus(2); |
| | |
| | | refundPass.setPhone(jsonObject.getString("phone")); |
| | | refundPass.setAddress(jsonObject.getString("address")); |
| | | this.save(refundPass); |
| | | order.setOldOrderStatus(order.getOrderStatus()); |
| | | order.setOrderStatus(7); |
| | | order.setOldOrderStatus(7); |
| | | orderService.updateById(order); |
| | | return R.ok(); |
| | | } |
| | |
| | | if(null == bargainPriceDetail){ |
| | | //没有门店特价,判断地区价格配置 |
| | | LambdaQueryWrapper<GoodsArea> queryWrapper = new LambdaQueryWrapper<GoodsArea>().eq(GoodsArea::getGoodsId, goodsId).eq(GoodsArea::getVip, vip); |
| | | if(StringUtils.isNotEmpty(districtCode)){ |
| | | queryWrapper.eq(GoodsArea::getDistrictsCode, districtCode); |
| | | if(StringUtils.isNotEmpty(provinceCode)){ |
| | | queryWrapper.eq(GoodsArea::getProvinceCode, provinceCode); |
| | | } |
| | | if(StringUtils.isNotEmpty(cityCode)){ |
| | | queryWrapper.and(i -> i.eq(GoodsArea::getCityCode, cityCode).or().isNull(GoodsArea::getCityCode)); |
| | | } |
| | | if(StringUtils.isNotEmpty(provinceCode)){ |
| | | queryWrapper.and(i -> i.eq(GoodsArea::getProvinceCode, provinceCode).or().isNull(GoodsArea::getProvinceCode)); |
| | | if(StringUtils.isNotEmpty(districtCode)){ |
| | | queryWrapper.and(i -> i.eq(GoodsArea::getDistrictsCode, districtCode).or().isNull(GoodsArea::getDistrictsCode)); |
| | | } |
| | | GoodsArea goodsArea = goodsAreaService.getOne(queryWrapper); |
| | | if(null == goodsArea){ |
| | |
| | | package com.ruoyi.other.service.impl; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | import com.ruoyi.account.api.feignClient.AppUserShopClient; |
| | | import com.ruoyi.account.api.model.AppUser; |
| | | import com.ruoyi.account.api.model.AppUserShop; |
| | | import com.ruoyi.account.api.model.UserAddress; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | |
| | | Optional<AppUserShop> first = data.stream().filter(s -> s.getShopId() == shopId.intValue() && s.getRoleType() == 3).findFirst(); |
| | | Integer technicianId = null; |
| | | if(first.isPresent()){ |
| | | AppUserShop appUserShop = first.get(); |
| | | Technician technician = technicianService.getOne(new LambdaQueryWrapper<Technician>().eq(Technician::getAppUserId, appUserShop.getAppUserId()) |
| | | .eq(Technician::getShopId, appUserShop.getShopId()).eq(Technician::getDelFlag, 0).eq(Technician::getStatus, 2)); |
| | | if(null != technician){ |
| | | technicianId = technician.getId(); |
| | | //既是店员又是技师,需要取员工身份获取列表数据 |
| | | Optional<AppUserShop> first1 = data.stream().filter(s -> s.getShopId() == shopId.intValue() && s.getRoleType() != 3).findFirst(); |
| | | if(!first1.isPresent()){ |
| | | AppUserShop appUserShop = first.get(); |
| | | Technician technician = technicianService.getOne(new LambdaQueryWrapper<Technician>().eq(Technician::getAppUserId, appUserShop.getAppUserId()) |
| | | .eq(Technician::getShopId, appUserShop.getShopId()).eq(Technician::getDelFlag, 0).eq(Technician::getStatus, 2)); |
| | | if(null != technician){ |
| | | technicianId = technician.getId(); |
| | | } |
| | | } |
| | | } |
| | | List<TechnicianSubscribeVO> list = technicianSubscribeMapper.getTechnicianSubscribeByUserAndShop(pageInfo, shopId, status, technicianId); |
| | |
| | | AppUser appUser = appUserClient.getAppUserById(technicianSubscribe.getAppUserId()); |
| | | technicianSubscribeVO.setUserName(appUser.getName()); |
| | | technicianSubscribeVO.setPhone(appUser.getPhone()); |
| | | Integer serviceMode = technicianSubscribeVO.getServiceMode(); |
| | | if(1 == serviceMode){ |
| | | UserAddress userAddress = JSON.parseObject(technicianSubscribeVO.getUserAddress(), UserAddress.class); |
| | | technicianSubscribeVO.setUserAddress(userAddress.getProvince() + userAddress.getCity() + userAddress.getDistrict() + userAddress.getRecieveAddress()); |
| | | } |
| | | } |
| | | return pageInfo.setRecords(list); |
| | | } |
| | |
| | | ts.latitude, |
| | | tts.subscribe_time, |
| | | tts.service_mode, |
| | | tts.user_address, |
| | | tts.status |
| | | FROM |
| | | t_technician_subscribe tts |