维修流程
This commit is contained in:
parent
a2fbf98de6
commit
768c09b0e4
@ -195,11 +195,9 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ShopMallPartners shopInfoByUserId() throws Exception {
|
public ShopMallPartners shopInfoByUserId() throws Exception {
|
||||||
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
|
||||||
ShopMallPartners partner = new ShopMallPartners();
|
|
||||||
LambdaQueryWrapper<ShopMallPartners> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ShopMallPartners> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(ShopMallPartners::getUserId, user.getId());
|
queryWrapper.orderByDesc(ShopMallPartners::getPartnerId).last("limit 1");
|
||||||
partner = this.getOne(queryWrapper);
|
ShopMallPartners partner = this.getOne(queryWrapper);
|
||||||
if (ObjectUtil.isEmpty(partner)){
|
if (ObjectUtil.isEmpty(partner)){
|
||||||
throw new Exception("未查询到信息");
|
throw new Exception("未查询到信息");
|
||||||
}
|
}
|
||||||
@ -1452,8 +1450,7 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
InspectionInfo info = inspectionInfoService.getById(inspectionInfoId);
|
InspectionInfo info = inspectionInfoService.getById(inspectionInfoId);
|
||||||
OrderInfo order = orderService.getById(info.getInspectionOrderId());
|
OrderInfo order = orderService.getById(info.getInspectionOrderId());
|
||||||
AdminUserDO buyUser = userService.getUser(info.getUserId());
|
AdminUserDO buyUser = userService.getUser(info.getUserId());
|
||||||
PartnerWorker temp = partnerWorkerService.getById(info.getWorkId());
|
AdminUserDO worker = userService.getUser(info.getWorkId());
|
||||||
AdminUserDO worker = userService.getUser(temp.getUserId());
|
|
||||||
InspectionInfoVo res =new InspectionInfoVo();
|
InspectionInfoVo res =new InspectionInfoVo();
|
||||||
BeanUtils.copyProperties(order,res);
|
BeanUtils.copyProperties(order,res);
|
||||||
res.setInspectionId(info.getId());
|
res.setInspectionId(info.getId());
|
||||||
|
@ -120,14 +120,7 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
|
|||||||
public int insertInspectionInfo(InspectionInfo inspectionInfo) throws Exception {
|
public int insertInspectionInfo(InspectionInfo inspectionInfo) throws Exception {
|
||||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||||
ShopMallPartners partners = appInspectionPartnerService.shopInfo();
|
ShopMallPartners partners = appInspectionPartnerService.shopInfo();
|
||||||
// LambdaQueryWrapper<PartnerWorker> workerQueryWrapper =new LambdaQueryWrapper<>();
|
|
||||||
// workerQueryWrapper.eq(PartnerWorker::getUserId,loginUser.getId()).eq(PartnerWorker::getPartnerId,partners.getPartnerId());
|
|
||||||
// PartnerWorker worker = workerService.getOne(workerQueryWrapper);
|
|
||||||
// if (ObjectUtils.isNotEmpty(worker)){
|
|
||||||
// inspectionInfo.setWorkId(worker.getId());
|
|
||||||
// }else {
|
|
||||||
// throw new Exception("请先将接待员加入员工");
|
|
||||||
// }
|
|
||||||
if (ObjectUtils.isEmpty(inspectionInfo.getInspectionWorkNodes())) {
|
if (ObjectUtils.isEmpty(inspectionInfo.getInspectionWorkNodes())) {
|
||||||
throw new RuntimeException("请选择检测项目");
|
throw new RuntimeException("请选择检测项目");
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import cn.iocoder.yudao.framework.security.config.SecurityProperties;
|
|||||||
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
||||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||||
|
import cn.iocoder.yudao.module.partner.entity.PartnerWorker;
|
||||||
import cn.iocoder.yudao.util.RedisCache;
|
import cn.iocoder.yudao.util.RedisCache;
|
||||||
import cn.iocoder.yudao.module.rescue.domain.DriverInfo;
|
import cn.iocoder.yudao.module.rescue.domain.DriverInfo;
|
||||||
import cn.iocoder.yudao.module.rescue.domain.LoginBody;
|
import cn.iocoder.yudao.module.rescue.domain.LoginBody;
|
||||||
@ -81,8 +82,6 @@ public class SysLoginController {
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private PermissionApi permissionApi;
|
private PermissionApi permissionApi;
|
||||||
@Resource
|
|
||||||
private PasswordEncoder passwordEncoder;
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private RoleApi roleApi;
|
private RoleApi roleApi;
|
||||||
@ -577,50 +576,23 @@ public class SysLoginController {
|
|||||||
map.put("driverInfo", driverInfo);
|
map.put("driverInfo", driverInfo);
|
||||||
return success(map);
|
return success(map);
|
||||||
}
|
}
|
||||||
//
|
|
||||||
//
|
|
||||||
// /**
|
/**
|
||||||
// * 获取检测工用户信息
|
* 获取检测工用户信息
|
||||||
// *
|
*
|
||||||
// * @return 用户信息
|
* @return 用户信息
|
||||||
// */
|
*/
|
||||||
// @GetMapping("/getJcWorkerInfo")
|
@GetMapping("/getJcWorkerInfo")
|
||||||
// public AjaxResult getJcWorkerInfo()
|
public CommonResult getJcWorkerInfo()
|
||||||
// {
|
{
|
||||||
// AjaxResult ajax = success();
|
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
||||||
// LambdaQueryWrapper<PartnerWorker> queryWrapper =new LambdaQueryWrapper<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
// SysUser user = SecurityUtils.getLoginUser().getUser();
|
map.put("partnerId", user.getTenantId());
|
||||||
// queryWrapper.eq(PartnerWorker::getUserId,user.getUserId());
|
map.put("user", user);
|
||||||
// PartnerWorker worker = jcWorkerService.getOne(queryWrapper);
|
return CommonResult.success(map);
|
||||||
// if (ObjectUtil.isNotEmpty(worker)){
|
}
|
||||||
// LambdaQueryWrapper<ShopMallPartners> queryWrapper1 =new LambdaQueryWrapper<>();
|
|
||||||
// queryWrapper1.eq(ShopMallPartners::getPartnerId,worker.getPartnerId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0");
|
|
||||||
// ShopMallPartners partner = partnersService.getOne(queryWrapper1);
|
|
||||||
// if (ObjectUtil.isEmpty(partner)){
|
|
||||||
// return error("信息有误");
|
|
||||||
// }
|
|
||||||
// ajax.put("partnerInfo", partner);
|
|
||||||
// }else {
|
|
||||||
// return error("信息有误");
|
|
||||||
// }
|
|
||||||
// SysUser sysUser = userService.selectUserById(user.getUserId());
|
|
||||||
//
|
|
||||||
// ajax.put("user", sysUser);
|
|
||||||
//
|
|
||||||
// return ajax;
|
|
||||||
// }
|
|
||||||
// /**
|
|
||||||
// * 获取路由信息
|
|
||||||
// *
|
|
||||||
// * @return 路由信息
|
|
||||||
// */
|
|
||||||
// @GetMapping("getRouters")
|
|
||||||
// public CommonResult getRouters()
|
|
||||||
// {
|
|
||||||
// Long userId = SecurityFrameworkUtils.getLoginUserId();
|
|
||||||
// List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId);
|
|
||||||
// return AjaxResult.success(menuService.buildMenus(menus));
|
|
||||||
// }
|
|
||||||
|
|
||||||
@PostMapping("/wxLogin")
|
@PostMapping("/wxLogin")
|
||||||
public CommonResult wxLogin(@RequestBody WxLoginBody wxLoginBody) {
|
public CommonResult wxLogin(@RequestBody WxLoginBody wxLoginBody) {
|
||||||
|
@ -3,6 +3,8 @@ package cn.iocoder.yudao.module.system.dal.mysql.user;
|
|||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
|
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
||||||
|
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserPageReqVO;
|
import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserPageReqVO;
|
||||||
import cn.iocoder.yudao.module.system.controller.app.user.UserInfoVO;
|
import cn.iocoder.yudao.module.system.controller.app.user.UserInfoVO;
|
||||||
@ -30,7 +32,15 @@ public interface AdminUserMapper extends BaseMapperX<AdminUserDO> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
default AdminUserDO selectByMobile(String mobile) {
|
default AdminUserDO selectByMobile(String mobile) {
|
||||||
return getUserByMobileWithoutTenant(mobile);
|
Long tenantId=null;
|
||||||
|
try {
|
||||||
|
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||||
|
tenantId = loginUser.getTenantId();
|
||||||
|
|
||||||
|
}catch (Exception e){
|
||||||
|
|
||||||
|
}
|
||||||
|
return getUserByMobileWithoutTenant(mobile,tenantId);
|
||||||
}
|
}
|
||||||
|
|
||||||
default PageResult<AdminUserDO> selectPage(UserPageReqVO reqVO, Collection<Long> deptIds) {
|
default PageResult<AdminUserDO> selectPage(UserPageReqVO reqVO, Collection<Long> deptIds) {
|
||||||
@ -65,7 +75,7 @@ public interface AdminUserMapper extends BaseMapperX<AdminUserDO> {
|
|||||||
|
|
||||||
AdminUserDO selectUserByPhone(String phone);
|
AdminUserDO selectUserByPhone(String phone);
|
||||||
|
|
||||||
AdminUserDO getUserByMobileWithoutTenant(String phoneNumber);
|
AdminUserDO getUserByMobileWithoutTenant(@Param("phoneNumber") String phoneNumber,@Param("tenantId") Long tenantId);
|
||||||
|
|
||||||
int updateSetOpenId(@Param("userId")Long userId,@Param("openId")String openId);
|
int updateSetOpenId(@Param("userId")Long userId,@Param("openId")String openId);
|
||||||
|
|
||||||
|
@ -10,6 +10,8 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|||||||
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
|
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
|
||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
import cn.iocoder.yudao.framework.datapermission.core.util.DataPermissionUtils;
|
import cn.iocoder.yudao.framework.datapermission.core.util.DataPermissionUtils;
|
||||||
|
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
||||||
|
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||||
import cn.iocoder.yudao.module.infra.api.config.ConfigApi;
|
import cn.iocoder.yudao.module.infra.api.config.ConfigApi;
|
||||||
@ -298,6 +300,7 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AdminUserDO getUserByMobile(String mobile) {
|
public AdminUserDO getUserByMobile(String mobile) {
|
||||||
|
|
||||||
return userMapper.selectByMobile(mobile);
|
return userMapper.selectByMobile(mobile);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -451,7 +454,15 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
|
|||||||
if (StrUtil.isBlank(mobile)) {
|
if (StrUtil.isBlank(mobile)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
AdminUserDO user = userMapper.getUserByMobileWithoutTenant(mobile);
|
Long tenantId=null;
|
||||||
|
try {
|
||||||
|
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||||
|
tenantId = loginUser.getTenantId();
|
||||||
|
|
||||||
|
}catch (Exception e){
|
||||||
|
|
||||||
|
}
|
||||||
|
AdminUserDO user = userMapper.getUserByMobileWithoutTenant(mobile,tenantId);
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -562,7 +573,15 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AdminUserDO getUserByMobileWithoutTenant(String phoneNumber) {
|
public AdminUserDO getUserByMobileWithoutTenant(String phoneNumber) {
|
||||||
return userMapper.getUserByMobileWithoutTenant(phoneNumber);
|
Long tenantId=null;
|
||||||
|
try {
|
||||||
|
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||||
|
tenantId = loginUser.getTenantId();
|
||||||
|
|
||||||
|
}catch (Exception e){
|
||||||
|
|
||||||
|
}
|
||||||
|
return userMapper.getUserByMobileWithoutTenant(phoneNumber,tenantId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -69,6 +69,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
system_users
|
system_users
|
||||||
WHERE
|
WHERE
|
||||||
mobile = #{phoneNumber}
|
mobile = #{phoneNumber}
|
||||||
|
<if test="tenantId!=null">
|
||||||
|
and tenant_id = #{tenantId}
|
||||||
|
</if>
|
||||||
AND deleted = 0
|
AND deleted = 0
|
||||||
|
limit 1
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
Loading…
Reference in New Issue
Block a user