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 updatePassword(User record);
|
||||
|
||||
String getDefaultlanguage(String paramKey);
|
||||
|
||||
}
|
|
@ -303,16 +303,5 @@
|
|||
phone = #{phone,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</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>
|
|
@ -12,5 +12,5 @@ public interface ExtUserMapper {
|
|||
|
||||
int updatePassword(User record);
|
||||
|
||||
String getDefaultlanguage(String paramKey);
|
||||
String getDefaultLanguage(String paramKey);
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
update_time = #{updateTime,jdbcType=BIGINT}
|
||||
where id=#{id,jdbcType=VARCHAR}
|
||||
</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
|
||||
where param_key=#{paramKey,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
|
|
@ -89,8 +89,8 @@ public class LoginController {
|
|||
|
||||
/*Get default language*/
|
||||
@PostMapping(value = "/language")
|
||||
public String getDefaultlanguage() {
|
||||
return userService.getDefaultlanguage();
|
||||
public String getDefaultLanguage() {
|
||||
return userService.getDefaultLanguage();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -345,8 +345,8 @@ public class UserService {
|
|||
userRoleMapper.insertSelective(userRole);
|
||||
}
|
||||
|
||||
public String getDefaultlanguage() {
|
||||
public String getDefaultLanguage() {
|
||||
final String key = "registry.defaultlanguage";
|
||||
return extUserMapper.getDefaultlanguage(key);
|
||||
return extUserMapper.getDefaultLanguage(key);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,9 +107,13 @@
|
|||
this.$post("signin", this.form, response => {
|
||||
saveLocalStorage(response);
|
||||
let language = response.data.language;
|
||||
this.$post("language",response=>{
|
||||
this.$setLang(language);
|
||||
})
|
||||
if (!language) {
|
||||
this.$post("language", response => {
|
||||
language = response.data.language
|
||||
this.$setLang(language);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
window.location.href = "/"
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue