hejiahui 2 år sedan
förälder
incheckning
77b39edf2c

+ 2 - 0
src/main/java/com/steerinfo/dil/mapper/RmsPersonnelMapper.java

@@ -38,4 +38,6 @@ public interface RmsPersonnelMapper extends IBaseMapper<RmsPersonnel, BigDecimal
 
    //根据用户ssoId查找用户名
     String getPersonnelNameByUserId(String userId);
+
+    int updateByPersonnelId(BigDecimal id);
 }

+ 1 - 3
src/main/java/com/steerinfo/dil/service/impl/RmsPersonnelServiceImpl.java

@@ -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);
     }
 
     /**

+ 4 - 0
src/main/resources/com/steerinfo/dil/mapper/RmsPersonnelMapper.xml

@@ -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>