Browse Source

支持隐藏账号

master
nili 6 months ago
parent
commit
c1a5ce82d9
  1. 1
      game-dao/src/main/java/awesome/group/game/dao/bean/MatrixAdmin.java
  2. 3
      game-dao/src/main/java/awesome/group/game/dao/mapper/MatrixAdminMapper.java
  3. 15
      game-service/src/main/java/awesome/group/game/service/bo/MatrixAdminBo.java
  4. 4
      game-service/src/main/java/awesome/group/game/service/matrix/AdminService.java
  5. 7
      game-web/src/main/java/awesome/group/game/web/rest/matrix/AdminController.java

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

@ -16,4 +16,5 @@ public class MatrixAdmin {
private Integer parentAdminId; private Integer parentAdminId;
private Integer deviceCnt; private Integer deviceCnt;
private Integer incomeRate; private Integer incomeRate;
private Integer hide;
} }

3
game-dao/src/main/java/awesome/group/game/dao/mapper/MatrixAdminMapper.java

@ -11,4 +11,7 @@ public interface MatrixAdminMapper extends BaseMapper<MatrixAdmin> {
@Update("update matrix_admin set app_ids = #{appIds} where id = #{id}") @Update("update matrix_admin set app_ids = #{appIds} where id = #{id}")
int updateAppIds(String appIds, int id); int updateAppIds(String appIds, int id);
@Update("update matrix_admin set hide = #{hide} where id = #{id}")
int updateHide(Integer id, Integer hide);
} }

15
game-service/src/main/java/awesome/group/game/service/bo/MatrixAdminBo.java

@ -10,13 +10,14 @@ import java.util.List;
@Data @Data
public class MatrixAdminBo { public class MatrixAdminBo {
private Integer id; public Integer id;
private String name; public String name;
private String password; public String password;
private List<Integer> appIds; public List<Integer> appIds;
private Integer role;//1超级管理员,2管理员,3普通账号 public Integer hide;
private Integer deviceCnt; public Integer role;//1超级管理员,2管理员,3普通账号
private Integer incomeRate; public Integer deviceCnt;
public Integer incomeRate;
public OverviewBo overview; public OverviewBo overview;
public MatrixAdminBo() { public MatrixAdminBo() {

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

@ -237,6 +237,10 @@ public class AdminService {
} }
} }
public void updateAdminHide(Integer id, Integer hide) {
adminMapper.updateHide(id, hide);
}
public void saveApp(MatrixApp app) { public void saveApp(MatrixApp app) {
if (app.getCode() != null) { if (app.getCode() != null) {
appMapper.updateNameOrUrl(app); appMapper.updateNameOrUrl(app);

7
game-web/src/main/java/awesome/group/game/web/rest/matrix/AdminController.java

@ -87,6 +87,13 @@ public class AdminController {
return new R<>(R.CODE_SUCCESS, "ok", null); return new R<>(R.CODE_SUCCESS, "ok", null);
} }
@PostMapping("/changeAdminHide")
@RestApi
public R<Void> changeAdminHide(@RequestParam Integer adminId, @RequestParam Integer hide) {
adminService.updateAdminHide(adminId, hide);
return new R<>(R.CODE_SUCCESS, "ok", null);
}
@GetMapping("/incomeOverview") @GetMapping("/incomeOverview")
@RestApi @RestApi
public R<OverviewBo> incomeOverview(@RequestParam(required = false) String appCode) { public R<OverviewBo> incomeOverview(@RequestParam(required = false) String appCode) {

Loading…
Cancel
Save