| | |
| | | import com.ruoyi.im.comm.Result; |
| | | import com.ruoyi.im.service.MedicalInsuranceAccountService; |
| | | import com.ruoyi.system.domain.MedicalInsuranceAccount; |
| | | import com.ruoyi.system.domain.UserAccount; |
| | | import com.ruoyi.system.domain.UserPolicy; |
| | | import com.ruoyi.system.domain.dto.UserPolicyDto; |
| | | import com.ruoyi.im.service.UserPolicyService; |
| | | import com.ruoyi.system.service.UserAccountService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | |
| | | @Autowired |
| | | MedicalInsuranceAccountService medicalInsuranceAccountService; |
| | | |
| | | @Autowired |
| | | UserAccountService userAccountService; |
| | | |
| | | /** |
| | | * 保险购买申请 |
| | | */ |
| | |
| | | * 根据用户id查询保单 |
| | | */ |
| | | @GetMapping("/getPolicyById") |
| | | public Result getPolicyById(@RequestParam(value = "id") Integer id) { |
| | | public Result getPolicyById(@RequestParam(value = "account") String account) { |
| | | try { |
| | | List<UserPolicy> list = userPolicyService.list(new LambdaQueryWrapper<UserPolicy>().eq(UserPolicy::getUserId, id)); |
| | | UserAccount userAccount = userAccountService.getOne(new LambdaQueryWrapper<UserAccount>() |
| | | .eq(UserAccount::getAccount,account)); |
| | | List<UserPolicy> list = userPolicyService.list(new LambdaQueryWrapper<UserPolicy>().eq(UserPolicy::getUserId, userAccount.getId())); |
| | | return Result.success(list); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |