votepartact.java

来自「JAVA做的CMS源码」· Java 代码 · 共 44 行

JAVA
44
字号
package com.jeecms.auxiliary.action.front;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.jeecms.auxiliary.AuxiPartAction;
import com.jeecms.auxiliary.entity.VoteTopic;
import com.jeecms.auxiliary.manager.VoteTopicMng;

@Scope("prototype")
@Controller("auxiliary.votePartAct")
public class VotePartAct extends AuxiPartAction {
	public String voteTopic() {
		if (topicId < 0) {
			bean = voteTopicMng.getCurrentTopic(getWebId());
		} else {
			bean = voteTopicMng.findById(topicId);
		}
		return handleResult("VoteTopic");
	}

	@Autowired
	private VoteTopicMng voteTopicMng;
	private Long topicId;
	private VoteTopic bean;

	public Long getTopicId() {
		return topicId;
	}

	public void setTopicId(Long topicId) {
		this.topicId = topicId;
	}

	public VoteTopic getBean() {
		return bean;
	}

	public void setBean(VoteTopic bean) {
		this.bean = bean;
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?