huwhois 5 ans auparavant
Parent
commit
9d0054a6d6

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

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
4 4
import io.renren.common.utils.PageUtils;
5 5
import io.renren.modules.admin.attenders.entity.AttendersEntity;
6 6
7
import java.util.List;
7 8
import java.util.Map;
8 9
9 10
/**
@ -21,5 +22,7 @@ public interface AttendersService extends IService<AttendersEntity> {
21 22
	 * 删除用户(逻辑删除)
22 23
	 */
23 24
	void delete(Long[] ids);
25
26
	List<AttendersEntity> selectByMap(Map<String, Object> uMap);
24 27
}
25 28

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

@ -3,6 +3,8 @@ package io.renren.modules.admin.attenders.service.impl;
3 3
import org.springframework.stereotype.Service;
4 4
import java.util.Map;
5 5
import java.util.Arrays;
6
import java.util.List;
7
6 8
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
7 9
import com.baomidou.mybatisplus.core.metadata.IPage;
8 10
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -31,4 +33,8 @@ public class AttendersServiceImpl extends ServiceImpl<AttendersDao, AttendersEnt
31 33
    public void delete(Long[] ids) {
32 34
        baseMapper.deleteBatchIds(Arrays.asList(ids));
33 35
    }
36
37
    public List<AttendersEntity> selectByMap(Map<String, Object> uMap) {
38
        return baseMapper.selectByMap(uMap);
39
    }
34 40
}

+ 1 - 1
src/main/java/io/renren/modules/admin/payment/dao/PaymentDao.java

@ -13,5 +13,5 @@ import org.apache.ibatis.annotations.Mapper;
13 13
 */
14 14
@Mapper
15 15
public interface PaymentDao extends BaseMapper<PaymentEntity> {
16
	
16
17 17
}

+ 4 - 0
src/main/java/io/renren/modules/admin/payment/entity/PaymentEntity.java

