Package com.iqbon.jcms.domain

Examples of com.iqbon.jcms.domain.User


  String indexid, @RequestParam("lspri")
  int lspri, @RequestParam("topicid")
  String topicid, @RequestParam(value = "pageNum", required = false)
  int pageNum, @RequestParam(value = "type", required = false)
  int type, HttpSession session) {
    User user = getUserFromSession(session);
    if (user == null) {
      return errorMav;
    }
    int number = pushRecordService.updateLspri(indexid, lspri, user.getUserName());
    if (number > 0) {
      return this.topicPage(topicid, pageNum, 0, type);
    }
    return errorMav;
  }
View Full Code Here


  String url, @RequestParam("lspri")
  int lspri, @RequestParam("topicid")
  String topicid, @RequestParam(value = "pageNum", required = false)
  int pageNum, @RequestParam(value = "type", required = false)
  int type, HttpSession session) {
    User user = getUserFromSession(session);
    if (user == null) {
      return errorMav;
    }
    PushRecord pushRecord = new PushRecord();
    pushRecord.setIndexid(indexid);
    pushRecord.setTitle(title);
    pushRecord.setSubTitle(subTitle);
    pushRecord.setImg(img);
    pushRecord.setUrl(url);
    pushRecord.setLspri(lspri);
    pushRecord.setModifyUser(user.getUserName());
    pushRecord.setTopicid(topicid);
    int number = pushRecordService.updatePushRecord(pushRecord);
    if (number > 0) {
      return this.topicPage(topicid, pageNum, 0, type);
    }
View Full Code Here

  public ModelAndView deletePushRecords(@RequestParam("pushRecordSelect")
  String[] indexid, @RequestParam("topicid")
  String topicid, @RequestParam(value = "pageNum", required = false)
  int pageNum, @RequestParam(value = "type", required = false)
  int type, HttpSession session) {
    User user = getUserFromSession(session);
    if (user == null) {
      return errorMav;
    }
    int number = pushRecordService.deletePushRecords(Arrays.asList(indexid));
    if (number > 0) {
View Full Code Here

  public ModelAndView deletePushRecordWithDocs(@RequestParam("pushRecordSelect")
  String[] indexids, @RequestParam("topicid")
  String topicid, @RequestParam(value = "pageNum", required = false)
  int pageNum, @RequestParam(value = "type", required = false)
  int type, HttpSession session) {
    User user = getUserFromSession(session);
    if (user == null) {
      return errorMav;
    }
    int number = 0;
    for (String indexid : indexids) {
      PushRecord pushRecord = pushRecordService.getPushRecordById(indexid);
      if (pushRecord.getType() == PushRecord.PUSH_RECORD_TYPE.doc.ordinal()) {//普通文章的推送记录
        number = docService.deleteDoc(pushRecord.getDocid(), user.getUserName());
      } else if (pushRecord.getType() == PushRecord.PUSH_RECORD_TYPE.emptyDoc.ordinal()) {//空文章
        List<String> deleteIndexid = new ArrayList<String>();
        deleteIndexid.add(indexid);
        number = pushRecordService.deletePushRecords(deleteIndexid);
      } else if (pushRecord.getType() == PushRecord.PUSH_RECORD_TYPE.model.ordinal()) {//模板
        String modelName = pushRecord.getModelName();
        List<String> deleteIndexid = new ArrayList<String>();
        deleteIndexid.add(indexid);
        number = pushRecordService.deletePushRecords(deleteIndexid);
        modelService.deleteModel(modelName, user.getUserName());
      }
    }
    if (number > 0) {
      return this.topicPage(topicid, pageNum, 0, type);
    }
View Full Code Here

  public ModelAndView deleteModels(@RequestParam("modelSelect")
  String[] modelNames, @RequestParam("topicid")
  String topicid, @RequestParam(value = "pageNum", required = false)
  int pageNum, @RequestParam(value = "type", required = false)
  int type, HttpSession session) {
    User user = getUserFromSession(session);
    if (user == null) {
      errorMav.setAnonymousErrorInfo();
      return errorMav;
    }
    int number = modelService.deleteModels(Arrays.asList(modelNames), user.getUserName());
    if (number > 0) {
      return this.topicPage(topicid, pageNum, 0, type);
    }
    return errorMav;
  }
View Full Code Here

   * 从session中获取用户对象
   * @param session
   * @return
   */
  protected User getUserFromSession(HttpSession session) {
    User user = (User) session.getAttribute(KeyConstant.SESSION_KEY_USER);
    return user;
  }
View Full Code Here

*/
public class UserMapper implements RowMapper<User> {

  @Override
  public User mapRow(ResultSet rs, int rowNum) throws SQLException {
    User user = new User();
    user.setNickName(rs.getString("nickname"));
    user.setUserName(rs.getString("user_name"));
    user.setPositionNum(rs.getInt("position_num"));
    user.setEmail(rs.getString("email"));
    user.setTelephone(rs.getString("telephone"));
    user.setMobile(rs.getString("mobile"));
    user.setPositionName(rs.getString("position_num"));
    return user;
  }
View Full Code Here

TOP

Related Classes of com.iqbon.jcms.domain.User

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.