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";
}
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);
}
}
Aggregations