Merge pull request 'feature-zrx' (#33) from feature-zrx into develop
Reviewed-on: #33 Reviewed-by: 筱锋xiao_lfeng <gm@x-lf.cn>
This commit is contained in:
commit
24c45812e8
|
@ -64,6 +64,7 @@ public class ProjectDailyServiceImpl implements ProjectDailyService {
|
|||
Processing.copyProperties(projectDailyAddVO, projectDailyDO);
|
||||
projectDailyDO.setUserId(userId);
|
||||
projectDailyDO.setProjectId(Long.valueOf(projectDailyAddVO.getProjectId()));
|
||||
projectDailyDO.setDailyTime(Processing.convertStringToDate(projectDailyAddVO.getDailyTime()));
|
||||
|
||||
// 向数据库添加数据
|
||||
projectDailyDAO.addProjectDaily(projectDailyDO);
|
||||
|
@ -132,8 +133,15 @@ public class ProjectDailyServiceImpl implements ProjectDailyService {
|
|||
public BaseResponse deleteDaily(Integer dailyId, HttpServletRequest 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, projectDailyMapper.getDailyById(dailyId).getProjectId())) {
|
||||
if (!projectDAO.isPrincipalUser(userId, projectDailyDO.getProjectId())) {
|
||||
return ResultUtil.error(ErrorCode.User_NOT_PROJECT_PRINCIPAL);
|
||||
}
|
||||
|
||||
|
|
|
@ -54,11 +54,9 @@
|
|||
</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
|
||||
where id = #{id}
|
||||
and is_delete = 0
|
||||
where id = #{id} and is_delete = 0
|
||||
</select>
|
||||
|
||||
<delete id="deleteDailyById" parameterType="java.lang.Integer">
|
||||
|
|
Loading…
Reference in New Issue
Block a user