Merge remote-tracking branch 'origin/master'
| | |
| | | } |
| | | |
| | | /** |
| | | * 门店登录使用 |
| | | * @param username |
| | | * @return |
| | | */ |
| | | @InnerAuth |
| | | @GetMapping("/infoShop/{username}") |
| | | public R<LoginUser> infoShop(@PathVariable("username") String username) { |
| | | SysUser sysUser = userService.selectUserByUserName(username); |
| | | if (StringUtils.isNull(sysUser)) { |
| | | return R.fail("用户名或密码错误"); |
| | | } |
| | | // 角色集合 |
| | | Set<String> roles = permissionService.getRolePermission(sysUser); |
| | | // 权限集合getRolePermission |
| | | Set<String> permissions = permissionService.getMenuPermission(sysUser); |
| | | LoginUser sysUserVo = new LoginUser(); |
| | | sysUserVo.setSysUser(sysUser); |
| | | sysUserVo.setRoles(roles); |
| | | sysUserVo.setPermissions(permissions); |
| | | |
| | | return R.ok(sysUserVo); |
| | | } |
| | | |
| | | /** |
| | | * 注册用户信息 |
| | | */ |
| | | @PostMapping("/register") |
| | |
| | | userCancellationLogService.save(userCancellationLog); |
| | | user.setStatus(3); |
| | | appUserService.updateById(user); |
| | | |
| | | List<AppUser> subUserList = appUserService.list(new LambdaQueryWrapper<AppUser>() |
| | | .eq(AppUser::getInviteUserId, userId)); |
| | | for (AppUser appUser : subUserList) { |
| | | Long inviteUserId = user.getInviteUserId(); |
| | | appUser.setInviteUserId(inviteUserId); |
| | | } |
| | | appUserService.updateBatchById(subUserList); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | R<BigDecimal> bigDecimalR = systemConfigClient.redPackegeSet(); |
| | | userSignRecord.setRedAmount(bigDecimalR.getData()); |
| | | userSignRecord.setSignDay(LocalDate.now()); |
| | | |
| | | BigDecimal sum = appUser.getTotalRedPacketAmount().add(bigDecimalR.getData()); |
| | | appUser.setTotalRedPacketAmount(sum); |
| | | BigDecimal sum2 = appUser.getBalance().add(bigDecimalR.getData()); |
| | | appUser.setBalance(sum2); |
| | | appUserService.updateById(appUser); |
| | | SignBackRDto signBackRDto = new SignBackRDto(); |
| | | signBackRDto.setPoint(userSignRecord.getPoint()); |
| | | signBackRDto.setRedAmount(userSignRecord.getRedAmount()); |
| | |
| | | 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; |
| | | } |
| | |
| | | Order order = orderMapper.selectById(id); |
| | | boolean check = check(order, shopId, loginUserApplet.getUserid()); |
| | | if (!check){ |
| | | throw new ServiceException("订单不存在"); |
| | | throw new ServiceException("该订单与当前扫码门店不一致"); |
| | | } |
| | | |
| | | // 售后设置 |
| | |
| | | AND tt.del_flag = 0 |
| | | AND tt.shop_id = #{shopId} |
| | | <if test="name != null and name != ''"> |
| | | AND tt.`name` LIKE concat('%', #{name}, '%') |
| | | AND tt.name LIKE concat('%', #{name}, '%') |
| | | </if> |
| | | GROUP BY |
| | | tt.id, |
| | |
| | | tt.introduction, |
| | | tt.home_picture |
| | | <if test="point != null and point == 1"> |
| | | order by ttsc.score DESC |
| | | order by score DESC |
| | | </if> |
| | | <if test="point != null and point == 2"> |
| | | order by ttsc.score |
| | | order by score |
| | | </if> |
| | | </select> |
| | | <select id="selectTechnicianDetail" resultType="com.ruoyi.other.vo.TechnicianDetailVO"> |