@ -33,6 +33,10 @@ public class PaymentEntity implements Serializable {
33 33
	 * 公司id
34 34
	 */
35 35
	private Long companyId;
36
	/**
37
	 * 公司id
38
	 */
39
	private Long meetingId;
36 40
	/**
37 41
	 * 参会人员id
38 42
	 */

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

@ -32,7 +32,7 @@ public class TypesOfFeeEntity implements Serializable {
32 32
	/**
33 33
	 * 费用类型
34 34
	 */
35
	private String type;
35
	private String name;
36 36
	/**
37 37
	 * 金额
38 38
	 */

+ 0 - 20
src/main/java/io/renren/modules/app/controller/OrderController.java

@ -1,20 +0,0 @@
1
package io.renren.modules.app.controller;
2
3
import io.renren.common.utils.R;
4
import io.renren.modules.app.annotation.Login;
5
import io.renren.modules.app.annotation.LoginUser;
6
import io.renren.modules.app.entity.UserEntity;
7
import io.swagger.annotations.Api;
8
import io.swagger.annotations.ApiOperation;
9
import org.springframework.web.bind.annotation.GetMapping;
10
import org.springframework.web.bind.annotation.RequestAttribute;
11
import org.springframework.web.bind.annotation.RequestMapping;
12
import org.springframework.web.bind.annotation.RestController;
13
14
/**
15
 * OrderController
16
 */
17
public class OrderController {
18
    
19
    
20
}

+ 29 - 12
src/main/java/io/renren/modules/app/controller/UserController.java

@ -1,15 +1,8 @@
1
2 1
package io.renren.modules.app.controller;
3 2
4
import io.renren.common.utils.R;
5
import io.renren.modules.app.annotation.Login;
6
import io.renren.modules.app.annotation.LoginUser;
7
import io.renren.modules.app.entity.UserEntity;
8
import io.renren.modules.app.service.UserService;
9
import io.swagger.annotations.Api;
10
import io.swagger.annotations.ApiOperation;
11
12 3
import java.util.Date;
4
import java.util.List;
5
import java.util.Map;
13 6
14 7
import org.springframework.beans.factory.annotation.Autowired;
15 8
import org.springframework.web.bind.annotation.GetMapping;
@ -19,10 +12,19 @@ import org.springframework.web.bind.annotation.RequestBody;
19 12
import org.springframework.web.bind.annotation.RequestMapping;
20 13
import org.springframework.web.bind.annotation.RestController;
21 14
15
import io.renren.common.utils.R;
16
import io.renren.modules.app.annotation.Login;
17
import io.renren.modules.app.annotation.LoginUser;
18
import io.renren.modules.app.entity.UserEntity;
19
import io.renren.modules.app.service.UserService;
20
import io.swagger.annotations.Api;
21
import io.swagger.annotations.ApiOperation;
22
23
22 24
/**
23
 * APP测试接口
25
 * 用户接口
24 26
 *
25
 * @author Mark sunlightcs@gmail.com
27
 * @author huwhois sunlightcs@gmail.com
26 28
 */
27 29
@RestController
28 30
@RequestMapping("/app/user")
@ -32,7 +34,7 @@ public class UserController {
32 34
    private UserService userService;
33 35
34 36
    @Login
35
    @GetMapping("/userInfo")
37
    @GetMapping("/info")
36 38
    @ApiOperation("获取用户信息")
37 39
    public R userInfo(@LoginUser UserEntity user){
38 40
        return R.ok().put("user", user);
@ -51,4 +53,19 @@ public class UserController {
51 53
52 54
        return R.ok();
53 55
    }
56
57
    /**
58
     * 订单列表
59
     */
60
    @Login
61
    @GetMapping("/orderlist")
62
    @ApiOperation("获取订单列表")
63
    public R orderList(@RequestAttribute("userId") Integer userId){
64
        System.out.println(userId);
65
        Long memberId = Long.valueOf(userId);        
66
67
        List<Map<String, Object>> orderList = userService.queryOrderList(memberId);        
68
69
        return R.ok().put("orderList", orderList);
70
    }
54 71
}

+ 6 - 1
src/main/java/io/renren/modules/app/dao/UserDao.java

@ -8,9 +8,13 @@
8 8
9 9
package io.renren.modules.app.dao;
10 10
11
import java.util.List;
12
import java.util.Map;
13
11 14
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
12 15
import io.renren.modules.app.entity.UserEntity;
13 16
import org.apache.ibatis.annotations.Mapper;
17
import org.apache.ibatis.annotations.Select;
14 18
15 19
/**
16 20
 * 用户
@ -19,5 +23,6 @@ import org.apache.ibatis.annotations.Mapper;
19 23
 */
20 24
@Mapper
21 25
public interface UserDao extends BaseMapper<UserEntity> {
22
26
    @Select("select p.order_id, p.attenders as attendersId, (select a.name from attenders as a where a.id=p.attenders) as attendersName,  (select a.organization from attenders as a where a.id=p.attenders) as organization, (select tf.name from types_of_fee as tf where tf.id=p.pay_type) as typeName, p.pay_time, (select m.name_cn from meeting as m where m.id=p.meeting_id) as meetingName from payment as p where p.attenders in  (select a.id from attenders as a where a.member_id=#{member_id});")
27
    List<Map<String, Object>> queryOrderList(Long memberId);
23 28
}

+ 0 - 80
src/main/java/io/renren/modules/app/entity/OrderEntity.java

@ -1,80 +0,0 @@
1
package io.renren.modules.app.entity;
2
3
import java.math.BigDecimal;
4
import java.io.Serializable;
5
import java.util.Date;
6
import lombok.Data;
7
8
/**
9
 * 
10
 * 
11
 * @author huwhois
12
 * @email huwhois@163.com
13
 * @date 2020-03-06 11:27:30
14
 */
15
@Data
16
public class OrderEntity implements Serializable {
17
	private static final long serialVersionUID = 1L;
18
19
	/**
20
	 * 缴费信息id
21
	 */
22
	private Long id;
23
	/**
24
	 * 订单编号
25
	 */
26
	private Long orderId;
27
	/**
28
	 * 公司id
29
	 */
30
	private Long companyId;
31
	/**
32
	 * 参会人员id
33
	 */
34
	private Long attenderId;
35
	/**
36
	 * 缴费时间
37
	 */
38
	private Date payTime;
39
	/**
40
	 * 缴费方式
41
	 */
42
	private Integer payType;
43
	/**
44
	 * 缴费项目
45
	 */
46
	private String payOption;
47
	/**
48
	 * 金额
49
	 */
50
	private BigDecimal money;
51
	/**
52
	 * 发票抬头
53
	 */
54
	private String taxTitle;
55
	/**
56
	 * 纳税人税号
57
	 */
58
	private String taxNumber;
59
	/**
60
	 * 地址 电话
61
	 */
62
	private String addrPhone;
63
	/**
64
	 * 开户行及账号
65
	 */
66
	private String bankAddrAccount;
67
	/**
68
	 * 邮寄地址
69
	 */
70
	private String taxAddress;
71
	/**
72
	 * 创建时间
73
	 */
74
	private Date createTime;
75
	/**
76
	 * 是否被删除 状态  0:正常   1:删除
77
	 */
78
	private Integer isDel;
79
80
}

+ 1 - 1
src/main/java/io/renren/modules/app/entity/UserEntity.java

@ -54,7 +54,7 @@ public class UserEntity implements Serializable {
54 54
	/**
55 55
	 * 姓名
56 56
	 */
57
	@NotBlank(message="姓名不能为空", groups = {AddGroup.class, UpdateGroup.class})
57
	@NotBlank(message="姓名不能为空", groups = UpdateGroup.class)
58 58
	private String truename;
59 59
	/**
60 60
	 * 性别

+ 8 - 0
src/main/java/io/renren/modules/app/service/UserService.java

@ -8,6 +8,8 @@
8 8
9 9
package io.renren.modules.app.service;
10 10
11
import java.util.List;
12
import java.util.Map;
11 13
12 14
import com.baomidou.mybatisplus.extension.service.IService;
13 15
import io.renren.modules.app.entity.UserEntity;
@ -34,4 +36,10 @@ public interface UserService extends IService<UserEntity> {
34 36
	 * @param user
35 37
	 */
36 38
	public void saveUser(UserEntity user);
39
40
	/**
41
	 * 根据用户id 获取订单信息
42
	 * @param memberId
43
	 */
44
	public List<Map<String, Object>> queryOrderList(Long memberId);
37 45
}

+ 8 - 1
src/main/java/io/renren/modules/app/service/impl/UserServiceImpl.java

@ -9,6 +9,8 @@
9 9
package io.renren.modules.app.service.impl;
10 10
11 11
import java.util.Date;
12
import java.util.List;
13
import java.util.Map;
12 14
13 15
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
14 16
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -55,5 +57,10 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
55 57
		user.setPassword(new Sha256Hash(user.getPassword(), salt).toHex());
56 58
		user.setSalt(salt);
57 59
		this.save(user); 
58
    }
60
	}
61
62
	@Override
63
	public List<Map<String, Object>> queryOrderList(Long memberId) {
64
		return baseMapper.queryOrderList(memberId);
65
	}
59 66
}

