Skip to content

Commit

Permalink
feat: 增加微信登录功能
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyw committed May 28, 2024
1 parent dae6a66 commit 10dca31
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@
<scope>import</scope>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.2.13</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,13 @@
import com.roncoo.education.common.core.enums.ClientTypeEnum;
import com.roncoo.education.common.core.enums.LoginAuthTypeEnum;
import com.roncoo.education.common.core.tools.JsonUtil;
import com.roncoo.education.user.service.api.biz.ApiUsersBiz;
import com.roncoo.education.user.service.api.req.WxCodeReq;
import com.roncoo.education.user.service.api.req.WxLoginReq;
import org.junit.jupiter.api.Test;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;

import javax.annotation.Resource;

public class LoginTest extends BaseTest {

@Resource
private ApiUsersBiz apiUsersBiz;

@Test
public void wxLogin() throws Exception {
WxLoginReq req = new WxLoginReq();
Expand All @@ -33,7 +27,7 @@ public void wxCode() throws Exception {
req.setLoginAuthType(LoginAuthTypeEnum.PC.getCode());
req.setClientType(ClientTypeEnum.PC.getCode());
req.setCode("222");
apiUsersBiz.wxCode(req);
mvc.perform(MockMvcRequestBuilders.post("/user/api/users/wx/code").content(JsonUtil.toJsonString(req)));
}

}

0 comments on commit 10dca31

Please sign in to comment.