Parcourir la Source

Merge branch 'homework' into dev

huwhois 5 ans auparavant
Parent
commit
e89d08ea69
18 fichiers modifiés avec 746 ajouts et 8 suppressions
  1. 20 8
      src/main/java/io/renren/modules/admin/attenders/controller/AttendersController.java
  2. 5 0
      src/main/java/io/renren/modules/admin/attenders/service/AttendersService.java
  3. 5 0
      src/main/java/io/renren/modules/admin/attenders/service/impl/AttendersServiceImpl.java
  4. 108 0
      src/main/java/io/renren/modules/admin/meeting/controller/MeetingController.java
  5. 19 0
      src/main/java/io/renren/modules/admin/meeting/dao/MeetingDao.java
  6. 108 0
      src/main/java/io/renren/modules/admin/meeting/entity/MeetingEntity.java
  7. 32 0
      src/main/java/io/renren/modules/admin/meeting/service/MeetingService.java
  8. 41 0
      src/main/java/io/renren/modules/admin/meeting/service/impl/MeetingServiceImpl.java
  9. 91 0
      src/main/java/io/renren/modules/admin/typesofattenders/controller/TypesOfAttendersController.java
  10. 17 0
      src/main/java/io/renren/modules/admin/typesofattenders/dao/TypesOfAttendersDao.java
  11. 44 0
      src/main/java/io/renren/modules/admin/typesofattenders/entity/TypesOfAttendersEntity.java
  12. 20 0
      src/main/java/io/renren/modules/admin/typesofattenders/service/TypesOfAttendersService.java
  13. 29 0
      src/main/java/io/renren/modules/admin/typesofattenders/service/impl/TypesOfAttendersServiceImpl.java
  14. 92 0
      src/main/java/io/renren/modules/admin/typesoffee/controller/TypesOfFeeController.java
  15. 17 0
      src/main/java/io/renren/modules/admin/typesoffee/dao/TypesOfFeeDao.java
  16. 49 0
      src/main/java/io/renren/modules/admin/typesoffee/entity/TypesOfFeeEntity.java
  17. 20 0
      src/main/java/io/renren/modules/admin/typesoffee/service/TypesOfFeeService.java
  18. 29 0
      src/main/java/io/renren/modules/admin/typesoffee/service/impl/TypesOfFeeServiceImpl.java

+ 20 - 8
src/main/java/io/renren/modules/admin/attenders/controller/AttendersController.java

@ -2,12 +2,14 @@ package io.renren.modules.admin.attenders.controller;
2 2
3 3
import java.util.Arrays;
4 4
import java.util.Map;
5
import java.util.Date;
5 6
6 7
import org.apache.shiro.authz.annotation.RequiresPermissions;
7 8
import org.springframework.beans.factory.annotation.Autowired;
8 9
import org.springframework.web.bind.annotation.PathVariable;
9 10
import org.springframework.web.bind.annotation.RequestBody;
10 11
import org.springframework.web.bind.annotation.RequestMapping;
12
import org.springframework.web.bind.annotation.PostMapping;
11 13
import org.springframework.web.bind.annotation.RequestParam;
12 14
import org.springframework.web.bind.annotation.RestController;
13 15
@ -15,7 +17,7 @@ import io.renren.modules.admin.attenders.entity.AttendersEntity;
15 17
import io.renren.modules.admin.attenders.service.AttendersService;
16 18
import io.renren.common.utils.PageUtils;
17 19
import io.renren.common.utils.R;
18
20
import io.renren.modules.sys.controller.AbstractController;
19 21
20 22
21 23
/**
@ -27,7 +29,7 @@ import io.renren.common.utils.R;
27 29
 */
