Compare commits
No commits in common. "d377efeaadf5d855b1fdf470cb34ee0e2958da38" and "60388ca2da16f7f4f05accc9742f5145506a8325" have entirely different histories.
d377efeaad
...
60388ca2da
|
@ -64,7 +64,6 @@ public class ProjectDailyServiceImpl implements ProjectDailyService {
|
||||||
Processing.copyProperties(projectDailyAddVO, projectDailyDO);
|
Processing.copyProperties(projectDailyAddVO, projectDailyDO);
|
||||||
projectDailyDO.setUserId(userId);
|
projectDailyDO.setUserId(userId);
|
||||||
projectDailyDO.setProjectId(Long.valueOf(projectDailyAddVO.getProjectId()));
|
projectDailyDO.setProjectId(Long.valueOf(projectDailyAddVO.getProjectId()));
|
||||||
projectDailyDO.setDailyTime(Processing.convertStringToDate(projectDailyAddVO.getDailyTime()));
|
|
||||||
|
|
||||||
// 向数据库添加数据
|
// 向数据库添加数据
|
||||||
projectDailyDAO.addProjectDaily(projectDailyDO);
|
projectDailyDAO.addProjectDaily(projectDailyDO);
|
||||||
|
@ -133,15 +132,8 @@ public class ProjectDailyServiceImpl implements ProjectDailyService {
|
||||||
public BaseResponse deleteDaily(Integer dailyId, HttpServletRequest request) {
|
public BaseResponse deleteDaily(Integer dailyId, HttpServletRequest request) {
|
||||||
|
|
||||||
Long userId = Processing.getAuthHeaderToUserId(request);
|
Long userId = Processing.getAuthHeaderToUserId(request);
|
||||||
|
|
||||||
ProjectDailyDO projectDailyDO = projectDailyMapper.getDailyById(dailyId);
|
|
||||||
|
|
||||||
if (projectDailyDO == null) {
|
|
||||||
return ResultUtil.error(ErrorCode.PROJECT_DAILY_NOT_EXIST);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 检查用户是否为项目负责人
|
// 检查用户是否为项目负责人
|
||||||
if (!projectDAO.isPrincipalUser(userId, projectDailyDO.getProjectId())) {
|
if (!projectDAO.isPrincipalUser(userId, projectDailyMapper.getDailyById(dailyId).getProjectId())) {
|
||||||
return ResultUtil.error(ErrorCode.User_NOT_PROJECT_PRINCIPAL);
|
return ResultUtil.error(ErrorCode.User_NOT_PROJECT_PRINCIPAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,9 +54,11 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="getDailyById" parameterType="java.lang.Integer" resultType="com.jsl.oa.model.dodata.ProjectDailyDO">
|
<select id="getDailyById" parameterType="java.lang.Integer"
|
||||||
|
resultType="com.jsl.oa.model.dodata.ProjectDailyDO">
|
||||||
select * from organize_oa.oa_project_daily
|
select * from organize_oa.oa_project_daily
|
||||||
where id = #{id} and is_delete = 0
|
where id = #{id}
|
||||||
|
and is_delete = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<delete id="deleteDailyById" parameterType="java.lang.Integer">
|
<delete id="deleteDailyById" parameterType="java.lang.Integer">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user