|
|
@@ -0,0 +1,45 @@
|
|
|
+package com.finikes.oc.vote.controller;
|
|
|
+
|
|
|
+import com.finikes.oc.BaseDTO;
|
|
|
+import com.finikes.oc.BizException;
|
|
|
+import com.finikes.oc.base.dao.PassportDAO;
|
|
|
+import com.finikes.oc.base.dto.PassportHouseInfoResponseDTO;
|
|
|
+import com.finikes.oc.base.dto.RegisterResponseDTO;
|
|
|
+import com.finikes.oc.base.entity.Passport;
|
|
|
+import com.finikes.oc.estate.dao.EstateUnitDAO;
|
|
|
+import com.finikes.oc.estate.dao.HouseDAO;
|
|
|
+import com.finikes.oc.estate.entity.EstateUnit;
|
|
|
+import com.finikes.oc.estate.entity.House;
|
|
|
+import com.finikes.oc.management.dao.HouseRelationDAO;
|
|
|
+import com.finikes.oc.management.entity.HouseRelation;
|
|
|
+import com.finikes.oc.vote.dao.OptionDao;
|
|
|
+import com.finikes.oc.vote.entity.Option;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import javax.servlet.http.HttpSession;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+@RequestMapping("/option")
|
|
|
+@ResponseBody
|
|
|
+@Controller
|
|
|
+public class OptionController {
|
|
|
+ @Autowired
|
|
|
+ private OptionDao optionDao;
|
|
|
+
|
|
|
+ @ResponseBody
|
|
|
+ @RequestMapping(value = "/s", method = RequestMethod.GET)
|
|
|
+ public BaseDTO getPassportAndHouse(@RequestParam("voteId") String voteId) {
|
|
|
+ int _voteId = Integer.parseInt(voteId);
|
|
|
+ List<Integer> voteIds = new ArrayList<>();
|
|
|
+ voteIds.add(_voteId);
|
|
|
+ List<Option> options = optionDao.selectByVoteIds(voteIds);
|
|
|
+
|
|
|
+ return new BaseDTO().setContent(options);
|
|
|
+ }
|
|
|
+}
|