huwhois 5 years ago
parent
commit
86cea9313d

+ 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
}