Commit d627f65e by huangZW

111

parent 95e8314c
......@@ -32,6 +32,8 @@ public interface StaffClerkRelationApiService {
void insertOrUpdate(StaffClerkRelationDTO staffClerkRelation);
void delAndInsert(StaffClerkRelationDTO staffClerkRelation);
/**
* 解绑
* @param storeId
......
......@@ -72,4 +72,6 @@ public interface TabHaobanStaffClerkRelationMapper {
TabHaobanStaffClerkRelation getOneBindStoreId(@Param("staffId")String staffId, @Param("storeId")String storeId);
TabHaobanStaffClerkRelation getByClerkId(@Param("clerkId")String clerkId);
int delByPrimaryKey(@Param("staffClerkRelationId")String staffClerkRelationId);
}
\ No newline at end of file
......@@ -202,4 +202,13 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
StaffClerkRelationDTO dto = EntityUtil.changeEntity(StaffClerkRelationDTO.class, tab);
return dto;
}
@Override
public void delAndInsert(StaffClerkRelationDTO staffClerkRelation) {
if(StringUtils.isEmpty(staffClerkRelation.getStaffClerkRelationId())){
staffClerkRelatinService.insert(staffClerkRelation);
}else{
tabHaobanStaffClerkRelationMapper.delByPrimaryKey(staffClerkRelation.getStaffClerkRelationId());
staffClerkRelatinService.insert(staffClerkRelation);
}
}
}
......@@ -310,4 +310,14 @@
where clerk_id = #{clerkId,jdbcType=VARCHAR}
and status_flag=1
</select>
<update id="delByPrimaryKey" >
update tab_haoban_staff_clerk_relation
set
status_flag = 0,
update_time = now()
where staff_clerk_relation_id = #{staffClerkRelationId,jdbcType=VARCHAR}
and status_flag =1
</update>
</mapper>
\ No newline at end of file
......@@ -231,7 +231,7 @@ public class AuditController extends WebBaseController{
staffClerkRelation.setWxEnterpriseId(wxEnterpriseId);
staffClerkRelation.setWxUserId(wxUserId);
staffClerkRelation.setStaffId(auditStaffId);
staffClerkRelationApiService.insertOrUpdate(staffClerkRelation);
staffClerkRelationApiService.delAndInsert(staffClerkRelation);
audit.setAuditStatus(1);
//发送消息
staffDepartmentRelatedApiService.sendClerkBind(clerkId, clerkCode, auditStatus, auditReason);
......
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