+ 16 - 0
src/main/java/io/renren/modules/sys/controller/SysMenuController.java

@ -55,6 +55,22 @@ public class SysMenuController extends AbstractController {
55 55
		return R.ok().put("meetingMenuList", meetingMenuList).put("noMeetingMenuList", noMeetingMenuList).put("permissions", permissions);
56 56
	}
57 57
58
	@GetMapping("/nomeetingnav")
59
	public R nomeetingnav() {
60
		Long meetingMenuId = 76L;
61
		List<SysMenuEntity> meetingMenuList = sysMenuService.getUserMenuList(getUserId(), meetingMenuId);
62
		Set<String> permissions = shiroService.getUserPermissions(getUserId());
63
		return R.ok().put("menuList", meetingMenuList).put("permissions", permissions);
64
	}
65
66
	@GetMapping("/meetingnav")
67
	public R meetingnav() {
68
		Long meetingMenuId = 76L;
69
		List<SysMenuEntity> noMeetingMenuList = sysMenuService.getUserNotParentIdMenuList(getUserId(), meetingMenuId);
70
		Set<String> permissions = shiroService.getUserPermissions(getUserId());
71
		return R.ok().put("menuList", noMeetingMenuList).put("permissions", permissions);
72
	}
73
58 74
	/**
59 75
	 * 所有菜单列表
60 76
	 */