diff --git a/RuoYi-Cloud-master/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteUserRoleService.java b/RuoYi-Cloud-master/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteUserRoleService.java index 09b8fdceb57b721b4e0ac26e0d2f5f656897fd63..de86a923c7185309db0579fa55b1847b027d20c7 100644 --- a/RuoYi-Cloud-master/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteUserRoleService.java +++ b/RuoYi-Cloud-master/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteUserRoleService.java @@ -27,4 +27,23 @@ public interface RemoteUserRoleService { @PostMapping("/user/addApi") public R addApi(@Validated @RequestBody SysUser user,@RequestHeader(SecurityConstants.FROM_SOURCE) String source); + /** + * 删除用户 + * + * @param userIds 用户Id, 需要删除的用户Id数组 + * @return 结果 + */ + @DeleteMapping("/user/{userIds}") + public R removeApi(@PathVariable("userIds") Long[] userIds,@RequestHeader(SecurityConstants.FROM_SOURCE) String source); + + + /** + * 修改用户 + * + * @param user 用户对象,根据传过来的数据修改对应的用户信息 + * @return 结果 + */ + @PutMapping("/user") + public R editApi(@Validated @RequestBody SysUser user,@RequestHeader(SecurityConstants.FROM_SOURCE) String source); + } diff --git a/RuoYi-Cloud-master/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteUserRoleFallbackFactory.java b/RuoYi-Cloud-master/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteUserRoleFallbackFactory.java index 85b888562ca21fd3164c6a2f4619360358754de4..3260b9f3bb22cd91e974d9160df356d831fff5e0 100644 --- a/RuoYi-Cloud-master/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteUserRoleFallbackFactory.java +++ b/RuoYi-Cloud-master/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteUserRoleFallbackFactory.java @@ -1,5 +1,6 @@ package com.ruoyi.system.api.factory; +import com.ruoyi.common.core.constant.SecurityConstants; import com.ruoyi.common.core.domain.R; import com.ruoyi.system.api.RemoteUserRoleService; import com.ruoyi.system.api.domain.SysUser; @@ -7,6 +8,11 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.openfeign.FallbackFactory; import org.springframework.stereotype.Component; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; /** * 服务降级 @@ -32,6 +38,10 @@ public class RemoteUserRoleFallbackFactory implements FallbackFactory removeApi(Long[] userIds,String source){return R.fail("删除用户失败:" + throwable.getMessage());} + @Override + public R editApi(SysUser user,String source){return R.fail("修改用户失败:" + throwable.getMessage());} }; } } diff --git a/RuoYi-Cloud-master/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java b/RuoYi-Cloud-master/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java index cd9418c91676da0cee00fd6b2354a26fb1fd1607..4a394ff7fa1e23dee31fe9ad89f500c4ed50e5c5 100644 --- a/RuoYi-Cloud-master/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java +++ b/RuoYi-Cloud-master/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java @@ -176,81 +176,58 @@ public class SysUserController extends BaseController { return ajax; } - /** - * 新增用户 - */ - @RequiresPermissions("system:user:add") - @Log(title = "用户管理", businessType = BusinessType.INSERT) - @Transactional - public AjaxResult add(@Validated @RequestBody SysUser user) { - if (!userService.checkUserNameUnique(user)) { - return error("新增用户'" + user.getUserName() + "'失败,登录账号已存在"); - } else if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(user)) { - return error("新增用户'" + user.getUserName() + "'失败,手机号码已存在"); - } else if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(user)) { - return error("新增用户'" + user.getUserName() + "'失败,邮箱账号已存在"); - } - user.setCreateBy(SecurityUtils.getUsername()); - user.setPassword(SecurityUtils.encryptPassword(user.getPassword())); - return toAjax(userService.insertUser(user)); - } /** * 新增用户Api接口,不校验权限,用于第三方登录注册用户时使用。 */ @InnerAuth - @RequiresPermissions("yonghu:repair:list") + //@PreAuthorize("@ss.hasPermi('yonghu:repair:add') || @ss.hasPermi('yonghu:customer:add') || @ss.hasPermi('yonghu:property:add') || @ss.hasPermi('yonghu:user:add')") @PostMapping("/addApi") public R addApi(@Validated @RequestBody SysUser user) { - System.out.println("调用api成功!即将插入user数据"); - -// if (!userService.checkUserNameUnique(user)) { -// return error("新增用户'" + user.getUserName() + "'失败,登录账号已存在"); -// } else if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(user)) { -// return error("新增用户'" + user.getUserName() + "'失败,手机号码已存在"); -// } else if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(user)) { -// return error("新增用户'" + user.getUserName() + "'失败,邮箱账号已存在"); -// } user.setCreateBy(SecurityUtils.getUsername()); user.setPassword(SecurityUtils.encryptPassword(user.getPassword())); - - System.out.println("调用api成功!即将插入user数据"); - return R.ok(userService.insertUser(user),"插入成功"); + userService.insertUser(user); + // 插入成功后,获取返回的userId,返回给调用方 + Integer userId = Math.toIntExact(user.getUserId()); + return R.ok(userId,"插入成功"); } /** - * 修改用户 + * 修改用户Api */ - @RequiresPermissions("system:user:edit") + @InnerAuth + //@RequiresPermissions("system:user:edit") @Log(title = "用户管理", businessType = BusinessType.UPDATE) @PutMapping - public AjaxResult edit(@Validated @RequestBody SysUser user) { + public R editApi(@Validated @RequestBody SysUser user) { + System.out.println("修改用户信息:"+user.toString()); userService.checkUserAllowed(user); userService.checkUserDataScope(user.getUserId()); if (!userService.checkUserNameUnique(user)) { - return error("修改用户'" + user.getUserName() + "'失败,登录账号已存在"); + return R.fail("修改用户'" + user.getUserName() + "'失败,登录账号已存在"); } else if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(user)) { - return error("修改用户'" + user.getUserName() + "'失败,手机号码已存在"); + return R.fail("修改用户'" + user.getUserName() + "'失败,手机号码已存在"); } else if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(user)) { - return error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在"); + return R.fail("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在"); } user.setUpdateBy(SecurityUtils.getUsername()); - return toAjax(userService.updateUser(user)); + return R.ok(userService.updateUser(user)); } + /** - * 删除用户 + * 删除用户ApiremoveApi */ + @InnerAuth @RequiresPermissions("system:user:remove") @Log(title = "用户管理", businessType = BusinessType.DELETE) @DeleteMapping("/{userIds}") - public AjaxResult remove(@PathVariable Long[] userIds) { - if (ArrayUtils.contains(userIds, SecurityUtils.getUserId())) { - return error("当前用户不能删除"); - } - return toAjax(userService.deleteUserByIds(userIds)); + public R removeApi(@PathVariable Long[] userIds) { + + return R.ok(userService.deleteUserByIds(userIds)); } + /** * 重置密码 */ diff --git a/RuoYi-Cloud-master/ruoyi-modules/ruoyi-yonghu/src/main/java/com/ruoyi/yonghu/controller/JsqRepairController.java b/RuoYi-Cloud-master/ruoyi-modules/ruoyi-yonghu/src/main/java/com/ruoyi/yonghu/controller/JsqRepairController.java index e1a2c7fe6dcb9157a5ab66b1fbd2fe89ba96f5c0..be9df349d825e85a9c192c5810e3ae4434139af2 100644 --- a/RuoYi-Cloud-master/ruoyi-modules/ruoyi-yonghu/src/main/java/com/ruoyi/yonghu/controller/JsqRepairController.java +++ b/RuoYi-Cloud-master/ruoyi-modules/ruoyi-yonghu/src/main/java/com/ruoyi/yonghu/controller/JsqRepairController.java @@ -1,6 +1,7 @@ package com.ruoyi.yonghu.controller; import com.ruoyi.common.core.domain.R; +import com.ruoyi.common.core.utils.poi.ExcelUtil; import com.ruoyi.common.core.web.controller.BaseController; import com.ruoyi.common.core.web.domain.AjaxResult; import com.ruoyi.common.core.web.page.TableDataInfo; @@ -16,10 +17,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import com.ruoyi.system.api.domain.SysUser; -import com.ruoyi.system.api.RemoteUserRoleService; - -import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; import java.util.List; /** @@ -34,8 +32,7 @@ public class JsqRepairController extends BaseController { @Autowired private JsqRepairService jsqRepairService; - @Resource - private RemoteUserRoleService remoteUserRoleService; + /** * 查询维修人员管理列表 @@ -49,6 +46,31 @@ public class JsqRepairController extends BaseController { return getDataTable(list); } + /** + * 导出维修人员管理列表 + */ + @RequiresPermissions("yonghu:repair:export") + @Log(title = "维修人员管理", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, JsqRepair jsqRepair) + { + List list = jsqRepairService.selectJsqRepairList(jsqRepair); + ExcelUtil util = new ExcelUtil(JsqRepair.class); + util.exportExcel(response, list, "维修人员管理数据"); + } + + /** + * 获取维修人员管理详细信息 + */ + @RequiresPermissions("yonghu:repair:query") + @GetMapping(value = "/{repairId}") + public AjaxResult getInfo(@PathVariable("repairId") Long repairId) + { + System.out.println("维修人员管理修改前置操作"); + return success(jsqRepairService.selectJsqRepairByRepairId(repairId)); + } + + /** * 新增维修工 */ @@ -63,32 +85,34 @@ public class JsqRepairController extends BaseController { jsqRepair.setRepairPwd(SecurityUtils.encryptPassword(jsqRepair.getRepairPwd())); jsqRepair.setRepairStatus(1L); - //新增维修工成功则在用户表也插入一条信息 - SysUser sysUser = new SysUser(); - Long[] roleIds = new Long[1]; - roleIds[0] = 5L; - sysUser.setRoleIds(roleIds); - sysUser.setUserName(jsqRepair.getRepairName()); - sysUser.setNickName(jsqRepair.getRepairName()); - sysUser.setPassword(SecurityUtils.encryptPassword(jsqRepair.getRepairPwd())); - sysUser.setPhonenumber(jsqRepair.getRepairPhone()); - sysUser.setStatus("0"); - sysUser.setCreateBy(SecurityUtils.getUsername()); - sysUser.setCreateTime(jsqRepair.getCreateTime()); - - R integerR = remoteUserRoleService.addApi(sysUser, "inner" ); - - int i= 0; - - if (integerR.getCode() == 200) { - - jsqRepair.setUserId(Long.parseLong(integerR.getData().toString())); - //新增维修工 - i = jsqRepairService.insertJsqRepair(jsqRepair); - return toAjax(i); - } + return toAjax(jsqRepairService.insertJsqRepair(jsqRepair)); + } + + /** + * 修改维修人员管理 + */ + @RequiresPermissions("yonghu:repair:edit") + @Log(title = "维修人员管理", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody JsqRepair jsqRepair) + { + System.out.println("维修人员管理修改"); + int i = jsqRepairService.updateJsqRepair(jsqRepair); + System.out.println("i = "+i); + System.out.println("执行完毕"); return toAjax(i); } + /** + * 删除维修人员管理 + */ + @RequiresPermissions("yonghu:repair:remove") + @Log(title = "维修人员管理", businessType = BusinessType.DELETE) + @DeleteMapping("/{repairIds}") + public AjaxResult remove(@PathVariable("repairIds") Long[] repairIds) + { + return toAjax(jsqRepairService.deleteJsqRepairByRepairIds(repairIds)); + } + } diff --git a/RuoYi-Cloud-master/ruoyi-modules/ruoyi-yonghu/src/main/java/com/ruoyi/yonghu/mapper/JsqRepairMapper.java b/RuoYi-Cloud-master/ruoyi-modules/ruoyi-yonghu/src/main/java/com/ruoyi/yonghu/mapper/JsqRepairMapper.java index 72692b3785c4c3d009c2dbfb8b6a01f417e729b2..6e5195b04341104ac8e512e9a6b95ac94eb027e4 100644 --- a/RuoYi-Cloud-master/ruoyi-modules/ruoyi-yonghu/src/main/java/com/ruoyi/yonghu/mapper/JsqRepairMapper.java +++ b/RuoYi-Cloud-master/ruoyi-modules/ruoyi-yonghu/src/main/java/com/ruoyi/yonghu/mapper/JsqRepairMapper.java @@ -12,6 +12,13 @@ import java.util.List; */ public interface JsqRepairMapper { + /** + * 查询维修人员管理 + * + * @param repairId 维修人员管理主键 + * @return 维修人员管理 + */ + public JsqRepair selectJsqRepairByRepairId(Long repairId); /** * 查询维修人员管理列表 * @@ -29,12 +36,28 @@ public interface JsqRepairMapper public int insertJsqRepair(JsqRepair jsqRepair); /** - * 校验用户名称是否唯一 + * 修改维修人员管理 + * + * @param jsqRepair 维修人员管理 + * @return 结果 + */ + public int updateJsqRepair(JsqRepair jsqRepair); + + /** + * 删除维修人员管理 + * + * @param repairId 维修人员管理主键 + * @return 结果 + */ + public int deleteJsqRepairByRepairId(Long repairId); + + /** + * 批量删除维修人员管理 * - * @param repairName 用户名称 + * @param repairIds 需要删除的数据主键集合 * @return 结果 */ - public JsqRepair checkRepairNameUnique(String repairName); + public int deleteJsqRepairByRepairIds(Long[] repairIds); } diff --git a/RuoYi-Cloud-master/ruoyi-modules/ruoyi-yonghu/src/main/java/com/ruoyi/yonghu/service/JsqRepairService.java b/RuoYi-Cloud-master/ruoyi-modules/ruoyi-yonghu/src/main/java/com/ruoyi/yonghu/service/JsqRepairService.java index 4b781d4ac347ec9aa3c21506ac6bc1f9aa2bba4a..23bf0e1bd06a4883b8ef23e8f5930df1fafd5cc4 100644 --- a/RuoYi-Cloud-master/ruoyi-modules/ruoyi-yonghu/src/main/java/com/ruoyi/yonghu/service/JsqRepairService.java +++ b/RuoYi-Cloud-master/ruoyi-modules/ruoyi-yonghu/src/main/java/com/ruoyi/yonghu/service/JsqRepairService.java @@ -13,6 +13,13 @@ import java.util.List; */ public interface JsqRepairService { + /** + * 查询维修人员管理 + * + * @param repairId 维修人员管理主键 + * @return 维修人员管理 + */ + public JsqRepair selectJsqRepairByRepairId(Long repairId); /** * 查询维修人员管理列表 @@ -30,12 +37,28 @@ public interface JsqRepairService public int insertJsqRepair(JsqRepair jsqRepair); /** - * 校验用户名称是否唯一 + * 修改维修人员管理 + * + * @param jsqRepair 维修人员管理 + * @return 结果 + */ + public int updateJsqRepair(JsqRepair jsqRepair); + + /** + * 批量删除维修人员管理 + * + * @param repairIds 需要删除的维修人员管理主键集合 + * @return 结果 + */ + public int deleteJsqRepairByRepairIds(Long[] repairIds); + + /** + * 删除维修人员管理信息 * - * @param jsqRepair 用户信息 + * @param repairId 维修人员管理主键 * @return 结果 */ - public boolean checkRepairNameUnique(JsqRepair jsqRepair); + public int deleteJsqRepairByRepairId(Long repairId); } diff --git a/RuoYi-Cloud-master/ruoyi-modules/ruoyi-yonghu/src/main/java/com/ruoyi/yonghu/service/impl/JsqRepairServiceImpl.java b/RuoYi-Cloud-master/ruoyi-modules/ruoyi-yonghu/src/main/java/com/ruoyi/yonghu/service/impl/JsqRepairServiceImpl.java index 498116ee5c3b2e7484e06bd5873584745f122ddf..5b3c6c84efe0293f72939e71b92891f3f8c455ff 100644 --- a/RuoYi-Cloud-master/ruoyi-modules/ruoyi-yonghu/src/main/java/com/ruoyi/yonghu/service/impl/JsqRepairServiceImpl.java +++ b/RuoYi-Cloud-master/ruoyi-modules/ruoyi-yonghu/src/main/java/com/ruoyi/yonghu/service/impl/JsqRepairServiceImpl.java @@ -1,27 +1,45 @@ package com.ruoyi.yonghu.service.impl; -import com.ruoyi.common.core.constant.UserConstants; + +import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.utils.DateUtils; -import com.ruoyi.common.core.utils.StringUtils; +import com.ruoyi.common.security.utils.SecurityUtils; +import com.ruoyi.system.api.RemoteUserRoleService; import com.ruoyi.system.api.domain.SysUser; import com.ruoyi.yonghu.domain.JsqRepair; import com.ruoyi.yonghu.mapper.JsqRepairMapper; import com.ruoyi.yonghu.service.JsqRepairService; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.List; /** * 维修人员管理Service业务层处理 - * + * * @author ruoyi * @date 2024-12-23 */ @Service -public class JsqRepairServiceImpl implements JsqRepairService -{ +public class JsqRepairServiceImpl implements JsqRepairService { + + @Resource + private RemoteUserRoleService remoteUserRoleService; + @Resource + private JsqRepairMapper jsqRepairMapper; + + + /** + * 查询维修人员管理 + * + * @param repairId 维修人员管理主键 + * @return 维修人员管理 + */ + @Override + public JsqRepair selectJsqRepairByRepairId(Long repairId) { + return jsqRepairMapper.selectJsqRepairByRepairId(repairId); + } /** * 查询维修人员管理列表 @@ -30,41 +48,113 @@ public class JsqRepairServiceImpl implements JsqRepairService * @return 维修人员管理 */ @Override - public List selectJsqRepairList(JsqRepair jsqRepair) - { + public List selectJsqRepairList(JsqRepair jsqRepair) { return jsqRepairMapper.selectJsqRepairList(jsqRepair); } - @Resource - private JsqRepairMapper jsqRepairMapper; /** * 新增维修人员管理 - * + * * @param jsqRepair 维修人员管理 * @return 结果 */ @Override - public int insertJsqRepair(JsqRepair jsqRepair) - { - jsqRepair.setCreateTime(DateUtils.getNowDate()); - return jsqRepairMapper.insertJsqRepair(jsqRepair); + @Transactional//事务注解 + public int insertJsqRepair(JsqRepair jsqRepair) { + //在用户表也插入一条信息 + SysUser sysUser = new SysUser(); + Long[] roleIds = new Long[1]; + roleIds[0] = 5L; + sysUser.setRoleIds(roleIds); + sysUser.setUserName(jsqRepair.getRepairName()); + sysUser.setNickName(jsqRepair.getRepairName()); + sysUser.setPassword(SecurityUtils.encryptPassword(jsqRepair.getRepairPwd())); + sysUser.setPhonenumber(jsqRepair.getRepairPhone()); + sysUser.setStatus("0"); + sysUser.setCreateBy(SecurityUtils.getUsername()); + sysUser.setCreateTime(jsqRepair.getCreateTime()); + + R integerR = remoteUserRoleService.addApi(sysUser, "inner"); + + //当用户表插入成功之后再插入维修工表 + if (integerR.getCode() == 200) { + + jsqRepair.setUserId(integerR.getData().longValue()); + //新增维修工 + jsqRepair.setCreateTime(DateUtils.getNowDate()); + return jsqRepairMapper.insertJsqRepair(jsqRepair); + } else { + return -1; + } } + /** - * 校验用户名称是否唯一 + * 修改维修人员管理 * - * @param jsqRepair 用户信息 + * @param jsqRepair 维修人员管理 + * @return 结果 + */ + @Override + @Transactional//事务注解 + public int updateJsqRepair(JsqRepair jsqRepair) { + + //在用户表也修改一条信息 + SysUser sysUser = new SysUser(); + Long[] roleIds = new Long[1]; + roleIds[0] = 5L; + sysUser.setRoleIds(roleIds); + sysUser.setUserId(jsqRepair.getUserId()); + sysUser.setUserName(jsqRepair.getRepairName()); + sysUser.setNickName(jsqRepair.getRepairName()); + sysUser.setPassword(SecurityUtils.encryptPassword(jsqRepair.getRepairPwd())); + sysUser.setPhonenumber(jsqRepair.getRepairPhone()); + sysUser.setStatus("0"); + sysUser.setDelFlag(jsqRepair.getDelFlag()); + sysUser.setCreateBy(SecurityUtils.getUsername()); + sysUser.setCreateTime(jsqRepair.getCreateTime()); + R integerR = remoteUserRoleService.editApi(sysUser, "inner"); + + //当用户表插入成功之后再修改维修工表 + if (integerR.getCode() == 200) { + System.out.println("修改用户成功"); + //新增维修工 + jsqRepair.setCreateTime(DateUtils.getNowDate()); + return jsqRepairMapper.updateJsqRepair(jsqRepair); + } else { + return -1; + } + } + + /** + * 批量删除维修人员管理 + * + * @param repairIds 需要删除的维修人员管理主键 * @return 结果 */ @Override - public boolean checkRepairNameUnique(JsqRepair jsqRepair) - { - Long repairId = StringUtils.isNull(jsqRepair.getRepairId()) ? -1L : jsqRepair.getRepairId(); - JsqRepair info = jsqRepairMapper.checkRepairNameUnique(jsqRepair.getRepairName()); - if (StringUtils.isNotNull(info) && info.getRepairId().longValue() != repairId.longValue()) - { - return false; + public int deleteJsqRepairByRepairIds(Long[] repairIds) { + //先删除用户表中的信息,通过维修工表中的userId字段找到用户id + + for (Long repairId : repairIds) { + JsqRepair jsqRepair = jsqRepairMapper.selectJsqRepairByRepairId(repairId); + Long[] userIds = new Long[1]; + userIds[0] = jsqRepair.getUserId(); + remoteUserRoleService.removeApi(userIds, "inner"); } - return true; + //再删除维修工表中的信息 + return jsqRepairMapper.deleteJsqRepairByRepairIds(repairIds); + } + + /** + * 删除维修人员管理信息 + * + * @param repairId 维修人员管理主键 + * @return 结果 + */ + @Override + public int deleteJsqRepairByRepairId(Long repairId) { + + return jsqRepairMapper.deleteJsqRepairByRepairId(repairId); } } diff --git a/RuoYi-Cloud-master/ruoyi-modules/ruoyi-yonghu/src/main/resources/mapper/yonghu/JsqRepairMapper.xml b/RuoYi-Cloud-master/ruoyi-modules/ruoyi-yonghu/src/main/resources/mapper/yonghu/JsqRepairMapper.xml index 62b144b62c95271dff5ccf3a5ab1900d747949f7..4c945d98c06aadd0bdb44d12466ccd1a18f327bb 100644 --- a/RuoYi-Cloud-master/ruoyi-modules/ruoyi-yonghu/src/main/resources/mapper/yonghu/JsqRepairMapper.xml +++ b/RuoYi-Cloud-master/ruoyi-modules/ruoyi-yonghu/src/main/resources/mapper/yonghu/JsqRepairMapper.xml @@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + insert into jsq_repair user_id, @@ -63,7 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_by, update_time, del_flag, - + #{userId}, #{repairName}, @@ -79,8 +79,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{updateBy}, #{updateTime}, #{delFlag}, - + + + update jsq_repair + + user_id = #{userId}, + repair_name = #{repairName}, + repair_pwd = #{repairPwd}, + repair_sex = #{repairSex}, + repair_age = #{repairAge}, + repair_address = #{repairAddress}, + repair_home = #{repairHome}, + repair_phone = #{repairPhone}, + repair_status = #{repairStatus}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + del_flag = #{delFlag}, + + where repair_id = #{repairId} + + + + delete from jsq_repair where repair_id = #{repairId} + + + update jsq_repair set del_flag = '2' where repair_id in + + #{repairId} + + \ No newline at end of file