| | |
| | | @PostMapping("/applicationOrdering") |
| | | public JSONObject order (@RequestBody TidePojo tidePojo) { |
| | | SysUser user = userService.selectUserByUserName(tidePojo.getPltAccountLogin()); |
| | | String randomString = TideUtils.getRandomString(12); |
| | | // String randomString = TideUtils.getRandomString(12); |
| | | String defaultPwd = "I73Kj+Mn$+SI";//默认开通密码固定写死 |
| | | //账号不存在,执行新增操作 |
| | | if(Objects.isNull(user)){ |
| | | user = new SysUser(); |
| | | String password = SecurityUtils.encryptPassword(randomString); |
| | | String password = SecurityUtils.encryptPassword(defaultPwd); |
| | | user.setPassword(password); |
| | | user.setUserName(tidePojo.getPltAccountLogin()); |
| | | user.setNickName(tidePojo.getEnterpriseName()); |
| | |
| | | user.setDelFlag("0"); |
| | | user.setPostIds(new Long[]{1L}); |
| | | user.setRoleId(1L); |
| | | user.setDeptIds(new Long[]{100L}); |
| | | userService.insertUser(user); |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("account", tidePojo.getPltAccountLogin()); |
| | | map.put("token", randomString); |
| | | map.put("token", defaultPwd); |
| | | map.put("tenantId", user.getUserId()); |
| | | return TideUtils.getResult(20000, "成功", map); |
| | | } |
| | |
| | | @Component |
| | | @Slf4j |
| | | public class TideUtils { |
| | | private final static String appId = "19472937-3039-4bf1-8334-13dc20e076e5"; |
| | | private final static String appId = "1152966532368695296"; |
| | | |
| | | private final static String appSecret = "b57bbad60724f810e7bb7e1e7b8791b63eba50e50faef6fa819ade822fac9e4a"; |
| | | private final static String appSecret = "okcLMTMwODIwMjUxMTE4MjgwMzA1t8"; |
| | | |
| | | // 内网地址 |
| | | private final static String ip = "http://58.56.84.138:8083"; |
| | |
| | | # 开发环境配置 |
| | | server: |
| | | # 服务器的HTTP端口,默认为8080 |
| | | port: 7003 |
| | | port: 8014 |
| | | servlet: |
| | | # 应用的访问路径 |
| | | context-path: / |
| | |
| | | druid: |
| | | # 主库数据源 |
| | | master: |
| | | url: jdbc:mysql://10.136.12.71:3306/mis_ruoyi?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | url: jdbc:mysql://10.136.12.71:3306/mom_ruoyi?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: zttZTT123! |
| | | # 从库数据源 |