@@ -38,4 +38,6 @@ public interface RmsPersonnelMapper extends IBaseMapper<RmsPersonnel, BigDecimal
//根据用户ssoId查找用户名
String getPersonnelNameByUserId(String userId);
+
+ int updateByPersonnelId(BigDecimal id);
}
@@ -157,9 +157,7 @@ public class RmsPersonnelServiceImpl implements IRmsPersonnelService {
*/
@Override
public int deletePersonnel(BigDecimal id) {
- RmsPersonnel rmsPersonnel=rmsPersonnelMapper.selectByPrimaryKey(id);
- rmsPersonnel.setDeleted(new BigDecimal(1));
- return rmsPersonnelMapper.updateByPrimaryKeySelective(rmsPersonnel);
+ return rmsPersonnelMapper.updateByPersonnelId(id);
/**
@@ -728,4 +728,8 @@
WHERE RP.PERSONNEL_SSO_ID =#{userId}
</select>
+ <update id="updateByPersonnelId" parameterType="java.math.BigDecimal">
+ update Rms_Personnel set deleted =1 where personnel_id =#{id}
+ </update>
</mapper>