huwhois 4 lat temu
rodzic
commit
52d71efe2c

+ 0 - 17
src/main/java/io/renren/modules/app/controller/AppMeetingController.java

@ -2,10 +2,8 @@ package io.renren.modules.app.controller;
2 2
3 3
import io.renren.common.utils.R;
4 4
import io.renren.modules.admin.entity.MeetingEntity;
5
import io.renren.modules.admin.entity.MoneyAccountEntity;
6 5
import io.renren.modules.admin.service.EmployeeService;
7 6
import io.renren.modules.admin.service.MeetingService;
8
import io.renren.modules.admin.service.MoneyAccountService;
9 7
import io.renren.modules.admin.entity.PaperRequireEntity;
10 8
import io.renren.modules.admin.service.PaperRequireService;
11 9
@ -29,9 +27,6 @@ import org.springframework.web.bind.annotation.RestController;
29 27
public class AppMeetingController {
30 28
    @Autowired
31 29
    private MeetingService meetingService;
32
33
    @Autowired
34
    private MoneyAccountService moneyAccountService;
35 30
    @Autowired
36 31
    private PaperRequireService paperRequireService;
37 32
    @Autowired
@ -83,18 +78,6 @@ public class AppMeetingController {
83 78
            .put("onsiteRegDeadline", onsiteRegDeadline).put("paperDealine", paperDealine);
84 79
    }
85 80
86
    /**
87
     * 根据meetingId信息获取对公账号
88
     * @param mid
89
     * @return
90
     */
91
    @GetMapping("/accountinfo/{mid}")
92
    public R infoByMid(@PathVariable("mid") Long mid){
93
		MoneyAccountEntity moneyAccount = moneyAccountService.getOneByMeetingId(mid);
94
        
95
        return R.ok().put("moneyAccount", moneyAccount);
96
    }
97
98 81
     /**
99 82
     * 根据meetingId信息获取投稿要求
100 83
     */

+ 40 - 3
src/main/java/io/renren/modules/app/controller/AppOrderController.java

@ -6,6 +6,7 @@ import java.util.Date;
6 6
import java.util.List;
7 7
import java.util.Map;
8 8

9
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
9 10
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
10 11

11 12
import org.springframework.beans.factory.annotation.Autowired;
@ -25,6 +26,10 @@ import io.renren.modules.admin.service.PaymentService;
25 26
import io.renren.modules.app.annotation.Login;
26 27
import io.renren.modules.app.annotation.LoginUser;
27 28
import io.renren.modules.app.entity.UserEntity;
29
import io.renren.modules.admin.entity.TypesOfFeeEntity;
30
import io.renren.modules.admin.service.TypesOfFeeService;
31
import io.renren.modules.admin.entity.MoneyAccountEntity;
32
import io.renren.modules.admin.service.MoneyAccountService;
28 33

29 34
/**
30 35
 * @author chenshun
@ -38,13 +43,17 @@ public class AppOrderController {
38 43
    private AttendersService attendersService;
39 44
    @Autowired
40 45
    private PaymentService paymentService;
41
    
46
    @Autowired
47
    private TypesOfFeeService typesOfFeeService;
48
    @Autowired
49
    private MoneyAccountService moneyAccountService;
50

42 51
    /**
43 52
     * 订单列表
44 53
     */
45 54
    @Login
46 55
    @GetMapping("/list")
47
    public R orderList(@RequestAttribute("userId") Integer userId){
56
    public R list(@RequestAttribute("userId") Integer userId){
48 57
        Long memberId = Long.valueOf(userId);
49 58

50 59
        List<Map<String, Object>> orderList = paymentService.queryOrderListByMemberId(memberId);        
@ -52,6 +61,29 @@ public class AppOrderController {
52 61
        return R.ok().put("orderList", orderList);
53 62
    }
54 63

64
    /**
65
     * 获取注册类型列表
66
     */
67
    @GetMapping("/feelist/{mid}")
68
    public R feeList(@PathVariable("mid") Long mid){
69
        List<TypesOfFeeEntity> feeList = typesOfFeeService.list(
70
            new QueryWrapper<TypesOfFeeEntity>().eq("meeting_id", mid));
71
            
72
        return R.ok().put("feeList", feeList);
73
    }
74

75
    /**
76
     * 根据meetingId信息获取对公账号
77
     * @param mid
78
     * @return
79
     */
80
    @GetMapping("/accountinfo/{mid}")
81
    public R accountInfoByMid(@PathVariable("mid") Long mid){
82
		MoneyAccountEntity moneyAccount = moneyAccountService.getOneByMeetingId(mid);
83
        
84
        return R.ok().put("moneyAccount", moneyAccount);
85
    }
86

55 87
    /**
56 88
     * 保存
57 89
     */
@ -121,8 +153,13 @@ public class AppOrderController {
121 153
        return R.ok();
122 154
    }
123 155

156
    /**
157
     * 根据订单编号获取订单信息
158
     * @param orderId
159
     * @return
160
     */
124 161
    @GetMapping("/infobyorderid/{orderId}")
125
    public R infoByAttendersId(@PathVariable("orderId") String orderId){
162
    public R infoByOrderId(@PathVariable("orderId") String orderId){
126 163
        Map<String, Object> orderInfo = paymentService.queryOrderInfoByOrderId(orderId);
127 164

128 165
        return R.ok().put("orderInfo", orderInfo);

+ 0 - 40
src/main/java/io/renren/modules/app/controller/SmsTestController.java

@ -1,40 +0,0 @@
1
package io.renren.modules.app.controller;
2
3
import io.renren.common.utils.HttpRequestUtil;
4
import io.renren.modules.app.service.SmsCodeService;
5
import io.renren.common.utils.ConfigConstant;
6
7
import java.net.URLEncoder;
8
import java.util.UUID;
9
10
import org.springframework.beans.factory.annotation.Autowired;
11
import org.springframework.web.bind.annotation.PostMapping;
12
import org.springframework.web.bind.annotation.RequestMapping;
13
import org.springframework.web.bind.annotation.RestController;
14
15
@RestController
16
@RequestMapping("app/smscode")
17
public class SmsTestController {
18
	@Autowired
19
    private SmsCodeService smsCodeService;
20
    
21
    /**
22
	 * 短信发送(验证码通知,会员营销)
23
	 * 接口文档地址:http://www.miaodiyun.com/doc/https_sms.html
24
	 */
25
	@PostMapping("/test")
26
	public String execute() throws Exception{
27
		String uuid = UUID.randomUUID().toString();
28
		String phone = "17611467373";
29
		String code = smsCodeService.getCode(uuid, phone);
30
		StringBuilder sb = new StringBuilder();
31
		sb.append("accountSid").append("=").append(ConfigConstant.ACCOUNT_SID);
32
		sb.append("&to").append("=").append(phone);
33
		sb.append("&param").append("=").append(URLEncoder.encode(code + "," + ConfigConstant.EXPIRE_TIME,"UTF-8"));
34
		sb.append("&templateid").append("=").append("206770");
35
		String body = sb.toString() + HttpRequestUtil.createCommonParam(ConfigConstant.ACCOUNT_SID, ConfigConstant.AUTH_TOKEN);
36
		String result = HttpRequestUtil.post(ConfigConstant.BASE_URL, body);
37
		System.out.println(result);
38
		return result;
39
	}
40
}

+ 0 - 47
src/main/java/io/renren/modules/app/controller/TypesOfFee.java

@ -1,47 +0,0 @@
1
package io.renren.modules.app.controller;
2
3
import java.math.BigDecimal;
4
import java.util.Arrays;
5
import java.util.Map;
6
7
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
8
9
import java.util.Date;
10
import java.util.List;
11
12
import org.springframework.beans.factory.annotation.Autowired;
13
import org.springframework.web.bind.annotation.PathVariable;
14
import org.springframework.web.bind.annotation.RequestMapping;
15
import org.springframework.web.bind.annotation.GetMapping;
16
import org.springframework.web.bind.annotation.RestController;
17
18
import io.renren.modules.admin.entity.TypesOfFeeEntity;
19
import io.renren.modules.admin.service.TypesOfFeeService;
20
import io.renren.common.utils.R;
21
22
23
24
/**
25
 * 费用类型表
26
 *
27
 * @author chenshun
28
 * @email sunlightcs@gmail.com
29
 * @date 2020-02-24 10:38:03
30
 */
31
@RestController
32
@RequestMapping("app/typesoffee")
33
public class TypesOfFee {
34
    @Autowired
35
    private TypesOfFeeService typesOfFeeService;
36
37
    /**
38
     * 列表
39
     */
40
    @GetMapping("/list/{mid}")
41
    public R list(@PathVariable("mid") Long mid){
42
        List<TypesOfFeeEntity> feeList = typesOfFeeService.list(
43
            new QueryWrapper<TypesOfFeeEntity>().eq("meeting_id", mid));
44
            
45
        return R.ok().put("feeList", feeList);
46
    }
47
}