|
@@ -410,32 +410,6 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
|
|
|
DBConnection();
|
|
|
String sUserId = null;
|
|
|
String password = null;
|
|
|
- if (excSelect("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon) > 0) {
|
|
|
- excUpdate("update t_user t set t.LAST_LOGIN_TIME = now() where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
|
|
|
- sUserId = excSelect1("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
|
|
|
- } else {
|
|
|
- password = MD5Util.encrypt(commonUser.getPhone(), "123456");
|
|
|
- excInsert("insert into t_user (USERNAME,PASSWORD,REALNAME,STATUS,MOBILE,CREATE_TIME,MODIFY_TIME,LAST_LOGIN_TIME,AVATAR,OPER_ID) " +
|
|
|
- "VALUES ('" + commonUser.getPhone() + "','" + password + "','" + userDO.getUserName() + "',1,'" + commonUser.getPhone() + "',NOW(),NOW(),NOW(),'https://liangxin.zthymaoyi.com/upload/default.jpg','"
|
|
|
- + UUID.randomUUID().toString(true) + "')", this.coon);
|
|
|
- Long user_id = excSelect("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
|
|
|
- sUserId = excSelect1("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
|
|
|
- excInsert("insert into t_user_role (USER_ID,ROLE_ID) " +
|
|
|
- "VALUES (" + user_id + ",7)", this.coon);
|
|
|
- excInsert("insert into t_user_config (USER_ID,THEME,LAYOUT,MULTI_PAGE,FIX_SIDERBAR,FIX_HEADER,COLOR) " +
|
|
|
- "VALUES (" + user_id + ",'dark','side','0','1','1','rgb(66, 185, 131)')", this.coon);
|
|
|
-
|
|
|
- }
|
|
|
- close();
|
|
|
- DBConnection1();
|
|
|
- if (excSelect2("select * from s_user t where t.id = '" + sUserId + "'", this.coon1) != null) {
|
|
|
- excUpdate("update s_user t set t.last_oper_time = now() where t.id = '" + sUserId + "'", this.coon1);
|
|
|
- } else {
|
|
|
- excInsert("insert into s_user (id,nick_name,user_name,password,avatar,money,status,oper_time,last_oper_time) " +
|
|
|
- "VALUES ('" + sUserId + "','" + userDO.getUserName() + "','" + commonUser.getPhone() + "','" + password + "','https://liangxin.zthymaoyi.com/upload/default.jpg','0.0',0,NOW(),NOW())", this.coon1);
|
|
|
- }
|
|
|
- close1();
|
|
|
- userDO.setLiangxinId(sUserId);
|
|
|
this.updateById(userDO);
|
|
|
}
|
|
|
//返回用户DTO
|
|
@@ -544,32 +518,6 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
|
|
|
DBConnection();
|
|
|
String sUserId = null;
|
|
|
password = null;
|
|
|
- if (excSelect("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon) > 0) {
|
|
|
- excUpdate("update t_user t set t.LAST_LOGIN_TIME = now() where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
|
|
|
- sUserId = excSelect1("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
|
|
|
- } else {
|
|
|
- password = MD5Util.encrypt(commonUser.getPhone(), "123456");
|
|
|
- excInsert("insert into t_user (USERNAME,PASSWORD,REALNAME,STATUS,MOBILE,CREATE_TIME,MODIFY_TIME,LAST_LOGIN_TIME,AVATAR,OPER_ID) " +
|
|
|
- "VALUES ('" + commonUser.getPhone() + "','" + password + "','" + userDO.getUserName() + "',1,'" + commonUser.getPhone() + "',NOW(),NOW(),NOW(),'https://liangxin.zthymaoyi.com/upload/default.jpg','"
|
|
|
- + UUID.randomUUID().toString(true) + "')", this.coon);
|
|
|
- Long user_id = excSelect("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
|
|
|
- sUserId = excSelect1("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
|
|
|
- excInsert("insert into t_user_role (USER_ID,ROLE_ID) " +
|
|
|
- "VALUES (" + user_id + ",7)", this.coon);
|
|
|
- excInsert("insert into t_user_config (USER_ID,THEME,LAYOUT,MULTI_PAGE,FIX_SIDERBAR,FIX_HEADER,COLOR) " +
|
|
|
- "VALUES (" + user_id + ",'dark','side','0','1','1','rgb(66, 185, 131)')", this.coon);
|
|
|
-
|
|
|
- }
|
|
|
- close();
|
|
|
- DBConnection1();
|
|
|
- if (excSelect2("select * from s_user t where t.id = '" + sUserId + "'", this.coon1) != null) {
|
|
|
- excUpdate("update s_user t set t.last_oper_time = now() where t.id = '" + sUserId + "'", this.coon1);
|
|
|
- } else {
|
|
|
- excInsert("insert into s_user (id,nick_name,user_name,password,avatar,money,status,oper_time,last_oper_time) " +
|
|
|
- "VALUES ('" + sUserId + "','" + userDO.getUserName() + "','" + commonUser.getPhone() + "','" + password + "','https://liangxin.zthymaoyi.com/upload/default.jpg','0.0',0,NOW(),NOW())", this.coon1);
|
|
|
- }
|
|
|
- close1();
|
|
|
- userDO.setLiangxinId(sUserId);
|
|
|
this.updateById(userDO);
|
|
|
}
|
|
|
//返回用户DTO
|