Search in sources :

Example 6 with PersonalServiceAuthentication

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

the class PersonalServiceAuthenticationController method updateForm.

// 返回修改页面
@RequestMapping(value = "/{id}", params = "form", produces = "text/html")
public String updateForm(@PathVariable("id") Long id, Model uiModel) {
    PersonalServiceAuthentication personalServiceAuthentication = personalServiceAuthenticationService.selectById(id);
    uiModel.addAttribute("personalServiceAuthentication", personalServiceAuthentication);
    AppService appService = appServiceImpl.selectById(personalServiceAuthentication.getAppService());
    uiModel.addAttribute("appService", appService);
    return "personalserviceauthentication/update";
}
Also used : PersonalServiceAuthentication(com.itrus.portal.db.PersonalServiceAuthentication) AppService(com.itrus.portal.db.AppService) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 7 with PersonalServiceAuthentication

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

the class PersonalServiceAuthenticationServiceImpl method updatePersonalServiceAuthentication.

/**
 * 修改实名认证服务
 * @param appServiceAuthentication
 * @param appService
 * @param id
 * @return
 */
public void updatePersonalServiceAuthentication(PersonalServiceAuthentication personalServiceAuthentication, AppService appService, Long id) {
    DefaultTransactionDefinition def = new DefaultTransactionDefinition();
    def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
    TransactionStatus status = transactionManager.getTransaction(def);
    try {
        // 修改实名认证服务配置表
        PersonalServiceAuthentication personalServiceAuthentication0 = selectById(personalServiceAuthentication.getId());
        personalServiceAuthentication.setAppService(personalServiceAuthentication0.getAppService());
        sqlSession.update("com.itrus.portal.db.PersonalServiceAuthenticationMapper.updateByPrimaryKey", personalServiceAuthentication);
        // 修改应用服务表
        AppService appService0 = appServiceImpl.selectById(appService.getId());
        appService.setCreator(appService0.getCreator());
        appService.setType(1L);
        appService.setCreateTime(appService0.getCreateTime());
        appService.setServiceConfigName(appService0.getServiceConfigName());
        appService.setServiceConfigId(appService0.getServiceConfigId());
        appService.setModifyTime(new Date());
        appService.setModifier(id);
        appService.setIsDelete(appService0.getIsDelete());
        sqlSession.update("com.itrus.portal.db.AppServiceMapper.updateByPrimaryKey", appService);
        transactionManager.commit(status);
    } catch (Exception e) {
        // TODO: handle exception
        e.printStackTrace();
    } finally {
        if (!status.isCompleted())
            transactionManager.rollback(status);
    }
}
Also used : PersonalServiceAuthentication(com.itrus.portal.db.PersonalServiceAuthentication) AppService(com.itrus.portal.db.AppService) DefaultTransactionDefinition(org.springframework.transaction.support.DefaultTransactionDefinition) TransactionStatus(org.springframework.transaction.TransactionStatus) Date(java.util.Date)

Aggregations

PersonalServiceAuthentication (com.itrus.portal.db.PersonalServiceAuthentication)7 AppService (com.itrus.portal.db.AppService)5 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)5 AppServiceAuthentication (com.itrus.portal.db.AppServiceAuthentication)2 Date (java.util.Date)2 AppServiceAuthenticationExample (com.itrus.portal.db.AppServiceAuthenticationExample)1 ApplicationInfo (com.itrus.portal.db.ApplicationInfo)1 ApplicationInfoExample (com.itrus.portal.db.ApplicationInfoExample)1 Bankcardelements (com.itrus.portal.db.Bankcardelements)1 FaceMatching (com.itrus.portal.db.FaceMatching)1 FaceMatchingExample (com.itrus.portal.db.FaceMatchingExample)1 PersonalName (com.itrus.portal.db.PersonalName)1 PersonalServiceAuthenticationExample (com.itrus.portal.db.PersonalServiceAuthenticationExample)1 ArrayList (java.util.ArrayList)1 Calendar (java.util.Calendar)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1 TransactionStatus (org.springframework.transaction.TransactionStatus)1 DefaultTransactionDefinition (org.springframework.transaction.support.DefaultTransactionDefinition)1