Commit d3077aaa by Water Wang

optimize

parent 4feefb8f
...@@ -464,8 +464,10 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -464,8 +464,10 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
practitionerPotential.setIsActive(1); practitionerPotential.setIsActive(1);
if(potentialId != null){ if(potentialId != null){
practitionerPotential.setId(potentialId); practitionerPotential.setId(potentialId);
aclPractitionerPotentialDALService.update(practitionerPotential);
}else{
aclPractitionerPotentialDALService.save(practitionerPotential);
} }
aclPractitionerPotentialDALService.update(practitionerPotential);
potentialId = practitionerPotential.getId(); potentialId = practitionerPotential.getId();
//如果已经分配团队长,则在追踪表中增加记录 //如果已经分配团队长,则在追踪表中增加记录
List<Long> practitionerPotentialIdList = new ArrayList<>(); List<Long> practitionerPotentialIdList = new ArrayList<>();
......
...@@ -16,7 +16,7 @@ public interface AclPractitionerPotentialDALService { ...@@ -16,7 +16,7 @@ public interface AclPractitionerPotentialDALService {
List<AclPractitionerPotential> findByMobileNo(String mobileNo,Integer isActive); List<AclPractitionerPotential> findByMobileNo(String mobileNo,Integer isActive);
/** /**
* 保存 * 更新
* @param practitionerPotential * @param practitionerPotential
* @return * @return
*/ */
...@@ -28,4 +28,11 @@ public interface AclPractitionerPotentialDALService { ...@@ -28,4 +28,11 @@ public interface AclPractitionerPotentialDALService {
* @return * @return
*/ */
List<PractitionerPotentialInfo> findByPractitionerIdAndLasted(Long practitionerId); List<PractitionerPotentialInfo> findByPractitionerIdAndLasted(Long practitionerId);
/**
* 保存
* @param practitionerPotential
* @return
*/
int save(AclPractitionerPotential practitionerPotential);
} }
...@@ -27,4 +27,9 @@ public class AclPractitionerPotentialDALServiceImpl implements AclPractitionerPo ...@@ -27,4 +27,9 @@ public class AclPractitionerPotentialDALServiceImpl implements AclPractitionerPo
public List<PractitionerPotentialInfo> findByPractitionerIdAndLasted(Long practitionerId) { public List<PractitionerPotentialInfo> findByPractitionerIdAndLasted(Long practitionerId) {
return aclPractitionerPotentialMapper.findByPractitionerIdAndLasted(practitionerId) ; return aclPractitionerPotentialMapper.findByPractitionerIdAndLasted(practitionerId) ;
} }
@Override
public int save(AclPractitionerPotential practitionerPotential) {
return aclPractitionerPotentialMapper.insert(practitionerPotential);
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment