|  |  |  | 
|---|
|  |  |  | import com.doumee.core.model.PageData; | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.core.utils.DateUtil; | 
|---|
|  |  |  | import com.doumee.core.utils.Utils; | 
|---|
|  |  |  | import com.doumee.dao.business.YwPatrolPointMapper; | 
|---|
|  |  |  | import com.doumee.dao.business.model.Category; | 
|---|
|  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void deleteById(Integer id, LoginUserInfo user) { | 
|---|
|  |  |  | ywPatrolPointMapper.update(new UpdateWrapper<YwPatrolPoint>().lambda().set(YwPatrolPoint::getIsdeleted,Constants.ONE) | 
|---|
|  |  |  | .set(YwPatrolPoint::getEditDate," now() ") | 
|---|
|  |  |  | .set(YwPatrolPoint::getEditDate, DateUtil.getCurrDateTime()) | 
|---|
|  |  |  | .set(YwPatrolPoint::getEditor,user.getId()) | 
|---|
|  |  |  | .eq(YwPatrolPoint::getId,user.getId()) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public YwPatrolPoint getDetail(Integer id) { | 
|---|
|  |  |  | YwPatrolPoint ywPatrolPoint = ywPatrolPointMapper.selectById(id); | 
|---|
|  |  |  | if(Objects.isNull(ywPatrolPoint)){ | 
|---|
|  |  |  | throw new BusinessException(ResponseStatus.DATA_EMPTY); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Multifile multifile = multifileMapper.selectOne(new QueryWrapper<Multifile>().lambda().eq(Multifile::getObjId,id) | 
|---|
|  |  |  | .eq(Multifile::getObjType,Constants.MultiFile.FN_PATROL_POINT_FILE).last(" limit 1")); | 
|---|
|  |  |  | if(Objects.nonNull(multifile)){ | 
|---|
|  |  |  | .eq(Multifile::getObjType,Constants.MultiFile.FN_PATROL_POINT_FILE.getKey()).orderByDesc(Multifile::getId).last(" limit 1")); | 
|---|
|  |  |  | if(Objects.nonNull(multifile) && StringUtils.isNotBlank(multifile.getFileurl())){ | 
|---|
|  |  |  | String path = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() | 
|---|
|  |  |  | +systemDictDataBiz.queryByCode(Constants.FTP,Constants.YW_PATROL).getCode(); | 
|---|
|  |  |  | ywPatrolPoint.setFileFullUrl(path + multifile.getFileurl()); | 
|---|
|  |  |  | ywPatrolPoint.setFileUrl(multifile.getFileurl()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return ywPatrolPoint; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|