| | |
| | | import cn.huge.base.common.exception.ServiceException; |
| | | import cn.huge.base.common.utils.DateUtils; |
| | | import cn.huge.base.common.utils.IdUtils; |
| | | import cn.huge.module.client.api.impl.CustClientImpl; |
| | | import cn.huge.module.client.api.impl.UtilsClientImpl; |
| | | import cn.huge.module.cases.dao.mapper.CaseEvaluateMapper; |
| | | import cn.huge.module.cases.domain.po.CaseEvaluate; |
| | | import cn.huge.module.cust.dto.PaUserDTO; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | @Autowired |
| | | private CustClientImpl custClient; |
| | | |
| | | /** |
| | | * 更新对象 |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @param caseEvaluate 实体对象 |
| | | */ |
| | | public void saveCaseEvaluateWechat(CaseEvaluate caseEvaluate,String userId){ |
| | | try{ |
| | | PaUserDTO loginUser = custClient.paclientGetUser(userId); |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(caseEvaluate.getId())){ |
| | | caseEvaluate.setId(utilsClient.getNewTimeId()); |
| | | caseEvaluate.setCreateTime(nowDate); |
| | | } |
| | | caseEvaluate.setEvaluateUserId(loginUser.getId()); |
| | | caseEvaluate.setEvaluateUserName(loginUser.getTrueName()); |
| | | caseEvaluate.setCustId(loginUser.getCustId()); |
| | | caseEvaluate.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(caseEvaluate); |
| | | }catch (Exception e){ |
| | | log.error("[CaseEvaluateService.saveCaseEvaluateWechat]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseEvaluateService.saveCaseEvaluateWechat", e); |
| | | } |
| | | } |
| | | |
| | | } |