28 30
@RestController
29 31
@RequestMapping("admin/attenders")
30
public class AttendersController {
32
public class AttendersController  extends AbstractController {
31 33
    @Autowired
32 34
    private AttendersService attendersService;
33 35
@ -60,6 +62,8 @@ public class AttendersController {
60 62
    @RequestMapping("/save")
61 63
    @RequiresPermissions("admin:attenders:save")
62 64
    public R save(@RequestBody AttendersEntity attenders){
65
        attenders.setCreateTime(new Date());
66
        attenders.setCreater(getUserId());
63 67
		attendersService.save(attenders);
64 68
65 69
        return R.ok();
@ -71,7 +75,9 @@ public class AttendersController {
71 75
    @RequestMapping("/update")
72 76
    @RequiresPermissions("admin:attenders:update")
73 77
    public R update(@RequestBody AttendersEntity attenders){
74
		attendersService.updateById(attenders);
78
		attenders.setModifyTime(new Date());
79
        attenders.setModifier(getUserId());
80
        attendersService.updateById(attenders);
75 81
76 82
        return R.ok();
77 83
    }
@ -79,12 +85,18 @@ public class AttendersController {
79 85
    /**
80 86
     * 删除
81 87
     */
82
    @RequestMapping("/delete")
83
    @RequiresPermissions("admin:attenders:delete")
84
    public R delete(@RequestBody Long[] ids){
85
		attendersService.removeByIds(Arrays.asList(ids));
88
    // @RequestMapping("/delete")
89
    // @RequiresPermissions("admin:attenders:delete")
90
    // public R delete(@RequestBody Long[] ids){
91
	// 	attendersService.removeByIds(Arrays.asList(ids));
92
93
    //     return R.ok();
94
    // }
86 95
96
    @PostMapping("/delete")
97
    @RequiresPermissions("admin:member:delete")
98
    public R delete(@RequestBody Long[] ids){
99
        attendersService.delete(ids);
87 100
        return R.ok();
88 101
    }
89
90 102
}

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

@ -16,5 +16,10 @@ import java.util.Map;
16 16
public interface AttendersService extends IService<AttendersEntity> {
17 17
18 18
    PageUtils queryPage(Map<String, Object> params);
19
20
    /**
21
	 * 删除用户(逻辑删除)
22
	 */
23
	void delete(Long[] ids);
19 24
}
20 25

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

@ -2,6 +2,7 @@ package io.renren.modules.admin.attenders.service.impl;
2 2
3 3
import org.springframework.stereotype.Service;
4 4
import java.util.Map;
5
import java.util.Arrays;
5 6
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
6 7
import com.baomidou.mybatisplus.core.metadata.IPage;
7 8
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -26,4 +27,8 @@ public class AttendersServiceImpl extends ServiceImpl<AttendersDao, AttendersEnt
26 27
        return new PageUtils(page);
27 28
    }
28 29
30
    @Override
31
    public void delete(Long[] ids) {
32
        baseMapper.deleteBatchIds(Arrays.asList(ids));
33
    }
29 34
}

+ 108 - 0
src/main/java/io/renren/modules/admin/meeting/controller/MeetingController.java

@ -0,0 +1,108 @@
1
package io.renren.modules.admin.meeting.controller;
2
3
import java.util.Arrays;
4
import java.util.Map;
5
import java.util.Date;
6
import org.apache.shiro.authz.annotation.RequiresPermissions;
7
import org.springframework.beans.factory.annotation.Autowired;
8
import org.springframework.web.bind.annotation.PathVariable;
9
import org.springframework.web.bind.annotation.RequestBody;
10
import org.springframework.web.bind.annotation.RequestMapping;
11
import org.springframework.web.bind.annotation.PostMapping;
12
import org.springframework.web.bind.annotation.RequestParam;
13
import org.springframework.web.bind.annotation.RestController;
14
15
import io.renren.modules.admin.meeting.entity.MeetingEntity;
16
import io.renren.modules.admin.meeting.service.MeetingService;
17
import io.renren.common.utils.PageUtils;
18
import io.renren.common.utils.R;
19
20
21
22
/**
23
 * 会议表
24
 *
25
 * @author chenshun
26
 * @email sunlightcs@gmail.com
27
 * @date 2020-02-20 14:59:39
28
 */
29
@RestController
30
@RequestMapping("admin/meeting")
31
public class MeetingController {
32
    @Autowired
33
    private MeetingService meetingService;
34
35
    /**
36
     * 列表
37
     */
38
    @RequestMapping("/list")
39
    @RequiresPermissions("admin:meeting:list")
40
    public R list(@RequestParam Map<String, Object> params){
41
        PageUtils page = meetingService.queryPage(params);
42
43
        return R.ok().put("page", page);
44
    }
45
46
47
    /**
48
     * 信息
49
     */
50
    @RequestMapping("/info/{id}")
51
    @RequiresPermissions("admin:meeting:info")
52
    public R info(@PathVariable("id") Long id){
53
		MeetingEntity meeting = meetingService.getById(id);
54
55
        return R.ok().put("meeting", meeting);
56
    }
57
58
    /**
59
     * 保存
60
     */
61
    @RequestMapping("/save")
62
    @RequiresPermissions("admin:meeting:save")
63
    public R save(@RequestBody MeetingEntity meeting){
64
        meeting.setCreateTime(new Date());
65
		meetingService.save(meeting);
66
67
        return R.ok();
68
    }
69
70
    /**
71
     * 修改
72
     */
73
    @RequestMapping("/update")
74
    @RequiresPermissions("admin:meeting:update")
75
    public R update(@RequestBody MeetingEntity meeting){
76
        meeting.setModifyTime(new Date());
77
		meetingService.updateById(meeting);
78
79
        return R.ok();
80
    }
81
82
    /**
83
     * 删除
84
     */
85
    // @RequestMapping("/delete")
86
    // @RequiresPermissions("admin:meeting:delete")
87
    // public R delete(@RequestBody Long[] ids){
88
	// 	meetingService.removeByIds(Arrays.asList(ids));
89
90
    //     return R.ok();
91
    // }
92
    @PostMapping("/delete")
93
    @RequiresPermissions("admin:meeting:delete")
94
    public R delete(@RequestBody Long[] ids){
95
        meetingService.delete(ids);
96
        return R.ok();
97
    }
98
99
    @PostMapping("/status")
100
    @RequiresPermissions("admin:meeting:status")
101
    public R status(@RequestBody Map<String, Object> param){
102
        Long id = Long.valueOf(param.get("id").toString());
103
        Integer status = Integer.valueOf(param.get("status").toString());
104
105
        meetingService.updateStatus(id, status);
106
        return R.ok();
107
    }
108
}

+ 19 - 0
src/main/java/io/renren/modules/admin/meeting/dao/MeetingDao.java

@ -0,0 +1,19 @@
1
package io.renren.modules.admin.meeting.dao;
2
3
import io.renren.modules.admin.meeting.entity.MeetingEntity;
4
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
import org.apache.ibatis.annotations.Mapper;
6
import org.apache.ibatis.annotations.Update;
7
8
/**
9
 * 会议表
10
 * 
11
 * @author chenshun
12
 * @email sunlightcs@gmail.com
13
 * @date 2020-02-20 14:59:39
14
 */
15
@Mapper
16
public interface MeetingDao extends BaseMapper<MeetingEntity> {
17
	@Update("update meeting set is_check=#{isCheck} where id=#{id}")
18
    int updateStatus(Long id, Integer isCheck);
19
}

+ 108 - 0
src/main/java/io/renren/modules/admin/meeting/entity/MeetingEntity.java

@ -0,0 +1,108 @@
1
package io.renren.modules.admin.meeting.entity;
2
3
import com.baomidou.mybatisplus.annotation.TableId;
4
import com.baomidou.mybatisplus.annotation.TableName;
5
6
import java.io.Serializable;
7
import java.util.Date;
8
import lombok.Data;
9
10
/**
11
 * 会议表
12
 * 
13
 * @author chenshun
14
 * @email sunlightcs@gmail.com
15
 * @date 2020-02-20 14:59:39
16
 */
17
@Data
18
@TableName("meeting")
19
public class MeetingEntity implements Serializable {
20
	private static final long serialVersionUID = 1L;
21
22
	/**
23
	 * 会议id (会议表)
24
	 */
25
	@TableId
26
	private Long id;
27
	/**
28
	 * 举办单位id
29
	 */
30
	private Long companyId;
31
	/**
32
	 * 会议名称(中文)
33
	 */
34
	private String nameCn;
35
	/**
36
	 * 会议名称(英文)
37
	 */
38
	private String nameEn;
39
	/**
40
	 * 举办地点
41
	 */
42
	private String address;
43
	/**
44
	 * 开始时间
45
	 */
46
	private Date startTime;
47
	/**
48
	 * 结束时间
49
	 */
50
	private Date endTime;
51
	/**
52
	 * 官方网址
53
	 */
54
	private String officeWebsite;
55
	/**
56
	 * 会议封面图片地址
57
	 */
58
	private String titlePicture;
59
	/**
60
	 * 涉及学科
61
	 */
62
	private String subjects;
63
	/**
64
	 * 涉及行业
65
	 */
66
	private String industries;
67
	/**
68
	 * 会议负责人
69
	 */
70
	private String serviceEmp;
71
	/**
72
	 * 线上报名截止时间
73
	 */
74
	private Date onlineRegDeadline;
75
	/**
76
	 * 现场报名截止时间
77
	 */
78
	private Date onsiteRegDeadline;
79
	/**
80
	 * 投稿截止时间
81
	 */
82
	private Date subDeadline;
83
	/**
84
	 * 投稿范围及要求
85
	 */
86
	private String subRequirement;
87
	/**
88
	 * 会议介绍
89
	 */
90
	private String introduction;
91
	/**
92
	 * 创建时间
93
	 */
94
	private Date createTime;
95
	/**
96
	 * 修改时间
97
	 */
98
	private Date modifyTime;
99
	/**
100
	 * 是否通过审核 0:未通过 1:通过
101
	 */
102
	private Integer isCheck;
103
	/**
104
	 * 是否被删除 状态  0:正常   1:删除
105
	 */
106
	private Integer isDel;
107
108
}

+ 32 - 0
src/main/java/io/renren/modules/admin/meeting/service/MeetingService.java

@ -0,0 +1,32 @@
1
package io.renren.modules.admin.meeting.service;
2
3
import com.baomidou.mybatisplus.extension.service.IService;
4
import io.renren.common.utils.PageUtils;
5
import io.renren.modules.admin.meeting.entity.MeetingEntity;
6
7
import java.util.Map;
8
9
/**
10
 * 会议表
11
 *
12
 * @author chenshun
13
 * @email sunlightcs@gmail.com
14
 * @date 2020-02-20 14:59:39
15
 */
16
public interface MeetingService extends IService<MeetingEntity> {
17
18
    PageUtils queryPage(Map<String, Object> params);
19
20
    /**
21
	 * 删除用户(逻辑删除)
22
	 */
23
	void delete(Long[] ids);
24
25
	/**
26
	 * 更新审核状态
27
	 * @param id
28
	 * @param isCheck
29
	 */
30
    int updateStatus(Long id, Integer isCheck);
31
}
32

+ 41 - 0
src/main/java/io/renren/modules/admin/meeting/service/impl/MeetingServiceImpl.java

@ -0,0 +1,41 @@
1
package io.renren.modules.admin.meeting.service.impl;
2
3
import org.springframework.stereotype.Service;
4
import java.util.Arrays;
5
import java.util.Map;
6
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
7
import com.baomidou.mybatisplus.core.metadata.IPage;
8
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
9
import io.renren.common.utils.PageUtils;
10
import io.renren.common.utils.Query;
11
12
import io.renren.modules.admin.meeting.dao.MeetingDao;
13
import io.renren.modules.admin.meeting.entity.MeetingEntity;
14
import io.renren.modules.admin.meeting.service.MeetingService;
15
16
17
@Service("meetingService")
18
public class MeetingServiceImpl extends ServiceImpl<MeetingDao, MeetingEntity> implements MeetingService {
19
20
    @Override
21
    public PageUtils queryPage(Map<String, Object> params) {
22
        IPage<MeetingEntity> page = this.page(
23
                new Query<MeetingEntity>().getPage(params),
24
                new QueryWrapper<MeetingEntity>()
25
        );
26
27
        return new PageUtils(page);
28
    }
29
30
    @Override
31
    public void delete(Long[] ids) {
32
        baseMapper.deleteBatchIds(Arrays.asList(ids));
33
    }
34
35
    @Override
36
    public int updateStatus(Long id, Integer isCheck) {
37
        int itemp = baseMapper.updateStatus(id, isCheck);
38
        return itemp;
39
        // @Update("update member set is_check=#{is_check}  where id = #{id}")
40
    }
41
}

+ 91 - 0
src/main/java/io/renren/modules/admin/typesofattenders/controller/TypesOfAttendersController.java

@ -0,0 +1,91 @@
1
package io.renren.modules.admin.typesofattenders.controller;
2
3
import java.util.Arrays;
4
import java.util.Map;
5
import java.util.Date;
6
7
import org.apache.shiro.authz.annotation.RequiresPermissions;
8
import org.springframework.beans.factory.annotation.Autowired;
9
import org.springframework.web.bind.annotation.PathVariable;
10
import org.springframework.web.bind.annotation.RequestBody;
11
import org.springframework.web.bind.annotation.RequestMapping;
12
import org.springframework.web.bind.annotation.RequestParam;
13
import org.springframework.web.bind.annotation.RestController;
14
15
import io.renren.modules.admin.typesofattenders.entity.TypesOfAttendersEntity;
16
import io.renren.modules.admin.typesofattenders.service.TypesOfAttendersService;
17
import io.renren.common.utils.PageUtils;
18
import io.renren.common.utils.R;
19
20
21
22
/**
23
 * 参会人员类型表
24
 *
25
 * @author chenshun
26
 * @email sunlightcs@gmail.com
27
 * @date 2020-02-24 10:37:48
28
 */
29
@RestController
30
@RequestMapping("admin/typesofattenders")
31
public class TypesOfAttendersController {
32
    @Autowired
33
    private TypesOfAttendersService typesOfAttendersService;
34
35
    /**
36
     * 列表
37
     */
38
    @RequestMapping("/list")
39
    @RequiresPermissions("admin:typesofattenders:list")
40
    public R list(@RequestParam Map<String, Object> params){
41
        PageUtils page = typesOfAttendersService.queryPage(params);
42
43
        return R.ok().put("page", page);
44
    }
45
46
47
    /**
48
     * 信息
49
     */
50
    @RequestMapping("/info/{id}")
51
    @RequiresPermissions("admin:typesofattenders:info")
52
    public R info(@PathVariable("id") Long id){
53
		TypesOfAttendersEntity typesOfAttenders = typesOfAttendersService.getById(id);
54
55
        return R.ok().put("typesOfAttenders", typesOfAttenders);
56
    }
57
58
    /**
59
     * 保存
60
     */
61
    @RequestMapping("/save")
62
    @RequiresPermissions("admin:typesofattenders:save")
63
    public R save(@RequestBody TypesOfAttendersEntity typesOfAttenders){
64
		typesOfAttendersService.save(typesOfAttenders);
65
66
        return R.ok();
67
    }
68
69
    /**
70
     * 修改
71
     */
72
    @RequestMapping("/update")
73
    @RequiresPermissions("admin:typesofattenders:update")
74
    public R update(@RequestBody TypesOfAttendersEntity typesOfAttenders){
75
		typesOfAttendersService.updateById(typesOfAttenders);
76
77
        return R.ok();
78
    }
79
80
    /**
81
     * 删除
82
     */
83
    @RequestMapping("/delete")
84
    @RequiresPermissions("admin:typesofattenders:delete")
85
    public R delete(@RequestBody Long[] ids){
86
		typesOfAttendersService.removeByIds(Arrays.asList(ids));
87
88
        return R.ok();
89
    }
90
91
}

+ 17 - 0
src/main/java/io/renren/modules/admin/typesofattenders/dao/TypesOfAttendersDao.java

@ -0,0 +1,17 @@
1
package io.renren.modules.admin.typesofattenders.dao;
2
3
import io.renren.modules.admin.typesofattenders.entity.TypesOfAttendersEntity;
4
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
import org.apache.ibatis.annotations.Mapper;
6
7
/**
8
 * 参会人员类型表
9
 * 
10
 * @author chenshun
11
 * @email sunlightcs@gmail.com
12
 * @date 2020-02-24 10:37:48
13
 */
14
@Mapper
15
public interface TypesOfAttendersDao extends BaseMapper<TypesOfAttendersEntity> {
16
	
17
}

+ 44 - 0
src/main/java/io/renren/modules/admin/typesofattenders/entity/TypesOfAttendersEntity.java

@ -0,0 +1,44 @@
1
package io.renren.modules.admin.typesofattenders.entity;
2
3
import com.baomidou.mybatisplus.annotation.TableId;
4
import com.baomidou.mybatisplus.annotation.TableName;
5
6
import java.io.Serializable;
7
import java.util.Date;
8
import lombok.Data;
9
10
/**
11
 * 参会人员类型表
12
 * 
13
 * @author chenshun
14
 * @email sunlightcs@gmail.com
15
 * @date 2020-02-24 10:37:48
16
 */
17
@Data
18
@TableName("types_of_attenders")
19
public class TypesOfAttendersEntity implements Serializable {
20
	private static final long serialVersionUID = 1L;
21
22
	/**
23
	 * 
24
	 */
25
	@TableId
26
	private Long id;
27
	/**
28
	 * 会议id
29
	 */
30
	private Long meetingId;
31
	/**
32
	 * 类型
33
	 */
34
	private String type;
35
	/**
36
	 * 创建时间
37
	 */
38
	private Date createTime;
39
	/**
40
	 * 是否被删除 状态  0:正常   1:删除
41
	 */
42
	private Integer isDel;
43
44
}

+ 20 - 0
src/main/java/io/renren/modules/admin/typesofattenders/service/TypesOfAttendersService.java

@ -0,0 +1,20 @@
1
package io.renren.modules.admin.typesofattenders.service;
2
3
import com.baomidou.mybatisplus.extension.service.IService;
4
import io.renren.common.utils.PageUtils;
5
import io.renren.modules.admin.typesofattenders.entity.TypesOfAttendersEntity;
6
7
import java.util.Map;
8
9
/**
10
 * 参会人员类型表
11
 *
12
 * @author chenshun
13
 * @email sunlightcs@gmail.com
14
 * @date 2020-02-24 10:37:48
15
 */
16
public interface TypesOfAttendersService extends IService<TypesOfAttendersEntity> {
17
18
    PageUtils queryPage(Map<String, Object> params);
19
}
20

+ 29 - 0
src/main/java/io/renren/modules/admin/typesofattenders/service/impl/TypesOfAttendersServiceImpl.java

@ -0,0 +1,29 @@
1
package io.renren.modules.admin.typesofattenders.service.impl;
2
3
import org.springframework.stereotype.Service;
4
import java.util.Map;
5
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
6
import com.baomidou.mybatisplus.core.metadata.IPage;
7
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
8
import io.renren.common.utils.PageUtils;
9
import io.renren.common.utils.Query;
10
11
import io.renren.modules.admin.typesofattenders.dao.TypesOfAttendersDao;
12
import io.renren.modules.admin.typesofattenders.entity.TypesOfAttendersEntity;
13
import io.renren.modules.admin.typesofattenders.service.TypesOfAttendersService;
14
15
16
@Service("typesOfAttendersService")
17
public class TypesOfAttendersServiceImpl extends ServiceImpl<TypesOfAttendersDao, TypesOfAttendersEntity> implements TypesOfAttendersService {
18
19
    @Override
20
    public PageUtils queryPage(Map<String, Object> params) {
21
        IPage<TypesOfAttendersEntity> page = this.page(
22
                new Query<TypesOfAttendersEntity>().getPage(params),
23
                new QueryWrapper<TypesOfAttendersEntity>()
24
        );
25
26
        return new PageUtils(page);
27
    }
28
29
}

+ 92 - 0
src/main/java/io/renren/modules/admin/typesoffee/controller/TypesOfFeeController.java

@ -0,0 +1,92 @@
1
package io.renren.modules.admin.typesoffee.controller;
2
3
import java.util.Arrays;
4
import java.util.Map;
5
import java.util.Date;
6
7
import org.apache.shiro.authz.annotation.RequiresPermissions;
8
import org.springframework.beans.factory.annotation.Autowired;
9
import org.springframework.web.bind.annotation.PathVariable;
10
import org.springframework.web.bind.annotation.RequestBody;
11
import org.springframework.web.bind.annotation.RequestMapping;
12
import org.springframework.web.bind.annotation.RequestParam;
13
import org.springframework.web.bind.annotation.RestController;
14
15
import io.renren.modules.admin.typesoffee.entity.TypesOfFeeEntity;
16
import io.renren.modules.admin.typesoffee.service.TypesOfFeeService;
17
import io.renren.common.utils.PageUtils;
18
import io.renren.common.utils.R;
19
20
21
22
/**
23
 * 费用类型表
24
 *
25
 * @author chenshun
26
 * @email sunlightcs@gmail.com
27
 * @date 2020-02-24 10:38:03
28
 */
29
@RestController
30
@RequestMapping("admin/typesoffee")
31
public class TypesOfFeeController {
32
    @Autowired
33
    private TypesOfFeeService typesOfFeeService;
34
35
    /**
36
     * 列表
37
     */
38
    @RequestMapping("/list")
39
    @RequiresPermissions("admin:typesoffee:list")
40
    public R list(@RequestParam Map<String, Object> params){
41
        PageUtils page = typesOfFeeService.queryPage(params);
42
43
        return R.ok().put("page", page);
44
    }
45
46
47
    /**
48
     * 信息
49
     */
50
    @RequestMapping("/info/{id}")
51
    @RequiresPermissions("admin:typesoffee:info")
52
    public R info(@PathVariable("id") Long id){
53
		TypesOfFeeEntity typesOfFee = typesOfFeeService.getById(id);
54
55
        return R.ok().put("typesOfFee", typesOfFee);
56
    }
57
58
    /**
59
     * 保存
60
     */
61
    @RequestMapping("/save")
62
    @RequiresPermissions("admin:typesoffee:save")
63
    public R save(@RequestBody TypesOfFeeEntity typesOfFee){
64
        typesOfFee.setCreateTime(new Date());
65
		typesOfFeeService.save(typesOfFee);
66
67
        return R.ok();
68
    }
69
70
    /**
71
     * 修改
72
     */
73
    @RequestMapping("/update")
74
    @RequiresPermissions("admin:typesoffee:update")
75
    public R update(@RequestBody TypesOfFeeEntity typesOfFee){
76
		typesOfFeeService.updateById(typesOfFee);
77
78
        return R.ok();
79
    }
80
81
    /**
82
     * 删除
83
     */
84
    @RequestMapping("/delete")
85
    @RequiresPermissions("admin:typesoffee:delete")
86
    public R delete(@RequestBody Long[] ids){
87
		typesOfFeeService.removeByIds(Arrays.asList(ids));
88
89
        return R.ok();
90
    }
91
92
}

+ 17 - 0
src/main/java/io/renren/modules/admin/typesoffee/dao/TypesOfFeeDao.java

@ -0,0 +1,17 @@
1
package io.renren.modules.admin.typesoffee.dao;
2
3
import io.renren.modules.admin.typesoffee.entity.TypesOfFeeEntity;
4
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
import org.apache.ibatis.annotations.Mapper;
6
7
/**
8
 * 费用类型表
9
 * 
10
 * @author chenshun
11
 * @email sunlightcs@gmail.com
12
 * @date 2020-02-24 10:38:03
13
 */
14
@Mapper
15
public interface TypesOfFeeDao extends BaseMapper<TypesOfFeeEntity> {
16
	
17
}

+ 49 - 0
src/main/java/io/renren/modules/admin/typesoffee/entity/TypesOfFeeEntity.java

@ -0,0 +1,49 @@
1
package io.renren.modules.admin.typesoffee.entity;
2
3
import com.baomidou.mybatisplus.annotation.TableId;
4
import com.baomidou.mybatisplus.annotation.TableName;
5
6
import java.math.BigDecimal;
7
import java.io.Serializable;
8
import java.util.Date;
9
import lombok.Data;
10
11
/**
12
 * 费用类型表
13
 * 
14
 * @author chenshun
15
 * @email sunlightcs@gmail.com
16
 * @date 2020-02-24 10:38:03
17
 */
18
@Data
19
@TableName("types_of_fee")
20
public class TypesOfFeeEntity implements Serializable {
21
	private static final long serialVersionUID = 1L;
22
23
	/**
24
	 * 
25
	 */
26
	@TableId
27
	private Long id;
28
	/**
29
	 * 会议id
30
	 */
31
	private Long meetingId;
32
	/**
33
	 * 费用类型
34
	 */
35
	private String type;
36
	/**
37
	 * 金额
38
	 */
39
	private BigDecimal money;
40
	/**
41
	 * 创建时间
42
	 */
43
	private Date createTime;
44
	/**
45
	 * 是否被删除 状态  0:正常   1:删除
46
	 */
47
	private Integer isDel;
48
49
}

+ 20 - 0
src/main/java/io/renren/modules/admin/typesoffee/service/TypesOfFeeService.java

@ -0,0 +1,20 @@
1
package io.renren.modules.admin.typesoffee.service;
2
3
import com.baomidou.mybatisplus.extension.service.IService;
4
import io.renren.common.utils.PageUtils;
5
import io.renren.modules.admin.typesoffee.entity.TypesOfFeeEntity;
6
7
import java.util.Map;
8
9
/**
10
 * 费用类型表
11
 *
12
 * @author chenshun
13
 * @email sunlightcs@gmail.com
14
 * @date 2020-02-24 10:38:03
15
 */
16
public interface TypesOfFeeService extends IService<TypesOfFeeEntity> {
17
18
    PageUtils queryPage(Map<String, Object> params);
19
}
20

+ 29 - 0
src/main/java/io/renren/modules/admin/typesoffee/service/impl/TypesOfFeeServiceImpl.java

@ -0,0 +1,29 @@
1
package io.renren.modules.admin.typesoffee.service.impl;
2
3
import org.springframework.stereotype.Service;
4
import java.util.Map;
5
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
6
import com.baomidou.mybatisplus.core.metadata.IPage;
7
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
8
import io.renren.common.utils.PageUtils;
9
import io.renren.common.utils.Query;
10
11
import io.renren.modules.admin.typesoffee.dao.TypesOfFeeDao;
12
import io.renren.modules.admin.typesoffee.entity.TypesOfFeeEntity;
13
import io.renren.modules.admin.typesoffee.service.TypesOfFeeService;
14
15
16
@Service("typesOfFeeService")
17
public class TypesOfFeeServiceImpl extends ServiceImpl<TypesOfFeeDao, TypesOfFeeEntity> implements TypesOfFeeService {
18
19
    @Override
20
    public PageUtils queryPage(Map<String, Object> params) {
21
        IPage<TypesOfFeeEntity> page = this.page(
22
                new Query<TypesOfFeeEntity>().getPage(params),
23
                new QueryWrapper<TypesOfFeeEntity>()
24
        );
25
26
        return new PageUtils(page);
27
    }
28
29
}