Browse Source

内部用户加个启用状态

master
nili 4 months ago
parent
commit
b5ab193738
  1. 1
      game-dao/src/main/java/awesome/group/game/dao/bean/MatrixInnerUser.java
  2. 6
      game-dao/src/main/java/awesome/group/game/dao/mapper/MatrixInnerUserMapper.java
  3. 1
      game-service/src/main/java/awesome/group/game/service/bo/matrix/WhiteUserBo.java
  4. 4
      game-service/src/main/java/awesome/group/game/service/matrix/SuperAdminService.java
  5. 9
      game-web/src/main/java/awesome/group/game/web/rest/matrix/SuperAdminController.java

1
game-dao/src/main/java/awesome/group/game/dao/bean/MatrixInnerUser.java

@ -12,6 +12,7 @@ public class MatrixInnerUser {
private Integer id;
private Integer userId;
private Integer appId;
private Integer status;
private Timestamp createdAt;
private Timestamp updatedAt;
}

6
game-dao/src/main/java/awesome/group/game/dao/mapper/MatrixInnerUserMapper.java

@ -3,6 +3,7 @@ package awesome.group.game.dao.mapper;
import awesome.group.game.dao.bean.MatrixInnerUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import java.util.List;
@ -10,6 +11,9 @@ public interface MatrixInnerUserMapper extends BaseMapper<MatrixInnerUser> {
@Select("select * from matrix_inner_user where user_id = #{userId}")
MatrixInnerUser queryByUserId(Integer userId);
@Select("Select user_id from matrix_inner_user where app_id = #{appId}")
@Select("Select user_id from matrix_inner_user where app_id = #{appId} and status = 0")
List<Integer> queryByAppId(Integer appId);
@Update("update matrix_inner_user set status = #{status} where user_id = #{userId}")
int updateStatus(Integer userId, int status);
}

1
game-service/src/main/java/awesome/group/game/service/bo/matrix/WhiteUserBo.java

@ -33,6 +33,7 @@ public class WhiteUserBo {
this.id = w.getId();
this.appId = u.getAppId();
this.appName = a.getName();
this.status = w.getStatus();
this.user = new UserBo(u, true);
this.createdAt = w.getCreatedAt().getTime();
this.updatedAt = w.getUpdatedAt().getTime();

4
game-service/src/main/java/awesome/group/game/service/matrix/SuperAdminService.java

@ -123,6 +123,10 @@ public class SuperAdminService {
}
}
public void changeInnerUser(Integer userId, int status) {
innerUserMapper.updateStatus(userId, status);
}
public void saveInnerUser(Integer userId) {
if (innerUserMapper.queryByUserId(userId) != null) {
return;

9
game-web/src/main/java/awesome/group/game/web/rest/matrix/SuperAdminController.java

@ -1,7 +1,6 @@
package awesome.group.game.web.rest.matrix;
import awesome.group.game.dao.bean.MatrixEvilApp;
import awesome.group.game.dao.bean.MatrixMockSchedule;
import awesome.group.game.dao.bean.MatrixMockScheduleV2;
import awesome.group.game.service.bo.AddMockScheduleReq;
import awesome.group.game.service.bo.matrix.WhiteUserBo;
@ -10,7 +9,6 @@ import awesome.group.game.service.matrix.SuperAdminService;
import awesome.group.game.service.pay.AlipayFundTransUniTransfer;
import awesome.group.game.web.RequestContext;
import awesome.group.game.web.aop.RestApi;
import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -68,6 +66,13 @@ public class SuperAdminController {
return new R<>(null);
}
@PostMapping("/changeInnerUserStatus")
@RestApi
public R<Void> changeInnerUserStatus(@RequestParam Integer userId, @RequestParam int status) {
superAdminService.changeInnerUser(userId, status);
return new R<>(null);
}
@PostMapping("/transfer")
@RestApi
public R<Void> transfer(@RequestParam String name, @RequestParam String aliAccount, @RequestParam String appCode) {

Loading…
Cancel
Save