huwhois 5 years ago
parent
commit
8722606370

+ 16 - 10
src/main/java/io/renren/modules/admin/controller/MemberController.java

@ -1,6 +1,7 @@
1 1
package io.renren.modules.admin.controller;
2 2
3 3
import java.util.Map;
4
import java.util.Arrays;
4 5
import java.util.Date;
5 6
6 7
import org.apache.shiro.authz.annotation.RequiresPermissions;
@ -96,26 +97,19 @@ public class MemberController extends AbstractController  {
96 97
    /**
97 98
     * 删除
98 99
     */
99
    // @PostMapping("/delete")
100
    // @RequiresPermissions("admin:member:delete")
101
    // @ApiOperation("删除")
102
    // public R delete(@RequestBody Long[] ids){
103
	// 	memberService.removeByIds(Arrays.asList(ids));
104
105
    //     return R.ok();
106
    // }
107 100
    @PostMapping("/delete")
108 101
    @RequiresPermissions("admin:member:delete")
109 102
    @ApiOperation("删除")
110 103
    public R delete(@RequestBody Long[] ids){
111
        memberService.delete(ids);
104
		memberService.removeByIds(Arrays.asList(ids));
105
112 106
        return R.ok();
113 107
    }
114 108
115 109
    @PostMapping("/status")
116 110
    @RequiresPermissions("admin:member:status")
117 111
    @ApiOperation("改变审核状态")
118
    public R status(@RequestBody Map<String, Object> param){
112
    public R status(@RequestParam Map<String, Object> param){
119 113
        // memberService.removeByIds(Arrays.asList(ids));
120 114
        Long id = Long.valueOf(param.get("id").toString());
121 115
        Integer status = Integer.valueOf(param.get("status").toString());
@ -124,4 +118,16 @@ public class MemberController extends AbstractController  {
124 118
        memberService.updateStatus(id, status);
125 119
        return R.ok();
126 120
    }
121
122
    @PostMapping("/repassword/{id}")
123
    @RequiresPermissions("admin:member:repassword")
124
    @ApiOperation("改变审核状态")
125
    public R repassword(@PathVariable("id") Long id){
126
        MemberEntity member = memberService.getById(id);
127
        member.setPassword("123456");
128
        member.setModifyTime(new Date());
129
        member.setModifyId(getUserId());
130
		memberService.updateById(member);
131
        return R.ok();
132
    }
127 133
}

+ 0 - 5
src/main/java/io/renren/modules/admin/service/MemberService.java

@ -28,11 +28,6 @@ public interface MemberService extends IService<MemberEntity> {
28 28
	 */
29 29
	void update(MemberEntity member);
30 30
31
	/**
32
	 * 删除用户(逻辑删除)
33
	 */
34
	void delete(Long[] ids);
35
36 31
	/**
37 32
	 * 更新审核状态
38 33
	 * @param id

+ 0 - 5
src/main/java/io/renren/modules/admin/service/impl/MemberServiceImpl.java

@ -63,11 +63,6 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
63 63
        this.updateById(member);
64 64
    }
65 65
66
    @Override
67
    public void delete(Long[] ids) {
68
        baseMapper.deleteBatchIds(Arrays.asList(ids));
69
    }
70
71 66
    @Override
72 67
    public int updateStatus(Long id, Integer isCheck) {
73 68
        int itemp = baseMapper.updateStatus(id, isCheck);