| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Isolation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | } |
| | | |
| | | @PostMapping("/applicationOrdering") |
| | | @Transactional(rollbackFor = Exception.class,isolation = Isolation.READ_COMMITTED) |
| | | public JSONObject order (@RequestBody TidePojo tidePojo) { |
| | | SysUser user = userService.selectUserByUserName(tidePojo.getPltAccountLogin()); |
| | | String defaultPwd = "I73Kj+Mn$+SI";//默认开通密码固定写死 |
| | |
| | | //查询公司 |
| | | SysDept newSysDept = deptService.selectDeptByDeptName(dept.getDeptName()); |
| | | dept.setDeptId(ObjectUtils.isEmpty(newSysDept)?100L:newSysDept.getDeptId()); |
| | | dept.setTenantId(dept.getDeptId()); |
| | | deptService.updateDept(dept); |
| | | user = new SysUser(); |
| | | String password = SecurityUtils.encryptPassword(defaultPwd); |
| | | user.setPassword(password); |