Search in sources :

Example 21 with RealNameAuthentication

use of com.itrus.portal.db.RealNameAuthentication in project portal by ixinportal.

the class RealNameAuthenticationSerivceImpl method updateRealName.

// 修改信息
public void updateRealName(RealNameAuthentication realname) throws ServiceNullException, Exception {
    if (realname == null || realname.getId() == null)
        throw new ServiceNullException("配置为空");
    RealNameAuthentication realname1 = getRealNameById(realname.getId());
    if (realname1 == null)
        throw new ServiceNullException("配置不存在");
    sqlSession.update("com.itrus.portal.db.RealNameAuthenticationMapper.updateByPrimaryKeySelective", realname);
}
Also used : ServiceNullException(com.itrus.portal.exception.ServiceNullException) RealNameAuthentication(com.itrus.portal.db.RealNameAuthentication)

Example 22 with RealNameAuthentication

use of com.itrus.portal.db.RealNameAuthentication in project portal by ixinportal.

the class RealNameAuthenticationSerivceImpl method getRealNameAuthenticationByMap.

// 查看信息
public Map<Integer, RealNameAuthentication> getRealNameAuthenticationByMap() {
    List<RealNameAuthentication> list = sqlSession.selectList("com.itrus.portal.db.RealNameAuthenticationMapper.selectByExample");
    if (list == null || list.isEmpty())
        return null;
    Map<Integer, RealNameAuthentication> realNameMap = new HashMap<Integer, RealNameAuthentication>();
    for (RealNameAuthentication realName : list) {
        realNameMap.put(realName.getType(), realName);
    }
    return realNameMap;
}
Also used : HashMap(java.util.HashMap) RealNameAuthentication(com.itrus.portal.db.RealNameAuthentication)

Example 23 with RealNameAuthentication

use of com.itrus.portal.db.RealNameAuthentication in project portal by ixinportal.

the class RealNameAuthenticationSerivceImpl method getRealNameAuthenticationExample.

// 查看信息
public RealNameAuthentication getRealNameAuthenticationExample(RealNameAuthenticationExample example) throws Exception {
    List<RealNameAuthentication> list = sqlSession.selectList("com.itrus.portal.db.RealNameAuthenticationMapper.selectByExample", example);
    if (list == null || list.isEmpty())
        return null;
    RealNameAuthentication realname = list.get(0);
    return realname;
}
Also used : RealNameAuthentication(com.itrus.portal.db.RealNameAuthentication)

Example 24 with RealNameAuthentication

use of com.itrus.portal.db.RealNameAuthentication in project portal by ixinportal.

the class RealNameAuthenticationSerivceImpl method getRealNameAuthenticationByOss.

/**
 * 获取OSS服务配置
 * @return
 * @throws Exception
 */
public RealNameAuthentication getRealNameAuthenticationByOss() throws Exception {
    RealNameAuthenticationExample re = new RealNameAuthenticationExample();
    RealNameAuthenticationExample.Criteria rec = re.createCriteria();
    rec.andTypeEqualTo(4);
    RealNameAuthentication realname = this.getRealNameAuthenticationExample(re);
    return realname;
}
Also used : RealNameAuthentication(com.itrus.portal.db.RealNameAuthentication) RealNameAuthenticationExample(com.itrus.portal.db.RealNameAuthenticationExample)

Aggregations

RealNameAuthentication (com.itrus.portal.db.RealNameAuthentication)24 JSONObject (com.alibaba.fastjson.JSONObject)14 HashMap (java.util.HashMap)14 IOException (java.io.IOException)11 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)9 EvidenceBasicInformation (com.itrus.portal.db.EvidenceBasicInformation)8 EvidenceEnclosure (com.itrus.portal.db.EvidenceEnclosure)8 EvidenceEnclosureExample (com.itrus.portal.db.EvidenceEnclosureExample)8 ApplicationInfo (com.itrus.portal.db.ApplicationInfo)6 RealNameAuthenticationExample (com.itrus.portal.db.RealNameAuthenticationExample)6 ArrayList (java.util.ArrayList)5 Date (java.util.Date)5 Map (java.util.Map)5 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)5 AppService (com.itrus.portal.db.AppService)4 EvidenceSaveService (com.itrus.portal.db.EvidenceSaveService)3 BufferedOutputStream (java.io.BufferedOutputStream)3 List (java.util.List)3 JSONException (org.json.JSONException)3 JsonParseException (com.fasterxml.jackson.core.JsonParseException)2