Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -57,6 +57,11 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
"/api/wxWorkQrConnect",
|
||||
"/api/sys/user-plan-log/wx-pay/**",
|
||||
"/api/wx-official/**",
|
||||
"/api/system/user/loginByPhoneForTest",
|
||||
"/api/system/user/updateUserBalanceWithoutLogin",
|
||||
"/api/system/user/getUserWithoutLogin",
|
||||
"/api/system/user-referee/getReferee/**",
|
||||
"/api/system/dict-data/page",
|
||||
"/lvQ4EoivKJ.txt"
|
||||
)
|
||||
.permitAll()
|
||||
|
||||
@@ -39,7 +39,6 @@ public class OrganizationController extends BaseController {
|
||||
return success(organizationService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:org:list')")
|
||||
@OperationLog
|
||||
@ApiOperation("根据id查询组织机构")
|
||||
@GetMapping("/{id}")
|
||||
|
||||
@@ -8,11 +8,15 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.config.ConfigProperties;
|
||||
import com.gxwebsoft.common.core.security.JwtSubject;
|
||||
import com.gxwebsoft.common.core.security.JwtUtil;
|
||||
import com.gxwebsoft.common.core.utils.CommonUtil;
|
||||
import com.gxwebsoft.common.core.web.*;
|
||||
import com.gxwebsoft.common.system.entity.*;
|
||||
import com.gxwebsoft.common.system.param.UserImportParam;
|
||||
import com.gxwebsoft.common.system.param.UserParam;
|
||||
import com.gxwebsoft.common.system.result.LoginResult;
|
||||
import com.gxwebsoft.common.system.service.DictionaryDataService;
|
||||
import com.gxwebsoft.common.system.service.OrganizationService;
|
||||
import com.gxwebsoft.common.system.service.RoleService;
|
||||
@@ -51,6 +55,8 @@ public class UserController extends BaseController {
|
||||
private OrganizationService organizationService;
|
||||
@Resource
|
||||
private DictionaryDataService dictionaryDataService;
|
||||
@Resource
|
||||
private ConfigProperties configProperties;
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:auth:user')")
|
||||
@ApiOperation("分页查询用户")
|
||||
@@ -80,6 +86,16 @@ public class UserController extends BaseController {
|
||||
return success(userService.getByPhone(phone));
|
||||
}
|
||||
|
||||
@ApiOperation("手机号登录(测试用)")
|
||||
@PostMapping("/loginByPhoneForTest")
|
||||
public ApiResult<?> loginByPhoneForTest(@RequestBody User user) {
|
||||
User getLoginUser = userService.getByPhone(user.getPhone());
|
||||
if (!user.getPhoneLoginCode().equals("1700083")) return fail("验证码错误");
|
||||
String access_token = JwtUtil.buildToken(new JwtSubject(getLoginUser.getUsername(), getLoginUser.getTenantId()),
|
||||
configProperties.getTokenExpireTime(), configProperties.getTokenKey());
|
||||
return success("登录成功", new LoginResult(access_token, user));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:user:save')")
|
||||
@ApiOperation("添加用户")
|
||||
@PostMapping()
|
||||
@@ -396,6 +412,25 @@ public class UserController extends BaseController {
|
||||
return fail("操作失败");
|
||||
}
|
||||
|
||||
@PostMapping("/updateUserBalanceWithoutLogin")
|
||||
@ApiOperation("更新用户余额(无需登陆)")
|
||||
public ApiResult<?> updateUserBalanceWithoutLogin(@RequestBody User user) {
|
||||
if (user.getAuthCode() == null || !user.getAuthCode().equals("1700083"))
|
||||
return fail("参数错误");
|
||||
if (userService.updateUser(user)) {
|
||||
return success("操作成功");
|
||||
}
|
||||
return fail("操作失败");
|
||||
}
|
||||
|
||||
@ApiOperation("获取用户(无需登陆)")
|
||||
@PostMapping("/getUserWithoutLogin")
|
||||
public ApiResult<?> getUserWithoutLogin(@RequestBody User user) {
|
||||
if (user.getAuthCode() == null || !user.getAuthCode().equals("1700083"))
|
||||
return fail("参数错误");
|
||||
return success(userService.getByIdRel(user.getUserId()));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:user:list')")
|
||||
@OperationLog
|
||||
@ApiOperation("统计用户余额")
|
||||
|
||||
@@ -175,8 +175,8 @@ public class WxLoginController extends BaseController {
|
||||
UserReferee check = userRefereeService.check(addUser.getUserId(), userParam.getRefereeId());
|
||||
if (check == null) {
|
||||
UserReferee userReferee = new UserReferee();
|
||||
userReferee.setDealerId(addUser.getUserId());
|
||||
userReferee.setUserId(userParam.getRefereeId());
|
||||
userReferee.setDealerId(userParam.getRefereeId());
|
||||
userReferee.setUserId(addUser.getUserId());
|
||||
userRefereeService.save(userReferee);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,6 +92,9 @@ public class Organization implements Serializable {
|
||||
@ApiModelProperty(value = "负责人id")
|
||||
private Integer leaderId;
|
||||
|
||||
@ApiModelProperty(value = "是否合作单位")
|
||||
private Integer isCoop;
|
||||
|
||||
@ApiModelProperty(value = "排序号")
|
||||
private Integer sortNumber;
|
||||
|
||||
|
||||
@@ -305,6 +305,14 @@ public class User implements UserDetails {
|
||||
@TableField(exist = false)
|
||||
private User referee;
|
||||
|
||||
@ApiModelProperty("手机号登录校验码")
|
||||
@TableField(exist = false)
|
||||
private String phoneLoginCode;
|
||||
|
||||
@ApiModelProperty("校验码")
|
||||
@TableField(exist = false)
|
||||
private String authCode;
|
||||
|
||||
// @ApiModelProperty("企业信息")
|
||||
// @TableField(exist = false)
|
||||
// private Company companyInfo;
|
||||
|
||||
@@ -68,6 +68,9 @@
|
||||
<if test="param.leaderId != null">
|
||||
AND a.leader_id = #{param.leaderId}
|
||||
</if>
|
||||
<if test="param.isCoop != null">
|
||||
AND a.is_coop = #{param.isCoop}
|
||||
</if>
|
||||
<if test="param.estateOnly != null">
|
||||
AND a.estate IS NOT null
|
||||
</if>
|
||||
|
||||
@@ -114,6 +114,10 @@ public class OrganizationParam extends BaseParam {
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer leaderId;
|
||||
|
||||
@ApiModelProperty(value = "是否合作单位")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer isCoop;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String comments;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user