📄 voting.java
字号:
package sunyang.vote.action.vote;
import sunyang.vote.action.rootaction.VoteContextRoot;
import sunyang.vote.domain.Votecontext;
@SuppressWarnings("serial")
public class Voting extends VoteContextRoot {
@Override
public String execute() throws Exception {
Votecontext voteContext;
String vc[] = context;
for (int i = 0; i < vc.length; i++) {
voteContext = new Votecontext();
//设置投票子选项编号
voteContext.setVotecontextId(Integer.parseInt(vc[i]));
//由投票子选项编号查找对应系选项信息
Votecontext votecontext2 = voteContextService.findVCCountByVCId(voteContext);
Integer count = votecontext2.getCount();
String vccontext = votecontext2.getContext();
votecontext2.setContext(vccontext);
//当前投票子选项票数加一
votecontext2.setCount(count + 1);
voteContextService.updateVoteContext(votecontext2);
}
return SUCCESS;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -