Selaa lähdekoodia

fix(VoteOption): wrong sql statement and error setter.

eric 2 vuotta sitten
vanhempi
commit
9f33420e5d

+ 2 - 2
src/main/java/com/finikes/oc/vote/service/VoteServiceImpl.java

@@ -282,7 +282,7 @@ public class VoteServiceImpl implements VoteService {
             }
 
             Choice choice = new Choice();
-            choice.setAssigneeId(passport.getId());
+            choice.setPassportId(passport.getId());
             choice.setOptionId(dto.getOptionId());
             choice.setProxy(false);
             choice.setChooseTime(now);
@@ -345,7 +345,7 @@ public class VoteServiceImpl implements VoteService {
             }
 
             Choice choice = new Choice();
-            choice.setAssigneeId(dto.getPrincipalId());
+            choice.setPassportId(dto.getPrincipalId());
             choice.setOptionId(dto.getOptionId());
             choice.setAssigneeId(passport.getId());
             choice.setProxy(true);

+ 1 - 1
src/main/resources/mapper/ChoiceMapper.xml

@@ -26,7 +26,7 @@
         t_choice choice,
         t_house_relation relation
         WHERE vote_option.vote_id = #{voteId}
-        AND choice.assignee_id = relation.passportId
+        AND choice.passport_id = relation.passportId
         AND certificateNo = #{certificateNo}
         AND state = 1
     </select>