File tree Expand file tree Collapse file tree 5 files changed +3
-10
lines changed
langchat-server/src/test/java/cn/tycoding/langchat
langchat-ui/src/views/login
langchat-upms-api/src/main/java/cn/tycoding/langchat/upms/controller
langchat-upms-biz/src/main/java/cn/tycoding/langchat/upms/service/impl Expand file tree Collapse file tree 5 files changed +3
-10
lines changed Original file line number Diff line number Diff line change 1818
1919import cn .tycoding .langchat .common .core .properties .AuthProps ;
2020import cn .tycoding .langchat .upms .utils .AuthUtil ;
21- import dev .langchain4j .model .dashscope .QwenEmbeddingModel ;
22- import dev .langchain4j .model .embedding .EmbeddingModel ;
2321import lombok .extern .slf4j .Slf4j ;
2422import org .junit .Test ;
2523import org .junit .runner .RunWith ;
@@ -42,11 +40,6 @@ public class AppTest {
4240 public static void main (String [] args ) {
4341 String encode = AuthUtil .encode ("langchat-salt" , "123456" );
4442 System .out .println (encode );
45-
46- EmbeddingModel embeddingModel = QwenEmbeddingModel .builder ()
47- .apiKey ("demo" )
48- .modelName ("" )
49- .build ();
5043 }
5144
5245 @ Test
Original file line number Diff line number Diff line change 2929 const userStore = useUserStore ();
3030 const router = useRouter ();
3131 const form = reactive ({
32- username: ' langchat ' ,
32+ username: ' administrator ' ,
3333 password: ' langchat' ,
3434 });
3535
Original file line number Diff line number Diff line change 6060 if (value .length == 0 ) {
6161 reject (new Error (' 请输入手机号' ));
6262 }
63- if (! / ^ [1] + [3,8] + \d {9} $ / .test (value )) {
63+ if (! / ^ [1][ 3-9 ] \d {9} $ / .test (value )) {
6464 reject (new Error (' 手机号格式错误' ));
6565 } else {
6666 resolve ();
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ public R<UserInfo> findById(@PathVariable String id) {
7171 @ ApiLog ("新增用户" )
7272 @ SaCheckPermission ("upms:user:add" )
7373 public R <SysUser > add (@ RequestBody UserInfo user ) {
74+ user .setPassword (AuthUtil .encode (authProps .getSaltKey (), user .getPassword ()));
7475 sysUserService .add (user );
7576 return R .ok ();
7677 }
Original file line number Diff line number Diff line change @@ -158,7 +158,6 @@ public void add(UserInfo user) {
158158 }
159159
160160 user .setCreateTime (new Date ());
161- user .setPassword (AuthUtil .encode (authProps .getSaltKey (), user .getPassword ()));
162161
163162 // 设置角色
164163 if (user .getRoleIds () == null || user .getRoleIds ().isEmpty ()) {
You can’t perform that action at this time.
0 commit comments