Merge branch 'dev' of https://github.com/fit2cloudrd/metersphere-server into dev
This commit is contained in:
commit
bd0365135e
|
@ -29,8 +29,6 @@ public interface UserMapper {
|
||||||
|
|
||||||
int updateByPrimaryKey(User record);
|
int updateByPrimaryKey(User record);
|
||||||
|
|
||||||
int updatePassword(User record);
|
|
||||||
|
|
||||||
String getDefaultlanguage(String paramKey);
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -303,16 +303,5 @@
|
||||||
phone = #{phone,jdbcType=VARCHAR}
|
phone = #{phone,jdbcType=VARCHAR}
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
<!--修改密码-->
|
|
||||||
<update id="updatePassword" parameterType="io.metersphere.base.domain.User">
|
|
||||||
update user
|
|
||||||
set
|
|
||||||
password=#{password,jdbcType=VARCHAR},
|
|
||||||
update_time = #{updateTime,jdbcType=BIGINT}
|
|
||||||
where id=#{id,jdbcType=VARCHAR}
|
|
||||||
</update>
|
|
||||||
<select id="getDefaultlanguage" parameterType="java.lang.String" resultType="java.lang.String">
|
|
||||||
select param_value from system_parameter
|
|
||||||
where param_key=#{paramKey,jdbcType=VARCHAR}
|
|
||||||
</select>
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -12,5 +12,5 @@ public interface ExtUserMapper {
|
||||||
|
|
||||||
int updatePassword(User record);
|
int updatePassword(User record);
|
||||||
|
|
||||||
String getDefaultlanguage(String paramKey);
|
String getDefaultLanguage(String paramKey);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
update_time = #{updateTime,jdbcType=BIGINT}
|
update_time = #{updateTime,jdbcType=BIGINT}
|
||||||
where id=#{id,jdbcType=VARCHAR}
|
where id=#{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
<select id="getDefaultlanguage" parameterType="java.lang.String" resultType="java.lang.String">
|
<select id="getDefaultLanguage" parameterType="java.lang.String" resultType="java.lang.String">
|
||||||
select param_value from system_parameter
|
select param_value from system_parameter
|
||||||
where param_key=#{paramKey,jdbcType=VARCHAR}
|
where param_key=#{paramKey,jdbcType=VARCHAR}
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -89,8 +89,8 @@ public class LoginController {
|
||||||
|
|
||||||
/*Get default language*/
|
/*Get default language*/
|
||||||
@PostMapping(value = "/language")
|
@PostMapping(value = "/language")
|
||||||
public String getDefaultlanguage() {
|
public String getDefaultLanguage() {
|
||||||
return userService.getDefaultlanguage();
|
return userService.getDefaultLanguage();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -345,8 +345,8 @@ public class UserService {
|
||||||
userRoleMapper.insertSelective(userRole);
|
userRoleMapper.insertSelective(userRole);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDefaultlanguage() {
|
public String getDefaultLanguage() {
|
||||||
final String key = "registry.defaultlanguage";
|
final String key = "registry.defaultlanguage";
|
||||||
return extUserMapper.getDefaultlanguage(key);
|
return extUserMapper.getDefaultLanguage(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,9 +107,13 @@
|
||||||
this.$post("signin", this.form, response => {
|
this.$post("signin", this.form, response => {
|
||||||
saveLocalStorage(response);
|
saveLocalStorage(response);
|
||||||
let language = response.data.language;
|
let language = response.data.language;
|
||||||
this.$post("language",response=>{
|
if (!language) {
|
||||||
this.$setLang(language);
|
this.$post("language", response => {
|
||||||
})
|
language = response.data.language
|
||||||
|
this.$setLang(language);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
window.location.href = "/"
|
window.location.href = "/"
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue