提交 bd036513 编写于 作者: C chenjianxing

Merge branch 'dev' of https://github.com/fit2cloudrd/metersphere-server into dev

...@@ -29,8 +29,6 @@ public interface UserMapper { ...@@ -29,8 +29,6 @@ public interface UserMapper {
int updateByPrimaryKey(User record); int updateByPrimaryKey(User record);
int updatePassword(User record);
String getDefaultlanguage(String paramKey);
} }
\ No newline at end of file
...@@ -303,16 +303,5 @@ ...@@ -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>
\ No newline at end of file
...@@ -12,5 +12,5 @@ public interface ExtUserMapper { ...@@ -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 @@ ...@@ -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 { ...@@ -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 { ...@@ -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 @@ ...@@ -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 = "/"
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册