1
zj
2025-09-21 db4f7bbb81d14ba590206b9ba2ebcea76f7de9bf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package com.ruoyi.web.controller.product;
 
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.im.comm.Result;
import com.ruoyi.im.service.MedicalInsuranceAccountService;
import com.ruoyi.system.domain.UserPolicy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
import java.util.List;
 
@RestController
@RequestMapping("/MedicalInsuranceAccount")
public class MedicalInsuranceAccountController {
 
    @Autowired
    MedicalInsuranceAccountService medicalInsuranceAccountService;
 
    /**
     * 领取保险金
     */
    @GetMapping("/getInsuranceBenefit")
    public Result getInsuranceBenefit(@RequestParam(value = "account") String account) {
        try {
            return medicalInsuranceAccountService.getInsuranceBenefit(account);
        }catch (Exception e){
            e.printStackTrace();
            return Result.error("购买失败!");
        }
    }
 
    /**
     * 查询领取状态
     */
    @GetMapping("/getReceiveStatus")
    public Result getReceiveStatus(@RequestParam(value = "account") String account) {
        try {
            return medicalInsuranceAccountService.getReceiveStatus(account);
        }catch (Exception e){
            e.printStackTrace();
            return Result.error("购买失败!");
        }
    }
}